标签:pass character lse 部分 dap meta trap des 出错
1.github下载apollo源码 : https://github.com/ctripcorp/apollo.git
2.具体的使用方法详见wiki : https://github.com/ctripcorp/apollo/wiki/Apollo%E5%BC%80%E5%8F%91%E6%8C%87%E5%8D%97
3.本地打包apollo源码:为了避免打包出错,最好是删除test里面的方法,其他的未尝试过, apollo源码里面包含主要的三个部分
eureka: instance: hostname: ${hostname:localhost} preferIpAddress: true status-page-url-path: /info health-check-url-path: /health server: peerEurekaNodesUpdateIntervalMs: 60000 enableSelfPreservation: false client: serviceUrl:#(meta-service地址,和configservice一起部署) defaultZone: http://10.108.135.88:8080/eureka/ healthcheck: enabled: true eurekaServiceUrlPollIntervalSeconds: 60 management: health: status: order: DOWN, OUT_OF_SERVICE, UNKNOWN, UP
spring: application: name: apollo-configservice profiles: active: ${apollo_profile} ctrip: appid: 100003171 server: port: 8080 logging: file: /opt/logs/100003171/apollo-configservice.log
eureka: instance: hostname: ${hostname:localhost} preferIpAddress: true status-page-url-path: /info health-check-url-path: /health client: serviceUrl: defaultZone: http://10.108.135.88:8080/eureka/ healthcheck: enabled: true eurekaServiceUrlPollIntervalSeconds: 60 management: health: status: order: DOWN, OUT_OF_SERVICE, UNKNOWN, UP
spring: application: name: apollo-adminservice profiles: active: ${apollo_profile} ctrip: appid: 100003172 server: port: 8090 logging: file: /opt/logs/100003172/apollo-adminservice.log
dev.meta=http://10.108.135.88:8080 (填写dev环境下的meta-service地址) fat.meta=http://fat-url uat.meta=${uat_meta} lpt.meta=${lpt_meta} pro.meta=${pro_meta}
portal不需要注册eureka信息
@echo off rem apollo config db info set apollo_config_db_url="jdbc:mysql://10.xx.xx.xx:3306/ApolloConfigDB?characterEncoding=utf8" (数据库地址) set apollo_config_db_username="username" set apollo_config_db_password="password" rem apollo portal db info set apollo_portal_db_url="jdbc:mysql://10.xx.xx.xx:3306/ApolloPortalDB?characterEncoding=utf8" set apollo_portal_db_username="username" set apollo_portal_db_password="password" rem meta server url, different environments should have different meta server addresses set dev_meta="http://10.108.135.xx:8080" set fat_meta="http://10.108.135.xx:8080" set uat_meta="http://10.108.135.xx:8080" set pro_meta="http://10.108.135.xx:8080" set META_SERVERS_OPTS=-Ddev_meta=%dev_meta% -Dfat_meta=%fat_meta% -Duat_meta=%uat_meta% -Dpro_meta=%pro_meta% rem =============== Please do not modify the following content =============== rem go to script directory cd "%~dp0" cd .. rem package config-service and admin-service echo "==== starting to build config-service and admin-service ====" call mvn clean package -DskipTests -pl apollo-configservice,apollo-adminservice -am -Dapollo_profile=github -Dspring_datasource_url=%apollo_config_db_url% -Dspring_datasource_username=%apollo_config_db_username% -Dspring_datasource_password=%apollo_config_db_password% echo "==== building config-service and admin-service finished ====" echo "==== starting to build portal ====" call mvn clean package -DskipTests -pl apollo-portal -am -Dapollo_profile=github,auth -Dspring_datasource_url=%apollo_portal_db_url% -Dspring_datasource_username=%apollo_portal_db_username% -Dspring_datasource_password=%apollo_portal_db_password% %META_SERVERS_OPTS% echo "==== building portal finished ====" pause
配置好上述信息后,即可执行脚本,apolloconfig-service和apolloadmin-service每个环境都要部署一套,且需要注意的是ApolloPortalDB只需要在生产环境部署一个即可,而ApolloConfigDB需要在每个环境部署一套,如fat、uat和pro分别部署3套ApolloConfigDB。
以上,后续有时间继续更新
标签:pass character lse 部分 dap meta trap des 出错
原文地址:https://www.cnblogs.com/tingxuelou/p/10286762.html