Apollo Distributed Configuration Center

1 Introduction

Apollo (Apollo) is a research and development department Ctrip framework for distributed configuration center, capable of centralized management applications in different environments, different cluster configuration, the configuration changes can be pushed to real-time application side, and have standardized permissions, process control and other features, applicable to micro-service configuration management scenarios.

- Excerpt from Apollo's official website

1.1. Pain points

  • After modifying the configuration, you need to restart the project
  • A large number of duplicate configuration, not easy to manage

1.2. Why Apollo

Apollo VS Spring Cloud Config

  • Spring Cloud Config depend on GitHub, all configurations are written in the file, and then come into force by submitting GitHub, a different environment with no need to distinguish between files

Apollo VS Ali cloud application configuration management ACM

  • Ali cloud depends on not easy subsequent migration
  • Ali cloud has abandoned the project, is no longer maintained

 

2. Quick Start

2.1. Server configuration

There are many ways to run, as an entry, select the jar package runs here from the official website to download lay directly

https://github.com/ctripcorp/apollo/releases

Before you begin, you first need to build the table. Clone project down, the script is located in $ {YOUR-WORKSPACE} / apollo / scripts / db / migration /

Can also go directly to the github, apolloportaldb.sqlapolloconfigdb.sql

1 source /your_local_path/configdb/V1.0.0__initialization.sql
2 source /your_local_path/portaldb/V1.0.0__initialization.sql

数据库有了,接下来修改配置文件中相应的数据库连接信息

如无意外,至此,adminservice、configservice、portal都起来了

初始账号密码是:apollo/admin

首先,新建一个项目

然后,编辑配置并发布

2.2.  客户端配置

application.properties

修改配置后,实时生效

下一篇继续探索Apollo

未完待续。。。

 

3.  文档

https://github.com/ctripcorp/apollo/wiki/分布式部署指南

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

https://github.com/ctripcorp/apollo/wiki/Apollo使用指南

https://github.com/ctripcorp/apollo/wiki/Java客户端使用指南

https://github.com/ctripcorp/apollo/wiki/Apollo开发指南

 

Guess you like

Origin www.cnblogs.com/cjsblog/p/10946267.html