jenkins
官方镜像:jenkinsci/blueocean
挂载点:/var/jenkins_home
暴露端口:8080
gitlab
官方镜像:gitlab/gitlab-ce:latest
挂载点:配置:/etc/gitlab 日志:/var/log/gitlab 数据:/var/opt/gitlab
暴露端口和gitlab.rb文件中指定的一致
apollo
部署helm3
在 Helm 3 中移除了 tiller,解压将helm拷贝到/usr/local/bin/中即用。
添加一个仓库命名为apollo
helm repo add apollo http://ctripcorp.github.io/apollo/charts
查询仓库中的chart
helm search repo apollo
将chart下载到本地
helm pull apollo/apollo-portal
部署一个release随机生成名称
helm install --generate-name .
部署一个release指定名称
helm install portal .
部署一个release指定命名空间
helm install -n dev service-dev .
根据value生成manifect
helm template
限制保存历史版本数量
--history-max 10
查看release状态
helm status traefik -n traefik-v2
查看release历史版本
helm history traefik -n traefik-v2
回滚历史版本
helm rollback mydb 1
部署apollo
-
apollo/apollo-server,每个环境部署一套
vim values.yaml configdb: name: apollo-configdb
apolloconfigdb host
host: "192.168.149.32" port: 3306 dbName: ApolloConfigDB
apolloconfigdb user name
userName: "apolloconfig"
apolloconfigdb password
password: "123456" service: fullNameOverride: "" port: 8080 targetPort: 8080 type: NodePort #指定类型为nodeport,adminserver也需要指定 config: # override apollo.config-service.url: config service url to be accessed by apollo-client configServiceUrlOverride: "http://192.168.130.207:30007"#指定本环境的地址 # override apollo.admin-service.url: admin service url to be accessed by apollo-portal adminServiceUrlOverride: "http://192.168.130.207:30006"
-
指定端口
templates/service-configservice.yaml
templates/service-adminservice.yaml
- configserver数据库授权
grant all on ApolloConfigDB.* to "apolloconfig"@"%" identified by "123456";
- 导入sql文件
略
- 配置ApolloConfigDB.ServerConfig本环境的configserver地址
1 | eureka.service.url | default | http://192.168.130.207:30001/eureka/
-
apollo/apollo-portal控制端,只需要部署一个
vim values.yaml service: type: NodePort config:
specify the env names, e.g. dev,pro
envs: ""
specify the meta servers, e.g.
dev: http://192.168.130.207:30003 #每个环境的configserver地址 fat: http://192.168.130.207:30005 uat: http://192.168.130.207:30007 pro: http://192.168.130.207:30001 portaldb: name: apollo-portaldb
apolloportaldb host
host: 192.168.130.207 port: 3306 dbName: ApolloPortalDB
apolloportaldb user name
userName: apolloportal
apolloportaldb password
password: 123456
-
导入sql文件
-
授权用户
-
修改ApolloPortalDB.ServerConfig
支持的环境列表
1 | apollo.portal.envs | DEV,FAT,UAT,PRO
各环境configserver的地址
8 | apollo.portal.meta.servers | {"dev":"http://192.168.130.207:30003","fat":"http://192.168.130.207:30005","uat":"http://192.168.130.207:30007","pro":"http://192.168.130.207:30001"}
其他的根据需求自行修改github.com/ctripcorp/a…
最终访问portal地址即可!