1 Star 0 Fork 178

徐宏亮 / bk-ci

forked from 腾讯蓝鲸智云 / bk-ci 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
consul.en.md 1.70 KB
一键复制 编辑 原始数据 按行查看 历史
zanyzhao 提交于 2020-07-23 22:28 . doc: 部署文档国际化 #2161

Consul Deployment

System Requirement

  • Consul 1.0+

Consul Installation & Startup

  • Download Consul

Download the appropriate Consul package for your operating system and unzip it.

  • Install Consul

Upload Consul to the server. After modifying its permission, put it in the /usr/local/sbin/ directory as global application.

# Modify the permission of Consul
chmod 755 ./consul
# Put Consul in /usr/local/sbin/
cp ./consul /usr/local/sbin/
  • Start Consul Agent in Server Mode
consul agent -server -data-dir={consul_directory} -ui -http-port={consul_http_port} -datacenter=bkdevops -domain=bkdevops -bootstrap -client=0.0.0.0
# For example, Consul server IP=CONSOL_SERVER_IP
consul agent -server -data-dir=/data/consul -ui -http-port=8080 -datacenter=dc -domain=ci -bootstrap -client=0.0.0.0
  • Start Consul Agent in Client Mode
consul agent -data-dir={consul_directory} -datacenter=dc -domain=ci -join={server_IP} -bind={local_IP}
# For example, Consul client IP=CONSUL_CLIENT_IP
consul agent -data-dir=/data/consul -datacenter=dc -domain=ci -join=CONSOL_SERVER_IP -bind=CONSUL_CLIENT_IP

If your service is also deployed on Consul server agent, you can connect to the server directly without starting Consul client agent.

  • Parameter Description
Parameter Name Parameter Description
consul_directory Data directory of Consul
consul_http_port Port for Consul’s web UI
server_IP IP address of the server
local_IP IP address of the current machine
  • Verification

Go to this website for verification: http://{service_IP}:8080

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Kotlin
1
https://gitee.com/xu_hong_liang/bk-ci.git
git@gitee.com:xu_hong_liang/bk-ci.git
xu_hong_liang
bk-ci
bk-ci
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891