基于Docker在Win10上部署Apollo配置中心
https://www.jianshu.com/p/a1215056ce75
http://nobodyiam.com/2016/07/09/introduction-to-apollo/
Apollo 配置详细步骤(Windows环境)
http://www.bubuko.com/infodetail-1206147.html
https://hub.docker.com/r/nobodyiam/apollo-quick-start/
简介
Apollo(阿波罗)是携程框架部门研发的配置管理平台,能够集中化管理应用不同环境、不同集群的配置,配置修改后能够实时推送到应用端,并且具备规范的权限、流程治理等特性。
本文所部署的环境,只针对本地测试使用。
准备
下载Apollo项目到本地
Apollo项目在 GitHub 的地址:https://github.com/ctripcorp/apollo
PS G:\CMM> git clone https://github.com/ctripcorp/apollo.git
Cloning into 'apollo'...
remote: Counting objects: 85441, done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 85441 (delta 9), reused 20 (delta 7), pack-reused 85414
Receiving objects: 100% (85441/85441), 38.47 MiB | 655.00 KiB/s, done.
Resolving deltas: 100% (67476/67476), done.
启动Docker容器
进入项目里的 docker-quick-start 目录
PS G:\CMM> cd .\apollo\scripts\docker-quick-start
在此目录下执行命令:docker-compose up,第一次执行会触发下载镜像等操作,需要耐心等待一些时间。
PS G:\CMM\apollo\scripts\docker-quick-start> docker-compose up
Creating network "dockerquickstart_default" with the default driver
Pulling apollo-dbdata (alpine:latest)...
latest: Pulling from library/alpine
2fdfe1cd78c2: Pull complete
Digest: sha256:ccba511b1d6b5f1d83825a94f9d5b05528db456d9cf14a1ea1db892c939cda64
Status: Downloaded newer image for alpine:latest
Pulling apollo-db (mysql:5.7)...
5.7: Pulling from library/mysql
85b1f47fba49: Downloading [=======================> ] 24.35MB/52.6MB
5671503d4f93: Download complete
3b43b3b913cb: Download complete
4fbb803665d0: Download complete
搜索所有apollo-quick-start开头的日志,看到以下日志说明启动成功:
apollo-quick-start | Waiting for config service startup...............
apollo-quick-start | Config service started. You may visit http://localhost:8080 for service status now!
apollo-quick-start | Waiting for admin service startup..............
apollo-quick-start | Admin service started
apollo-quick-start | ==== starting portal ====
apollo-quick-start | Portal logging file is ./portal/apollo-portal.log
apollo-quick-start | Started [331]
apollo-quick-start | Waiting for portal startup................
apollo-quick-start | Portal started. You can visit http://localhost:8070 now!
数据库的端口映射为13306,所以如果希望在宿主机上访问数据库,可以通过localhost:13306,用户名是root,密码留空。
验证安装结果
浏览器访问地址:http://localhost:8070
image.png
输入用户名apollo,密码admin后登录
image.png
使用Apollo配置中心
作者:半个王国
链接:https://www.jianshu.com/p/a1215056ce75
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。