devops-service

by Helm

Helm chartv1.1.13App 1.1.13

devops-service for Choerodon

About this chart

Choerodon DevOps Service

DevOps Service通过自主整合的DevOps工具链,集成相关的开源工具,以此形成了计划、编码、测试、部署、运维以及监控的DevOps闭环。 并且只需通过简单的配置,您便能获得最佳的开发体验。

Add Helm chart repository

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

Install the Chart

$ helm install c7n/devops-service --name devops-service

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

Uninstall the Chart

$ helm delete devops-service

Configuration

ParameterDescriptionDefault
replicaCountReplicaSet数量1
image.repository镜像仓库地址registry.cn-shanghai.aliyuncs.com/c7n/devops-service
image.pullPolicy镜像拉取策略IfNotPresent
preJob.timeout初始化job超时时间1200
preJob.image初始化job镜像registry.cn-shanghai.aliyuncs.com/c7n/dbtool:0.7.1
preJob.preInitDB.enable是否执行初始化数据库jobtrue
preJob.preInitDB.datasource.url初始化数据库地址jdbc:mysql://localhost:3306/devops_service?useUnicode=true&characterEncoding=utf-8&useSSL=false
preJob.preInitDB.datasource.username初始化数据库用户名username
preJob.preInitDB.datasource.password初始化数据库密码password
preJob.preInitDB.datasources.platform.url多数据源初始化数据库地址jdbc:mysql://localhost:3306/devops_service?useUnicode=true&characterEncoding=utf-8&useSSL=false
preJob.preInitDB.datasources.platform.username多数据源初始化数据库用户名username
preJob.preInitDB.datasources.platform.password多数据源初始化数据库密码password
deployment.managementPort管理端口8061
env.open.SPRING_REDIS_HOSTredis地址devops-redis.devops.svc
env.open.EUREKA_CLIENT_SERVICEURL_DEFAULTZONE注册服务地址http://register-server:8000/eureka/
env.open.SPRING_DATASOURCE_URL数据库链接地址jdbc:mysql://mysql.db.svc:3306/devops_service?useUnicode=true&characterEncoding=utf-8&useSSL=false
env.open.SPRING_DATASOURCE_USERNAME数据库用户名root
env.open.SPRING_DATASOURCE_PASSWORD数据库密码choerodon
env.open.SPRING_CLOUD_CONFIG_ENABLED启用配置中心true
env.open.SPRING_CLOUD_CONFIG_URI配置中心地址http://config-server.framework:8010/
env.open.SERVICES_GITLAB_URLgitlab地址http://git.choerodon.com.cn
env.open.SERVICES_GITLAB_SSHURLgitlab ssh地址[email protected]
env.open.SERVICES_GITLAB_PROJECTLIMITgitlab用户可以创建项目限制100
env.open.SERVICES_HELM_URLhelm地址helm.example.com
env.open.SERVICES_HELM_USERNAMEHelm chart 仓库 的用户名
env.open.SERVICES_HELM_PASSWORDHelm chart 仓库 的密码
env.open.SERVICES_SONARQUBE_URLsonarqube地址
env.open.SERVICES_SONARQUBE_USERNAMEsonarqube用户名
env.open.SERVICES_SONARQUBE_PASSWORDsonarqube密码
env.open.SERVICES_GATEWAY_URLgateway地址http://api.example.com
env.open.AGENT_VERSIONagent版本0.5.0.RELEASE
env.open.AGENT_SERVICEURLagent连接devops ws地址ws://devops-service.choerodon.com.cn/agent/
env.open.AGENT_REPOURLagent仓库地址https://openchart.choerodon.com.cn/choerodon/c7n/
env.open.AGENT_CERTMANAGERURLcertmanager仓库地址https://openchart.choerodon.com.cn/choerodon/infra/
env.open.SKYWALKING_OPTSskywalking 代理端配置
metrics.path监控地址/actuator/prometheus
metrics.group监控组spring-boot
log.parser日志spring-boot
service.enabled是否创建servicefalse
service.nameservice名字devops-service
service.typeservice类型ClusterIP
service.portservice端口8060
ingress.enabled是否创建域名false
ingress.host域名地址devops-service.choerodon.com.cn
resources.limits.memory资源请求限制4Gi
resources.requests.memory资源请求需求2Gi

SkyWalking Configuration

ParameterDescription
javaagentSkyWalking 代理jar包(添加则开启 SkyWalking,删除则关闭)
skywalking.agent.application_codeSkyWalking 应用名称
skywalking.agent.sample_n_per_3_secsSkyWalking 采样率配置
skywalking.agent.namespaceSkyWalking 跨进程链路中的header配置
skywalking.agent.authenticationSkyWalking 认证token配置
skywalking.agent.span_limit_per_segmentSkyWalking 每segment中的最大span数配置
skywalking.agent.ignore_suffixSkyWalking 需要忽略的调用配置
skywalking.agent.is_open_debugging_classSkyWalking 是否保存增强后的字节码文件
skywalking.collector.backend_serviceSkyWalking OAP 服务地址和端口配置
$ helm install c7n/devops-service \
    --set env.open.SKYWALKING_OPTS="-javaagent:/agent/skywalking-agent.jar -Dskywalking.agent.application_code=devops-service  -Dskywalking.agent.sample_n_per_3_secs=-1 -Dskywalking.collector.backend_service=oap.skywalking:11800" \
    --name devops-service

验证部署

curl -s $(kubectl get po -n c7n-system -l choerodon.io/release=devops-service -o jsonpath="{.items[0].status.podIP}"):8061/actuator/health | jq -r .status

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

UP

Deploy devops-service with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has devops-service 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 chartdevops-service is pinned at v1.1.13 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