基於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
來源:簡書
簡書著作權歸作者所有,任何形式的轉載都請聯系作者獲得授權並注明出處。