go-register-server

by Helm

Helm chartv0.21.0App 0.21.0

go-register-server for Choerodon

About this chart

Choerodon Asgard Service

Choerodon Asgard Service 是一个任务调度服务,通过saga 实现微服务之间的数据一致性。

Introduction

Add Helm chart repository

helm repo add choerodon https://openchart.choerodon.com.cn/choerodon/c7n
helm repo update

Installing the Chart

$ helm install c7n/go-register-server \
      --set service.enabled=true \
      --set service.name=register-server \
      --set env.open.REGISTER_SERVICE_NAMESPACE="c7n-system" \
      --set rbac.create=true \
      --name register-server \
      --namespace c7n-system

Specify each parameter using the --set key=value[,key=value] argument to helm install.

Uninstalling the Chart

$ helm delete register-server

Configuration

ParameterDescriptionDefault
replicaCountReplicas count1
deployment.managementPort服务管理端口8000
env.open.REGISTER_SERVICE_NAMESPACE注册中心监听的namespace,多个namespace 用空格间隔c7n-system
service.enabled是否创建servicefalse
service.portservice端口8000
service.nameservice名称register-server
service.typeservice类型ClusterIP
metrics.path收集应用的指标数据路径``
metrics.group性能指标应用分组go-register-server
logs.parser日志收集格式docker
ingress.enabled是否创建ingressfalse
ingress.hostingress地址register.example.com
rbac.create是否创建ClusterRole 和serviceAccountNametrue
rbac.serviceAccountNameserviceAccountNamedefault
resources.limitsk8s中容器能使用资源的资源最大值512Mi
resources.requestsk8s中容器使用的最小资源需求256Mi

验证部署

curl $(kubectl get svc register-server -o jsonpath="{.spec.clusterIP}" -n c7n-system):8000/eureka/apps

出现以下类似信息即为成功部署

{
    "name": "go-register-server",
    "instance": [
        {
            "instanceId": "192.168.3.19:go-register-server:8000",
            "hostName": "192.168.3.19",
            "app": "go-register-server",
            "ipAddr": "192.168.3.19",
            "status": "UP",
             ...
             "metadata": {
                "VERSION": "0.18.0"
            },
             ...
        }
    ]
}

Deploy go-register-server with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has go-register-server on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartgo-register-server is pinned at v0.21.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply