Skip to content

Instantly share code, notes, and snippets.

@yangl
Last active November 14, 2016 10:05
Show Gist options
  • Save yangl/780cd96c7d88c3aa5c5a43c046c67b1d to your computer and use it in GitHub Desktop.
Save yangl/780cd96c7d88c3aa5c5a43c046c67b1d to your computer and use it in GitHub Desktop.
apollo配置中心部署说明

1.configservice服务开发环境绑定至公网(由于开发服务器与工作环境不在同一网段): application.yml中的spring结点下添加如下配置(忽略掉不要绑定的网卡)

   spring:
     cloud:
       inetutils:
         ignored-interfaces:
           - lo
           - eth0
           - docker.*

然后再在scripts/startup.sh的JAVA_OPTS中添加 -Dserver.address=要绑定的网卡IP

2.adminservice、configservice、portal、client模块添加plexus.xml配置来干掉cat,不要忘记注掉pom.xml中apollo-buildtools的scope

3.干掉WebSecurityConfig这一行http.httpBasic(),用来自己在portal前面挂nginx添加basic-auth认证

4.如果把portal和configservice、adminservice部署在一起的情况下记着修改

    SERVER_PORT=8383
    JAVA_OPTS最后添加 -Dserver.address=10.25.156.103 -Dserver.port=8383

configservice前面挂slb(健康url:/health) portal前面挂nginx添加basic认证即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment