版本选择
https://github.com/apolloconfig/apollo/releases
部署方式
Quick Start | https://www.apolloconfig.com/#/zh/deployment/quick-start
with Helm Chart | https://www.apolloconfig.com/#/zh/deployment/distributed-deployment-guide?id=_24-kubernetes 部署
输入用户名 apollo,密码 admin 后登录
服务升级
WIP
with Helm Chart
https://github.com/apolloconfig/apollo/blob/master/scripts/sql/profiles/mysql-default/apolloconfigdb.sql
https://github.com/apolloconfig/apollo/blob/master/scripts/sql/profiles/mysql-default/apolloportaldb.sql
$ helm repo add apollo https://charts.apolloconfig.com $ helm search repo apollo
apollo-service
该 Helm Chart 提供如下两个微服务:
- Admin Service
- Config Service
helm install apollo-service-dev \ --set configdb.host=1.2.3.4 \ --set configdb.userName=apollo \ --set configdb.password=apollo \ --set configdb.service.enabled=true \ --set configService.replicaCount=1 \ --set adminService.replicaCount=1 \ -n your-namespace \ apollo/apollo-service # ----------------------------------------------------------------------------- # 修改配置 # 我们使用域名来访问数据库,所以使用如下配置 ... configdb: host: xxx.mysql.rds.aliyuncs.com ... service: enabled: true type: ExternalName ... # 如果使用域名访问数据库,还可以使用如下配置: ... configdb: ... host: mysql-8.application-dependency-test port: 3306 ... service: enabled: false ... # ----------------------------------------------------------------------------- # 执行安装 helm upgrade --install apollo-service ./apollo-service-0.7.0.tgz -f apollo-service-0.7.0.tgz.helm-values.yaml # 安装完成后会提示对应环境的 Meta Server 地址,需要记录下来,apollo-portal 安装时需要用到 Meta service url for current release: echo http://apollo-config-service.application-dependency-test:8080 ... Urls registered to meta service: Config service: http://apollo-config-service.application-dependency-test:8080 Admin service: http://apollo-admin-service.application-dependency-test:8090
apollo-portal
$ helm install apollo-portal \ --set portaldb.host=1.2.3.4 \ --set portaldb.userName=apollo \ --set portaldb.password=apollo \ --set portaldb.service.enabled=true \ --set config.envs="dev\,pro" \ --set config.metaServers.dev=http://apollo-service-dev-apollo-configservice:8080 \ --set config.metaServers.pro=http://apollo-service-pro-apollo-configservice:8080 \ --set replicaCount=1 \ -n your-namespace \ apollo/apollo-portal # ----------------------------------------------------------------------------- # 修改配置 # 我们使用域名来访问数据库,所以使用如下配置 portaldb: host: xxx.mysql.rds.aliyuncs.com dbName: ApolloPortalDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false service: enabled: true type: ExternalName # ----------------------------------------------------------------------------- # 执行安装 helm upgrade --install apollo-portal ./apollo-portal-0.7.0.tgz -f apollo-portal-0.7.0.tgz.helm-values.yaml
我们尝试使用 config.envs=”prod”、config.metaServers.prod=xxx 配置,但 Portal 界面无法登陆。
其日志显示 … Get admin server address from meta server failed. env: PRO, meta server address .. 消息。
恢复 pro 配置,Web 界面能够成功登陆。我们暂未到配置 env 的方法。