分布式配置中心选型

种类、对比参考博客:

https://www.cnblogs.com/xiaoqi/p/configserver-compair.html

https://www.jianshu.com/p/d78fa8412cbf

https://blog.csdn.net/z960339491/article/details/80521882

https://blog.csdn.net/s573626822/article/details/82879083

https://www.jianshu.com/p/0b6ab664d507

http://vernonzheng.com/2015/02/09/%E5%BC%80%E6%BA%90%E5%88%86%E5%B8%83%E5%BC%8F%E9%85%8D%E7%BD%AE%E4%B8%AD%E5%BF%83%E9%80%89%E5%9E%8B/

配置中心架构演变探讨:https://blog.csdn.net/weixin_37186559/article/details/81157915

Apollo地址和参考文档:

集群部署思路:

client通过configService与配置中心交互,portal通过adminService管理配置中心数据,在configService与adminService集群部署的情况下,client与portal 是通过metaservice查询对应的configservice与adminservice节点通讯
那么configService与adminService启动多点(在单机伪集群下启动不同端口),服务名相同,app.id相同,注册到Eureka注册中心应分别表现为同一个服务多个节点
然后portal工程apollo-env.properties文件中配置dev.meta值为configServer多集群,能否支持逗号分隔待查,不支持就要单独lb负载
我们工程实际的client在配置apollo.meta地址时也要配置成集群地址,能否支持逗号分隔待查,不支持就要单独lb负载

参考:https://www.jianshu.com/p/a80212af3646

最有用的:

1.https://github.com/ctripcorp/apollo/wiki/Apollo%E5%BC%80%E5%8F%91%E6%8C%87%E5%8D%97

2.https://github.com/ctripcorp/apollo/wiki/%E9%83%A8%E7%BD%B2&%E5%BC%80%E5%8F%91%E9%81%87%E5%88%B0%E7%9A%84%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98#42-%E6%B7%BB%E5%8A%A0%E8%87%AA%E5%AE%9A%E4%B9%89%E7%9A%84%E7%8E%AF%E5%A2%83

环境设置:https://blog.csdn.net/qq_33320785/article/details/80772810

客户端接入样例工程:https://github.com/ctripcorp/apollo-use-cases

https://github.com/smillbob/apolloDemo

注意:

官方演示客户端接入:需要修改客户端引入的apollo-core工程中的com.ctrip.framework.apollo.core.ConfigConsts类的配置,实际上线工程不要修改!!:

package com.ctrip.framework.apollo.core;

public interface ConfigConsts {
String NAMESPACE_APPLICATION = "TEST1.sunfield";
String CLUSTER_NAME_DEFAULT = "sunfield001";
String CLUSTER_NAMESPACE_SEPARATOR = "+";
String APOLLO_CLUSTER_KEY = "apollo.cluster";
String APOLLO_META_KEY = "apollo.meta";
String CONFIG_FILE_CONTENT_KEY = "content";
String NO_APPID_PLACEHOLDER = "ApolloNoAppIdPlaceHolder";
long NOTIFICATION_ID_PLACEHOLDER = -1;
}

把namespace和cluster改为自己项目在portal页面的配置

在启动客户端时,需要指定环境参数:

-Denv=dev -Dapollo.meta=http://localhost:8080

尤其是-Denv=dev需要设置为自己应用所在环境,默认为dev;-Dapollo.meta是实际连接的apollo-configserver工程地址

3.本地IDE启动:

Apollo开发指南:https://github.com/ctripcorp/apollo/wiki/Apollo%E5%BC%80%E5%8F%91%E6%8C%87%E5%8D%97

Java客户端使用指南:

https://github.com/ctripcorp/apollo/wiki/Java%E5%AE%A2%E6%88%B7%E7%AB%AF%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97

4.服务器部署:

分布式部署指南:https://github.com/ctripcorp/apollo/wiki/%E5%88%86%E5%B8%83%E5%BC%8F%E9%83%A8%E7%BD%B2%E6%8C%87%E5%8D%97

5.架构:

配置中心设计指南:https://github.com/ctripcorp/apollo/wiki/Apollo%E9%85%8D%E7%BD%AE%E4%B8%AD%E5%BF%83%E8%AE%BE%E8%AE%A1

架构官方解析:https://mp.weixin.qq.com/s/-hUaQPzfsl9Lm3IqQW3VDQ

6.其他:

Home(含演示地址):https://github.com/ctripcorp/apollo/wiki

配置中心介绍:

https://github.com/ctripcorp/apollo/wiki/Apollo%E9%85%8D%E7%BD%AE%E4%B8%AD%E5%BF%83%E4%BB%8B%E7%BB%8D

Quickstart:https://github.com/ctripcorp/apollo/wiki/Quick-Start

Quickstart安装包及教程:https://github.com/nobodyiam/apollo-build-scripts

搭建Apollo(修改注册中心和配置集群、客户端工程接入):

源码编译打包:跳过maven测试,改两个插件配置加上skipTest,参考:

https://www.cnblogs.com/lixuwu/p/5941363.html

https://www.cnblogs.com/javabg/p/8026881.html

https://blog.csdn.net/u012149181/article/details/80767327

错误:

[ERROR] OS=Windows and the assembly descriptor contains a *nix-specific root-relative-reference (starting with slash) /

参照:https://stackoverflow.com/questions/32604733/error-os-windows-and-the-assembly-descriptor-contains-a-nix-specific-root-relat

https://blog.csdn.net/wangshuminjava/article/details/82768166

https://www.cnblogs.com/softidea/p/4186090.html

Eureka工程权限验证问题(实际没有用到):

https://www.oschina.net/question/3688227_2275113

客户端例子:https://www.cnblogs.com/toov5/p/9986621.html

https://www.cnblogs.com/FlyAway2013/p/8811385.html

https://www.jianshu.com/p/7d91cb5109a4

修改:主要参照open-platform开源工程对apollo的修改文档

其他参照(实际没有用到):

https://blog.csdn.net/luhong327/article/details/81453001

https://blog.csdn.net/u011943534/article/details/82152133

https://www.iteye.com/topic/1148244#2430708

https://blog.csdn.net/qq_33320785/article/details/80772810

部署:

多点:https://blog.csdn.net/z960339491/article/details/80667559

IDEA执行打包脚本:https://blog.csdn.net/u012443641/article/details/81295999

应用了Apollo的开源Spring Cloud分布式架构例子:https://gitee.com/owenwangwen/open-capacity-platform

Apollo部署例子:https://blog.csdn.net/z960339491/article/details/80667559

防火墙:https://www.cnblogs.com/xxoome/p/6884376.html

用户创建,密码设置,用户组创建:https://www.linuxidc.com/Linux/2017-06/144916.htm

https://www.cnblogs.com/clicli/p/5943788.html

阿里团队介绍自己的Diamond:http://jm.taobao.org/2016/09/28/an-article-about-config-center/

skywalking:

https://gitee.com/OpenSkywalking/sky-walking

http://skywalking.apache.org/

人人代码生成:https://gitee.com/GongZiXiaoBai0419/renren-generator

人人开源网站:https://www.renren.io/

与公司架构密切相关的开源项目参考:

后端架构:open-capacity-platform

https://gitee.com/owenwangwen/open-capacity-platform

各层组件代码自动生成和直接使用:JeeSite

官网:https://jeesite.gitee.io/

4.x:https://gitee.com/thinkgem/jeesite4

1.x:https://gitee.com/thinkgem/jeesite

原文地址:https://www.cnblogs.com/free-wings/p/10314385.html