repo_name
stringclasses
5 values
pr_number
int64
1.52k
15.5k
pr_title
stringlengths
8
143
pr_description
stringlengths
0
10.2k
author
stringlengths
3
18
date_created
timestamp[ns, tz=UTC]
date_merged
timestamp[ns, tz=UTC]
previous_commit
stringlengths
40
40
pr_commit
stringlengths
40
40
query
stringlengths
11
10.2k
filepath
stringlengths
6
220
before_content
stringlengths
0
597M
after_content
stringlengths
0
597M
label
int64
-1
1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/test/resources/application.properties
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring.datasource.url = jdbc:h2:mem:~/apolloportaldb;mode=mysql;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1 spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl spring.jpa.properties.hibernate.show_sql=false spring.h2.console.enabled = true spring.h2.console.settings.web-allow-others=true spring.main.allow-bean-definition-overriding=true
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring.session.store-type=none spring.datasource.url = jdbc:h2:mem:~/apolloportaldb;mode=mysql;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1 spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl spring.jpa.properties.hibernate.show_sql=false spring.h2.console.enabled = true spring.h2.console.settings.web-allow-others=true spring.main.allow-bean-definition-overriding=true
1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/zh/_sidebar.md
- [**首页**](zh/README.md) - 设计文档 - [Apollo配置中心设计](zh/design/apollo-design.md) - [Apollo配置中心介绍](zh/design/apollo-introduction.md) - [Apollo核心概念之“Namespace”](zh/design/apollo-core-concept-namespace.md) - [Apollo源码解析(全)](http://www.iocoder.cn/categories/Apollo/) - 部署文档 - [Quick Start](zh/deployment/quick-start.md) - [Docker方式部署Quick Start](zh/deployment/quick-start-docker.md) - [分布式部署指南](zh/deployment/distributed-deployment-guide.md) - 开发文档 - [Apollo开发指南](zh/development/apollo-development-guide.md) - Code Styles - [Eclipse Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/eclipse-java-google-style.xml) - [Intellij Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/intellij-java-google-style.xml) - [Portal实现用户登录功能](zh/development/portal-how-to-implement-user-login-function.md) - [Portal接入邮件服务](zh/development/portal-how-to-enable-email-service.md) - [Portal启用webhook通知](zh/development/portal-how-to-enable-webhook-notification.md) - 使用文档 - [Apollo使用指南](zh/usage/apollo-user-guide.md) - [Java客户端使用指南](zh/usage/java-sdk-user-guide.md) - [.Net客户端使用指南](zh/usage/dotnet-sdk-user-guide.md) - [Go、Python、NodeJS、PHP等客户端使用指南](zh/usage/third-party-sdks-user-guide.md) - [其它语言客户端接入指南](zh/usage/other-language-client-user-guide.md) - [Apollo开放平台接入指南](zh/usage/apollo-open-api-platform.md) - [Apollo使用场景和示例代码](https://github.com/ctripcorp/apollo-use-cases) - [Apollo实践案例](zh/usage/apollo-user-practices.md) - [Apollo安全相关最佳实践](zh/usage/apollo-user-guide?id=_71-%e5%ae%89%e5%85%a8%e7%9b%b8%e5%85%b3) - FAQ - [常见问题回答](zh/faq/faq.md) - [部署&开发遇到的常见问题](zh/faq/common-issues-in-deployment-and-development-phase.md) - 其它 - [版本历史](https://github.com/ctripcorp/apollo/releases) - [Apollo性能测试报告](zh/misc/apollo-benchmark.md) - 社区 - [团队](zh/community/team.md) - [社区治理](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md) - [贡献指南](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) - [致谢](zh/community/thank-you.md)
- [**首页**](zh/README.md) - 设计文档 - [Apollo配置中心设计](zh/design/apollo-design.md) - [Apollo配置中心介绍](zh/design/apollo-introduction.md) - [Apollo核心概念之“Namespace”](zh/design/apollo-core-concept-namespace.md) - [Apollo源码解析(全)](http://www.iocoder.cn/categories/Apollo/) - 部署文档 - [Quick Start](zh/deployment/quick-start.md) - [Docker方式部署Quick Start](zh/deployment/quick-start-docker.md) - [分布式部署指南](zh/deployment/distributed-deployment-guide.md) - 开发文档 - [Apollo开发指南](zh/development/apollo-development-guide.md) - Code Styles - [Eclipse Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/eclipse-java-google-style.xml) - [Intellij Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/intellij-java-google-style.xml) - [Portal实现用户登录功能](zh/development/portal-how-to-implement-user-login-function.md) - [Portal接入邮件服务](zh/development/portal-how-to-enable-email-service.md) - [Portal 共享 session](zh/development/portal-how-to-enable-session-store.md) - [Portal启用webhook通知](zh/development/portal-how-to-enable-webhook-notification.md) - 使用文档 - [Apollo使用指南](zh/usage/apollo-user-guide.md) - [Java客户端使用指南](zh/usage/java-sdk-user-guide.md) - [.Net客户端使用指南](zh/usage/dotnet-sdk-user-guide.md) - [Go、Python、NodeJS、PHP等客户端使用指南](zh/usage/third-party-sdks-user-guide.md) - [其它语言客户端接入指南](zh/usage/other-language-client-user-guide.md) - [Apollo开放平台接入指南](zh/usage/apollo-open-api-platform.md) - [Apollo使用场景和示例代码](https://github.com/ctripcorp/apollo-use-cases) - [Apollo实践案例](zh/usage/apollo-user-practices.md) - [Apollo安全相关最佳实践](zh/usage/apollo-user-guide?id=_71-%e5%ae%89%e5%85%a8%e7%9b%b8%e5%85%b3) - FAQ - [常见问题回答](zh/faq/faq.md) - [部署&开发遇到的常见问题](zh/faq/common-issues-in-deployment-and-development-phase.md) - 其它 - [版本历史](https://github.com/ctripcorp/apollo/releases) - [Apollo性能测试报告](zh/misc/apollo-benchmark.md) - 社区 - [团队](zh/community/team.md) - [社区治理](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md) - [贡献指南](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) - [致谢](zh/community/thank-you.md)
1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/zh/development/apollo-development-guide.md
本文档介绍了如何在本地使用IDE编译、运行Apollo,从而可以帮助大家了解Apollo的内在运行机制,同时也为自定义开发做好准备。 # &nbsp; # 一、准备工作 ## 1.1 本地运行时环境 Apollo本地开发需要以下组件: 1. Java: 1.8+ 2. MySQL: 5.6.5+ 3. IDE: 没有特殊要求 其中MySQL需要创建Apollo数据库并导入基础数据。 具体步骤请参考[分布式部署指南](zh/deployment/distributed-deployment-guide)中的以下部分: 1. [一、准备工作](zh/deployment/distributed-deployment-guide#一、准备工作) 2. [2.1 创建数据库](zh/deployment/distributed-deployment-guide#_21-创建数据库) ## 1.2 Apollo总体设计 具体请参考[Apollo配置中心设计](zh/design/apollo-design) # 二、本地启动 ## 2.1 Apollo Config Service和Apollo Admin Service 我们在本地开发时,一般会在IDE中同时启动`apollo-configservice`和`apollo-adminservice`。 下面以Intellij Community 2016.2版本为例来说明如何在本地启动`apollo-configservice`和`apollo-adminservice`。 ![ConfigAdminApplication-Overview](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/ConfigAdminApplication-Overview.png) ### 2.1.1 新建运行配置 ![NewConfiguration-Application](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/NewConfiguration-Application.png) ### 2.1.2 Main class配置 `com.ctrip.framework.apollo.assembly.ApolloApplication` > 注:如果希望独立启动`apollo-configservice`和`apollo-adminservice`,可以把Main Class分别换成 > `com.ctrip.framework.apollo.configservice.ConfigServiceApplication`和 > `com.ctrip.framework.apollo.adminservice.AdminServiceApplication` ### 2.1.3 VM options配置 ![ConfigAdminApplication-VM-Options](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/ConfigAdminApplication-VM-Options.png) -Dapollo_profile=github -Dspring.datasource.url=jdbc:mysql://localhost:3306/ApolloConfigDB?characterEncoding=utf8 -Dspring.datasource.username=root -Dspring.datasource.password= >注1:spring.datasource相关配置替换成你自己的数据库连接信息,注意数据库是`ApolloConfigDB` > >注2:程序默认日志输出为/opt/logs/100003171/apollo-assembly.log,如果需要修改日志文件路径,可以增加`logging.file.name`参数,如下: > >-Dlogging.file.name=/your-path/apollo-assembly.log ### 2.1.4 Program arguments配置 `--configservice --adminservice` ### 2.1.5 运行 对新建的运行配置点击Run或Debug皆可。 ![ConfigAdminApplication-Run](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/ConfigAdminApplication-Run.png) 启动完后,打开[http://localhost:8080](http://localhost:8080)可以看到`apollo-configservice`和`apollo-adminservice`都已经启动完成并注册到Eureka。 ![ConfigAdminApplication-Eureka](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/ConfigAdminApplication-Eureka.png) > 注:除了在Eureka确认服务状态外,还可以通过健康检查接口确认服务健康状况: > > apollo-adminservice: [http://localhost:8090/health](http://localhost:8090/health) > apollo-configservice: [http://localhost:8080/health](http://localhost:8080/health) > > 如果服务健康,返回内容中的status.code应当为`UP`: > > { > "status": { > "code": "UP", > ... > }, > ... > } ## 2.2 Apollo-Portal 下面以Intellij Community 2016.2版本为例来说明如何在本地启动`apollo-portal`。 ![PortalApplication-Overview](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/PortalApplication-Overview.png) ### 2.2.1 新建运行配置 ![NewConfiguration-Application](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/NewConfiguration-Application.png) ### 2.2.2 Main class配置 `com.ctrip.framework.apollo.portal.PortalApplication` ### 2.2.3 VM options配置 ![PortalApplication-VM-Options](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/PortalApplication-VM-Options.png) -Dapollo_profile=github,auth -Ddev_meta=http://localhost:8080/ -Dserver.port=8070 -Dspring.datasource.url=jdbc:mysql://localhost:3306/ApolloPortalDB?characterEncoding=utf8 -Dspring.datasource.username=root -Dspring.datasource.password= >注1:这里指定了apollo_profile是`github`和`auth`,其中`github`是Apollo必须的一个profile,用于数据库的配置,`auth`是从0.9.0新增的,用来支持使用apollo提供的Spring Security简单认证,更多信息可以参考[Portal-实现用户登录功能](zh/development/portal-how-to-implement-user-login-function) > >注2:spring.datasource相关配置替换成你自己的数据库连接信息,注意数据库是`ApolloPortalDB `。 > >注3:默认ApolloPortalDB中导入的配置只会展示DEV环境的配置,所以这里配置了dev\_meta属性,如果你希望在本地展示其它环境的配置,需要在这里增加其它环境的meta服务器地址,如fat\_meta。 > >注4:这里指定了server.port=8070是因为`apollo-configservice`启动在8080端口,所以这里配置`apollo-portal`启动在8070端口。 > >注5:程序默认日志输出为/opt/logs/100003173/apollo-portal.log,如果需要修改日志文件路径,可以增加`logging.file.name`参数,如下: > >-Dlogging.file.name=/your-path/apollo-portal.log ### 2.2.4 运行 对新建的运行配置点击Run或Debug皆可。 ![PortalApplication-Run](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/PortalApplication-Run.png) 启动完后,打开[http://localhost:8070](http://localhost:8070)就可以看到Apollo配置中心界面了。 ![PortalApplication-Home](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/PortalApplication-Home.png) >注:如果启用了`auth` profile的话,默认的用户名是apollo,密码是admin ### 2.2.5 Demo应用接入 为了更好的开发和调试,一般我们都会自己创建一个demo项目给自己使用。 可以参考[一、普通应用接入指南](zh/usage/apollo-user-guide#一、普通应用接入指南)创建自己的demo项目。 ## 2.3 Java样例客户端启动 项目中有一个样例客户端的项目:`apollo-demo`,下面以Intellij Community 2016.2版本为例来说明如何在本地启动。 ### 2.3.1 配置项目AppId 在`2.2.5 Demo应用接入`中创建Demo项目时,系统会要求填入一个全局唯一的AppId,我们需要把这个AppId配置到`apollo-demo`项目的app.properties文件中:`apollo-demo/src/main/resources/META-INF/app.properties`。 ![apollo-demo-app-properties](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/apollo-demo-app-properties.png) 如我们自己的demo项目使用的AppId是100004458,那么文件内容就是: app.id=100004458 >注:AppId是应用的唯一身份标识,Apollo客户端使用这个标识来获取应用自己的私有Namespace配置。 > 对于公共Namespace的配置,没有AppId也可以获取到配置,但是就失去了应用覆盖公共Namespace配置的能力。 > 更多配置AppId的方式可以参考[1.2.1 AppId](zh/usage/java-sdk-user-guide#_121-appid) ### 2.3.2 新建运行配置 ![NewConfiguration-Application](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/NewConfiguration-Application.png) ### 2.3.3 Main class配置 `com.ctrip.framework.apollo.demo.api.SimpleApolloConfigDemo` ### 2.3.4 VM options配置 ![apollo-demo-vm-options](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/apollo-demo-vm-options.png) -Dapollo.meta=http://localhost:8080 > 注:这里当前环境的meta server地址为`http://localhost:8080`,也就是`apollo-configservice`的地址。 > 更多配置Apollo Meta Server的方式可以参考[1.2.2 Apollo Meta Server](zh/usage/java-sdk-user-guide#_122-apollo-meta-server) ### 2.3.5 概览 ![apollo-demo-overview](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/apollo-demo-overview.png) ### 2.3.6 运行 对新建的运行配置点击Run或Debug皆可。 ![apollo-demo-run](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/apollo-demo-run.png) 启动完后,忽略前面的调试信息,可以看到如下提示: Apollo Config Demo. Please input key to get the value. Input quit to exit. > 输入你之前在Portal上配置的值,如我们的Demo项目中配置了`timeout`,会看到如下信息: > timeout > [SimpleApolloConfigDemo] Loading key : timeout with value: 100 > 客户端日志级别默认是`DEBUG`,如果需要调整,可以通过修改`apollo-demo/src/main/resources/log4j2.xml`中的level配置 > ```xml > <logger name="com.ctrip.framework.apollo" additivity="false" level="trace"> > <AppenderRef ref="Async" level="DEBUG"/> > </logger> > ``` ## 2.4 .Net样例客户端启动 [apollo.net](https://github.com/ctripcorp/apollo.net)项目中有一个样例客户端的项目:`ApolloDemo`,下面就以VS 2010为例来说明如何在本地启动。 ### 2.4.1 配置项目AppId 在`2.2.5 Demo应用接入`中创建Demo项目时,系统会要求填入一个全局唯一的AppId,我们需要把这个AppId配置到`ApolloDemo`项目的APP.config文件中:`apollo.net\ApolloDemo\App.config`。 ![apollo-demo-app-config](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/apollo-net-app-config.png) 如我们自己的demo项目使用的AppId是100004458,那么文件内容就是: ```xml <add key="AppID" value="100004458"/> ``` >注:AppId是应用的唯一身份标识,Apollo客户端使用这个标识来获取应用自己的私有Namespace配置。 > 对于公共Namespace的配置,没有AppId也可以获取到配置,但是就失去了应用覆盖公共Namespace配置的能力。 ### 2.4.2 配置服务地址 Apollo客户端针对不同的环境会从不同的服务器获取配置,所以我们需要在app.config或web.config配置服务器地址(Apollo.{ENV}.Meta)。假设DEV环境的配置服务(apollo-configservice)地址是11.22.33.44,那么我们就做如下配置: ![apollo-net-server-url-config](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/apollo-net-server-url-config.png) ### 2.4.3 运行 运行`ApolloConfigDemo.cs`即可。 启动完后,忽略前面的调试信息,可以看到如下提示: Apollo Config Demo. Please input key to get the value. Input quit to exit. > 输入你之前在Portal上配置的值,如我们的Demo项目中配置了`timeout`,会看到如下信息: > timeout > Loading key: timeout with value: 100 >注:Apollo .Net客户端开源版目前默认会把日志直接输出到Console,大家可以自己实现Logging相关功能。 > > 详见[https://github.com/ctripcorp/apollo.net/tree/master/Apollo/Logging/Spi](https://github.com/ctripcorp/apollo.net/tree/master/Apollo/Logging/Spi) # 三、开发 ## 模块依赖图 ![模块依赖图](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/module-dependency.png) ## 3.1 Portal 实现用户登录功能 请参考[Portal 实现用户登录功能](zh/development/portal-how-to-implement-user-login-function) ## 3.2 Portal 接入邮件服务 请参考[Portal 接入邮件服务](zh/development/portal-how-to-enable-email-service)
本文档介绍了如何在本地使用IDE编译、运行Apollo,从而可以帮助大家了解Apollo的内在运行机制,同时也为自定义开发做好准备。 # &nbsp; # 一、准备工作 ## 1.1 本地运行时环境 Apollo本地开发需要以下组件: 1. Java: 1.8+ 2. MySQL: 5.6.5+ 3. IDE: 没有特殊要求 其中MySQL需要创建Apollo数据库并导入基础数据。 具体步骤请参考[分布式部署指南](zh/deployment/distributed-deployment-guide)中的以下部分: 1. [一、准备工作](zh/deployment/distributed-deployment-guide#一、准备工作) 2. [2.1 创建数据库](zh/deployment/distributed-deployment-guide#_21-创建数据库) ## 1.2 Apollo总体设计 具体请参考[Apollo配置中心设计](zh/design/apollo-design) # 二、本地启动 ## 2.1 Apollo Config Service和Apollo Admin Service 我们在本地开发时,一般会在IDE中同时启动`apollo-configservice`和`apollo-adminservice`。 下面以Intellij Community 2016.2版本为例来说明如何在本地启动`apollo-configservice`和`apollo-adminservice`。 ![ConfigAdminApplication-Overview](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/ConfigAdminApplication-Overview.png) ### 2.1.1 新建运行配置 ![NewConfiguration-Application](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/NewConfiguration-Application.png) ### 2.1.2 Main class配置 `com.ctrip.framework.apollo.assembly.ApolloApplication` > 注:如果希望独立启动`apollo-configservice`和`apollo-adminservice`,可以把Main Class分别换成 > `com.ctrip.framework.apollo.configservice.ConfigServiceApplication`和 > `com.ctrip.framework.apollo.adminservice.AdminServiceApplication` ### 2.1.3 VM options配置 ![ConfigAdminApplication-VM-Options](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/ConfigAdminApplication-VM-Options.png) -Dapollo_profile=github -Dspring.datasource.url=jdbc:mysql://localhost:3306/ApolloConfigDB?characterEncoding=utf8 -Dspring.datasource.username=root -Dspring.datasource.password= >注1:spring.datasource相关配置替换成你自己的数据库连接信息,注意数据库是`ApolloConfigDB` > >注2:程序默认日志输出为/opt/logs/100003171/apollo-assembly.log,如果需要修改日志文件路径,可以增加`logging.file.name`参数,如下: > >-Dlogging.file.name=/your-path/apollo-assembly.log ### 2.1.4 Program arguments配置 `--configservice --adminservice` ### 2.1.5 运行 对新建的运行配置点击Run或Debug皆可。 ![ConfigAdminApplication-Run](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/ConfigAdminApplication-Run.png) 启动完后,打开[http://localhost:8080](http://localhost:8080)可以看到`apollo-configservice`和`apollo-adminservice`都已经启动完成并注册到Eureka。 ![ConfigAdminApplication-Eureka](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/ConfigAdminApplication-Eureka.png) > 注:除了在Eureka确认服务状态外,还可以通过健康检查接口确认服务健康状况: > > apollo-adminservice: [http://localhost:8090/health](http://localhost:8090/health) > apollo-configservice: [http://localhost:8080/health](http://localhost:8080/health) > > 如果服务健康,返回内容中的status.code应当为`UP`: > > { > "status": { > "code": "UP", > ... > }, > ... > } ## 2.2 Apollo-Portal 下面以Intellij Community 2016.2版本为例来说明如何在本地启动`apollo-portal`。 ![PortalApplication-Overview](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/PortalApplication-Overview.png) ### 2.2.1 新建运行配置 ![NewConfiguration-Application](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/NewConfiguration-Application.png) ### 2.2.2 Main class配置 `com.ctrip.framework.apollo.portal.PortalApplication` ### 2.2.3 VM options配置 ![PortalApplication-VM-Options](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/PortalApplication-VM-Options.png) -Dapollo_profile=github,auth -Ddev_meta=http://localhost:8080/ -Dserver.port=8070 -Dspring.datasource.url=jdbc:mysql://localhost:3306/ApolloPortalDB?characterEncoding=utf8 -Dspring.datasource.username=root -Dspring.datasource.password= >注1:这里指定了apollo_profile是`github`和`auth`,其中`github`是Apollo必须的一个profile,用于数据库的配置,`auth`是从0.9.0新增的,用来支持使用apollo提供的Spring Security简单认证,更多信息可以参考[Portal-实现用户登录功能](zh/development/portal-how-to-implement-user-login-function) > >注2:spring.datasource相关配置替换成你自己的数据库连接信息,注意数据库是`ApolloPortalDB `。 > >注3:默认ApolloPortalDB中导入的配置只会展示DEV环境的配置,所以这里配置了dev\_meta属性,如果你希望在本地展示其它环境的配置,需要在这里增加其它环境的meta服务器地址,如fat\_meta。 > >注4:这里指定了server.port=8070是因为`apollo-configservice`启动在8080端口,所以这里配置`apollo-portal`启动在8070端口。 > >注5:程序默认日志输出为/opt/logs/100003173/apollo-portal.log,如果需要修改日志文件路径,可以增加`logging.file.name`参数,如下: > >-Dlogging.file.name=/your-path/apollo-portal.log ### 2.2.4 运行 对新建的运行配置点击Run或Debug皆可。 ![PortalApplication-Run](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/PortalApplication-Run.png) 启动完后,打开[http://localhost:8070](http://localhost:8070)就可以看到Apollo配置中心界面了。 ![PortalApplication-Home](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/PortalApplication-Home.png) >注:如果启用了`auth` profile的话,默认的用户名是apollo,密码是admin ### 2.2.5 Demo应用接入 为了更好的开发和调试,一般我们都会自己创建一个demo项目给自己使用。 可以参考[一、普通应用接入指南](zh/usage/apollo-user-guide#一、普通应用接入指南)创建自己的demo项目。 ## 2.3 Java样例客户端启动 项目中有一个样例客户端的项目:`apollo-demo`,下面以Intellij Community 2016.2版本为例来说明如何在本地启动。 ### 2.3.1 配置项目AppId 在`2.2.5 Demo应用接入`中创建Demo项目时,系统会要求填入一个全局唯一的AppId,我们需要把这个AppId配置到`apollo-demo`项目的app.properties文件中:`apollo-demo/src/main/resources/META-INF/app.properties`。 ![apollo-demo-app-properties](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/apollo-demo-app-properties.png) 如我们自己的demo项目使用的AppId是100004458,那么文件内容就是: app.id=100004458 >注:AppId是应用的唯一身份标识,Apollo客户端使用这个标识来获取应用自己的私有Namespace配置。 > 对于公共Namespace的配置,没有AppId也可以获取到配置,但是就失去了应用覆盖公共Namespace配置的能力。 > 更多配置AppId的方式可以参考[1.2.1 AppId](zh/usage/java-sdk-user-guide#_121-appid) ### 2.3.2 新建运行配置 ![NewConfiguration-Application](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/NewConfiguration-Application.png) ### 2.3.3 Main class配置 `com.ctrip.framework.apollo.demo.api.SimpleApolloConfigDemo` ### 2.3.4 VM options配置 ![apollo-demo-vm-options](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/apollo-demo-vm-options.png) -Dapollo.meta=http://localhost:8080 > 注:这里当前环境的meta server地址为`http://localhost:8080`,也就是`apollo-configservice`的地址。 > 更多配置Apollo Meta Server的方式可以参考[1.2.2 Apollo Meta Server](zh/usage/java-sdk-user-guide#_122-apollo-meta-server) ### 2.3.5 概览 ![apollo-demo-overview](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/apollo-demo-overview.png) ### 2.3.6 运行 对新建的运行配置点击Run或Debug皆可。 ![apollo-demo-run](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/apollo-demo-run.png) 启动完后,忽略前面的调试信息,可以看到如下提示: Apollo Config Demo. Please input key to get the value. Input quit to exit. > 输入你之前在Portal上配置的值,如我们的Demo项目中配置了`timeout`,会看到如下信息: > timeout > [SimpleApolloConfigDemo] Loading key : timeout with value: 100 > 客户端日志级别默认是`DEBUG`,如果需要调整,可以通过修改`apollo-demo/src/main/resources/log4j2.xml`中的level配置 > ```xml > <logger name="com.ctrip.framework.apollo" additivity="false" level="trace"> > <AppenderRef ref="Async" level="DEBUG"/> > </logger> > ``` ## 2.4 .Net样例客户端启动 [apollo.net](https://github.com/ctripcorp/apollo.net)项目中有一个样例客户端的项目:`ApolloDemo`,下面就以VS 2010为例来说明如何在本地启动。 ### 2.4.1 配置项目AppId 在`2.2.5 Demo应用接入`中创建Demo项目时,系统会要求填入一个全局唯一的AppId,我们需要把这个AppId配置到`ApolloDemo`项目的APP.config文件中:`apollo.net\ApolloDemo\App.config`。 ![apollo-demo-app-config](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/apollo-net-app-config.png) 如我们自己的demo项目使用的AppId是100004458,那么文件内容就是: ```xml <add key="AppID" value="100004458"/> ``` >注:AppId是应用的唯一身份标识,Apollo客户端使用这个标识来获取应用自己的私有Namespace配置。 > 对于公共Namespace的配置,没有AppId也可以获取到配置,但是就失去了应用覆盖公共Namespace配置的能力。 ### 2.4.2 配置服务地址 Apollo客户端针对不同的环境会从不同的服务器获取配置,所以我们需要在app.config或web.config配置服务器地址(Apollo.{ENV}.Meta)。假设DEV环境的配置服务(apollo-configservice)地址是11.22.33.44,那么我们就做如下配置: ![apollo-net-server-url-config](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/apollo-net-server-url-config.png) ### 2.4.3 运行 运行`ApolloConfigDemo.cs`即可。 启动完后,忽略前面的调试信息,可以看到如下提示: Apollo Config Demo. Please input key to get the value. Input quit to exit. > 输入你之前在Portal上配置的值,如我们的Demo项目中配置了`timeout`,会看到如下信息: > timeout > Loading key: timeout with value: 100 >注:Apollo .Net客户端开源版目前默认会把日志直接输出到Console,大家可以自己实现Logging相关功能。 > > 详见[https://github.com/ctripcorp/apollo.net/tree/master/Apollo/Logging/Spi](https://github.com/ctripcorp/apollo.net/tree/master/Apollo/Logging/Spi) # 三、开发 ## 模块依赖图 ![模块依赖图](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/module-dependency.png) ## 3.1 Portal 实现用户登录功能 请参考[Portal 实现用户登录功能](zh/development/portal-how-to-implement-user-login-function) ## 3.2 Portal 接入邮件服务 请参考[Portal 接入邮件服务](zh/development/portal-how-to-enable-email-service) ## 3.3 Portal 集群部署时共享 session 请参考[Portal 共享 session](zh/development/portal-how-to-enable-session-store)
1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/zh/usage/apollo-user-guide.md
# &nbsp; # 名词解释 * 普通应用 * 普通应用指的是独立运行的程序,如 * Web应用程序 * 带有main函数的程序 * 公共组件 * 公共组件指的是发布的类库、客户端程序,不会自己独立运行,如 * Java的jar包 * .Net的dll文件 # 一、普通应用接入指南 ## 1.1 创建项目 要使用Apollo,第一步需要创建项目。 1. 打开apollo-portal主页 2. 点击“创建项目” ![create-app-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-app-entry.png) 3. 输入项目信息 * 部门:选择应用所在的部门 * 应用AppId:用来标识应用身份的唯一id,格式为string,需要和客户端app.properties中配置的app.id对应 * 应用名称:应用名,仅用于界面展示 * 应用负责人:选择的人默认会成为该项目的管理员,具备项目权限管理、集群创建、Namespace创建等权限 ![create-app](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-app.png) 4. 点击提交 创建成功后,会自动跳转到项目首页 ![app-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/app-created.png) ## 1.2 项目权限分配 ### 1.2.1 项目管理员权限 项目管理员拥有以下权限: 1. 可以管理项目的权限分配 2. 可以创建集群 3. 可以创建Namespace 创建项目时填写的应用负责人默认会成为项目的管理员之一,如果还需要其他人也成为项目管理员,可以按照下面步骤操作: 1. 点击页面左侧的“管理项目” * ![app-permission-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/app-permission-entry.png) 2. 搜索需要添加的成员并点击添加 * ![app-permission-search-user](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/app-permission-search-user.png) * ![app-permission-user-added](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/app-permission-user-added.png) ### 1.2.2 配置编辑、发布权限 配置权限分为编辑和发布: * 编辑权限允许用户在Apollo界面上创建、修改、删除配置 * 配置修改后只在Apollo界面上变化,不会影响到应用实际使用的配置 * 发布权限允许用户在Apollo界面上发布、回滚配置 * 配置只有在发布、回滚动作后才会被应用实际使用到 * Apollo在用户操作发布、回滚动作后实时通知到应用,并使最新配置生效 项目创建完,默认没有分配配置的编辑和发布权限,需要项目管理员进行授权。 1. 点击application这个namespace的授权按钮 * ![namespace-permission-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-permission-entry.png) 2. 分配修改权限 * ![namespace-permission-edit](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-permission-edit.png) 3. 分配发布权限 * ![namespace-publish-permission](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-publish-permission.png) ## 1.3 添加配置项 编辑配置需要拥有这个Namespace的编辑权限,如果发现没有新增配置按钮,可以找项目管理员授权。 ### 1.3.1 通过表格模式添加配置 1. 点击新增配置 * ![create-item-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-item-entry.png) 2. 输入配置项 * ![create-item-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-item-detail.png) 3. 点击提交 * ![item-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/item-created.png) ### 1.3.2 通过文本模式编辑 Apollo除了支持表格模式,逐个添加、修改配置外,还提供文本模式批量添加、修改。 这个对于从已有的properties文件迁移尤其有用。 1. 切换到文本编辑模式 ![text-mode-config-overview](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/text-mode-config-overview.png) 2. 点击右侧的修改配置按钮 ![text-mode-config-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/text-mode-config-entry.png) 3. 输入配置项,并点击提交修改 ![text-mode-config-submit](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/text-mode-config-submit.png) ## 1.4 发布配置 配置只有在发布后才会真的被应用使用到,所以在编辑完配置后,需要发布配置。 发布配置需要拥有这个Namespace的发布权限,如果发现没有发布按钮,可以找项目管理员授权。 1. 点击“发布按钮” ![publish-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/hermes-portal-publish-entry.png) 2. 填写发布相关信息,点击发布 ![publish-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/hermes-portal-publish-detail.png) ## 1.5 应用读取配置 配置发布成功后,应用就可以通过Apollo客户端读取到配置了。 Apollo目前提供Java客户端,具体信息请点击[Java客户端使用文档](zh/usage/java-sdk-user-guide): 如果应用使用了其它语言,也可以通过直接访问Http接口获取配置,具体可以参考[其它语言客户端接入指南](zh/usage/other-language-client-user-guide) ## 1.6 回滚已发布配置 如果发现已发布的配置有问题,可以通过点击『回滚』按钮来将客户端读取到的配置回滚到上一个发布版本。 这里的回滚机制类似于发布系统,发布系统中的回滚操作是将部署到机器上的安装包回滚到上一个部署的版本,但代码仓库中的代码是不会回滚的,从而开发可以在修复代码后重新发布。 Apollo中的回滚也是类似的机制,点击回滚后是将发布到客户端的配置回滚到上一个已发布版本,也就是说客户端读取到的配置会恢复到上一个版本,但页面上编辑状态的配置是不会回滚的,从而开发可以在修复配置后重新发布。 # 二、公共组件接入指南 ## 2.1 公共组件和普通应用的区别 公共组件是指那些发布给其它应用使用的客户端代码,比如CAT客户端、Hermes Producer客户端等。 虽然这类组件是由其他团队开发、维护,但是运行时是在业务实际应用内的,所以本质上可以认为是应用的一部分。 通常情况下,这类组件所用到的配置由原始开发团队维护,不过由于实际应用的运行时、环境各不一样,所以我们也允许应用在实际使用时能够覆盖公共组件的部分配置。 ## 2.2 公共组件接入步骤 公共组件的接入步骤,和普通应用几乎一致,唯一的区别是公共组件需要创建自己唯一的Namespace。 所以,首先执行普通应用接入文档中的以下几个步骤,然后再按照本章节后面的步骤操作。 1. [创建项目](#_11-%E5%88%9B%E5%BB%BA%E9%A1%B9%E7%9B%AE) 2. [项目管理员权限](#_121-%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86%E5%91%98%E6%9D%83%E9%99%90) ### 2.2.1 创建Namespace 创建Namespace需要项目管理员权限,如果发现没有添加Namespace按钮,可以找项目管理员授权。 1. 点击页面左侧的添加Namespace * ![create-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace.png) 2. 点击“创建新的Namespace” * ![create-namespace-select-type](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace-select-type.png) 3. 输入公共组件的Namespace名称,需要注意的是Namespace名称全局唯一 * Apollo会默认把部门代号添加在最前面 * ![create-namespace-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace-detail.png) 4. 点击提交后,页面会自动跳转到关联Namespace页面 * 首先,选中所有需要有这个Namespace的环境和集群,一般建议全选 * 其次,选中刚刚创建的namespace * 最后,点击提交 * ![link-namespace-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/link-namespace-detail.png) 5. 关联成功后,页面会自动跳转到Namespace权限管理页面 1. 分配修改权限 * ![namespace-permission-edit](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-permission-edit.png) 2. 分配发布权限 * ![namespace-publish-permission](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-publish-permission.png) 6. 点击“返回”回到项目页面 ### 2.2.2 添加配置项 编辑配置需要拥有这个Namespace的编辑权限,如果发现没有新增配置按钮,可以找项目管理员授权。 #### 2.2.2.1 通过表格模式添加配置 1. 点击新增配置 ![public-namespace-edit-item-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-edit-item-entry.png) 2. 输入配置项 ![public-namespace-edit-item](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-edit-item.png) 3. 点击提交 ![public-namespace-item-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-item-created.png) #### 2.2.2.2 通过文本模式编辑 这部分和普通应用一致,具体步骤请参见[1.3.2 通过文本模式编辑](#_132-%E9%80%9A%E8%BF%87%E6%96%87%E6%9C%AC%E6%A8%A1%E5%BC%8F%E7%BC%96%E8%BE%91)。 ### 2.2.3 发布配置 配置只有在发布后才会真的被应用使用到,所以在编辑完配置后,需要发布配置。 发布配置需要拥有这个Namespace的发布权限,如果发现没有发布按钮,可以找项目管理员授权。 1. 点击“发布按钮” ![public-namespace-publish-items-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-publish-items-entry.png) 2. 填写发布相关信息,点击发布 ![public-namespace-publish-items](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-publish-items.png) ### 2.2.4 应用读取配置 配置发布成功后,应用就可以通过Apollo客户端读取到配置了。 Apollo目前提供Java客户端,具体信息请点击[Java客户端使用文档](zh/usage/java-sdk-user-guide): 如果应用使用了其它语言,也可以通过直接访问Http接口获取配置,具体可以参考[其它语言客户端接入指南](zh/usage/other-language-client-user-guide) 对于公共组件的配置读取,可以参考上述文档中的“获取公共Namespace的配置”部分。 ## 2.3 应用覆盖公用组件配置步骤 前面提到,通常情况下,公共组件所用到的配置由原始开发团队维护,不过由于实际应用的运行时、环境各不一样,所以我们也允许应用在实际使用时能够覆盖公共组件的部分配置。 这里就讲一下应用如何覆盖公用组件的配置,简单起见,假设apollo-portal应用使用了hermes producer客户端,并且希望调整hermes的批量发送大小。 ### 2.3.1 关联公共组件Namespace 1. 进入使用公共组件的应用项目首页,点击左侧的添加Namespace按钮 * 所以,在这个例子中,我们需要进入apollo-portal的首页。 * (添加Namespace需要项目管理员权限,如果发现没有添加Namespace按钮,可以找项目管理员授权) * ![link-public-namespace-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/link-public-namespace-entry.png) 2. 找到hermes producer的namespace,并选择需要关联到哪些环境和集群 ![link-public-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/link-public-namespace.png) 3. 关联成功后,页面会自动跳转到Namespace权限管理页面 1. 分配修改权限 ![namespace-permission-edit](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-permission-edit.png) 2. 分配发布权限 ![namespace-publish-permission](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-publish-permission.png) 4. 点击“返回”回到项目页面 ### 2.3.2 覆盖公用组件配置 1. 点击新增配置 ![override-public-namespace-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-entry.png) 2. 输入要覆盖的配置项 ![override-public-namespace-item](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-item.png) 3. 点击提交 ![override-public-namespace-item-done](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-item-done.png) ### 2.3.3 发布配置 配置只有在发布后才会真的被应用使用到,所以在编辑完配置后,需要发布配置。 发布配置需要拥有这个Namespace的发布权限,如果发现没有发布按钮,可以找项目管理员授权。 1. 点击“发布按钮” ![override-public-namespace-item-publish-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-item-publish-entry.png) 2. 填写发布相关信息,点击发布 ![override-public-namespace-item-publish](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-item-publish.png) 3. 配置发布成功后,hermes producer客户端在apollo-portal应用里面运行时读取到的sender.batchSize的值就是1000。 # 三、集群独立配置说明 在有些特殊情况下,应用有需求对不同的集群做不同的配置,比如部署在A机房的应用连接的es服务器地址和部署在B机房的应用连接的es服务器地址不一样。 在这种情况下,可以通过在Apollo创建不同的集群来解决。 ## 3.1 创建集群 创建集群需要项目管理员权限,如果发现没有添加集群按钮,可以找项目管理员授权。 1. 点击页面左侧的“添加集群”按钮 * ![create-cluster](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-cluster.png) 2. 输入集群名称,选择环境并提交 * ![create-cluster-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-cluster-detail.png) 3. 切换到对应的集群,修改配置并发布即可 * ![config-in-cluster-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/cluster-created.png) 4. 通过上述配置,部署在SHAJQ机房的应用就会读到SHAJQ集群下的配置 5. 如果应用还在其它机房部署了应用,那么在上述的配置下,会读到default集群下的配置。 # 四、多个AppId使用同一份配置 在一些情况下,尽管应用本身不是公共组件,但还是需要在多个AppId之间共用同一份配置,比如同一个产品的不同项目:XX-Web, XX-Service, XX-Job等。 这种情况下如果希望实现多个AppId使用同一份配置的话,基本概念和公共组件的配置是一致的。 具体来说,就是在其中一个AppId下创建一个namespace,写入公共的配置信息,然后在各个项目中读取该namespace的配置即可。 如果某个AppId需要覆盖公共的配置信息,那么在该AppId下关联公共的namespace并写入需要覆盖的配置即可。 具体步骤可以参考[公共组件接入指南](#%e4%ba%8c%e3%80%81%e5%85%ac%e5%85%b1%e7%bb%84%e4%bb%b6%e6%8e%a5%e5%85%a5%e6%8c%87%e5%8d%97)。 # 五、灰度发布使用指南 通过灰度发布功能,可以实现: 1. 对于一些对程序有比较大影响的配置,可以先在一个或者多个实例生效,观察一段时间没问题后再全量发布配置。 2. 对于一些需要调优的配置参数,可以通过灰度发布功能来实现A/B测试。可以在不同的机器上应用不同的配置,不断调整、测评一段时间后找出较优的配置再全量发布配置。 下面将结合一个实际例子来描述如何使用灰度发布功能。 ## 5.1 场景介绍 100004458(apollo-demo)项目有两个客户端: 1. 10.32.21.19 2. 10.32.21.22 ![initial-instance-list](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/initial-instance-list.png) **灰度目标:** * 当前有一个配置timeout=2000,我们希望对10.32.21.22灰度发布timeout=3000,对10.32.21.19仍然是timeout=2000。 ![initial-config](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/initial-config.png) ## 5.2 创建灰度 首先点击application namespace右上角的`创建灰度`按钮。 ![create-gray-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/create-gray-release.png) 点击确定后,灰度版本就创建成功了,页面会自动切换到`灰度版本`Tab。 ![initial-gray-release-tab](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/initial-gray-release-tab.png) ## 5.3 灰度配置 点击`主版本的配置`中,timeout配置最右侧的`对此配置灰度`按钮 ![initial-gray-release-tab](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/edit-gray-release-config.png) 在弹出框中填入要灰度的值:3000,点击提交。 ![submit-gray-release-config](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/submit-gray-release-config.png) ![gray-release-config-submitted](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-config-submitted.png) ## 5.4 配置灰度规则 切换到`灰度规则`Tab,点击`新增规则`按钮 ![new-gray-release-rule](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/new-gray-release-rule.png) 在弹出框中`灰度的IP`下拉框会默认展示当前使用配置的机器列表,选择我们要灰度的IP,点击完成。 ![select-gray-release-ip](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/select-gray-release-ip.png) ![gray-release-ip-selected](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-ip-selected.png) ![gray-release-rule-saved](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-rule-saved.png) 如果下拉框中没找到需要的IP,说明机器还没从Apollo取过配置,可以点击手动输入IP来输入,输入完后点击添加按钮 ![manual-input-gray-release-ip](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/manual-input-gray-release-ip.png) ![manual-input-gray-release-ip-2](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/manual-input-gray-release-ip-2.png) >注:对于公共Namespace的灰度规则,需要先指定要灰度的appId,然后再选择IP。 ## 5.5 灰度发布 配置规则已经生效,不过灰度配置还没有发布。切换到`配置`Tab。 再次检查灰度的配置部分,如果没有问题,点击`灰度发布`。 ![prepare-to-do-gray-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/prepare-to-do-gray-release.png) 在弹出框中可以看到主版本的值是2000,灰度版本即将发布的值是3000。填入其它信息后,点击发布。 ![gray-release-confirm-dialog](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-confirm-dialog.png) 发布后,切换到`灰度实例列表`Tab,就能看到10.32.21.22已经使用了灰度发布的值。 ![gray-release-instance-list](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-instance-list.png) 切换到`主版本`的`实例列表`,会看到主版本配置只有10.32.21.19在使用了。 ![master-branch-instance-list](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/master-branch-instance-list.png) 后面可以继续配置的修改或规则的更改。配置的修改需要点击灰度发布后才会生效,规则的修改在规则点击完成后就会实时生效。 ## 5.6 全量发布 如果灰度的配置测试下来比较理想,符合预期,那么就可以操作`全量发布`。 全量发布的效果是: 1. 灰度版本的配置会合并回主版本,在这个例子中,就是主版本的timeout会被更新成3000 2. 主版本的配置会自动进行一次发布 3. 在全量发布页面,可以选择是否保留当前灰度版本,默认为不保留。 ![prepare-to-full-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/prepare-to-full-release.png) ![full-release-confirm-dialog](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/full-release-confirm-dialog.png) ![full-release-confirm-dialog-2](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/full-release-confirm-dialog-2.png) 我选择了不保留灰度版本,所以发布完的效果就是主版本的配置更新、灰度版本删除。点击主版本的实例列表,可以看到10.32.21.22和10.32.21.19都使用了主版本最新的配置。 ![master-branch-instance-list-after-full-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/master-branch-instance-list-after-full-release.png) ## 5.7 放弃灰度 如果灰度版本不理想或者不需要了,可以点击`放弃灰度`。 ![abandon-gray-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/abandon-gray-release.png) ## 5.8 发布历史 点击主版本的`发布历史`按钮,可以看到当前namespace的主版本以及灰度版本的发布历史。 ![view-release-history](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/view-release-history.png) ![view-release-history-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/view-release-history-detail.png) # 六、其它功能配置 ## 6.1 配置查看权限 从1.1.0版本开始,apollo-portal增加了查看权限的支持,可以支持配置某个环境只允许项目成员查看私有Namespace的配置。 这里的项目成员是指: 1. 项目的管理员 2. 具备该私有Namespace在该环境下的修改或发布权限 配置方式很简单,用超级管理员账号登录后,进入`管理员工具 - 系统参数`页面新增或修改`configView.memberOnly.envs`配置项即可。 ![configView.memberOnly.envs](https://user-images.githubusercontent.com/837658/46456519-c155e100-c7e1-11e8-969b-8f332379fa29.png) ## 6.2 配置访问密钥 Apollo从1.6.0版本开始增加访问密钥机制,从而只有经过身份验证的客户端才能访问敏感配置。如果应用开启了访问密钥,客户端需要配置密钥,否则无法获取配置。 1. 项目管理员打开管理密钥页面 ![管理密钥入口](https://user-images.githubusercontent.com/837658/94990081-f4d3cd80-05ab-11eb-9470-fed5ec6de92e.png) 2. 为项目的每个环境生成访问密钥,注意默认是禁用的,建议在客户端都配置完成后再开启 ![密钥配置页面](https://user-images.githubusercontent.com/837658/94990150-788dba00-05ac-11eb-9a12-727fdb872e42.png) 3. 客户端侧[配置访问密钥](zh/usage/java-sdk-user-guide#_1244-配置访问密钥) # 七、最佳实践 ## 7.1 安全相关 配置中心作为基础服务,存储着公司非常重要的配置信息,所以安全因素需要大家重点关注,下面列举了一些注意事项供大家参考,也欢迎大家分享自己的实践案例。 ### 7.1.1 认证 建议接入公司统一的身份认证系统,如 SSO、LDAP 等,接入方式可以参考[Portal 实现用户登录功能](zh/development/portal-how-to-implement-user-login-function) > 如果使用Apollo提供的Spring Security简单认证,务必记得要修改超级管理员apollo的密码 ### 7.1.2 授权 Apollo 支持细粒度的权限控制,请务必根据实际情况做好权限控制: 1. [项目管理员权限](#_121-项目管理员权限) * Apollo 默认允许所有登录用户创建项目,如果只允许部分用户创建项目,可以开启[创建项目权限控制](zh/deployment/distributed-deployment-guide?id=_3110-rolecreate-applicationenabled-是否开启创建项目权限控制) 2. [配置编辑、发布权限](#_122-配置编辑、发布权限) * 配置编辑、发布权限支持按环境配置,比如开发环境开发人员可以自行完成配置编辑和发布的过程,但是生产环境发布权限交由测试或运维人员 * 生产环境建议同时开启[发布审核](zh/deployment/distributed-deployment-guide?id=_322-namespacelockswitch-一次发布只能有一个人修改开关,用于发布审核),从而控制一次配置发布只能由一个人修改,另一个人发布,确保配置修改得到充分检查 3. [配置查看权限](#_61-配置查看权限) * 可以指定某个环境只允许项目成员查看私有Namespace的配置,从而避免敏感配置泄露,如生产环境 ### 7.1.3 系统访问 除了用户权限,在系统访问上也需要加以考虑: 1. `apollo-configservice`和`apollo-adminservice`是基于内网可信网络设计的,所以出于安全考虑,禁止`apollo-configservice`和`apollo-adminservice`直接暴露在公网 2. 对敏感配置可以考虑开启[访问秘钥](#_62-%e9%85%8d%e7%bd%ae%e8%ae%bf%e9%97%ae%e5%af%86%e9%92%a5),从而只有经过身份验证的客户端才能访问敏感配置 3. 1.7.1及以上版本可以考虑为`apollo-adminservice`开启[访问控制](zh/deployment/distributed-deployment-guide?id=_326-admin-serviceaccesscontrolenabled-配置apollo-adminservice是否开启访问控制),从而只有[受控的](zh/deployment/distributed-deployment-guide?id=_3112-admin-serviceaccesstokens-设置apollo-portal访问各环境apollo-adminservice所需的access-token)`apollo-portal`才能访问对应接口,增强安全性
# &nbsp; # 名词解释 * 普通应用 * 普通应用指的是独立运行的程序,如 * Web应用程序 * 带有main函数的程序 * 公共组件 * 公共组件指的是发布的类库、客户端程序,不会自己独立运行,如 * Java的jar包 * .Net的dll文件 # 一、普通应用接入指南 ## 1.1 创建项目 要使用Apollo,第一步需要创建项目。 1. 打开apollo-portal主页 2. 点击“创建项目” ![create-app-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-app-entry.png) 3. 输入项目信息 * 部门:选择应用所在的部门 * 应用AppId:用来标识应用身份的唯一id,格式为string,需要和客户端app.properties中配置的app.id对应 * 应用名称:应用名,仅用于界面展示 * 应用负责人:选择的人默认会成为该项目的管理员,具备项目权限管理、集群创建、Namespace创建等权限 ![create-app](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-app.png) 4. 点击提交 创建成功后,会自动跳转到项目首页 ![app-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/app-created.png) ## 1.2 项目权限分配 ### 1.2.1 项目管理员权限 项目管理员拥有以下权限: 1. 可以管理项目的权限分配 2. 可以创建集群 3. 可以创建Namespace 创建项目时填写的应用负责人默认会成为项目的管理员之一,如果还需要其他人也成为项目管理员,可以按照下面步骤操作: 1. 点击页面左侧的“管理项目” * ![app-permission-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/app-permission-entry.png) 2. 搜索需要添加的成员并点击添加 * ![app-permission-search-user](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/app-permission-search-user.png) * ![app-permission-user-added](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/app-permission-user-added.png) ### 1.2.2 配置编辑、发布权限 配置权限分为编辑和发布: * 编辑权限允许用户在Apollo界面上创建、修改、删除配置 * 配置修改后只在Apollo界面上变化,不会影响到应用实际使用的配置 * 发布权限允许用户在Apollo界面上发布、回滚配置 * 配置只有在发布、回滚动作后才会被应用实际使用到 * Apollo在用户操作发布、回滚动作后实时通知到应用,并使最新配置生效 项目创建完,默认没有分配配置的编辑和发布权限,需要项目管理员进行授权。 1. 点击application这个namespace的授权按钮 * ![namespace-permission-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-permission-entry.png) 2. 分配修改权限 * ![namespace-permission-edit](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-permission-edit.png) 3. 分配发布权限 * ![namespace-publish-permission](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-publish-permission.png) ## 1.3 添加配置项 编辑配置需要拥有这个Namespace的编辑权限,如果发现没有新增配置按钮,可以找项目管理员授权。 ### 1.3.1 通过表格模式添加配置 1. 点击新增配置 * ![create-item-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-item-entry.png) 2. 输入配置项 * ![create-item-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-item-detail.png) 3. 点击提交 * ![item-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/item-created.png) ### 1.3.2 通过文本模式编辑 Apollo除了支持表格模式,逐个添加、修改配置外,还提供文本模式批量添加、修改。 这个对于从已有的properties文件迁移尤其有用。 1. 切换到文本编辑模式 ![text-mode-config-overview](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/text-mode-config-overview.png) 2. 点击右侧的修改配置按钮 ![text-mode-config-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/text-mode-config-entry.png) 3. 输入配置项,并点击提交修改 ![text-mode-config-submit](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/text-mode-config-submit.png) ## 1.4 发布配置 配置只有在发布后才会真的被应用使用到,所以在编辑完配置后,需要发布配置。 发布配置需要拥有这个Namespace的发布权限,如果发现没有发布按钮,可以找项目管理员授权。 1. 点击“发布按钮” ![publish-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/hermes-portal-publish-entry.png) 2. 填写发布相关信息,点击发布 ![publish-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/hermes-portal-publish-detail.png) ## 1.5 应用读取配置 配置发布成功后,应用就可以通过Apollo客户端读取到配置了。 Apollo目前提供Java客户端,具体信息请点击[Java客户端使用文档](zh/usage/java-sdk-user-guide): 如果应用使用了其它语言,也可以通过直接访问Http接口获取配置,具体可以参考[其它语言客户端接入指南](zh/usage/other-language-client-user-guide) ## 1.6 回滚已发布配置 如果发现已发布的配置有问题,可以通过点击『回滚』按钮来将客户端读取到的配置回滚到上一个发布版本。 这里的回滚机制类似于发布系统,发布系统中的回滚操作是将部署到机器上的安装包回滚到上一个部署的版本,但代码仓库中的代码是不会回滚的,从而开发可以在修复代码后重新发布。 Apollo中的回滚也是类似的机制,点击回滚后是将发布到客户端的配置回滚到上一个已发布版本,也就是说客户端读取到的配置会恢复到上一个版本,但页面上编辑状态的配置是不会回滚的,从而开发可以在修复配置后重新发布。 # 二、公共组件接入指南 ## 2.1 公共组件和普通应用的区别 公共组件是指那些发布给其它应用使用的客户端代码,比如CAT客户端、Hermes Producer客户端等。 虽然这类组件是由其他团队开发、维护,但是运行时是在业务实际应用内的,所以本质上可以认为是应用的一部分。 通常情况下,这类组件所用到的配置由原始开发团队维护,不过由于实际应用的运行时、环境各不一样,所以我们也允许应用在实际使用时能够覆盖公共组件的部分配置。 ## 2.2 公共组件接入步骤 公共组件的接入步骤,和普通应用几乎一致,唯一的区别是公共组件需要创建自己唯一的Namespace。 所以,首先执行普通应用接入文档中的以下几个步骤,然后再按照本章节后面的步骤操作。 1. [创建项目](#_11-%E5%88%9B%E5%BB%BA%E9%A1%B9%E7%9B%AE) 2. [项目管理员权限](#_121-%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86%E5%91%98%E6%9D%83%E9%99%90) ### 2.2.1 创建Namespace 创建Namespace需要项目管理员权限,如果发现没有添加Namespace按钮,可以找项目管理员授权。 1. 点击页面左侧的添加Namespace * ![create-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace.png) 2. 点击“创建新的Namespace” * ![create-namespace-select-type](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace-select-type.png) 3. 输入公共组件的Namespace名称,需要注意的是Namespace名称全局唯一 * Apollo会默认把部门代号添加在最前面 * ![create-namespace-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace-detail.png) 4. 点击提交后,页面会自动跳转到关联Namespace页面 * 首先,选中所有需要有这个Namespace的环境和集群,一般建议全选 * 其次,选中刚刚创建的namespace * 最后,点击提交 * ![link-namespace-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/link-namespace-detail.png) 5. 关联成功后,页面会自动跳转到Namespace权限管理页面 1. 分配修改权限 * ![namespace-permission-edit](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-permission-edit.png) 2. 分配发布权限 * ![namespace-publish-permission](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-publish-permission.png) 6. 点击“返回”回到项目页面 ### 2.2.2 添加配置项 编辑配置需要拥有这个Namespace的编辑权限,如果发现没有新增配置按钮,可以找项目管理员授权。 #### 2.2.2.1 通过表格模式添加配置 1. 点击新增配置 ![public-namespace-edit-item-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-edit-item-entry.png) 2. 输入配置项 ![public-namespace-edit-item](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-edit-item.png) 3. 点击提交 ![public-namespace-item-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-item-created.png) #### 2.2.2.2 通过文本模式编辑 这部分和普通应用一致,具体步骤请参见[1.3.2 通过文本模式编辑](#_132-%E9%80%9A%E8%BF%87%E6%96%87%E6%9C%AC%E6%A8%A1%E5%BC%8F%E7%BC%96%E8%BE%91)。 ### 2.2.3 发布配置 配置只有在发布后才会真的被应用使用到,所以在编辑完配置后,需要发布配置。 发布配置需要拥有这个Namespace的发布权限,如果发现没有发布按钮,可以找项目管理员授权。 1. 点击“发布按钮” ![public-namespace-publish-items-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-publish-items-entry.png) 2. 填写发布相关信息,点击发布 ![public-namespace-publish-items](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-publish-items.png) ### 2.2.4 应用读取配置 配置发布成功后,应用就可以通过Apollo客户端读取到配置了。 Apollo目前提供Java客户端,具体信息请点击[Java客户端使用文档](zh/usage/java-sdk-user-guide): 如果应用使用了其它语言,也可以通过直接访问Http接口获取配置,具体可以参考[其它语言客户端接入指南](zh/usage/other-language-client-user-guide) 对于公共组件的配置读取,可以参考上述文档中的“获取公共Namespace的配置”部分。 ## 2.3 应用覆盖公用组件配置步骤 前面提到,通常情况下,公共组件所用到的配置由原始开发团队维护,不过由于实际应用的运行时、环境各不一样,所以我们也允许应用在实际使用时能够覆盖公共组件的部分配置。 这里就讲一下应用如何覆盖公用组件的配置,简单起见,假设apollo-portal应用使用了hermes producer客户端,并且希望调整hermes的批量发送大小。 ### 2.3.1 关联公共组件Namespace 1. 进入使用公共组件的应用项目首页,点击左侧的添加Namespace按钮 * 所以,在这个例子中,我们需要进入apollo-portal的首页。 * (添加Namespace需要项目管理员权限,如果发现没有添加Namespace按钮,可以找项目管理员授权) * ![link-public-namespace-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/link-public-namespace-entry.png) 2. 找到hermes producer的namespace,并选择需要关联到哪些环境和集群 ![link-public-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/link-public-namespace.png) 3. 关联成功后,页面会自动跳转到Namespace权限管理页面 1. 分配修改权限 ![namespace-permission-edit](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-permission-edit.png) 2. 分配发布权限 ![namespace-publish-permission](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-publish-permission.png) 4. 点击“返回”回到项目页面 ### 2.3.2 覆盖公用组件配置 1. 点击新增配置 ![override-public-namespace-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-entry.png) 2. 输入要覆盖的配置项 ![override-public-namespace-item](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-item.png) 3. 点击提交 ![override-public-namespace-item-done](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-item-done.png) ### 2.3.3 发布配置 配置只有在发布后才会真的被应用使用到,所以在编辑完配置后,需要发布配置。 发布配置需要拥有这个Namespace的发布权限,如果发现没有发布按钮,可以找项目管理员授权。 1. 点击“发布按钮” ![override-public-namespace-item-publish-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-item-publish-entry.png) 2. 填写发布相关信息,点击发布 ![override-public-namespace-item-publish](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-item-publish.png) 3. 配置发布成功后,hermes producer客户端在apollo-portal应用里面运行时读取到的sender.batchSize的值就是1000。 # 三、集群独立配置说明 在有些特殊情况下,应用有需求对不同的集群做不同的配置,比如部署在A机房的应用连接的es服务器地址和部署在B机房的应用连接的es服务器地址不一样。 在这种情况下,可以通过在Apollo创建不同的集群来解决。 ## 3.1 创建集群 创建集群需要项目管理员权限,如果发现没有添加集群按钮,可以找项目管理员授权。 1. 点击页面左侧的“添加集群”按钮 * ![create-cluster](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-cluster.png) 2. 输入集群名称,选择环境并提交 * ![create-cluster-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-cluster-detail.png) 3. 切换到对应的集群,修改配置并发布即可 * ![config-in-cluster-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/cluster-created.png) 4. 通过上述配置,部署在SHAJQ机房的应用就会读到SHAJQ集群下的配置 5. 如果应用还在其它机房部署了应用,那么在上述的配置下,会读到default集群下的配置。 # 四、多个AppId使用同一份配置 在一些情况下,尽管应用本身不是公共组件,但还是需要在多个AppId之间共用同一份配置,比如同一个产品的不同项目:XX-Web, XX-Service, XX-Job等。 这种情况下如果希望实现多个AppId使用同一份配置的话,基本概念和公共组件的配置是一致的。 具体来说,就是在其中一个AppId下创建一个namespace,写入公共的配置信息,然后在各个项目中读取该namespace的配置即可。 如果某个AppId需要覆盖公共的配置信息,那么在该AppId下关联公共的namespace并写入需要覆盖的配置即可。 具体步骤可以参考[公共组件接入指南](#%e4%ba%8c%e3%80%81%e5%85%ac%e5%85%b1%e7%bb%84%e4%bb%b6%e6%8e%a5%e5%85%a5%e6%8c%87%e5%8d%97)。 # 五、灰度发布使用指南 通过灰度发布功能,可以实现: 1. 对于一些对程序有比较大影响的配置,可以先在一个或者多个实例生效,观察一段时间没问题后再全量发布配置。 2. 对于一些需要调优的配置参数,可以通过灰度发布功能来实现A/B测试。可以在不同的机器上应用不同的配置,不断调整、测评一段时间后找出较优的配置再全量发布配置。 下面将结合一个实际例子来描述如何使用灰度发布功能。 ## 5.1 场景介绍 100004458(apollo-demo)项目有两个客户端: 1. 10.32.21.19 2. 10.32.21.22 ![initial-instance-list](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/initial-instance-list.png) **灰度目标:** * 当前有一个配置timeout=2000,我们希望对10.32.21.22灰度发布timeout=3000,对10.32.21.19仍然是timeout=2000。 ![initial-config](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/initial-config.png) ## 5.2 创建灰度 首先点击application namespace右上角的`创建灰度`按钮。 ![create-gray-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/create-gray-release.png) 点击确定后,灰度版本就创建成功了,页面会自动切换到`灰度版本`Tab。 ![initial-gray-release-tab](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/initial-gray-release-tab.png) ## 5.3 灰度配置 点击`主版本的配置`中,timeout配置最右侧的`对此配置灰度`按钮 ![initial-gray-release-tab](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/edit-gray-release-config.png) 在弹出框中填入要灰度的值:3000,点击提交。 ![submit-gray-release-config](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/submit-gray-release-config.png) ![gray-release-config-submitted](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-config-submitted.png) ## 5.4 配置灰度规则 切换到`灰度规则`Tab,点击`新增规则`按钮 ![new-gray-release-rule](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/new-gray-release-rule.png) 在弹出框中`灰度的IP`下拉框会默认展示当前使用配置的机器列表,选择我们要灰度的IP,点击完成。 ![select-gray-release-ip](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/select-gray-release-ip.png) ![gray-release-ip-selected](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-ip-selected.png) ![gray-release-rule-saved](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-rule-saved.png) 如果下拉框中没找到需要的IP,说明机器还没从Apollo取过配置,可以点击手动输入IP来输入,输入完后点击添加按钮 ![manual-input-gray-release-ip](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/manual-input-gray-release-ip.png) ![manual-input-gray-release-ip-2](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/manual-input-gray-release-ip-2.png) >注:对于公共Namespace的灰度规则,需要先指定要灰度的appId,然后再选择IP。 ## 5.5 灰度发布 配置规则已经生效,不过灰度配置还没有发布。切换到`配置`Tab。 再次检查灰度的配置部分,如果没有问题,点击`灰度发布`。 ![prepare-to-do-gray-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/prepare-to-do-gray-release.png) 在弹出框中可以看到主版本的值是2000,灰度版本即将发布的值是3000。填入其它信息后,点击发布。 ![gray-release-confirm-dialog](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-confirm-dialog.png) 发布后,切换到`灰度实例列表`Tab,就能看到10.32.21.22已经使用了灰度发布的值。 ![gray-release-instance-list](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-instance-list.png) 切换到`主版本`的`实例列表`,会看到主版本配置只有10.32.21.19在使用了。 ![master-branch-instance-list](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/master-branch-instance-list.png) 后面可以继续配置的修改或规则的更改。配置的修改需要点击灰度发布后才会生效,规则的修改在规则点击完成后就会实时生效。 ## 5.6 全量发布 如果灰度的配置测试下来比较理想,符合预期,那么就可以操作`全量发布`。 全量发布的效果是: 1. 灰度版本的配置会合并回主版本,在这个例子中,就是主版本的timeout会被更新成3000 2. 主版本的配置会自动进行一次发布 3. 在全量发布页面,可以选择是否保留当前灰度版本,默认为不保留。 ![prepare-to-full-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/prepare-to-full-release.png) ![full-release-confirm-dialog](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/full-release-confirm-dialog.png) ![full-release-confirm-dialog-2](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/full-release-confirm-dialog-2.png) 我选择了不保留灰度版本,所以发布完的效果就是主版本的配置更新、灰度版本删除。点击主版本的实例列表,可以看到10.32.21.22和10.32.21.19都使用了主版本最新的配置。 ![master-branch-instance-list-after-full-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/master-branch-instance-list-after-full-release.png) ## 5.7 放弃灰度 如果灰度版本不理想或者不需要了,可以点击`放弃灰度`。 ![abandon-gray-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/abandon-gray-release.png) ## 5.8 发布历史 点击主版本的`发布历史`按钮,可以看到当前namespace的主版本以及灰度版本的发布历史。 ![view-release-history](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/view-release-history.png) ![view-release-history-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/view-release-history-detail.png) # 六、其它功能配置 ## 6.1 配置查看权限 从1.1.0版本开始,apollo-portal增加了查看权限的支持,可以支持配置某个环境只允许项目成员查看私有Namespace的配置。 这里的项目成员是指: 1. 项目的管理员 2. 具备该私有Namespace在该环境下的修改或发布权限 配置方式很简单,用超级管理员账号登录后,进入`管理员工具 - 系统参数`页面新增或修改`configView.memberOnly.envs`配置项即可。 ![configView.memberOnly.envs](https://user-images.githubusercontent.com/837658/46456519-c155e100-c7e1-11e8-969b-8f332379fa29.png) ## 6.2 配置访问密钥 Apollo从1.6.0版本开始增加访问密钥机制,从而只有经过身份验证的客户端才能访问敏感配置。如果应用开启了访问密钥,客户端需要配置密钥,否则无法获取配置。 1. 项目管理员打开管理密钥页面 ![管理密钥入口](https://user-images.githubusercontent.com/837658/94990081-f4d3cd80-05ab-11eb-9470-fed5ec6de92e.png) 2. 为项目的每个环境生成访问密钥,注意默认是禁用的,建议在客户端都配置完成后再开启 ![密钥配置页面](https://user-images.githubusercontent.com/837658/94990150-788dba00-05ac-11eb-9a12-727fdb872e42.png) 3. 客户端侧[配置访问密钥](zh/usage/java-sdk-user-guide#_1244-配置访问密钥) # 七、最佳实践 ## 7.1 安全相关 配置中心作为基础服务,存储着公司非常重要的配置信息,所以安全因素需要大家重点关注,下面列举了一些注意事项供大家参考,也欢迎大家分享自己的实践案例。 ### 7.1.1 认证 建议接入公司统一的身份认证系统,如 SSO、LDAP 等,接入方式可以参考[Portal 实现用户登录功能](zh/development/portal-how-to-implement-user-login-function) > 如果使用Apollo提供的Spring Security简单认证,务必记得要修改超级管理员apollo的密码 ### 7.1.2 授权 Apollo 支持细粒度的权限控制,请务必根据实际情况做好权限控制: 1. [项目管理员权限](#_121-项目管理员权限) * Apollo 默认允许所有登录用户创建项目,如果只允许部分用户创建项目,可以开启[创建项目权限控制](zh/deployment/distributed-deployment-guide?id=_3110-rolecreate-applicationenabled-是否开启创建项目权限控制) 2. [配置编辑、发布权限](#_122-配置编辑、发布权限) * 配置编辑、发布权限支持按环境配置,比如开发环境开发人员可以自行完成配置编辑和发布的过程,但是生产环境发布权限交由测试或运维人员 * 生产环境建议同时开启[发布审核](zh/deployment/distributed-deployment-guide?id=_322-namespacelockswitch-一次发布只能有一个人修改开关,用于发布审核),从而控制一次配置发布只能由一个人修改,另一个人发布,确保配置修改得到充分检查 3. [配置查看权限](#_61-配置查看权限) * 可以指定某个环境只允许项目成员查看私有Namespace的配置,从而避免敏感配置泄露,如生产环境 ### 7.1.3 系统访问 除了用户权限,在系统访问上也需要加以考虑: 1. `apollo-configservice`和`apollo-adminservice`是基于内网可信网络设计的,所以出于安全考虑,禁止`apollo-configservice`和`apollo-adminservice`直接暴露在公网 2. 对敏感配置可以考虑开启[访问秘钥](#_62-%e9%85%8d%e7%bd%ae%e8%ae%bf%e9%97%ae%e5%af%86%e9%92%a5),从而只有经过身份验证的客户端才能访问敏感配置 3. 1.7.1及以上版本可以考虑为`apollo-adminservice`开启[访问控制](zh/deployment/distributed-deployment-guide?id=_326-admin-serviceaccesscontrolenabled-配置apollo-adminservice是否开启访问控制),从而只有[受控的](zh/deployment/distributed-deployment-guide?id=_3112-admin-serviceaccesstokens-设置apollo-portal访问各环境apollo-adminservice所需的access-token)`apollo-portal`才能访问对应接口,增强安全性
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./scripts/apollo-on-kubernetes/apollo-portal-server/config/app.properties
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # appId=100003173 jdkVersion=1.8
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # appId=100003173 jdkVersion=1.8
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-configservice/src/test/resources/application.properties
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring.datasource.url = jdbc:h2:mem:~/apolloconfigdb;mode=mysql;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1 spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl spring.h2.console.enabled = true spring.h2.console.settings.web-allow-others=true spring.jpa.properties.hibernate.show_sql=false spring.cloud.consul.enabled=false spring.main.allow-bean-definition-overriding=true # for ReleaseMessageScanner test apollo.message-scan.interval=100
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring.datasource.url = jdbc:h2:mem:~/apolloconfigdb;mode=mysql;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1 spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl spring.h2.console.enabled = true spring.h2.console.settings.web-allow-others=true spring.jpa.properties.hibernate.show_sql=false spring.cloud.consul.enabled=false spring.main.allow-bean-definition-overriding=true # for ReleaseMessageScanner test apollo.message-scan.interval=100
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-client/src/test/resources/spring/yaml/case2-new.yml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # batch: 2001
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # batch: 2001
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/resources/META-INF/app.properties
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # app.id=100003173 jdkVersion=1.8
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # app.id=100003173 jdkVersion=1.8
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/zh/usage/apollo-user-practices.md
Apollo 配置中心的实践案例,供大家参考: * [Apollo+ES源码改造,构建民生银行的ELK日志平台配置管理中心](https://mp.weixin.qq.com/s/VHugn0vgNu4m56V49geC4w) * [Apollo在有赞的实践](https://mp.weixin.qq.com/s/Ge14UeY9Gm2Hrk--E47eJQ) * [微服务版本切换初始设计思路](https://blog.llyweb.com/articles/2020/08/11/1597149013480.html) * [Alibaba Sentinel Push模式 规则推送至Apollo配置中心](https://anilople.github.io/Sentinel)
Apollo 配置中心的实践案例,供大家参考: * [Apollo+ES源码改造,构建民生银行的ELK日志平台配置管理中心](https://mp.weixin.qq.com/s/VHugn0vgNu4m56V49geC4w) * [Apollo在有赞的实践](https://mp.weixin.qq.com/s/Ge14UeY9Gm2Hrk--E47eJQ) * [微服务版本切换初始设计思路](https://blog.llyweb.com/articles/2020/08/11/1597149013480.html) * [Alibaba Sentinel Push模式 规则推送至Apollo配置中心](https://anilople.github.io/Sentinel)
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-demo/src/main/resources/META-INF/app.properties
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # test app.id=100004458
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # test app.id=100004458
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-configservice/src/main/config/app.properties
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # appId=100003171 jdkVersion=1.8
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # appId=100003171 jdkVersion=1.8
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-client/src/test/resources/spring/yaml/case9.yml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # someKey: someValue
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # someKey: someValue
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-common/src/main/resources/application.properties
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring.mvc.converters.preferred-json-mapper=gson # DataSource spring.datasource.hikari.connectionInitSql=set names utf8mb4 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver # Naming strategy spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl spring.jpa.hibernate.globally_quoted_identifiers=true spring.jpa.properties.hibernate.globally_quoted_identifiers=true # Tomcat configuration server.tomcat.accept-count=5000 # Increase tomcat header size for longer GET query parameter, should be n * 1024 server.max-http-header-size=10240 # Spring Boot 2.x management.endpoints.web.base-path=/ logging.logback.rollingpolicy.max-file-size=50MB logging.logback.rollingpolicy.max-history=10 management.endpoints.web.exposure.include=info,health,metrics,prometheus # Project information spring.info.git.location=classpath:apollo-git.properties
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring.mvc.converters.preferred-json-mapper=gson # DataSource spring.datasource.hikari.connectionInitSql=set names utf8mb4 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver # Naming strategy spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl spring.jpa.hibernate.globally_quoted_identifiers=true spring.jpa.properties.hibernate.globally_quoted_identifiers=true # Tomcat configuration server.tomcat.accept-count=5000 # Increase tomcat header size for longer GET query parameter, should be n * 1024 server.max-http-header-size=10240 # Spring Boot 2.x management.endpoints.web.base-path=/ logging.logback.rollingpolicy.max-file-size=50MB logging.logback.rollingpolicy.max-history=10 management.endpoints.web.exposure.include=info,health,metrics,prometheus # Project information spring.info.git.location=classpath:apollo-git.properties
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-configservice/src/main/resources/application-nacos-discovery.properties
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # apollo.eureka.server.enabled=false eureka.client.enabled=false spring.cloud.discovery.enabled=false #nacos enabled nacos.discovery.register.enabled=true nacos.discovery.auto-register=true nacos.discovery.register.service-name=apollo-configservice
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # apollo.eureka.server.enabled=false eureka.client.enabled=false spring.cloud.discovery.enabled=false #nacos enabled nacos.discovery.register.enabled=true nacos.discovery.auto-register=true nacos.discovery.register.service-name=apollo-configservice
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-biz/src/test/resources/logback-test.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright 2021 Apollo Authors ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ --> <configuration scan="true"> <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <charset>utf-8</charset> <Pattern>[%p] %c - %m%n</Pattern> </encoder> </appender> <logger name="org.springframework.test" level="OFF" /> <root level="WARN"> <appender-ref ref="CONSOLE" /> </root> </configuration>
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright 2021 Apollo Authors ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ --> <configuration scan="true"> <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <charset>utf-8</charset> <Pattern>[%p] %c - %m%n</Pattern> </encoder> </appender> <logger name="org.springframework.test" level="OFF" /> <root level="WARN"> <appender-ref ref="CONSOLE" /> </root> </configuration>
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-adminservice/src/test/resources/application.yml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring: application: name: apollo-adminservice server: port: ${port:8090} logging: level: org.springframework.cloud: 'DEBUG' file: name: /opt/logs/${ctrip.appid}/apollo-adminservice.log ctrip: appid: 100003172 eureka: instance: hostname: ${hostname:localhost} preferIpAddress: true status-page-url-path: /info health-check-url-path: /health client: serviceUrl: defaultZone: http://${eureka.instance.hostname}:8090/eureka/ healthcheck: enabled: true management: health: status: order: DOWN, OUT_OF_SERVICE, UNKNOWN, UP
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring: application: name: apollo-adminservice server: port: ${port:8090} logging: level: org.springframework.cloud: 'DEBUG' file: name: /opt/logs/${ctrip.appid}/apollo-adminservice.log ctrip: appid: 100003172 eureka: instance: hostname: ${hostname:localhost} preferIpAddress: true status-page-url-path: /info health-check-url-path: /health client: serviceUrl: defaultZone: http://${eureka.instance.hostname}:8090/eureka/ healthcheck: enabled: true management: health: status: order: DOWN, OUT_OF_SERVICE, UNKNOWN, UP
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-client/src/test/resources/spring/XmlConfigPlaceholderTest4.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright 2021 Apollo Authors ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:apollo="http://www.ctrip.com/schema/apollo" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.ctrip.com/schema/apollo http://www.ctrip.com/schema/apollo.xsd"> <apollo:config namespaces="application"/> <apollo:config namespaces="FX.apollo" order="10"/> <bean class="com.ctrip.framework.apollo.spring.XmlConfigPlaceholderTest.TestXmlBean"> <property name="timeout" value="${timeout:100}"/> <property name="batch" value="${batch:200}"/> </bean> </beans>
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright 2021 Apollo Authors ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:apollo="http://www.ctrip.com/schema/apollo" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.ctrip.com/schema/apollo http://www.ctrip.com/schema/apollo.xsd"> <apollo:config namespaces="application"/> <apollo:config namespaces="FX.apollo" order="10"/> <bean class="com.ctrip.framework.apollo.spring.XmlConfigPlaceholderTest.TestXmlBean"> <property name="timeout" value="${timeout:100}"/> <property name="batch" value="${batch:200}"/> </bean> </beans>
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-configservice/src/test/resources/application.yml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring: application: name: apollo-configservice server: port: ${port:8080} logging: level: org.springframework.cloud: 'DEBUG' file: name: /opt/logs/${ctrip.appid}/apollo-configservice.log ctrip: appid: 100003171 eureka: instance: hostname: ${hostname:localhost} preferIpAddress: true status-page-url-path: /info health-check-url-path: /health client: serviceUrl: defaultZone: http://${eureka.instance.hostname}:8080/eureka/ healthcheck: enabled: true management: health: status: order: DOWN, OUT_OF_SERVICE, UNKNOWN, UP
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring: application: name: apollo-configservice server: port: ${port:8080} logging: level: org.springframework.cloud: 'DEBUG' file: name: /opt/logs/${ctrip.appid}/apollo-configservice.log ctrip: appid: 100003171 eureka: instance: hostname: ${hostname:localhost} preferIpAddress: true status-page-url-path: /info health-check-url-path: /health client: serviceUrl: defaultZone: http://${eureka.instance.hostname}:8080/eureka/ healthcheck: enabled: true management: health: status: order: DOWN, OUT_OF_SERVICE, UNKNOWN, UP
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./.github/workflows/cla.yml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # name: "CLA Assistant" on: issue_comment: types: [created] pull_request_target: types: [opened,closed,synchronize] jobs: CLAssistant: runs-on: ubuntu-latest steps: - name: "CLA Assistant" if: (github.event.comment.body == 'recheck' || startsWith(github.event.comment.body, 'I have read the CLA Document and I hereby sign the CLA')) || github.event_name == 'pull_request_target' # Beta Release uses: cla-assistant/github-action@v2.1.2-beta env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # the below token should have repo scope and must be manually added by you in the repository's secret PERSONAL_ACCESS_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN_FOR_CLA_ASSISTANT }} with: path-to-signatures: 'signatures/version1/cla.json' path-to-document: 'https://github.com/ctripcorp/apollo-community/blob/master/CLA.md' # e.g. a CLA or a DCO document # branch should not be protected branch: 'master' allowlist: dependabot,bot* remote-repository-name: apollo-community #below are the optional inputs - If the optional inputs are not given, then default values will be taken #remote-organization-name: enter the remote organization name where the signatures should be stored (Default is storing the signatures in the same repository) #remote-repository-name: enter the remote repository name where the signatures should be stored (Default is storing the signatures in the same repository) #create-file-commit-message: 'For example: Creating file for storing CLA Signatures' #signed-commit-message: 'For example: $contributorName has signed the CLA in #$pullRequestNo' #custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign' #custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA' #custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.' #lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true) #use-dco-flag: true - If you are using DCO instead of CLA
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # name: "CLA Assistant" on: issue_comment: types: [created] pull_request_target: types: [opened,closed,synchronize] jobs: CLAssistant: runs-on: ubuntu-latest steps: - name: "CLA Assistant" if: (github.event.comment.body == 'recheck' || startsWith(github.event.comment.body, 'I have read the CLA Document and I hereby sign the CLA')) || github.event_name == 'pull_request_target' # Beta Release uses: cla-assistant/github-action@v2.1.2-beta env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # the below token should have repo scope and must be manually added by you in the repository's secret PERSONAL_ACCESS_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN_FOR_CLA_ASSISTANT }} with: path-to-signatures: 'signatures/version1/cla.json' path-to-document: 'https://github.com/ctripcorp/apollo-community/blob/master/CLA.md' # e.g. a CLA or a DCO document # branch should not be protected branch: 'master' allowlist: dependabot,bot* remote-repository-name: apollo-community #below are the optional inputs - If the optional inputs are not given, then default values will be taken #remote-organization-name: enter the remote organization name where the signatures should be stored (Default is storing the signatures in the same repository) #remote-repository-name: enter the remote repository name where the signatures should be stored (Default is storing the signatures in the same repository) #create-file-commit-message: 'For example: Creating file for storing CLA Signatures' #signed-commit-message: 'For example: $contributorName has signed the CLA in #$pullRequestNo' #custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign' #custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA' #custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.' #lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true) #use-dco-flag: true - If you are using DCO instead of CLA
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./scripts/apollo-on-kubernetes/README.md
# 使用方法 ## 一、构建镜像 ### 1.1 获取 apollo 压缩包 从 https://github.com/ctripcorp/apollo/releases 下载预先打好的 java 包 <br/> 例如你下载的是: <br/> apollo-portal-1.0.0-github.zip <br/> apollo-adminservice-1.0.0-github.zip <br/> apollo-configservice-1.0.0-github.zip <br/> ### 1.2 解压压缩包, 获取程序 jar 包 - 解压 apollo-portal-1.0.0-github.zip <br/> 获取 apollo-portal-1.0.0.jar, 重命名为 apollo-portal.jar, 放到 scripts/apollo-on-kubernetes/apollo-portal-server - 解压 apollo-adminservice-1.0.0-github.zip <br/> 获取 apollo-adminservice-1.0.0.jar, 重命名为 apollo-adminservice.jar, 放到 scripts/apollo-on-kubernetes/apollo-admin-server - 解压 apollo-configservice-1.0.0-github.zip <br/> 获取 apollo-configservice-1.0.0.jar, 重命名为 apollo-configservice.jar, 放到 scripts/apollo-on-kubernetes/apollo-config-server ### 1.3 build image 需要分别为alpine-bash-3.8-image,apollo-config-server,apollo-admin-server和apollo-portal-server构建镜像。 以 build apollo-config-server image 为例, 其他类似 ```bash scripts/apollo-on-kubernetes/apollo-config-server$ tree -L 2 . ├── apollo-configservice.conf ├── apollo-configservice.jar ├── config │   ├── application-github.properties │   └── app.properties ├── Dockerfile ├── entrypoint.sh └── scripts └── startup-kubernetes.sh ``` build image ```bash # 在 scripts/apollo-on-kubernetes/apollo-config-server 路径下 docker build -t apollo-config-server:v1.0.0 . ``` push image <br/> 将 image push 到你的 docker registry, 例如 vmware harbor ## 二、Deploy apollo on kubernetes ### 2.1 部署 MySQL 服务 你可以选用 MySQL-Galera-WSrep 来提高你的 MySQL 服务的可用性 <br/> MySQL 部署步骤略 ### 2.1 导入 MySQL DB 文件 由于上面部署了分布式的 MySQL, 所有 config-server、admin-server、portal-server 使用同一个 MySQL 服务的不同数据库 示例假设你的 apollo 开启了 4 个环境, 即 dev、test-alpha、test-beta、prod, 在你的 MySQL 中导入 scripts/apollo-on-kubernetes/db 下的文件即可 如果有需要, 你可以更改 eureka.service.url 的地址, 格式为 http://config-server-pod-name-index.meta-server-service-name:8080/eureka/ , 例如 http://statefulset-apollo-config-server-dev-0.service-apollo-meta-server-dev:8080/eureka/ ### 2.2 Deploy apollo on kubernetes 示例假设你有 4 台 kubernetes node 来部署 apollo, apollo 开启了 4 个环境, 即 dev、test-alpha、test-beta、prod 按照 scripts/apollo-on-kubernetes/kubernetes/kubectl-apply.sh 文件的内容部署 apollo 即可,注意需要按照实际情况修改对应配置文件中的数据库连接信息、eureka.service.url、replicas、nodeSelector、镜像信息等。 ```bash scripts/apollo-on-kubernetes/kubernetes$ cat kubectl-apply.sh # create namespace kubectl create namespace sre # dev-env kubectl apply -f apollo-env-dev/service-mysql-for-apollo-dev-env.yaml --record && \ kubectl apply -f apollo-env-dev/service-apollo-config-server-dev.yaml --record && \ kubectl apply -f apollo-env-dev/service-apollo-admin-server-dev.yaml --record # fat-env(test-alpha-env) kubectl apply -f apollo-env-test-alpha/service-mysql-for-apollo-test-alpha-env.yaml --record && \ kubectl apply -f apollo-env-test-alpha/service-apollo-config-server-test-alpha.yaml --record && \ kubectl apply -f apollo-env-test-alpha/service-apollo-admin-server-test-alpha.yaml --record # uat-env(test-beta-env) kubectl apply -f apollo-env-test-beta/service-mysql-for-apollo-test-beta-env.yaml --record && \ kubectl apply -f apollo-env-test-beta/service-apollo-config-server-test-beta.yaml --record && \ kubectl apply -f apollo-env-test-beta/service-apollo-admin-server-test-beta.yaml --record # prod-env kubectl apply -f apollo-env-prod/service-mysql-for-apollo-prod-env.yaml --record && \ kubectl apply -f apollo-env-prod/service-apollo-config-server-prod.yaml --record && \ kubectl apply -f apollo-env-prod/service-apollo-admin-server-prod.yaml --record # portal kubectl apply -f service-apollo-portal-server.yaml --record ``` ~~你需要注意的是, 应当尽量让同一个 server 的不同 pod 在不同 node 上, 这个通过 kubernetes nodeSelector 实现~~ 去掉nodeSelector 改为POD反亲和性[podAntiAffinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) ### 2.3 验证所有 pod 处于 Running 并且 READY 状态 ```bash kubectl get pod -n sre -o wide # 示例结果 NAME READY STATUS RESTARTS AGE IP NODE deployment-apollo-admin-server-dev-b7bbd657-4d5jx 1/1 Running 0 2d 10.247.4.79 k8s-apollo-node-2 deployment-apollo-admin-server-dev-b7bbd657-lwz5x 1/1 Running 0 2d 10.247.8.7 k8s-apollo-node-3 deployment-apollo-admin-server-dev-b7bbd657-xs4wt 1/1 Running 0 2d 10.247.1.23 k8s-apollo-node-1 deployment-apollo-admin-server-prod-699bbd894f-j977p 1/1 Running 0 2d 10.247.4.83 k8s-apollo-node-2 deployment-apollo-admin-server-prod-699bbd894f-n9m54 1/1 Running 0 2d 10.247.8.11 k8s-apollo-node-3 deployment-apollo-admin-server-prod-699bbd894f-vs56w 1/1 Running 0 2d 10.247.1.27 k8s-apollo-node-1 deployment-apollo-admin-server-test-beta-7c855cd4f5-9br65 1/1 Running 0 2d 10.247.1.25 k8s-apollo-node-1 deployment-apollo-admin-server-test-beta-7c855cd4f5-cck5g 1/1 Running 0 2d 10.247.8.9 k8s-apollo-node-3 deployment-apollo-admin-server-test-beta-7c855cd4f5-x6gt4 1/1 Running 0 2d 10.247.4.81 k8s-apollo-node-2 deployment-apollo-portal-server-6d4bbc879c-bv7cn 1/1 Running 0 2d 10.247.8.12 k8s-apollo-node-3 deployment-apollo-portal-server-6d4bbc879c-c4zrb 1/1 Running 0 2d 10.247.1.28 k8s-apollo-node-1 deployment-apollo-portal-server-6d4bbc879c-qm4mn 1/1 Running 0 2d 10.247.4.84 k8s-apollo-node-2 statefulset-apollo-config-server-dev-0 1/1 Running 0 2d 10.247.8.6 k8s-apollo-node-3 statefulset-apollo-config-server-dev-1 1/1 Running 0 2d 10.247.4.78 k8s-apollo-node-2 statefulset-apollo-config-server-dev-2 1/1 Running 0 2d 10.247.1.22 k8s-apollo-node-1 statefulset-apollo-config-server-prod-0 1/1 Running 0 2d 10.247.8.10 k8s-apollo-node-3 statefulset-apollo-config-server-prod-1 1/1 Running 0 2d 10.247.4.82 k8s-apollo-node-2 statefulset-apollo-config-server-prod-2 1/1 Running 0 2d 10.247.1.26 k8s-apollo-node-1 statefulset-apollo-config-server-test-beta-0 1/1 Running 0 2d 10.247.8.8 k8s-apollo-node-3 statefulset-apollo-config-server-test-beta-1 1/1 Running 0 2d 10.247.4.80 k8s-apollo-node-2 statefulset-apollo-config-server-test-beta-2 1/1 Running 0 2d 10.247.1.24 k8s-apollo-node-1 ``` ### 2.4 访问 apollo service - server 端(即 portal) <br/> &nbsp;&nbsp;&nbsp;&nbsp;kubernetes-master-ip:30001 - client 端, 在 client 端无需再实现负载均衡 <br/> Dev<br/> &nbsp;&nbsp;&nbsp;&nbsp;kubernetes-master-ip:30002 <br/> Test-Alpha <br/> &nbsp;&nbsp;&nbsp;&nbsp;kubernetes-master-ip:30003 <br/> Test-Beta <br/> &nbsp;&nbsp;&nbsp;&nbsp;kubernetes-master-ip:30004 <br/> Prod <br/> &nbsp;&nbsp;&nbsp;&nbsp;kubernetes-master-ip:30005 <br/> # FAQ ## 关于修改的 Dockerfile 添加 ENV 和 entrypoint.sh, 启动 server 需要的配置, 在 kubernetes yaml 文件中可以通过 configmap 传入、也可以通过 ENV 传入 关于 Dockerfile、entrypoint.sh 具体内容, 你可以查看文件里的内容 ## 关于 kubernetes yaml 文件 具体内容请查看 `scripts/apollo-on-kubernetes/kubernetes/service-apollo-portal-server.yaml` 注释 <br/> 其他类似。 ## 关于 eureka.service.url 使用 meta-server(即 config-server) 的 pod name, config-server 务必使用 statefulset。 格式为:`http://<config server pod名>.<meta server 服务名>:<meta server端口号>/eureka/`。 以 apollo-env-dev 为例: ```bash ('eureka.service.url', 'default', 'http://statefulset-apollo-config-server-dev-0.service-apollo-meta-server-dev:8080/eureka/,http://statefulset-apollo-config-server-dev-1.service-apollo-meta-server-dev:8080/eureka/,http://statefulset-apollo-config-server-dev-2.service-apollo-meta-server-dev:8080/eureka/', 'Eureka服务Url,多个service以英文逗号分隔') ``` 你可以精简 config-server pod 的 name, 示例的长名字是为了更好的阅读与理解。 ### 方式一:通过Spring Boot文件 application-github.properties配置(推荐) 推荐此方式配置 `eureka.service.url`,因为可以通过ConfigMap的方式传入容器,无需再修改数据库的字段。 Admin Server的配置: ```yaml --- # configmap for apollo-admin-server-dev kind: ConfigMap apiVersion: v1 metadata: namespace: sre name: configmap-apollo-admin-server-dev data: application-github.properties: | spring.datasource.url = jdbc:mysql://service-mysql-for-apollo-dev-env-mariadb.sre:3306/DevApolloConfigDB?characterEncoding=utf8 spring.datasource.username = root spring.datasource.password = test eureka.service.url = http://statefulset-apollo-config-server-dev-0.service-apollo-meta-server-dev:8080/eureka/,http://statefulset-apollo-config-server-dev-1.service-apollo-meta-server-dev:8080/eureka/,http://statefulset-apollo-config-server-dev-2.service-apollo-meta-server-dev:8080/eureka/ ``` Config Server的配置: ```yaml --- # configmap for apollo-config-server-dev kind: ConfigMap apiVersion: v1 metadata: namespace: sre name: configmap-apollo-config-server-dev data: application-github.properties: | spring.datasource.url = jdbc:mysql://service-mysql-for-apollo-dev-env-mariadb.sre:3306/DevApolloConfigDB?characterEncoding=utf8 spring.datasource.username = root spring.datasource.password = m6bCdQXa00 eureka.service.url = http://statefulset-apollo-config-server-dev-0.service-apollo-meta-server-dev:8080/eureka/,http://statefulset-apollo-config-server-dev-1.service-apollo-meta-server-dev:8080/eureka/,http://statefulset-apollo-config-server-dev-2.service-apollo-meta-server-dev:8080/eureka/ ``` ### 方式二:修改数据表 ApolloConfigDB.ServerConfig 修改数据库表 ApolloConfigDB.ServerConfig的 eureka.service.url。
# 使用方法 ## 一、构建镜像 ### 1.1 获取 apollo 压缩包 从 https://github.com/ctripcorp/apollo/releases 下载预先打好的 java 包 <br/> 例如你下载的是: <br/> apollo-portal-1.0.0-github.zip <br/> apollo-adminservice-1.0.0-github.zip <br/> apollo-configservice-1.0.0-github.zip <br/> ### 1.2 解压压缩包, 获取程序 jar 包 - 解压 apollo-portal-1.0.0-github.zip <br/> 获取 apollo-portal-1.0.0.jar, 重命名为 apollo-portal.jar, 放到 scripts/apollo-on-kubernetes/apollo-portal-server - 解压 apollo-adminservice-1.0.0-github.zip <br/> 获取 apollo-adminservice-1.0.0.jar, 重命名为 apollo-adminservice.jar, 放到 scripts/apollo-on-kubernetes/apollo-admin-server - 解压 apollo-configservice-1.0.0-github.zip <br/> 获取 apollo-configservice-1.0.0.jar, 重命名为 apollo-configservice.jar, 放到 scripts/apollo-on-kubernetes/apollo-config-server ### 1.3 build image 需要分别为alpine-bash-3.8-image,apollo-config-server,apollo-admin-server和apollo-portal-server构建镜像。 以 build apollo-config-server image 为例, 其他类似 ```bash scripts/apollo-on-kubernetes/apollo-config-server$ tree -L 2 . ├── apollo-configservice.conf ├── apollo-configservice.jar ├── config │   ├── application-github.properties │   └── app.properties ├── Dockerfile ├── entrypoint.sh └── scripts └── startup-kubernetes.sh ``` build image ```bash # 在 scripts/apollo-on-kubernetes/apollo-config-server 路径下 docker build -t apollo-config-server:v1.0.0 . ``` push image <br/> 将 image push 到你的 docker registry, 例如 vmware harbor ## 二、Deploy apollo on kubernetes ### 2.1 部署 MySQL 服务 你可以选用 MySQL-Galera-WSrep 来提高你的 MySQL 服务的可用性 <br/> MySQL 部署步骤略 ### 2.1 导入 MySQL DB 文件 由于上面部署了分布式的 MySQL, 所有 config-server、admin-server、portal-server 使用同一个 MySQL 服务的不同数据库 示例假设你的 apollo 开启了 4 个环境, 即 dev、test-alpha、test-beta、prod, 在你的 MySQL 中导入 scripts/apollo-on-kubernetes/db 下的文件即可 如果有需要, 你可以更改 eureka.service.url 的地址, 格式为 http://config-server-pod-name-index.meta-server-service-name:8080/eureka/ , 例如 http://statefulset-apollo-config-server-dev-0.service-apollo-meta-server-dev:8080/eureka/ ### 2.2 Deploy apollo on kubernetes 示例假设你有 4 台 kubernetes node 来部署 apollo, apollo 开启了 4 个环境, 即 dev、test-alpha、test-beta、prod 按照 scripts/apollo-on-kubernetes/kubernetes/kubectl-apply.sh 文件的内容部署 apollo 即可,注意需要按照实际情况修改对应配置文件中的数据库连接信息、eureka.service.url、replicas、nodeSelector、镜像信息等。 ```bash scripts/apollo-on-kubernetes/kubernetes$ cat kubectl-apply.sh # create namespace kubectl create namespace sre # dev-env kubectl apply -f apollo-env-dev/service-mysql-for-apollo-dev-env.yaml --record && \ kubectl apply -f apollo-env-dev/service-apollo-config-server-dev.yaml --record && \ kubectl apply -f apollo-env-dev/service-apollo-admin-server-dev.yaml --record # fat-env(test-alpha-env) kubectl apply -f apollo-env-test-alpha/service-mysql-for-apollo-test-alpha-env.yaml --record && \ kubectl apply -f apollo-env-test-alpha/service-apollo-config-server-test-alpha.yaml --record && \ kubectl apply -f apollo-env-test-alpha/service-apollo-admin-server-test-alpha.yaml --record # uat-env(test-beta-env) kubectl apply -f apollo-env-test-beta/service-mysql-for-apollo-test-beta-env.yaml --record && \ kubectl apply -f apollo-env-test-beta/service-apollo-config-server-test-beta.yaml --record && \ kubectl apply -f apollo-env-test-beta/service-apollo-admin-server-test-beta.yaml --record # prod-env kubectl apply -f apollo-env-prod/service-mysql-for-apollo-prod-env.yaml --record && \ kubectl apply -f apollo-env-prod/service-apollo-config-server-prod.yaml --record && \ kubectl apply -f apollo-env-prod/service-apollo-admin-server-prod.yaml --record # portal kubectl apply -f service-apollo-portal-server.yaml --record ``` ~~你需要注意的是, 应当尽量让同一个 server 的不同 pod 在不同 node 上, 这个通过 kubernetes nodeSelector 实现~~ 去掉nodeSelector 改为POD反亲和性[podAntiAffinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) ### 2.3 验证所有 pod 处于 Running 并且 READY 状态 ```bash kubectl get pod -n sre -o wide # 示例结果 NAME READY STATUS RESTARTS AGE IP NODE deployment-apollo-admin-server-dev-b7bbd657-4d5jx 1/1 Running 0 2d 10.247.4.79 k8s-apollo-node-2 deployment-apollo-admin-server-dev-b7bbd657-lwz5x 1/1 Running 0 2d 10.247.8.7 k8s-apollo-node-3 deployment-apollo-admin-server-dev-b7bbd657-xs4wt 1/1 Running 0 2d 10.247.1.23 k8s-apollo-node-1 deployment-apollo-admin-server-prod-699bbd894f-j977p 1/1 Running 0 2d 10.247.4.83 k8s-apollo-node-2 deployment-apollo-admin-server-prod-699bbd894f-n9m54 1/1 Running 0 2d 10.247.8.11 k8s-apollo-node-3 deployment-apollo-admin-server-prod-699bbd894f-vs56w 1/1 Running 0 2d 10.247.1.27 k8s-apollo-node-1 deployment-apollo-admin-server-test-beta-7c855cd4f5-9br65 1/1 Running 0 2d 10.247.1.25 k8s-apollo-node-1 deployment-apollo-admin-server-test-beta-7c855cd4f5-cck5g 1/1 Running 0 2d 10.247.8.9 k8s-apollo-node-3 deployment-apollo-admin-server-test-beta-7c855cd4f5-x6gt4 1/1 Running 0 2d 10.247.4.81 k8s-apollo-node-2 deployment-apollo-portal-server-6d4bbc879c-bv7cn 1/1 Running 0 2d 10.247.8.12 k8s-apollo-node-3 deployment-apollo-portal-server-6d4bbc879c-c4zrb 1/1 Running 0 2d 10.247.1.28 k8s-apollo-node-1 deployment-apollo-portal-server-6d4bbc879c-qm4mn 1/1 Running 0 2d 10.247.4.84 k8s-apollo-node-2 statefulset-apollo-config-server-dev-0 1/1 Running 0 2d 10.247.8.6 k8s-apollo-node-3 statefulset-apollo-config-server-dev-1 1/1 Running 0 2d 10.247.4.78 k8s-apollo-node-2 statefulset-apollo-config-server-dev-2 1/1 Running 0 2d 10.247.1.22 k8s-apollo-node-1 statefulset-apollo-config-server-prod-0 1/1 Running 0 2d 10.247.8.10 k8s-apollo-node-3 statefulset-apollo-config-server-prod-1 1/1 Running 0 2d 10.247.4.82 k8s-apollo-node-2 statefulset-apollo-config-server-prod-2 1/1 Running 0 2d 10.247.1.26 k8s-apollo-node-1 statefulset-apollo-config-server-test-beta-0 1/1 Running 0 2d 10.247.8.8 k8s-apollo-node-3 statefulset-apollo-config-server-test-beta-1 1/1 Running 0 2d 10.247.4.80 k8s-apollo-node-2 statefulset-apollo-config-server-test-beta-2 1/1 Running 0 2d 10.247.1.24 k8s-apollo-node-1 ``` ### 2.4 访问 apollo service - server 端(即 portal) <br/> &nbsp;&nbsp;&nbsp;&nbsp;kubernetes-master-ip:30001 - client 端, 在 client 端无需再实现负载均衡 <br/> Dev<br/> &nbsp;&nbsp;&nbsp;&nbsp;kubernetes-master-ip:30002 <br/> Test-Alpha <br/> &nbsp;&nbsp;&nbsp;&nbsp;kubernetes-master-ip:30003 <br/> Test-Beta <br/> &nbsp;&nbsp;&nbsp;&nbsp;kubernetes-master-ip:30004 <br/> Prod <br/> &nbsp;&nbsp;&nbsp;&nbsp;kubernetes-master-ip:30005 <br/> # FAQ ## 关于修改的 Dockerfile 添加 ENV 和 entrypoint.sh, 启动 server 需要的配置, 在 kubernetes yaml 文件中可以通过 configmap 传入、也可以通过 ENV 传入 关于 Dockerfile、entrypoint.sh 具体内容, 你可以查看文件里的内容 ## 关于 kubernetes yaml 文件 具体内容请查看 `scripts/apollo-on-kubernetes/kubernetes/service-apollo-portal-server.yaml` 注释 <br/> 其他类似。 ## 关于 eureka.service.url 使用 meta-server(即 config-server) 的 pod name, config-server 务必使用 statefulset。 格式为:`http://<config server pod名>.<meta server 服务名>:<meta server端口号>/eureka/`。 以 apollo-env-dev 为例: ```bash ('eureka.service.url', 'default', 'http://statefulset-apollo-config-server-dev-0.service-apollo-meta-server-dev:8080/eureka/,http://statefulset-apollo-config-server-dev-1.service-apollo-meta-server-dev:8080/eureka/,http://statefulset-apollo-config-server-dev-2.service-apollo-meta-server-dev:8080/eureka/', 'Eureka服务Url,多个service以英文逗号分隔') ``` 你可以精简 config-server pod 的 name, 示例的长名字是为了更好的阅读与理解。 ### 方式一:通过Spring Boot文件 application-github.properties配置(推荐) 推荐此方式配置 `eureka.service.url`,因为可以通过ConfigMap的方式传入容器,无需再修改数据库的字段。 Admin Server的配置: ```yaml --- # configmap for apollo-admin-server-dev kind: ConfigMap apiVersion: v1 metadata: namespace: sre name: configmap-apollo-admin-server-dev data: application-github.properties: | spring.datasource.url = jdbc:mysql://service-mysql-for-apollo-dev-env-mariadb.sre:3306/DevApolloConfigDB?characterEncoding=utf8 spring.datasource.username = root spring.datasource.password = test eureka.service.url = http://statefulset-apollo-config-server-dev-0.service-apollo-meta-server-dev:8080/eureka/,http://statefulset-apollo-config-server-dev-1.service-apollo-meta-server-dev:8080/eureka/,http://statefulset-apollo-config-server-dev-2.service-apollo-meta-server-dev:8080/eureka/ ``` Config Server的配置: ```yaml --- # configmap for apollo-config-server-dev kind: ConfigMap apiVersion: v1 metadata: namespace: sre name: configmap-apollo-config-server-dev data: application-github.properties: | spring.datasource.url = jdbc:mysql://service-mysql-for-apollo-dev-env-mariadb.sre:3306/DevApolloConfigDB?characterEncoding=utf8 spring.datasource.username = root spring.datasource.password = m6bCdQXa00 eureka.service.url = http://statefulset-apollo-config-server-dev-0.service-apollo-meta-server-dev:8080/eureka/,http://statefulset-apollo-config-server-dev-1.service-apollo-meta-server-dev:8080/eureka/,http://statefulset-apollo-config-server-dev-2.service-apollo-meta-server-dev:8080/eureka/ ``` ### 方式二:修改数据表 ApolloConfigDB.ServerConfig 修改数据库表 ApolloConfigDB.ServerConfig的 eureka.service.url。
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./GOVERNANCE.md
# Overview Apollo is a meritocratic, consensus-based community project. Anyone with an interest in the project can join the community, contribute to the project design and participate in the decision-making process. This document describes how that participation takes place and how to set about earning merit within the project community. # Roles and Responsibilities Apollo community is composed of and operated by the following roles: - Users - Contributors - Committers - Project Management Committee (PMC) ## Users Users are community members who have a need for the project. They are the most important members of the community and without them the project would have no purpose. Anyone can be a user and there are no special requirements. ## Contributors Contributors are community members who contribute in concrete ways to the project. ### How to become a Contributor - merged at least 1 pull request You are also encouraged to participate in the projects in the following ways: - Actively answer technical questions raised by community users in GitHub issues. - Help test the projects - Help review the pull requests (PRs) submitted by others - Help improve technical documents - Submit valuable issues - Report or fix known and unknown bugs - Write articles about source code analysis and usage cases for a project. - Give representations of Apollo topic in conferences. - Take part in our discussions of features, enhancements, etc. ## Committers Committers are contributors who have shown that they are committed to the continued development of the project through ongoing engagement with the community and recognized by PMCs for their outstanding contributions. ### How to become a Committer A Committer must have accomplished one or more of the following items: - Demonstrated a good sense of responsibility in PR reviews. - Demonstrated deep understanding of Apollo components by contributing significantly as: - Finished 2 or more tasks of Medium difficulty - Fixed 1 or more tasks of Hard difficulty - Nominated by one PMC member and gained more +1 than -1. ### Privileges and responsibilities - Control overall code quality of projects - Guide Contributors to contribute to the community continuously - Participate in design discussions ## Project Management Committee The PMC(Project Management Committee) functions as the core management team that oversees the Apollo community. The PMC has additional responsibilities over and above those of Committers. These responsibilities ensure the smooth running of the project. ### How to become a PMC member - Membership of the PMC is by invitation from the existing PMC members. - A nomination will result in discussion and then a vote by the existing PMC members. - PMC membership votes are subject to consensus approval of the current PMC members. ### Privileges and responsibilities - Handle reported security issues (CVE, etc.) - Nominate new committers and PMC members - Vote on new committers and new PMC members - Make major decisions for the future with respect to Apollo, such as project-level governance policies, management of sub-structures, security processes and so on - Make decisions when community consensus cannot be reached # Decision-making and voting Proposals and ideas can be submitted for agreement via a GitHub issue, PR, or GitHub Discussion. Major changes such as feature proposals and organization or process changes should be brought to the PMC. For the change to happen, the change must earn more +1 than -1. # Conflict resolution In general, we prefer that technical issues and other disputes upon which consensus can't be reached are amicably worked out between the persons involved. If a dispute cannot be decided independently, the PMC can be called in to resolve the issue by voting. The same PR can be used, or a separate PR can be opened for voting. # Changes in Governance Any change in this Governance document, or similar nature of changes to other governance related documents, shall go through the voting process as described in [Decision-making and voting](#decision-making-and-voting). # Credits The contents of this document are based on <http://oss-watch.ac.uk/resources/meritocraticgovernancemodel> by Ross Gardler and Gabriel Hanganu, and [TiDB Governance](https://github.com/pingcap/community/blob/master/GOVERNANCE.md).
# Overview Apollo is a meritocratic, consensus-based community project. Anyone with an interest in the project can join the community, contribute to the project design and participate in the decision-making process. This document describes how that participation takes place and how to set about earning merit within the project community. # Roles and Responsibilities Apollo community is composed of and operated by the following roles: - Users - Contributors - Committers - Project Management Committee (PMC) ## Users Users are community members who have a need for the project. They are the most important members of the community and without them the project would have no purpose. Anyone can be a user and there are no special requirements. ## Contributors Contributors are community members who contribute in concrete ways to the project. ### How to become a Contributor - merged at least 1 pull request You are also encouraged to participate in the projects in the following ways: - Actively answer technical questions raised by community users in GitHub issues. - Help test the projects - Help review the pull requests (PRs) submitted by others - Help improve technical documents - Submit valuable issues - Report or fix known and unknown bugs - Write articles about source code analysis and usage cases for a project. - Give representations of Apollo topic in conferences. - Take part in our discussions of features, enhancements, etc. ## Committers Committers are contributors who have shown that they are committed to the continued development of the project through ongoing engagement with the community and recognized by PMCs for their outstanding contributions. ### How to become a Committer A Committer must have accomplished one or more of the following items: - Demonstrated a good sense of responsibility in PR reviews. - Demonstrated deep understanding of Apollo components by contributing significantly as: - Finished 2 or more tasks of Medium difficulty - Fixed 1 or more tasks of Hard difficulty - Nominated by one PMC member and gained more +1 than -1. ### Privileges and responsibilities - Control overall code quality of projects - Guide Contributors to contribute to the community continuously - Participate in design discussions ## Project Management Committee The PMC(Project Management Committee) functions as the core management team that oversees the Apollo community. The PMC has additional responsibilities over and above those of Committers. These responsibilities ensure the smooth running of the project. ### How to become a PMC member - Membership of the PMC is by invitation from the existing PMC members. - A nomination will result in discussion and then a vote by the existing PMC members. - PMC membership votes are subject to consensus approval of the current PMC members. ### Privileges and responsibilities - Handle reported security issues (CVE, etc.) - Nominate new committers and PMC members - Vote on new committers and new PMC members - Make major decisions for the future with respect to Apollo, such as project-level governance policies, management of sub-structures, security processes and so on - Make decisions when community consensus cannot be reached # Decision-making and voting Proposals and ideas can be submitted for agreement via a GitHub issue, PR, or GitHub Discussion. Major changes such as feature proposals and organization or process changes should be brought to the PMC. For the change to happen, the change must earn more +1 than -1. # Conflict resolution In general, we prefer that technical issues and other disputes upon which consensus can't be reached are amicably worked out between the persons involved. If a dispute cannot be decided independently, the PMC can be called in to resolve the issue by voting. The same PR can be used, or a separate PR can be opened for voting. # Changes in Governance Any change in this Governance document, or similar nature of changes to other governance related documents, shall go through the voting process as described in [Decision-making and voting](#decision-making-and-voting). # Credits The contents of this document are based on <http://oss-watch.ac.uk/resources/meritocraticgovernancemodel> by Ross Gardler and Gabriel Hanganu, and [TiDB Governance](https://github.com/pingcap/community/blob/master/GOVERNANCE.md).
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-adminservice/src/test/resources/application.properties
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring.datasource.url = jdbc:h2:mem:~/apolloconfigdb;mode=mysql;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1 spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl spring.jpa.properties.hibernate.show_sql=false spring.h2.console.enabled = true spring.h2.console.settings.web-allow-others=true spring.main.allow-bean-definition-overriding=true spring.cloud.consul.enabled=false
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring.datasource.url = jdbc:h2:mem:~/apolloconfigdb;mode=mysql;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1 spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl spring.jpa.properties.hibernate.show_sql=false spring.h2.console.enabled = true spring.h2.console.settings.web-allow-others=true spring.main.allow-bean-definition-overriding=true spring.cloud.consul.enabled=false
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-configservice/pom.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright 2021 Apollo Authors ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <parent> <groupId>com.ctrip.framework.apollo</groupId> <artifactId>apollo</artifactId> <version>${revision}</version> <relativePath>../pom.xml</relativePath> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>apollo-configservice</artifactId> <name>Apollo ConfigService</name> <properties> <github.path>${project.artifactId}</github.path> </properties> <dependencies> <!-- apollo --> <dependency> <groupId>com.ctrip.framework.apollo</groupId> <artifactId>apollo-biz</artifactId> </dependency> <!-- end of apollo --> <!-- eureka --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId> <exclusions> <exclusion> <artifactId>spring-cloud-starter-netflix-archaius</artifactId> <groupId>org.springframework.cloud</groupId> </exclusion> <exclusion> <artifactId>spring-cloud-starter-netflix-ribbon</artifactId> <groupId>org.springframework.cloud</groupId> </exclusion> <exclusion> <artifactId>ribbon-eureka</artifactId> <groupId>com.netflix.ribbon</groupId> </exclusion> <exclusion> <artifactId>aws-java-sdk-core</artifactId> <groupId>com.amazonaws</groupId> </exclusion> <exclusion> <artifactId>aws-java-sdk-ec2</artifactId> <groupId>com.amazonaws</groupId> </exclusion> <exclusion> <artifactId>aws-java-sdk-autoscaling</artifactId> <groupId>com.amazonaws</groupId> </exclusion> <exclusion> <artifactId>aws-java-sdk-sts</artifactId> <groupId>com.amazonaws</groupId> </exclusion> <exclusion> <artifactId>aws-java-sdk-route53</artifactId> <groupId>com.amazonaws</groupId> </exclusion> <!-- duplicated with spring-security-core --> <exclusion> <groupId>org.springframework.security</groupId> <artifactId>spring-security-crypto</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.sun.jersey.contribs</groupId> <artifactId>jersey-apache-client4</artifactId> </dependency> <!-- end of eureka --> <dependency> <groupId>com.alibaba.nacos</groupId> <artifactId>nacos-api</artifactId> <version>${nacos-discovery-api.version}</version> </dependency> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <scope>test</scope> </dependency> <!-- JDK 1.8+ --> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> </dependency> <dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-impl</artifactId> </dependency> <dependency> <groupId>org.glassfish.jaxb</groupId> <artifactId>jaxb-runtime</artifactId> </dependency> <dependency> <groupId>javax.activation</groupId> <artifactId>activation</artifactId> </dependency> <!-- end of JDK 1.8+ --> <!-- JDK 11+ --> <dependency> <groupId>org.javassist</groupId> <artifactId>javassist</artifactId> </dependency> <!-- end of JDK 11+ --> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <plugin> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <finalName>${project.artifactId}-${project.version}-${package.environment}</finalName> <appendAssemblyId>false</appendAssemblyId> <descriptors> <descriptor>src/assembly/assembly-descriptor.xml</descriptor> </descriptors> </configuration> </execution> </executions> </plugin> <plugin> <groupId>com.spotify</groupId> <artifactId>docker-maven-plugin</artifactId> <version>1.2.2</version> <configuration> <imageName>apolloconfig/${project.artifactId}</imageName> <imageTags> <imageTag>${project.version}</imageTag> <imageTag>latest</imageTag> </imageTags> <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory> <serverId>docker-hub</serverId> <buildArgs> <VERSION>${project.version}</VERSION> </buildArgs> <resources> <resource> <targetPath>/</targetPath> <directory>${project.build.directory}</directory> <include>*.zip</include> </resource> </resources> </configuration> </plugin> </plugins> </build> <profiles> <profile> <id>nacos-discovery</id> <dependencies> <dependency> <groupId>com.alibaba.boot</groupId> <artifactId>nacos-discovery-spring-boot-starter</artifactId> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> </dependency> </dependencies> </profile> </profiles> </project>
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright 2021 Apollo Authors ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <parent> <groupId>com.ctrip.framework.apollo</groupId> <artifactId>apollo</artifactId> <version>${revision}</version> <relativePath>../pom.xml</relativePath> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>apollo-configservice</artifactId> <name>Apollo ConfigService</name> <properties> <github.path>${project.artifactId}</github.path> </properties> <dependencies> <!-- apollo --> <dependency> <groupId>com.ctrip.framework.apollo</groupId> <artifactId>apollo-biz</artifactId> </dependency> <!-- end of apollo --> <!-- eureka --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId> <exclusions> <exclusion> <artifactId>spring-cloud-starter-netflix-archaius</artifactId> <groupId>org.springframework.cloud</groupId> </exclusion> <exclusion> <artifactId>spring-cloud-starter-netflix-ribbon</artifactId> <groupId>org.springframework.cloud</groupId> </exclusion> <exclusion> <artifactId>ribbon-eureka</artifactId> <groupId>com.netflix.ribbon</groupId> </exclusion> <exclusion> <artifactId>aws-java-sdk-core</artifactId> <groupId>com.amazonaws</groupId> </exclusion> <exclusion> <artifactId>aws-java-sdk-ec2</artifactId> <groupId>com.amazonaws</groupId> </exclusion> <exclusion> <artifactId>aws-java-sdk-autoscaling</artifactId> <groupId>com.amazonaws</groupId> </exclusion> <exclusion> <artifactId>aws-java-sdk-sts</artifactId> <groupId>com.amazonaws</groupId> </exclusion> <exclusion> <artifactId>aws-java-sdk-route53</artifactId> <groupId>com.amazonaws</groupId> </exclusion> <!-- duplicated with spring-security-core --> <exclusion> <groupId>org.springframework.security</groupId> <artifactId>spring-security-crypto</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.sun.jersey.contribs</groupId> <artifactId>jersey-apache-client4</artifactId> </dependency> <!-- end of eureka --> <dependency> <groupId>com.alibaba.nacos</groupId> <artifactId>nacos-api</artifactId> <version>${nacos-discovery-api.version}</version> </dependency> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <scope>test</scope> </dependency> <!-- JDK 1.8+ --> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> </dependency> <dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-impl</artifactId> </dependency> <dependency> <groupId>org.glassfish.jaxb</groupId> <artifactId>jaxb-runtime</artifactId> </dependency> <dependency> <groupId>javax.activation</groupId> <artifactId>activation</artifactId> </dependency> <!-- end of JDK 1.8+ --> <!-- JDK 11+ --> <dependency> <groupId>org.javassist</groupId> <artifactId>javassist</artifactId> </dependency> <!-- end of JDK 11+ --> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <plugin> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <finalName>${project.artifactId}-${project.version}-${package.environment}</finalName> <appendAssemblyId>false</appendAssemblyId> <descriptors> <descriptor>src/assembly/assembly-descriptor.xml</descriptor> </descriptors> </configuration> </execution> </executions> </plugin> <plugin> <groupId>com.spotify</groupId> <artifactId>docker-maven-plugin</artifactId> <version>1.2.2</version> <configuration> <imageName>apolloconfig/${project.artifactId}</imageName> <imageTags> <imageTag>${project.version}</imageTag> <imageTag>latest</imageTag> </imageTags> <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory> <serverId>docker-hub</serverId> <buildArgs> <VERSION>${project.version}</VERSION> </buildArgs> <resources> <resource> <targetPath>/</targetPath> <directory>${project.build.directory}</directory> <include>*.zip</include> </resource> </resources> </configuration> </plugin> </plugins> </build> <profiles> <profile> <id>nacos-discovery</id> <dependencies> <dependency> <groupId>com.alibaba.boot</groupId> <artifactId>nacos-discovery-spring-boot-starter</artifactId> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> </dependency> </dependencies> </profile> </profiles> </project>
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-configservice/src/main/config/application-github.properties
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # DataSource spring.datasource.url = ${spring_datasource_url} spring.datasource.username = ${spring_datasource_username} spring.datasource.password = ${spring_datasource_password}
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # DataSource spring.datasource.url = ${spring_datasource_url} spring.datasource.username = ${spring_datasource_username} spring.datasource.password = ${spring_datasource_password}
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/config/application-ldap-openldap-sample.yml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # ldap sample for open ldap, need to rename this file to application-ldap.yml to make it effective spring: ldap: base: "dc=example,dc=org" username: "cn=admin,dc=example,dc=org" # 配置管理员账号,用于搜索、匹配用户 password: "password" searchFilter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 urls: - "ldap://localhost:389" ldap: mapping: # 配置 ldap 属性 objectClass: "inetOrgPerson" # ldap 用户 objectClass 配置 loginId: "uid" # ldap 用户惟一 id,用来作为登录的 id rdnKey: "uid" # ldap rdn key,可选项,如需启用group search需要配置 userDisplayName: "cn" # ldap 用户名,用来作为显示名 email: "mail" # ldap 邮箱属性 # group: # 启用group search,可选配置,启用后只有特定group的用户可以登录apollo # objectClass: "posixGroup" # 配置groupClassName # groupBase: "ou=group" # group search base # groupSearch: "(&(cn=dev))" # group filter # groupMembership: "memberUid" # group memberShip eg. member or memberUid
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # ldap sample for open ldap, need to rename this file to application-ldap.yml to make it effective spring: ldap: base: "dc=example,dc=org" username: "cn=admin,dc=example,dc=org" # 配置管理员账号,用于搜索、匹配用户 password: "password" searchFilter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户 urls: - "ldap://localhost:389" ldap: mapping: # 配置 ldap 属性 objectClass: "inetOrgPerson" # ldap 用户 objectClass 配置 loginId: "uid" # ldap 用户惟一 id,用来作为登录的 id rdnKey: "uid" # ldap rdn key,可选项,如需启用group search需要配置 userDisplayName: "cn" # ldap 用户名,用来作为显示名 email: "mail" # ldap 邮箱属性 # group: # 启用group search,可选配置,启用后只有特定group的用户可以登录apollo # objectClass: "posixGroup" # 配置groupClassName # groupBase: "ou=group" # group search base # groupSearch: "(&(cn=dev))" # group filter # groupMembership: "memberUid" # group memberShip eg. member or memberUid
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/zh/usage/other-language-client-user-guide.md
目前Apollo团队由于人力所限,只提供了Java和.Net的客户端,对于其它语言的应用,可以通过本文的介绍来直接通过Http接口获取配置。 另外,如果有团队/个人有兴趣的话,也欢迎帮助我们来实现其它语言的客户端,具体细节可以联系@nobodyiam和@lepdou。 >注:目前已有热心用户贡献了Go、Python、NodeJS、PHP、C++的客户端,更多信息可以参考[Go、Python、NodeJS、PHP等客户端使用指南](zh/usage/third-party-sdks-user-guide) ## 1.1 应用接入Apollo 首先需要在Apollo中接入你的应用,具体步骤可以参考[应用接入文档](zh/usage/apollo-user-guide?id=一、普通应用接入指南)。 ## 1.2 通过带缓存的Http接口从Apollo读取配置 该接口会从缓存中获取配置,适合频率较高的配置拉取请求,如简单的每30秒轮询一次配置。 由于缓存最多会有一秒的延时,所以如果需要配合配置推送通知实现实时更新配置的话,请参考[1.3 通过不带缓存的Http接口从Apollo读取配置](#_13-%E9%80%9A%E8%BF%87%E4%B8%8D%E5%B8%A6%E7%BC%93%E5%AD%98%E7%9A%84http%E6%8E%A5%E5%8F%A3%E4%BB%8Eapollo%E8%AF%BB%E5%8F%96%E9%85%8D%E7%BD%AE)。 ### 1.2.1 Http接口说明 **URL**: {config_server_url}/configfiles/json/{appId}/{clusterName}/{namespaceName}?ip={clientIp} **Method**: GET **参数说明**: | 参数名 | 是否必须 | 参数值 | 备注 | |-------------------|----------|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | config_server_url | 是 | Apollo配置服务的地址 | | | appId | 是 | 应用的appId | | | clusterName | 是 | 集群名 | 一般情况下传入 default 即可。 如果希望配置按集群划分,可以参考[集群独立配置说明](zh/usage/apollo-user-guide?id=三、集群独立配置说明)做相关配置,然后在这里填入对应的集群名。 | | namespaceName | 是 | Namespace的名字 | 如果没有新建过Namespace的话,传入application即可。 如果创建了Namespace,并且需要使用该Namespace的配置,则传入对应的Namespace名字。**需要注意的是对于properties类型的namespace,只需要传入namespace的名字即可,如application。对于其它类型的namespace,需要传入namespace的名字加上后缀名,如datasources.json** | | ip | 否 | 应用部署的机器ip | 这个参数是可选的,用来实现灰度发布。 如果不想传这个参数,请注意URL中从?号开始的query parameters整个都不要出现。 | ### 1.2.2 Http接口返回格式 该Http接口返回的是JSON格式、UTF-8编码,包含了对应namespace中所有的配置项。 返回内容Sample如下: ```json { "portal.elastic.document.type":"biz", "portal.elastic.cluster.name":"hermes-es-fws" } ``` > 通过`{config_server_url}/configfiles/{appId}/{clusterName}/{namespaceName}?ip={clientIp}`可以获取到properties形式的配置 ### 1.2.3 测试 由于是Http接口,所以在URL组装OK之后,直接通过浏览器、或者相关的http接口测试工具访问即可。 ## 1.3 通过不带缓存的Http接口从Apollo读取配置 该接口会直接从数据库中获取配置,可以配合配置推送通知实现实时更新配置。 ### 1.3.1 Http接口说明 **URL**: {config_server_url}/configs/{appId}/{clusterName}/{namespaceName}?releaseKey={releaseKey}&ip={clientIp} **Method**: GET **参数说明**: | 参数名 | 是否必须 | 参数值 | 备注 | |-------------------|----------|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | config_server_url | 是 | Apollo配置服务的地址 | | | appId | 是 | 应用的appId | | | clusterName | 是 | 集群名 | 一般情况下传入 default 即可。 如果希望配置按集群划分,可以参考[集群独立配置说明](zh/usage/apollo-user-guide?id=三、集群独立配置说明)做相关配置,然后在这里填入对应的集群名。 | | namespaceName | 是 | Namespace的名字 | 如果没有新建过Namespace的话,传入application即可。 如果创建了Namespace,并且需要使用该Namespace的配置,则传入对应的Namespace名字。**需要注意的是对于properties类型的namespace,只需要传入namespace的名字即可,如application。对于其它类型的namespace,需要传入namespace的名字加上后缀名,如datasources.json** | | releaseKey | 否 | 上一次的releaseKey | 将上一次返回对象中的releaseKey传入即可,用来给服务端比较版本,如果版本比下来没有变化,则服务端直接返回304以节省流量和运算 | | ip | 否 | 应用部署的机器ip | 这个参数是可选的,用来实现灰度发布。 | ### 1.3.2 Http接口返回格式 该Http接口返回的是JSON格式、UTF-8编码。 如果配置没有变化(传入的releaseKey和服务端的相等),则返回HttpStatus 304,response body为空。 如果配置有变化,则会返回HttpStatus 200,response body为对应namespace的meta信息以及其中所有的配置项。 返回内容Sample如下: ```json { "appId": "100004458", "cluster": "default", "namespaceName": "application", "configurations": { "portal.elastic.document.type":"biz", "portal.elastic.cluster.name":"hermes-es-fws" }, "releaseKey": "20170430092936-dee2d58e74515ff3" } ``` ### 1.3.3 测试 由于是Http接口,所以在URL组装OK之后,直接通过浏览器、或者相关的http接口测试工具访问即可。 ## 1.4 应用感知配置更新 Apollo提供了基于Http long polling的配置更新推送通知,第三方客户端可以看自己实际的需求决定是否需要使用这个功能。 如果对配置更新时间不是那么敏感的话,可以通过定时刷新来感知配置更新,刷新频率可以视应用自身情况来定,建议在30秒以上。 如果需要做到实时感知配置更新(1秒)的话,可以参考下面的文档实现配置更新推送的功能。 ### 1.4.1 配置更新推送实现思路 这里建议大家可以参考Apollo的Java实现:[RemoteConfigLongPollService.java](https://github.com/ctripcorp/apollo/blob/master/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/RemoteConfigLongPollService.java),代码量200多行,总体上还是比较简单的。 #### 1.4.1.1 初始化 首先需要确定哪些namespace需要配置更新推送,Apollo的实现方式是程序第一次获取某个namespace的配置时就会来注册一下,我们就知道有哪些namespace需要配置更新推送了。 初始化后的结果就是得到一个notifications的Map,内容是namespaceName -> notificationId(初始值为-1)。 运行过程中如果发现有新的namespace需要配置更新推送,直接塞到notifications这个Map里面即可。 #### 1.4.1.2 请求服务 有了notifications这个Map之后,就可以请求服务了。这里先描述一下请求服务的逻辑,具体的URL参数和说明请参见后面的接口说明。 1. 请求远端服务,带上自己的应用信息以及notifications信息 2. 服务端针对传过来的每一个namespace和对应的notificationId,检查notificationId是否是最新的 3. 如果都是最新的,则保持住请求60秒,如果60秒内没有配置变化,则返回HttpStatus 304。如果60秒内有配置变化,则返回对应namespace的最新notificationId, HttpStatus 200。 4. 如果传过来的notifications信息中发现有notificationId比服务端老,则直接返回对应namespace的最新notificationId, HttpStatus 200。 5. 客户端拿到服务端返回后,判断返回的HttpStatus 6. 如果返回的HttpStatus是304,说明配置没有变化,重新执行第1步 7. 如果返回的HttpStauts是200,说明配置有变化,针对变化的namespace重新去服务端拉取配置,参见[1.3 通过不带缓存的Http接口从Apollo读取配置](#_13-%E9%80%9A%E8%BF%87%E4%B8%8D%E5%B8%A6%E7%BC%93%E5%AD%98%E7%9A%84http%E6%8E%A5%E5%8F%A3%E4%BB%8Eapollo%E8%AF%BB%E5%8F%96%E9%85%8D%E7%BD%AE)。同时更新notifications map中的notificationId。重新执行第1步。 ### 1.4.2 Http接口说明 **URL**: {config_server_url}/notifications/v2?appId={appId}&cluster={clusterName}&notifications={notifications} **Method**: GET **参数说明**: | 参数名 | 是否必须 | 参数值 | 备注 | |-------------------|----------|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | config_server_url | 是 | Apollo配置服务的地址 | | | appId | 是 | 应用的appId | | | clusterName | 是 | 集群名 | 一般情况下传入 default 即可。 如果希望配置按集群划分,可以参考[集群独立配置说明](zh/usage/apollo-user-guide?id=三、集群独立配置说明)做相关配置,然后在这里填入对应的集群名。 | | notifications | 是 | notifications信息 | 传入本地的notifications信息,注意这里需要以array形式转为json传入,如:[{"namespaceName": "application", "notificationId": 100}, {"namespaceName": "FX.apollo", "notificationId": 200}]。**需要注意的是对于properties类型的namespace,只需要传入namespace的名字即可,如application。对于其它类型的namespace,需要传入namespace的名字加上后缀名,如datasources.json** | > 注1:由于服务端会hold住请求60秒,所以请确保客户端访问服务端的超时时间要大于60秒。 > 注2:别忘了对参数进行[url encode](https://en.wikipedia.org/wiki/Percent-encoding) ### 1.4.3 Http接口返回格式 该Http接口返回的是JSON格式、UTF-8编码,包含了有变化的namespace和最新的notificationId。 返回内容Sample如下: ```json [ { "namespaceName": "application", "notificationId": 101 } ] ``` ### 1.4.4 测试 由于是Http接口,所以在URL组装OK之后,直接通过浏览器、或者相关的http接口测试工具访问即可。 ## 1.5 配置访问密钥 Apollo从1.6.0版本开始增加访问密钥机制,从而只有经过身份验证的客户端才能访问敏感配置。如果应用开启了访问密钥,客户端发出请求时需要增加签名,否则无法获取配置。 需要设置的Header信息: | Header | Value | 备注 | |---------------|------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| | Authorization | Apollo ${appId}:${signature} | appId: 应用的appId,signature:使用访问密钥对当前时间以及所访问的URL加签后的值,具体实现可以参考[Signature.signature](https://github.com/ctripcorp/apollo/blob/aa184a2e11d6e7e3f519d860d69f3cf30ccfcf9c/apollo-core/src/main/java/com/ctrip/framework/apollo/core/signature/Signature.java#L22) | | Timestamp | 从`1970-1-1 00:00:00 UTC+0`到现在所经过的毫秒数 | 可以参考[System.currentTimeMillis](https://docs.oracle.com/javase/7/docs/api/java/lang/System.html#currentTimeMillis()) | ## 1.6 错误码说明 正常情况下,接口返回的Http状态码是200,下面列举了Apollo会返回的非200错误码说明。 ### 1.6.1 400 - Bad Request 客户端传入参数的错误,如必选参数没有传入等,客户端需要根据提示信息检查对应的参数是否正确。 ### 1.6.2 401 - Unauthorized 客户端未授权,如服务端配置了访问密钥,客户端未配置或配置错误。 ### 1.6.3 404 - Not Found 接口要访问的资源不存在,一般是URL或URL的参数错误,或者是对应的namespace还没有发布过配置。 ### 1.6.4 405 - Method Not Allowed 接口访问的Method不正确,比如应该使用GET的接口使用了POST访问等,客户端需要检查接口访问方式是否正确。 ### 1.6.5 500 - Internal Server Error 其它类型的错误默认都会返回500,对这类错误如果应用无法根据提示信息找到原因的话,可以尝试查看服务端日志来排查问题。
目前Apollo团队由于人力所限,只提供了Java和.Net的客户端,对于其它语言的应用,可以通过本文的介绍来直接通过Http接口获取配置。 另外,如果有团队/个人有兴趣的话,也欢迎帮助我们来实现其它语言的客户端,具体细节可以联系@nobodyiam和@lepdou。 >注:目前已有热心用户贡献了Go、Python、NodeJS、PHP、C++的客户端,更多信息可以参考[Go、Python、NodeJS、PHP等客户端使用指南](zh/usage/third-party-sdks-user-guide) ## 1.1 应用接入Apollo 首先需要在Apollo中接入你的应用,具体步骤可以参考[应用接入文档](zh/usage/apollo-user-guide?id=一、普通应用接入指南)。 ## 1.2 通过带缓存的Http接口从Apollo读取配置 该接口会从缓存中获取配置,适合频率较高的配置拉取请求,如简单的每30秒轮询一次配置。 由于缓存最多会有一秒的延时,所以如果需要配合配置推送通知实现实时更新配置的话,请参考[1.3 通过不带缓存的Http接口从Apollo读取配置](#_13-%E9%80%9A%E8%BF%87%E4%B8%8D%E5%B8%A6%E7%BC%93%E5%AD%98%E7%9A%84http%E6%8E%A5%E5%8F%A3%E4%BB%8Eapollo%E8%AF%BB%E5%8F%96%E9%85%8D%E7%BD%AE)。 ### 1.2.1 Http接口说明 **URL**: {config_server_url}/configfiles/json/{appId}/{clusterName}/{namespaceName}?ip={clientIp} **Method**: GET **参数说明**: | 参数名 | 是否必须 | 参数值 | 备注 | |-------------------|----------|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | config_server_url | 是 | Apollo配置服务的地址 | | | appId | 是 | 应用的appId | | | clusterName | 是 | 集群名 | 一般情况下传入 default 即可。 如果希望配置按集群划分,可以参考[集群独立配置说明](zh/usage/apollo-user-guide?id=三、集群独立配置说明)做相关配置,然后在这里填入对应的集群名。 | | namespaceName | 是 | Namespace的名字 | 如果没有新建过Namespace的话,传入application即可。 如果创建了Namespace,并且需要使用该Namespace的配置,则传入对应的Namespace名字。**需要注意的是对于properties类型的namespace,只需要传入namespace的名字即可,如application。对于其它类型的namespace,需要传入namespace的名字加上后缀名,如datasources.json** | | ip | 否 | 应用部署的机器ip | 这个参数是可选的,用来实现灰度发布。 如果不想传这个参数,请注意URL中从?号开始的query parameters整个都不要出现。 | ### 1.2.2 Http接口返回格式 该Http接口返回的是JSON格式、UTF-8编码,包含了对应namespace中所有的配置项。 返回内容Sample如下: ```json { "portal.elastic.document.type":"biz", "portal.elastic.cluster.name":"hermes-es-fws" } ``` > 通过`{config_server_url}/configfiles/{appId}/{clusterName}/{namespaceName}?ip={clientIp}`可以获取到properties形式的配置 ### 1.2.3 测试 由于是Http接口,所以在URL组装OK之后,直接通过浏览器、或者相关的http接口测试工具访问即可。 ## 1.3 通过不带缓存的Http接口从Apollo读取配置 该接口会直接从数据库中获取配置,可以配合配置推送通知实现实时更新配置。 ### 1.3.1 Http接口说明 **URL**: {config_server_url}/configs/{appId}/{clusterName}/{namespaceName}?releaseKey={releaseKey}&ip={clientIp} **Method**: GET **参数说明**: | 参数名 | 是否必须 | 参数值 | 备注 | |-------------------|----------|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | config_server_url | 是 | Apollo配置服务的地址 | | | appId | 是 | 应用的appId | | | clusterName | 是 | 集群名 | 一般情况下传入 default 即可。 如果希望配置按集群划分,可以参考[集群独立配置说明](zh/usage/apollo-user-guide?id=三、集群独立配置说明)做相关配置,然后在这里填入对应的集群名。 | | namespaceName | 是 | Namespace的名字 | 如果没有新建过Namespace的话,传入application即可。 如果创建了Namespace,并且需要使用该Namespace的配置,则传入对应的Namespace名字。**需要注意的是对于properties类型的namespace,只需要传入namespace的名字即可,如application。对于其它类型的namespace,需要传入namespace的名字加上后缀名,如datasources.json** | | releaseKey | 否 | 上一次的releaseKey | 将上一次返回对象中的releaseKey传入即可,用来给服务端比较版本,如果版本比下来没有变化,则服务端直接返回304以节省流量和运算 | | ip | 否 | 应用部署的机器ip | 这个参数是可选的,用来实现灰度发布。 | ### 1.3.2 Http接口返回格式 该Http接口返回的是JSON格式、UTF-8编码。 如果配置没有变化(传入的releaseKey和服务端的相等),则返回HttpStatus 304,response body为空。 如果配置有变化,则会返回HttpStatus 200,response body为对应namespace的meta信息以及其中所有的配置项。 返回内容Sample如下: ```json { "appId": "100004458", "cluster": "default", "namespaceName": "application", "configurations": { "portal.elastic.document.type":"biz", "portal.elastic.cluster.name":"hermes-es-fws" }, "releaseKey": "20170430092936-dee2d58e74515ff3" } ``` ### 1.3.3 测试 由于是Http接口,所以在URL组装OK之后,直接通过浏览器、或者相关的http接口测试工具访问即可。 ## 1.4 应用感知配置更新 Apollo提供了基于Http long polling的配置更新推送通知,第三方客户端可以看自己实际的需求决定是否需要使用这个功能。 如果对配置更新时间不是那么敏感的话,可以通过定时刷新来感知配置更新,刷新频率可以视应用自身情况来定,建议在30秒以上。 如果需要做到实时感知配置更新(1秒)的话,可以参考下面的文档实现配置更新推送的功能。 ### 1.4.1 配置更新推送实现思路 这里建议大家可以参考Apollo的Java实现:[RemoteConfigLongPollService.java](https://github.com/ctripcorp/apollo/blob/master/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/RemoteConfigLongPollService.java),代码量200多行,总体上还是比较简单的。 #### 1.4.1.1 初始化 首先需要确定哪些namespace需要配置更新推送,Apollo的实现方式是程序第一次获取某个namespace的配置时就会来注册一下,我们就知道有哪些namespace需要配置更新推送了。 初始化后的结果就是得到一个notifications的Map,内容是namespaceName -> notificationId(初始值为-1)。 运行过程中如果发现有新的namespace需要配置更新推送,直接塞到notifications这个Map里面即可。 #### 1.4.1.2 请求服务 有了notifications这个Map之后,就可以请求服务了。这里先描述一下请求服务的逻辑,具体的URL参数和说明请参见后面的接口说明。 1. 请求远端服务,带上自己的应用信息以及notifications信息 2. 服务端针对传过来的每一个namespace和对应的notificationId,检查notificationId是否是最新的 3. 如果都是最新的,则保持住请求60秒,如果60秒内没有配置变化,则返回HttpStatus 304。如果60秒内有配置变化,则返回对应namespace的最新notificationId, HttpStatus 200。 4. 如果传过来的notifications信息中发现有notificationId比服务端老,则直接返回对应namespace的最新notificationId, HttpStatus 200。 5. 客户端拿到服务端返回后,判断返回的HttpStatus 6. 如果返回的HttpStatus是304,说明配置没有变化,重新执行第1步 7. 如果返回的HttpStauts是200,说明配置有变化,针对变化的namespace重新去服务端拉取配置,参见[1.3 通过不带缓存的Http接口从Apollo读取配置](#_13-%E9%80%9A%E8%BF%87%E4%B8%8D%E5%B8%A6%E7%BC%93%E5%AD%98%E7%9A%84http%E6%8E%A5%E5%8F%A3%E4%BB%8Eapollo%E8%AF%BB%E5%8F%96%E9%85%8D%E7%BD%AE)。同时更新notifications map中的notificationId。重新执行第1步。 ### 1.4.2 Http接口说明 **URL**: {config_server_url}/notifications/v2?appId={appId}&cluster={clusterName}&notifications={notifications} **Method**: GET **参数说明**: | 参数名 | 是否必须 | 参数值 | 备注 | |-------------------|----------|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | config_server_url | 是 | Apollo配置服务的地址 | | | appId | 是 | 应用的appId | | | clusterName | 是 | 集群名 | 一般情况下传入 default 即可。 如果希望配置按集群划分,可以参考[集群独立配置说明](zh/usage/apollo-user-guide?id=三、集群独立配置说明)做相关配置,然后在这里填入对应的集群名。 | | notifications | 是 | notifications信息 | 传入本地的notifications信息,注意这里需要以array形式转为json传入,如:[{"namespaceName": "application", "notificationId": 100}, {"namespaceName": "FX.apollo", "notificationId": 200}]。**需要注意的是对于properties类型的namespace,只需要传入namespace的名字即可,如application。对于其它类型的namespace,需要传入namespace的名字加上后缀名,如datasources.json** | > 注1:由于服务端会hold住请求60秒,所以请确保客户端访问服务端的超时时间要大于60秒。 > 注2:别忘了对参数进行[url encode](https://en.wikipedia.org/wiki/Percent-encoding) ### 1.4.3 Http接口返回格式 该Http接口返回的是JSON格式、UTF-8编码,包含了有变化的namespace和最新的notificationId。 返回内容Sample如下: ```json [ { "namespaceName": "application", "notificationId": 101 } ] ``` ### 1.4.4 测试 由于是Http接口,所以在URL组装OK之后,直接通过浏览器、或者相关的http接口测试工具访问即可。 ## 1.5 配置访问密钥 Apollo从1.6.0版本开始增加访问密钥机制,从而只有经过身份验证的客户端才能访问敏感配置。如果应用开启了访问密钥,客户端发出请求时需要增加签名,否则无法获取配置。 需要设置的Header信息: | Header | Value | 备注 | |---------------|------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| | Authorization | Apollo ${appId}:${signature} | appId: 应用的appId,signature:使用访问密钥对当前时间以及所访问的URL加签后的值,具体实现可以参考[Signature.signature](https://github.com/ctripcorp/apollo/blob/aa184a2e11d6e7e3f519d860d69f3cf30ccfcf9c/apollo-core/src/main/java/com/ctrip/framework/apollo/core/signature/Signature.java#L22) | | Timestamp | 从`1970-1-1 00:00:00 UTC+0`到现在所经过的毫秒数 | 可以参考[System.currentTimeMillis](https://docs.oracle.com/javase/7/docs/api/java/lang/System.html#currentTimeMillis()) | ## 1.6 错误码说明 正常情况下,接口返回的Http状态码是200,下面列举了Apollo会返回的非200错误码说明。 ### 1.6.1 400 - Bad Request 客户端传入参数的错误,如必选参数没有传入等,客户端需要根据提示信息检查对应的参数是否正确。 ### 1.6.2 401 - Unauthorized 客户端未授权,如服务端配置了访问密钥,客户端未配置或配置错误。 ### 1.6.3 404 - Not Found 接口要访问的资源不存在,一般是URL或URL的参数错误,或者是对应的namespace还没有发布过配置。 ### 1.6.4 405 - Method Not Allowed 接口访问的Method不正确,比如应该使用GET的接口使用了POST访问等,客户端需要检查接口访问方式是否正确。 ### 1.6.5 500 - Internal Server Error 其它类型的错误默认都会返回500,对这类错误如果应用无法根据提示信息找到原因的话,可以尝试查看服务端日志来排查问题。
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-adminservice/src/main/config/app.properties
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # appId=100003172 jdkVersion=1.8
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # appId=100003172 jdkVersion=1.8
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/en/community/team.md
# Apollo Team The Apollo team is comprised of Members and Contributors. Members have direct access to the source of Apollo project and actively evolve the code-base. Contributors improve the project through submission of patches and suggestions to the Members. The number of Contributors to the project is unbounded. All contributions to Apollo are greatly appreciated, whether for trivial cleanups, big new features or other material rewards. For more information about the community governance model, please refer [GOVERNANCE.md](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md). ## Members Members include Project Management Committee members and committers. The list is in alphabet order. ### Project Management Committee | Github ID | Name | Organization | | ---------- | ---------- | ------------ | | JaredTan95 | Jared Tan | DaoCloud | | kezhenxu94 | Zhenxu Ke | Tetrate | | nobodyiam | Jason Song | Ant Group | | zouyx | Joe Zou | Shein | ### Committer | Github ID | Name | Organization | | ----------- | ------------- | ------------ | | Anilople | Xiaoquan Wang | Some Bank | | klboke | Kailing Chen | TapTap | | lepdou | Le Zhang | Ant Group | | nisiyong | Stephen Ni | Qihoo 360 | | pengweiqhca | Wei Peng | Tuhu | | vdisk-group | Lvqiu Ye | Hundsun | ## Contributors ### Apollo main repository <img src="https://opencollective.com/apollo/contributors.svg?width=880&button=false" /> ### apollo.net <img src="https://opencollective.com/apollonet/contributors.svg?width=880&button=false" /> ## Becoming a Committer Please refer [How to become a Committer](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md#how-to-become-a-committer).
# Apollo Team The Apollo team is comprised of Members and Contributors. Members have direct access to the source of Apollo project and actively evolve the code-base. Contributors improve the project through submission of patches and suggestions to the Members. The number of Contributors to the project is unbounded. All contributions to Apollo are greatly appreciated, whether for trivial cleanups, big new features or other material rewards. For more information about the community governance model, please refer [GOVERNANCE.md](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md). ## Members Members include Project Management Committee members and committers. The list is in alphabet order. ### Project Management Committee | Github ID | Name | Organization | | ---------- | ---------- | ------------ | | JaredTan95 | Jared Tan | DaoCloud | | kezhenxu94 | Zhenxu Ke | Tetrate | | nobodyiam | Jason Song | Ant Group | | zouyx | Joe Zou | Shein | ### Committer | Github ID | Name | Organization | | ----------- | ------------- | ------------ | | Anilople | Xiaoquan Wang | Some Bank | | klboke | Kailing Chen | TapTap | | lepdou | Le Zhang | Ant Group | | nisiyong | Stephen Ni | Qihoo 360 | | pengweiqhca | Wei Peng | Tuhu | | vdisk-group | Lvqiu Ye | Hundsun | ## Contributors ### Apollo main repository <img src="https://opencollective.com/apollo/contributors.svg?width=880&button=false" /> ### apollo.net <img src="https://opencollective.com/apollonet/contributors.svg?width=880&button=false" /> ## Becoming a Committer Please refer [How to become a Committer](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md#how-to-become-a-committer).
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/zh/development/portal-how-to-enable-webhook-notification.md
从 1.8.0 版本开始,apollo 增加了 webhook 支持,从而可以在配置发布时触发 webhook 并告知配置发布的信息。 ## 启用方式 > 配置项统一存储在ApolloPortalDB.ServerConfig表中,也可以通过`管理员工具 - 系统参数`页面进行配置,修改完一分钟实时生效。 1. webhook.supported.envs 开启 webhook 的环境列表,多个环境以英文逗号分隔,如 ``` DEV,FAT,UAT,PRO ``` 2. config.release.webhook.service.url webhook 通知的 url 地址,需要接收 HTTP POST 请求。如有多个地址,以英文逗号分隔,如 ``` http://www.xxx.com/webhook1,http://www.xxx.com/webhook2 ``` ## Webhook 接入方式 1. URL 参数 参数名 | 参数说明 --- | --- env | 该次配置发布所在的环境 2. Request body sample ```json { "appId": "", // appId "clusterName": "", // 集群 "namespaceName": "", // namespace "operator": "", // 发布人 "releaseId": 2, // releaseId "releaseTitle": "", // releaseTitle "releaseComment": "", // releaseComment "releaseTime": "", // 发布时间 eg:2020-01-01T00:00:00.000+0800 "configuration": [ { // 发布后的全部配置,如果为灰度发布,则为灰度发布后的全部配置 "firstEntity": "", // 配置的key "secondEntity": "" // 配置的value } ], "isReleaseAbandoned": false, "previousReleaseId": 1, // 上一次正式发布的releaseId "operation": // 0-正常发布 1-配置回滚 2-灰度发布 4-全量发布 "operationContext": { // 操作设置的属性配置 "isEmergencyPublish": true/false, // 是否紧急发布 "rules": [ { // 灰度规则 "clientAppId": "", // appId "clientIpList": [ "10.0.0.2", "10.0.0.3" ] // IP列表 } ], "branchReleaseKeys": [ "", "" ] // 灰度发布的key } } ```
从 1.8.0 版本开始,apollo 增加了 webhook 支持,从而可以在配置发布时触发 webhook 并告知配置发布的信息。 ## 启用方式 > 配置项统一存储在ApolloPortalDB.ServerConfig表中,也可以通过`管理员工具 - 系统参数`页面进行配置,修改完一分钟实时生效。 1. webhook.supported.envs 开启 webhook 的环境列表,多个环境以英文逗号分隔,如 ``` DEV,FAT,UAT,PRO ``` 2. config.release.webhook.service.url webhook 通知的 url 地址,需要接收 HTTP POST 请求。如有多个地址,以英文逗号分隔,如 ``` http://www.xxx.com/webhook1,http://www.xxx.com/webhook2 ``` ## Webhook 接入方式 1. URL 参数 参数名 | 参数说明 --- | --- env | 该次配置发布所在的环境 2. Request body sample ```json { "appId": "", // appId "clusterName": "", // 集群 "namespaceName": "", // namespace "operator": "", // 发布人 "releaseId": 2, // releaseId "releaseTitle": "", // releaseTitle "releaseComment": "", // releaseComment "releaseTime": "", // 发布时间 eg:2020-01-01T00:00:00.000+0800 "configuration": [ { // 发布后的全部配置,如果为灰度发布,则为灰度发布后的全部配置 "firstEntity": "", // 配置的key "secondEntity": "" // 配置的value } ], "isReleaseAbandoned": false, "previousReleaseId": 1, // 上一次正式发布的releaseId "operation": // 0-正常发布 1-配置回滚 2-灰度发布 4-全量发布 "operationContext": { // 操作设置的属性配置 "isEmergencyPublish": true/false, // 是否紧急发布 "rules": [ { // 灰度规则 "clientAppId": "", // appId "clientIpList": [ "10.0.0.2", "10.0.0.3" ] // IP列表 } ], "branchReleaseKeys": [ "", "" ] // 灰度发布的key } } ```
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/zh/design/apollo-core-concept-namespace.md
### 1. 什么是Namespace? Namespace是配置项的集合,类似于一个配置文件的概念。 ### 2. 什么是“application”的Namespace? Apollo在创建项目的时候,都会默认创建一个“application”的Namespace。顾名思义,“application”是给应用自身使用的,熟悉Spring Boot的同学都知道,Spring Boot项目都有一个默认配置文件application.yml。在这里application.yml就等同于“application”的Namespace。对于90%的应用来说,“application”的Namespace已经满足日常配置使用场景了。 #### 客户端获取“application” Namespace的代码如下: ``` java Config config = ConfigService.getAppConfig(); ``` #### 客户端获取非“application” Namespace的代码如下: ``` java Config config = ConfigService.getConfig(namespaceName); ``` ### 3. Namespace的格式有哪些? 配置文件有多种格式,例如:properties、xml、yml、yaml、json等。同样Namespace也具有这些格式。在Portal UI中可以看到“application”的Namespace上有一个“properties”标签,表明“application”是properties格式的。 >注1:非properties格式的namespace,在客户端使用时需要调用`ConfigService.getConfigFile(String namespace, ConfigFileFormat configFileFormat)`来获取,如果使用[Http接口直接调用](zh/usage/other-language-client-user-guide#_12-通过带缓存的http接口从apollo读取配置)时,对应的namespace参数需要传入namespace的名字加上后缀名,如datasources.json。 >注2:apollo-client 1.3.0版本开始对yaml/yml做了更好的支持,使用起来和properties格式一致:`Config config = ConfigService.getConfig("application.yml");`,Spring的注入方式也和properties一致。 ### 4. Namespace的获取权限分类 Namespace的获取权限分为两种: * private (私有的) * public (公共的) 这里的获取权限是相对于Apollo客户端来说的。 #### 4.1 private权限 private权限的Namespace,只能被所属的应用获取到。一个应用尝试获取其它应用private的Namespace,Apollo会报“404”异常。 #### 4.2 public权限 public权限的Namespace,能被任何应用获取。 ### 5. Namespace的类型 Namespace类型有三种: * 私有类型 * 公共类型 * 关联类型(继承类型) #### 5.1 私有类型 私有类型的Namespace具有private权限。例如上文提到的“application” Namespace就是私有类型。 #### 5.2 公共类型 ##### 5.2.1 含义 公共类型的Namespace具有public权限。公共类型的Namespace相当于游离于应用之外的配置,且通过Namespace的名称去标识公共Namespace,所以公共的Namespace的名称必须全局唯一。 ##### 5.2.2 使用场景 * 部门级别共享的配置 * 小组级别共享的配置 * 几个项目之间共享的配置 * 中间件客户端的配置 #### 5.3 关联类型 ##### 5.3.1 含义 关联类型又可称为继承类型,关联类型具有private权限。关联类型的Namespace继承于公共类型的Namespace,用于覆盖公共Namespace的某些配置。例如公共的Namespace有两个配置项 ``` k1 = v1 k2 = v2 ``` 然后应用A有一个关联类型的Namespace关联了此公共Namespace,且覆盖了配置项k1,新值为v3。那么在应用A实际运行时,获取到的公共Namespace的配置为: ``` k1 = v3 k2 = v2 ``` ##### 5.3.2 使用场景 举一个实际使用的场景。假设RPC框架的配置(如:timeout)有以下要求: * 提供一份全公司默认的配置且可动态调整 * RPC客户端项目可以自定义某些配置项且可动态调整 1. 如果把以上两点要求去掉“动态调整”,那么做法很简单。在rpc-client.jar包里有一份配置文件,每次修改配置文件然后重新发一个版本的jar包即可。同理,客户端项目修改配置也是如此。 2. 如果只支持客户端项目可动态调整配置。客户端项目可以在Apollo “application” Namespace上配置一些配置项。在初始化service的时候,从Apollo上读取配置即可。这样做的坏处就是,每个项目都要自定义一些key,不统一。 3. 那么如何完美支持以上需求呢?答案就是结合使用Apollo的公共类型的Namespace和关联类型的Namespace。RPC团队在Apollo上维护一个叫“rpc-client”的公共Namespace,在“rpc-client” Namespace上配置默认的参数值。rpc-client.jar里的代码读取“rpc-client”Namespace的配置即可。如果需要调整默认的配置,只需要修改公共类型“rpc-client” Namespace的配置。如果客户端项目想要自定义或动态修改某些配置项,只需要在Apollo 自己项目下关联“rpc-client”,就能创建关联类型“rpc-client”的Namespace。然后在关联类型“rpc-client”的Namespace下修改配置项即可。这里有一点需要指出的,那就是rpc-client.jar是在应用容器里运行的,所以rpc-client获取到的“rpc-client” Namespace的配置是应用的关联类型的Namespace加上公共类型的Namespace。 #### 5.4 例子 如下图所示,有三个应用:应用A、应用B、应用C。 * 应用A有两个私有类型的Namespace:application和NS-Private,以及一个关联类型的Namespace:NS-Public。 * 应用B有一个私有类型的Namespace:application,以及一个公共类型的Namespace:NS-Public。 * 应用C只有一个私有类型的Namespace:application ![Namespace例子](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-model-example.png) ##### 5.4.1 应用A获取Apollo配置 ```java //application Config appConfig = ConfigService.getAppConfig(); appConfig.getProperty("k1", null); // k1 = v11 appConfig.getProperty("k2", null); // k2 = v21 //NS-Private Config privateConfig = ConfigService.getConfig("NS-Private"); privateConfig.getProperty("k1", null); // k1 = v3 privateConfig.getProperty("k3", null); // k3 = v4 //NS-Public,覆盖公共类型配置的情况,k4被覆盖 Config publicConfig = ConfigService.getConfig("NS-Public"); publicConfig.getProperty("k4", null); // k4 = v6 cover publicConfig.getProperty("k6", null); // k6 = v6 publicConfig.getProperty("k7", null); // k7 = v7 ``` ##### 5.4.2 应用B获取Apollo配置 ```java //application Config appConfig = ConfigService.getAppConfig(); appConfig.getProperty("k1", null); // k1 = v12 appConfig.getProperty("k2", null); // k2 = null appConfig.getProperty("k3", null); // k3 = v32 //NS-Private,由于没有NS-Private Namespace 所以获取到default value Config privateConfig = ConfigService.getConfig("NS-Private"); privateConfig.getProperty("k1", "default value"); //NS-Public Config publicConfig = ConfigService.getConfig("NS-Public"); publicConfig.getProperty("k4", null); // k4 = v5 publicConfig.getProperty("k6", null); // k6 = v6 publicConfig.getProperty("k7", null); // k7 = v7 ``` ##### 5.4.3 应用C获取Apollo配置 ```java //application Config appConfig = ConfigService.getAppConfig(); appConfig.getProperty("k1", null); // k1 = v12 appConfig.getProperty("k2", null); // k2 = null appConfig.getProperty("k3", null); // k3 = v33 //NS-Private,由于没有NS-Private Namespace 所以获取到default value Config privateConfig = ConfigService.getConfig("NS-Private"); privateConfig.getProperty("k1", "default value"); //NS-Public,公共类型的Namespace,任何项目都可以获取到 Config publicConfig = ConfigService.getConfig("NS-Public"); publicConfig.getProperty("k4", null); // k4 = v5 publicConfig.getProperty("k6", null); // k6 = v6 publicConfig.getProperty("k7", null); // k7 = v7 ``` ##### 5.4.4 ChangeListener 以上代码例子中可以看到,在客户端Namespace映射成一个Config对象。Namespace配置变更的监听器是注册在Config对象上。 所以在应用A中监听application的Namespace代码如下: ```java Config appConfig = ConfigService.getAppConfig(); appConfig.addChangeListener(new ConfigChangeListener() { public void onChange(ConfigChangeEvent changeEvent) { //do something } }) ``` 在应用A中监听NS-Private的Namespace代码如下: ```java Config privateConfig = ConfigService.getConfig("NS-Private"); privateConfig.addChangeListener(new ConfigChangeListener() { public void onChange(ConfigChangeEvent changeEvent) { //do something } }) ``` 在应用A、应用B、应用C中监听NS-Public的Namespace代码如下: ```java Config publicConfig = ConfigService.getConfig("NS-Public"); publicConfig.addChangeListener(new ConfigChangeListener() { public void onChange(ConfigChangeEvent changeEvent) { //do something } }) ```
### 1. 什么是Namespace? Namespace是配置项的集合,类似于一个配置文件的概念。 ### 2. 什么是“application”的Namespace? Apollo在创建项目的时候,都会默认创建一个“application”的Namespace。顾名思义,“application”是给应用自身使用的,熟悉Spring Boot的同学都知道,Spring Boot项目都有一个默认配置文件application.yml。在这里application.yml就等同于“application”的Namespace。对于90%的应用来说,“application”的Namespace已经满足日常配置使用场景了。 #### 客户端获取“application” Namespace的代码如下: ``` java Config config = ConfigService.getAppConfig(); ``` #### 客户端获取非“application” Namespace的代码如下: ``` java Config config = ConfigService.getConfig(namespaceName); ``` ### 3. Namespace的格式有哪些? 配置文件有多种格式,例如:properties、xml、yml、yaml、json等。同样Namespace也具有这些格式。在Portal UI中可以看到“application”的Namespace上有一个“properties”标签,表明“application”是properties格式的。 >注1:非properties格式的namespace,在客户端使用时需要调用`ConfigService.getConfigFile(String namespace, ConfigFileFormat configFileFormat)`来获取,如果使用[Http接口直接调用](zh/usage/other-language-client-user-guide#_12-通过带缓存的http接口从apollo读取配置)时,对应的namespace参数需要传入namespace的名字加上后缀名,如datasources.json。 >注2:apollo-client 1.3.0版本开始对yaml/yml做了更好的支持,使用起来和properties格式一致:`Config config = ConfigService.getConfig("application.yml");`,Spring的注入方式也和properties一致。 ### 4. Namespace的获取权限分类 Namespace的获取权限分为两种: * private (私有的) * public (公共的) 这里的获取权限是相对于Apollo客户端来说的。 #### 4.1 private权限 private权限的Namespace,只能被所属的应用获取到。一个应用尝试获取其它应用private的Namespace,Apollo会报“404”异常。 #### 4.2 public权限 public权限的Namespace,能被任何应用获取。 ### 5. Namespace的类型 Namespace类型有三种: * 私有类型 * 公共类型 * 关联类型(继承类型) #### 5.1 私有类型 私有类型的Namespace具有private权限。例如上文提到的“application” Namespace就是私有类型。 #### 5.2 公共类型 ##### 5.2.1 含义 公共类型的Namespace具有public权限。公共类型的Namespace相当于游离于应用之外的配置,且通过Namespace的名称去标识公共Namespace,所以公共的Namespace的名称必须全局唯一。 ##### 5.2.2 使用场景 * 部门级别共享的配置 * 小组级别共享的配置 * 几个项目之间共享的配置 * 中间件客户端的配置 #### 5.3 关联类型 ##### 5.3.1 含义 关联类型又可称为继承类型,关联类型具有private权限。关联类型的Namespace继承于公共类型的Namespace,用于覆盖公共Namespace的某些配置。例如公共的Namespace有两个配置项 ``` k1 = v1 k2 = v2 ``` 然后应用A有一个关联类型的Namespace关联了此公共Namespace,且覆盖了配置项k1,新值为v3。那么在应用A实际运行时,获取到的公共Namespace的配置为: ``` k1 = v3 k2 = v2 ``` ##### 5.3.2 使用场景 举一个实际使用的场景。假设RPC框架的配置(如:timeout)有以下要求: * 提供一份全公司默认的配置且可动态调整 * RPC客户端项目可以自定义某些配置项且可动态调整 1. 如果把以上两点要求去掉“动态调整”,那么做法很简单。在rpc-client.jar包里有一份配置文件,每次修改配置文件然后重新发一个版本的jar包即可。同理,客户端项目修改配置也是如此。 2. 如果只支持客户端项目可动态调整配置。客户端项目可以在Apollo “application” Namespace上配置一些配置项。在初始化service的时候,从Apollo上读取配置即可。这样做的坏处就是,每个项目都要自定义一些key,不统一。 3. 那么如何完美支持以上需求呢?答案就是结合使用Apollo的公共类型的Namespace和关联类型的Namespace。RPC团队在Apollo上维护一个叫“rpc-client”的公共Namespace,在“rpc-client” Namespace上配置默认的参数值。rpc-client.jar里的代码读取“rpc-client”Namespace的配置即可。如果需要调整默认的配置,只需要修改公共类型“rpc-client” Namespace的配置。如果客户端项目想要自定义或动态修改某些配置项,只需要在Apollo 自己项目下关联“rpc-client”,就能创建关联类型“rpc-client”的Namespace。然后在关联类型“rpc-client”的Namespace下修改配置项即可。这里有一点需要指出的,那就是rpc-client.jar是在应用容器里运行的,所以rpc-client获取到的“rpc-client” Namespace的配置是应用的关联类型的Namespace加上公共类型的Namespace。 #### 5.4 例子 如下图所示,有三个应用:应用A、应用B、应用C。 * 应用A有两个私有类型的Namespace:application和NS-Private,以及一个关联类型的Namespace:NS-Public。 * 应用B有一个私有类型的Namespace:application,以及一个公共类型的Namespace:NS-Public。 * 应用C只有一个私有类型的Namespace:application ![Namespace例子](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-model-example.png) ##### 5.4.1 应用A获取Apollo配置 ```java //application Config appConfig = ConfigService.getAppConfig(); appConfig.getProperty("k1", null); // k1 = v11 appConfig.getProperty("k2", null); // k2 = v21 //NS-Private Config privateConfig = ConfigService.getConfig("NS-Private"); privateConfig.getProperty("k1", null); // k1 = v3 privateConfig.getProperty("k3", null); // k3 = v4 //NS-Public,覆盖公共类型配置的情况,k4被覆盖 Config publicConfig = ConfigService.getConfig("NS-Public"); publicConfig.getProperty("k4", null); // k4 = v6 cover publicConfig.getProperty("k6", null); // k6 = v6 publicConfig.getProperty("k7", null); // k7 = v7 ``` ##### 5.4.2 应用B获取Apollo配置 ```java //application Config appConfig = ConfigService.getAppConfig(); appConfig.getProperty("k1", null); // k1 = v12 appConfig.getProperty("k2", null); // k2 = null appConfig.getProperty("k3", null); // k3 = v32 //NS-Private,由于没有NS-Private Namespace 所以获取到default value Config privateConfig = ConfigService.getConfig("NS-Private"); privateConfig.getProperty("k1", "default value"); //NS-Public Config publicConfig = ConfigService.getConfig("NS-Public"); publicConfig.getProperty("k4", null); // k4 = v5 publicConfig.getProperty("k6", null); // k6 = v6 publicConfig.getProperty("k7", null); // k7 = v7 ``` ##### 5.4.3 应用C获取Apollo配置 ```java //application Config appConfig = ConfigService.getAppConfig(); appConfig.getProperty("k1", null); // k1 = v12 appConfig.getProperty("k2", null); // k2 = null appConfig.getProperty("k3", null); // k3 = v33 //NS-Private,由于没有NS-Private Namespace 所以获取到default value Config privateConfig = ConfigService.getConfig("NS-Private"); privateConfig.getProperty("k1", "default value"); //NS-Public,公共类型的Namespace,任何项目都可以获取到 Config publicConfig = ConfigService.getConfig("NS-Public"); publicConfig.getProperty("k4", null); // k4 = v5 publicConfig.getProperty("k6", null); // k6 = v6 publicConfig.getProperty("k7", null); // k7 = v7 ``` ##### 5.4.4 ChangeListener 以上代码例子中可以看到,在客户端Namespace映射成一个Config对象。Namespace配置变更的监听器是注册在Config对象上。 所以在应用A中监听application的Namespace代码如下: ```java Config appConfig = ConfigService.getAppConfig(); appConfig.addChangeListener(new ConfigChangeListener() { public void onChange(ConfigChangeEvent changeEvent) { //do something } }) ``` 在应用A中监听NS-Private的Namespace代码如下: ```java Config privateConfig = ConfigService.getConfig("NS-Private"); privateConfig.addChangeListener(new ConfigChangeListener() { public void onChange(ConfigChangeEvent changeEvent) { //do something } }) ``` 在应用A、应用B、应用C中监听NS-Public的Namespace代码如下: ```java Config publicConfig = ConfigService.getConfig("NS-Public"); publicConfig.addChangeListener(new ConfigChangeListener() { public void onChange(ConfigChangeEvent changeEvent) { //do something } }) ```
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-demo/src/main/resources/log4j2.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright 2021 Apollo Authors ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ --> <configuration monitorInterval="60"> <appenders> <Console name="Console" target="SYSTEM_OUT"> <PatternLayout pattern="[apollo-demo][%t]%d %-5p [%c] %m%n"/> </Console> <Async name="Async" includeLocation="true"> <AppenderRef ref="Console"/> </Async> </appenders> <loggers> <logger name="com.ctrip.framework.apollo" additivity="false" level="INFO"> <AppenderRef ref="Async"/> </logger> <logger name="com.ctrip.framework.apollo.demo" additivity="false" level="DEBUG"> <AppenderRef ref="Async"/> </logger> <root level="INFO"> <AppenderRef ref="Async"/> </root> </loggers> </configuration>
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright 2021 Apollo Authors ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ --> <configuration monitorInterval="60"> <appenders> <Console name="Console" target="SYSTEM_OUT"> <PatternLayout pattern="[apollo-demo][%t]%d %-5p [%c] %m%n"/> </Console> <Async name="Async" includeLocation="true"> <AppenderRef ref="Console"/> </Async> </appenders> <loggers> <logger name="com.ctrip.framework.apollo" additivity="false" level="INFO"> <AppenderRef ref="Async"/> </logger> <logger name="com.ctrip.framework.apollo.demo" additivity="false" level="DEBUG"> <AppenderRef ref="Async"/> </logger> <root level="INFO"> <AppenderRef ref="Async"/> </root> </loggers> </configuration>
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-client/src/test/resources/spring/XmlConfigPlaceholderTest8.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright 2021 Apollo Authors ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:apollo="http://www.ctrip.com/schema/apollo" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.ctrip.com/schema/apollo http://www.ctrip.com/schema/apollo.xsd"> <apollo:config /> <bean class="com.ctrip.framework.apollo.spring.XmlConfigPlaceholderAutoUpdateTest.TestXmlBeanWithConstructorArgs"> <constructor-arg index="0" value="${timeout}"/> <constructor-arg index="1" value="${batch}"/> </bean> </beans>
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright 2021 Apollo Authors ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:apollo="http://www.ctrip.com/schema/apollo" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.ctrip.com/schema/apollo http://www.ctrip.com/schema/apollo.xsd"> <apollo:config /> <bean class="com.ctrip.framework.apollo.spring.XmlConfigPlaceholderAutoUpdateTest.TestXmlBeanWithConstructorArgs"> <constructor-arg index="0" value="${timeout}"/> <constructor-arg index="1" value="${batch}"/> </bean> </beans>
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/zh/_navbar.md
- 社区 - [团队](zh/community/team.md) - [社区治理](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md) - [贡献指南](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) - [致谢](zh/community/thank-you.md) - Translations - [:uk: English](/en/) - [:cn: 中文](/zh/)
- 社区 - [团队](zh/community/team.md) - [社区治理](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md) - [贡献指南](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) - [致谢](zh/community/thank-you.md) - Translations - [:uk: English](/en/) - [:cn: 中文](/zh/)
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/resources/logback.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright 2021 Apollo Authors ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ --> <configuration> <include resource="org/springframework/boot/logging/logback/defaults.xml" /> <property name="LOG_FILE" value="${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}apollo-portal.log}" /> <include resource="org/springframework/boot/logging/logback/file-appender.xml" /> <include resource="org/springframework/boot/logging/logback/console-appender.xml" /> <root level="INFO"> <if condition='isDefined("LOG_APPENDERS")'> <then> <if condition='property("LOG_APPENDERS").contains("CONSOLE")'> <then> <appender-ref ref="CONSOLE"/> </then> </if> <if condition='property("LOG_APPENDERS").contains("FILE")'> <then> <appender-ref ref="FILE"/> </then> </if> </then> <else> <appender-ref ref="FILE" /> <appender-ref ref="CONSOLE" /> </else> </if> </root> </configuration>
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright 2021 Apollo Authors ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ --> <configuration> <include resource="org/springframework/boot/logging/logback/defaults.xml" /> <property name="LOG_FILE" value="${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}apollo-portal.log}" /> <include resource="org/springframework/boot/logging/logback/file-appender.xml" /> <include resource="org/springframework/boot/logging/logback/console-appender.xml" /> <root level="INFO"> <if condition='isDefined("LOG_APPENDERS")'> <then> <if condition='property("LOG_APPENDERS").contains("CONSOLE")'> <then> <appender-ref ref="CONSOLE"/> </then> </if> <if condition='property("LOG_APPENDERS").contains("FILE")'> <then> <appender-ref ref="FILE"/> </then> </if> </then> <else> <appender-ref ref="FILE" /> <appender-ref ref="CONSOLE" /> </else> </if> </root> </configuration>
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-client/src/test/resources/spring/yaml/case2.yml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # batch: 2000
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # batch: 2000
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-adminservice/src/main/resources/application-nacos-discovery.properties
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # eureka.client.enabled=false spring.cloud.discovery.enabled=false #nacos enabled nacos.discovery.register.enabled=true nacos.discovery.auto-register=true nacos.discovery.register.service-name=apollo-adminservice
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # eureka.client.enabled=false spring.cloud.discovery.enabled=false #nacos enabled nacos.discovery.register.enabled=true nacos.discovery.auto-register=true nacos.discovery.register.service-name=apollo-adminservice
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/zh/design/apollo-introduction.md
# &nbsp; # 1、What is Apollo ## 1.1 背景 随着程序功能的日益复杂,程序的配置日益增多:各种功能的开关、参数的配置、服务器的地址…… 对程序配置的期望值也越来越高:配置修改后实时生效,灰度发布,分环境、分集群管理配置,完善的权限、审核机制…… 在这样的大环境下,传统的通过配置文件、数据库等方式已经越来越无法满足开发人员对配置管理的需求。 Apollo配置中心应运而生! ## 1.2 Apollo简介 Apollo(阿波罗)是携程框架部门研发的开源配置管理中心,能够集中化管理应用不同环境、不同集群的配置,配置修改后能够实时推送到应用端,并且具备规范的权限、流程治理等特性。 Apollo支持4个维度管理Key-Value格式的配置: 1. application (应用) 2. environment (环境) 3. cluster (集群) 4. namespace (命名空间) 同时,Apollo基于开源模式开发,开源地址:<a href="https://github.com/ctripcorp/apollo" target="_blank">https://github.com/ctripcorp/apollo</a> ## 1.2 配置基本概念 既然Apollo定位于配置中心,那么在这里有必要先简单介绍一下什么是配置。 按照我们的理解,配置有以下几个属性: * **配置是独立于程序的只读变量** * 配置首先是独立于程序的,同一份程序在不同的配置下会有不同的行为。 * 其次,配置对于程序是只读的,程序通过读取配置来改变自己的行为,但是程序不应该去改变配置。 * 常见的配置有:DB Connection Str、Thread Pool Size、Buffer Size、Request Timeout、Feature Switch、Server Urls等。 * **配置伴随应用的整个生命周期** * 配置贯穿于应用的整个生命周期,应用在启动时通过读取配置来初始化,在运行时根据配置调整行为。 * **配置可以有多种加载方式** * 配置也有很多种加载方式,常见的有程序内部hard code,配置文件,环境变量,启动参数,基于数据库等 * **配置需要治理** * 权限控制 * 由于配置能改变程序的行为,不正确的配置甚至能引起灾难,所以对配置的修改必须有比较完善的权限控制 * 不同环境、集群配置管理 * 同一份程序在不同的环境(开发,测试,生产)、不同的集群(如不同的数据中心)经常需要有不同的配置,所以需要有完善的环境、集群配置管理 * 框架类组件配置管理 * 还有一类比较特殊的配置 - 框架类组件配置,比如CAT客户端的配置。 * 虽然这类框架类组件是由其他团队开发、维护,但是运行时是在业务实际应用内的,所以本质上可以认为框架类组件也是应用的一部分。 * 这类组件对应的配置也需要有比较完善的管理方式。 # 2、Why Apollo 正是基于配置的特殊性,所以Apollo从设计之初就立志于成为一个有治理能力的配置发布平台,目前提供了以下的特性: * **统一管理不同环境、不同集群的配置** * Apollo提供了一个统一界面集中式管理不同环境(environment)、不同集群(cluster)、不同命名空间(namespace)的配置。 * 同一份代码部署在不同的集群,可以有不同的配置,比如zookeeper的地址等 * 通过命名空间(namespace)可以很方便地支持多个不同应用共享同一份配置,同时还允许应用对共享的配置进行覆盖 * **配置修改实时生效(热发布)** * 用户在Apollo修改完配置并发布后,客户端能实时(1秒)接收到最新的配置,并通知到应用程序 * **版本发布管理** * 所有的配置发布都有版本概念,从而可以方便地支持配置的回滚 * **灰度发布** * 支持配置的灰度发布,比如点了发布后,只对部分应用实例生效,等观察一段时间没问题后再推给所有应用实例 * **权限管理、发布审核、操作审计** * 应用和配置的管理都有完善的权限管理机制,对配置的管理还分为了编辑和发布两个环节,从而减少人为的错误。 * 所有的操作都有审计日志,可以方便地追踪问题 * **客户端配置信息监控** * 可以在界面上方便地看到配置在被哪些实例使用 * **提供Java和.Net原生客户端** * 提供了Java和.Net的原生客户端,方便应用集成 * 支持Spring Placeholder, Annotation和Spring Boot的ConfigurationProperties,方便应用使用(需要Spring 3.1.1+) * 同时提供了Http接口,非Java和.Net应用也可以方便地使用 * **提供开放平台API** * Apollo自身提供了比较完善的统一配置管理界面,支持多环境、多数据中心配置管理、权限、流程治理等特性。不过Apollo出于通用性考虑,不会对配置的修改做过多限制,只要符合基本的格式就能保存,不会针对不同的配置值进行针对性的校验,如数据库用户名、密码,Redis服务地址等 * 对于这类应用配置,Apollo支持应用方通过开放平台API在Apollo进行配置的修改和发布,并且具备完善的授权和权限控制 * **部署简单** * 配置中心作为基础服务,可用性要求非常高,这就要求Apollo对外部依赖尽可能地少 * 目前唯一的外部依赖是MySQL,所以部署非常简单,只要安装好Java和MySQL就可以让Apollo跑起来 * Apollo还提供了打包脚本,一键就可以生成所有需要的安装包,并且支持自定义运行时参数 # 3、Apollo at a glance ## 3.1 基础模型 如下即是Apollo的基础模型: 1. 用户在配置中心对配置进行修改并发布 2. 配置中心通知Apollo客户端有配置更新 3. Apollo客户端从配置中心拉取最新的配置、更新本地配置并通知到应用 ![basic-architecture](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/basic-architecture.png) ## 3.2 界面概览 ![apollo-home-screenshot](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/apollo-home-screenshot.jpg) 上图是Apollo配置中心中一个项目的配置首页 * 在页面左上方的环境列表模块展示了所有的环境和集群,用户可以随时切换。 * 页面中央展示了两个namespace(application和FX.apollo)的配置信息,默认按照表格模式展示、编辑。用户也可以切换到文本模式,以文件形式查看、编辑。 * 页面上可以方便地进行发布、回滚、灰度、授权、查看更改历史和发布历史等操作 ## 3.3 添加/修改配置项 用户可以通过配置中心界面方便的添加/修改配置项,更多使用说明请参见[应用接入指南](zh/usage/apollo-user-guide) ![edit-item-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/edit-item-entry.png) 输入配置信息: ![edit-item](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/edit-item.png) ## 3.4 发布配置 通过配置中心发布配置: ![publish-items](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/publish-items-entry.png) 填写发布信息: ![publish-items](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/publish-items.png) ## 3.5 客户端获取配置(Java API样例) 配置发布后,就能在客户端获取到了,以Java为例,获取配置的示例代码如下。Apollo客户端还支持和Spring整合,更多客户端使用说明请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)和[.Net客户端使用指南](zh/usage/dotnet-sdk-user-guide)。 ```java Config config = ConfigService.getAppConfig(); Integer defaultRequestTimeout = 200; Integer requestTimeout = config.getIntProperty("requestTimeout", defaultRequestTimeout); ``` ## 3.6 客户端监听配置变化 通过上述获取配置代码,应用就能实时获取到最新的配置了。 不过在某些场景下,应用还需要在配置变化时获得通知,比如数据库连接的切换等,所以Apollo还提供了监听配置变化的功能,Java示例如下: ```java Config config = ConfigService.getAppConfig(); config.addChangeListener(new ConfigChangeListener() { @Override public void onChange(ConfigChangeEvent changeEvent) { for (String key : changeEvent.changedKeys()) { ConfigChange change = changeEvent.getChange(key); System.out.println(String.format( "Found change - key: %s, oldValue: %s, newValue: %s, changeType: %s", change.getPropertyName(), change.getOldValue(), change.getNewValue(), change.getChangeType())); } } }); ``` ## 3.7 Spring集成样例 Apollo和Spring也可以很方便地集成,只需要标注`@EnableApolloConfig`后就可以通过`@Value`获取配置信息: ```java @Configuration @EnableApolloConfig public class AppConfig {} ``` ```java @Component public class SomeBean { //timeout的值会自动更新 @Value("${request.timeout:200}") private int timeout; } ``` # 4、Apollo in depth 通过上面的介绍,相信大家已经对Apollo有了一个初步的了解,并且相信已经覆盖到了大部分的使用场景。 接下来会主要介绍Apollo的cluster管理(集群)、namespace管理(命名空间)和对应的配置获取规则。 ## 4.1 Core Concepts 在介绍高级特性前,我们有必要先来了解一下Apollo中的几个核心概念: 1. **application (应用)** * 这个很好理解,就是实际使用配置的应用,Apollo客户端在运行时需要知道当前应用是谁,从而可以去获取对应的配置 * 每个应用都需要有唯一的身份标识 -- appId,我们认为应用身份是跟着代码走的,所以需要在代码中配置,具体信息请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)。 2. **environment (环境)** * 配置对应的环境,Apollo客户端在运行时需要知道当前应用处于哪个环境,从而可以去获取应用的配置 * 我们认为环境和代码无关,同一份代码部署在不同的环境就应该能够获取到不同环境的配置 * 所以环境默认是通过读取机器上的配置(server.properties中的env属性)指定的,不过为了开发方便,我们也支持运行时通过System Property等指定,具体信息请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)。 3. **cluster (集群)** * 一个应用下不同实例的分组,比如典型的可以按照数据中心分,把上海机房的应用实例分为一个集群,把北京机房的应用实例分为另一个集群。 * 对不同的cluster,同一个配置可以有不一样的值,如zookeeper地址。 * 集群默认是通过读取机器上的配置(server.properties中的idc属性)指定的,不过也支持运行时通过System Property指定,具体信息请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)。 4. **namespace (命名空间)** * 一个应用下不同配置的分组,可以简单地把namespace类比为文件,不同类型的配置存放在不同的文件中,如数据库配置文件,RPC配置文件,应用自身的配置文件等 * 应用可以直接读取到公共组件的配置namespace,如DAL,RPC等 * 应用也可以通过继承公共组件的配置namespace来对公共组件的配置做调整,如DAL的初始数据库连接数 ## 4.2 自定义Cluster > 【本节内容仅对应用需要对不同集群应用不同配置才需要,如没有相关需求,可以跳过本节】 比如我们有应用在A数据中心和B数据中心都有部署,那么如果希望两个数据中心的配置不一样的话,我们可以通过新建cluster来解决。 ### 4.2.1 新建Cluster 新建Cluster只有项目的管理员才有权限,管理员可以在页面左侧看到“添加集群”按钮。 ![create-cluster](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-cluster.png) 点击后就进入到集群添加页面,一般情况下可以按照数据中心来划分集群,如SHAJQ、SHAOY等。 不过也支持自定义集群,比如可以为A机房的某一台机器和B机房的某一台机创建一个集群,使用一套配置。 ![create-cluster-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-cluster-detail.png) ### 4.2.2 在Cluster中添加配置并发布 集群添加成功后,就可以为该集群添加配置了,首先需要按照下图所示切换到SHAJQ集群,之后配置添加流程和[3.3 添加/修改配置项](#_33-添加修改配置项)一样,这里就不再赘述了。 ![cluster-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/cluster-created.png) ### 4.2.3 指定应用实例所属的Cluster Apollo会默认使用应用实例所在的数据中心作为cluster,所以如果两者一致的话,不需要额外配置。 如果cluster和数据中心不一致的话,那么就需要通过System Property方式来指定运行时cluster: * -Dapollo.cluster=SomeCluster * 这里注意`apollo.cluster`为全小写 ## 4.3 自定义Namespace > 【本节仅对公共组件配置或需要多个应用共享配置才需要,如没有相关需求,可以跳过本节】 如果应用有公共组件(如hermes-producer,cat-client等)供其它应用使用,就需要通过自定义namespace来实现公共组件的配置。 ### 4.3.1 新建Namespace 以hermes-producer为例,需要先新建一个namespace,新建namespace只有项目的管理员才有权限,管理员可以在页面左侧看到“添加Namespace”按钮。 ![create-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace.png) 点击后就进入namespace添加页面,Apollo会把应用所属的部门作为namespace的前缀,如FX。 ![create-namespace-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace-detail.png) ### 4.3.2 关联到环境和集群 Namespace创建完,需要选择在哪些环境和集群下使用 ![link-namespace-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/link-namespace-detail.png) ### 4.3.3 在Namespace中添加配置项 接下来在这个新建的namespace下添加配置项 ![add-item-in-new-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/add-item-in-new-namespace.png) 添加完成后就能在FX.Hermes.Producer的namespace中看到配置。 ![item-created-in-new-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/item-created-in-new-namespace.png) ### 4.3.4 发布namespace的配置 ![publish-items-in-new-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/publish-items-in-new-namespace.png) ### 4.3.5 客户端获取Namespace配置 对自定义namespace的配置获取,稍有不同,需要程序传入namespace的名字。Apollo客户端还支持和Spring整合,更多客户端使用说明请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)和[.Net客户端使用指南](zh/usage/dotnet-sdk-user-guide)。 ```java Config config = ConfigService.getConfig("FX.Hermes.Producer"); Integer defaultSenderBatchSize = 200; Integer senderBatchSize = config.getIntProperty("sender.batchsize", defaultSenderBatchSize); ``` ### 4.3.6 客户端监听Namespace配置变化 ```java Config config = ConfigService.getConfig("FX.Hermes.Producer"); config.addChangeListener(new ConfigChangeListener() { @Override public void onChange(ConfigChangeEvent changeEvent) { System.out.println("Changes for namespace " + changeEvent.getNamespace()); for (String key : changeEvent.changedKeys()) { ConfigChange change = changeEvent.getChange(key); System.out.println(String.format( "Found change - key: %s, oldValue: %s, newValue: %s, changeType: %s", change.getPropertyName(), change.getOldValue(), change.getNewValue(), change.getChangeType())); } } }); ``` ### 4.3.7 Spring集成样例 ```java @Configuration @EnableApolloConfig("FX.Hermes.Producer") public class AppConfig {} ``` ```java @Component public class SomeBean { //timeout的值会自动更新 @Value("${request.timeout:200}") private int timeout; } ``` ## 4.4 配置获取规则 > 【本节仅当应用自定义了集群或namespace才需要,如无相关需求,可以跳过本节】 在有了cluster概念后,配置的规则就显得重要了。 比如应用部署在A机房,但是并没有在Apollo新建cluster,这个时候Apollo的行为是怎样的? 或者在运行时指定了cluster=SomeCluster,但是并没有在Apollo新建cluster,这个时候Apollo的行为是怎样的? 接下来就来介绍一下配置获取的规则。 ### 4.4.1 应用自身配置的获取规则 当应用使用下面的语句获取配置时,我们称之为获取应用自身的配置,也就是应用自身的application namespace的配置。 ```java Config config = ConfigService.getAppConfig(); ``` 对这种情况的配置获取规则,简而言之如下: 1. 首先查找运行时cluster的配置(通过apollo.cluster指定) 2. 如果没有找到,则查找数据中心cluster的配置 3. 如果还是没有找到,则返回默认cluster的配置 图示如下: ![application-config-precedence](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/application-config-precedence.png) 所以如果应用部署在A数据中心,但是用户没有在Apollo创建cluster,那么获取的配置就是默认cluster(default)的。 如果应用部署在A数据中心,同时在运行时指定了SomeCluster,但是没有在Apollo创建cluster,那么获取的配置就是A数据中心cluster的配置,如果A数据中心cluster没有配置的话,那么获取的配置就是默认cluster(default)的。 ### 4.4.2 公共组件配置的获取规则 以`FX.Hermes.Producer`为例,hermes producer是hermes发布的公共组件。当使用下面的语句获取配置时,我们称之为获取公共组件的配置。 ```java Config config = ConfigService.getConfig("FX.Hermes.Producer"); ``` 对这种情况的配置获取规则,简而言之如下: 1. 首先获取当前应用下的`FX.Hermes.Producer` namespace的配置 2. 然后获取hermes应用下`FX.Hermes.Producer` namespace的配置 3. 上面两部分配置的并集就是最终使用的配置,如有key一样的部分,以当前应用优先 图示如下: ![public-namespace-config-precedence](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-config-precedence.png) 通过这种方式,就实现了对框架类组件的配置管理,框架组件提供方提供配置的默认值,应用如果有特殊需求,可以自行覆盖。 ## 4.5 总体设计 ![overall-architecture](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/overall-architecture.png) 上图简要描述了Apollo的总体设计,我们可以从下往上看: * Config Service提供配置的读取、推送等功能,服务对象是Apollo客户端 * Admin Service提供配置的修改、发布等功能,服务对象是Apollo Portal(管理界面) * Config Service和Admin Service都是多实例、无状态部署,所以需要将自己注册到Eureka中并保持心跳 * 在Eureka之上我们架了一层Meta Server用于封装Eureka的服务发现接口 * Client通过域名访问Meta Server获取Config Service服务列表(IP+Port),而后直接通过IP+Port访问服务,同时在Client侧会做load balance、错误重试 * Portal通过域名访问Meta Server获取Admin Service服务列表(IP+Port),而后直接通过IP+Port访问服务,同时在Portal侧会做load balance、错误重试 * 为了简化部署,我们实际上会把Config Service、Eureka和Meta Server三个逻辑角色部署在同一个JVM进程中 ### 4.5.1 Why Eureka 为什么我们采用Eureka作为服务注册中心,而不是使用传统的zk、etcd呢?我大致总结了一下,有以下几方面的原因: * 它提供了完整的Service Registry和Service Discovery实现 * 首先是提供了完整的实现,并且也经受住了Netflix自己的生产环境考验,相对使用起来会比较省心。 * 和Spring Cloud无缝集成 * 我们的项目本身就使用了Spring Cloud和Spring Boot,同时Spring Cloud还有一套非常完善的开源代码来整合Eureka,所以使用起来非常方便。 * 另外,Eureka还支持在我们应用自身的容器中启动,也就是说我们的应用启动完之后,既充当了Eureka的角色,同时也是服务的提供者。这样就极大的提高了服务的可用性。 * **这一点是我们选择Eureka而不是zk、etcd等的主要原因,为了提高配置中心的可用性和降低部署复杂度,我们需要尽可能地减少外部依赖。** * Open Source * 最后一点是开源,由于代码是开源的,所以非常便于我们了解它的实现原理和排查问题。 ## 4.6 客户端设计 ![client-architecture](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/client-architecture.png) 上图简要描述了Apollo客户端的实现原理: 1. 客户端和服务端保持了一个长连接,从而能第一时间获得配置更新的推送。 2. 客户端还会定时从Apollo配置中心服务端拉取应用的最新配置。 * 这是一个fallback机制,为了防止推送机制失效导致配置不更新 * 客户端定时拉取会上报本地版本,所以一般情况下,对于定时拉取的操作,服务端都会返回304 - Not Modified * 定时频率默认为每5分钟拉取一次,客户端也可以通过在运行时指定System Property: `apollo.refreshInterval`来覆盖,单位为分钟。 3. 客户端从Apollo配置中心服务端获取到应用的最新配置后,会保存在内存中 4. 客户端会把从服务端获取到的配置在本地文件系统缓存一份 * 在遇到服务不可用,或网络不通的时候,依然能从本地恢复配置 5. 应用程序从Apollo客户端获取最新的配置、订阅配置更新通知 ### 4.6.1 配置更新推送实现 前面提到了Apollo客户端和服务端保持了一个长连接,从而能第一时间获得配置更新的推送。 长连接实际上我们是通过Http Long Polling实现的,具体而言: * 客户端发起一个Http请求到服务端 * 服务端会保持住这个连接60秒 * 如果在60秒内有客户端关心的配置变化,被保持住的客户端请求会立即返回,并告知客户端有配置变化的namespace信息,客户端会据此拉取对应namespace的最新配置 * 如果在60秒内没有客户端关心的配置变化,那么会返回Http状态码304给客户端 * 客户端在收到服务端请求后会立即重新发起连接,回到第一步 考虑到会有数万客户端向服务端发起长连,在服务端我们使用了async servlet(Spring DeferredResult)来服务Http Long Polling请求。 ## 4.7 可用性考虑 配置中心作为基础服务,可用性要求非常高,下面的表格描述了不同场景下Apollo的可用性: | 场景 | 影响 | 降级 | 原因 | |------------------------|--------------------------------------|---------------------------------------|-----------------------------------------------------------------------------------------| | 某台config service下线 | 无影响 | | Config service无状态,客户端重连其它config service | | 所有config service下线 | 客户端无法读取最新配置,Portal无影响 | 客户端重启时,可以读取本地缓存配置文件 | | | 某台admin service下线 | 无影响 | | Admin service无状态,Portal重连其它admin service | | 所有admin service下线 | 客户端无影响,portal无法更新配置 | | | | 某台portal下线 | 无影响 | | Portal域名通过slb绑定多台服务器,重试后指向可用的服务器 | | 全部portal下线 | 客户端无影响,portal无法更新配置 | | | | 某个数据中心下线 | 无影响 | | 多数据中心部署,数据完全同步,Meta Server/Portal域名通过slb自动切换到其它存活的数据中心 | # 5、Contribute to Apollo Apollo从开发之初就是以开源模式开发的,所以也非常欢迎有兴趣、有余力的朋友一起加入进来。 服务端开发使用的是Java,基于Spring Cloud和Spring Boot框架。客户端目前提供了Java和.Net两种实现。 Github地址:<a href="https://github.com/ctripcorp/apollo" target="_blank">https://github.com/ctripcorp/apollo</a> 欢迎大家发起Pull Request!
# &nbsp; # 1、What is Apollo ## 1.1 背景 随着程序功能的日益复杂,程序的配置日益增多:各种功能的开关、参数的配置、服务器的地址…… 对程序配置的期望值也越来越高:配置修改后实时生效,灰度发布,分环境、分集群管理配置,完善的权限、审核机制…… 在这样的大环境下,传统的通过配置文件、数据库等方式已经越来越无法满足开发人员对配置管理的需求。 Apollo配置中心应运而生! ## 1.2 Apollo简介 Apollo(阿波罗)是携程框架部门研发的开源配置管理中心,能够集中化管理应用不同环境、不同集群的配置,配置修改后能够实时推送到应用端,并且具备规范的权限、流程治理等特性。 Apollo支持4个维度管理Key-Value格式的配置: 1. application (应用) 2. environment (环境) 3. cluster (集群) 4. namespace (命名空间) 同时,Apollo基于开源模式开发,开源地址:<a href="https://github.com/ctripcorp/apollo" target="_blank">https://github.com/ctripcorp/apollo</a> ## 1.2 配置基本概念 既然Apollo定位于配置中心,那么在这里有必要先简单介绍一下什么是配置。 按照我们的理解,配置有以下几个属性: * **配置是独立于程序的只读变量** * 配置首先是独立于程序的,同一份程序在不同的配置下会有不同的行为。 * 其次,配置对于程序是只读的,程序通过读取配置来改变自己的行为,但是程序不应该去改变配置。 * 常见的配置有:DB Connection Str、Thread Pool Size、Buffer Size、Request Timeout、Feature Switch、Server Urls等。 * **配置伴随应用的整个生命周期** * 配置贯穿于应用的整个生命周期,应用在启动时通过读取配置来初始化,在运行时根据配置调整行为。 * **配置可以有多种加载方式** * 配置也有很多种加载方式,常见的有程序内部hard code,配置文件,环境变量,启动参数,基于数据库等 * **配置需要治理** * 权限控制 * 由于配置能改变程序的行为,不正确的配置甚至能引起灾难,所以对配置的修改必须有比较完善的权限控制 * 不同环境、集群配置管理 * 同一份程序在不同的环境(开发,测试,生产)、不同的集群(如不同的数据中心)经常需要有不同的配置,所以需要有完善的环境、集群配置管理 * 框架类组件配置管理 * 还有一类比较特殊的配置 - 框架类组件配置,比如CAT客户端的配置。 * 虽然这类框架类组件是由其他团队开发、维护,但是运行时是在业务实际应用内的,所以本质上可以认为框架类组件也是应用的一部分。 * 这类组件对应的配置也需要有比较完善的管理方式。 # 2、Why Apollo 正是基于配置的特殊性,所以Apollo从设计之初就立志于成为一个有治理能力的配置发布平台,目前提供了以下的特性: * **统一管理不同环境、不同集群的配置** * Apollo提供了一个统一界面集中式管理不同环境(environment)、不同集群(cluster)、不同命名空间(namespace)的配置。 * 同一份代码部署在不同的集群,可以有不同的配置,比如zookeeper的地址等 * 通过命名空间(namespace)可以很方便地支持多个不同应用共享同一份配置,同时还允许应用对共享的配置进行覆盖 * **配置修改实时生效(热发布)** * 用户在Apollo修改完配置并发布后,客户端能实时(1秒)接收到最新的配置,并通知到应用程序 * **版本发布管理** * 所有的配置发布都有版本概念,从而可以方便地支持配置的回滚 * **灰度发布** * 支持配置的灰度发布,比如点了发布后,只对部分应用实例生效,等观察一段时间没问题后再推给所有应用实例 * **权限管理、发布审核、操作审计** * 应用和配置的管理都有完善的权限管理机制,对配置的管理还分为了编辑和发布两个环节,从而减少人为的错误。 * 所有的操作都有审计日志,可以方便地追踪问题 * **客户端配置信息监控** * 可以在界面上方便地看到配置在被哪些实例使用 * **提供Java和.Net原生客户端** * 提供了Java和.Net的原生客户端,方便应用集成 * 支持Spring Placeholder, Annotation和Spring Boot的ConfigurationProperties,方便应用使用(需要Spring 3.1.1+) * 同时提供了Http接口,非Java和.Net应用也可以方便地使用 * **提供开放平台API** * Apollo自身提供了比较完善的统一配置管理界面,支持多环境、多数据中心配置管理、权限、流程治理等特性。不过Apollo出于通用性考虑,不会对配置的修改做过多限制,只要符合基本的格式就能保存,不会针对不同的配置值进行针对性的校验,如数据库用户名、密码,Redis服务地址等 * 对于这类应用配置,Apollo支持应用方通过开放平台API在Apollo进行配置的修改和发布,并且具备完善的授权和权限控制 * **部署简单** * 配置中心作为基础服务,可用性要求非常高,这就要求Apollo对外部依赖尽可能地少 * 目前唯一的外部依赖是MySQL,所以部署非常简单,只要安装好Java和MySQL就可以让Apollo跑起来 * Apollo还提供了打包脚本,一键就可以生成所有需要的安装包,并且支持自定义运行时参数 # 3、Apollo at a glance ## 3.1 基础模型 如下即是Apollo的基础模型: 1. 用户在配置中心对配置进行修改并发布 2. 配置中心通知Apollo客户端有配置更新 3. Apollo客户端从配置中心拉取最新的配置、更新本地配置并通知到应用 ![basic-architecture](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/basic-architecture.png) ## 3.2 界面概览 ![apollo-home-screenshot](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/apollo-home-screenshot.jpg) 上图是Apollo配置中心中一个项目的配置首页 * 在页面左上方的环境列表模块展示了所有的环境和集群,用户可以随时切换。 * 页面中央展示了两个namespace(application和FX.apollo)的配置信息,默认按照表格模式展示、编辑。用户也可以切换到文本模式,以文件形式查看、编辑。 * 页面上可以方便地进行发布、回滚、灰度、授权、查看更改历史和发布历史等操作 ## 3.3 添加/修改配置项 用户可以通过配置中心界面方便的添加/修改配置项,更多使用说明请参见[应用接入指南](zh/usage/apollo-user-guide) ![edit-item-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/edit-item-entry.png) 输入配置信息: ![edit-item](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/edit-item.png) ## 3.4 发布配置 通过配置中心发布配置: ![publish-items](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/publish-items-entry.png) 填写发布信息: ![publish-items](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/publish-items.png) ## 3.5 客户端获取配置(Java API样例) 配置发布后,就能在客户端获取到了,以Java为例,获取配置的示例代码如下。Apollo客户端还支持和Spring整合,更多客户端使用说明请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)和[.Net客户端使用指南](zh/usage/dotnet-sdk-user-guide)。 ```java Config config = ConfigService.getAppConfig(); Integer defaultRequestTimeout = 200; Integer requestTimeout = config.getIntProperty("requestTimeout", defaultRequestTimeout); ``` ## 3.6 客户端监听配置变化 通过上述获取配置代码,应用就能实时获取到最新的配置了。 不过在某些场景下,应用还需要在配置变化时获得通知,比如数据库连接的切换等,所以Apollo还提供了监听配置变化的功能,Java示例如下: ```java Config config = ConfigService.getAppConfig(); config.addChangeListener(new ConfigChangeListener() { @Override public void onChange(ConfigChangeEvent changeEvent) { for (String key : changeEvent.changedKeys()) { ConfigChange change = changeEvent.getChange(key); System.out.println(String.format( "Found change - key: %s, oldValue: %s, newValue: %s, changeType: %s", change.getPropertyName(), change.getOldValue(), change.getNewValue(), change.getChangeType())); } } }); ``` ## 3.7 Spring集成样例 Apollo和Spring也可以很方便地集成,只需要标注`@EnableApolloConfig`后就可以通过`@Value`获取配置信息: ```java @Configuration @EnableApolloConfig public class AppConfig {} ``` ```java @Component public class SomeBean { //timeout的值会自动更新 @Value("${request.timeout:200}") private int timeout; } ``` # 4、Apollo in depth 通过上面的介绍,相信大家已经对Apollo有了一个初步的了解,并且相信已经覆盖到了大部分的使用场景。 接下来会主要介绍Apollo的cluster管理(集群)、namespace管理(命名空间)和对应的配置获取规则。 ## 4.1 Core Concepts 在介绍高级特性前,我们有必要先来了解一下Apollo中的几个核心概念: 1. **application (应用)** * 这个很好理解,就是实际使用配置的应用,Apollo客户端在运行时需要知道当前应用是谁,从而可以去获取对应的配置 * 每个应用都需要有唯一的身份标识 -- appId,我们认为应用身份是跟着代码走的,所以需要在代码中配置,具体信息请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)。 2. **environment (环境)** * 配置对应的环境,Apollo客户端在运行时需要知道当前应用处于哪个环境,从而可以去获取应用的配置 * 我们认为环境和代码无关,同一份代码部署在不同的环境就应该能够获取到不同环境的配置 * 所以环境默认是通过读取机器上的配置(server.properties中的env属性)指定的,不过为了开发方便,我们也支持运行时通过System Property等指定,具体信息请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)。 3. **cluster (集群)** * 一个应用下不同实例的分组,比如典型的可以按照数据中心分,把上海机房的应用实例分为一个集群,把北京机房的应用实例分为另一个集群。 * 对不同的cluster,同一个配置可以有不一样的值,如zookeeper地址。 * 集群默认是通过读取机器上的配置(server.properties中的idc属性)指定的,不过也支持运行时通过System Property指定,具体信息请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)。 4. **namespace (命名空间)** * 一个应用下不同配置的分组,可以简单地把namespace类比为文件,不同类型的配置存放在不同的文件中,如数据库配置文件,RPC配置文件,应用自身的配置文件等 * 应用可以直接读取到公共组件的配置namespace,如DAL,RPC等 * 应用也可以通过继承公共组件的配置namespace来对公共组件的配置做调整,如DAL的初始数据库连接数 ## 4.2 自定义Cluster > 【本节内容仅对应用需要对不同集群应用不同配置才需要,如没有相关需求,可以跳过本节】 比如我们有应用在A数据中心和B数据中心都有部署,那么如果希望两个数据中心的配置不一样的话,我们可以通过新建cluster来解决。 ### 4.2.1 新建Cluster 新建Cluster只有项目的管理员才有权限,管理员可以在页面左侧看到“添加集群”按钮。 ![create-cluster](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-cluster.png) 点击后就进入到集群添加页面,一般情况下可以按照数据中心来划分集群,如SHAJQ、SHAOY等。 不过也支持自定义集群,比如可以为A机房的某一台机器和B机房的某一台机创建一个集群,使用一套配置。 ![create-cluster-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-cluster-detail.png) ### 4.2.2 在Cluster中添加配置并发布 集群添加成功后,就可以为该集群添加配置了,首先需要按照下图所示切换到SHAJQ集群,之后配置添加流程和[3.3 添加/修改配置项](#_33-添加修改配置项)一样,这里就不再赘述了。 ![cluster-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/cluster-created.png) ### 4.2.3 指定应用实例所属的Cluster Apollo会默认使用应用实例所在的数据中心作为cluster,所以如果两者一致的话,不需要额外配置。 如果cluster和数据中心不一致的话,那么就需要通过System Property方式来指定运行时cluster: * -Dapollo.cluster=SomeCluster * 这里注意`apollo.cluster`为全小写 ## 4.3 自定义Namespace > 【本节仅对公共组件配置或需要多个应用共享配置才需要,如没有相关需求,可以跳过本节】 如果应用有公共组件(如hermes-producer,cat-client等)供其它应用使用,就需要通过自定义namespace来实现公共组件的配置。 ### 4.3.1 新建Namespace 以hermes-producer为例,需要先新建一个namespace,新建namespace只有项目的管理员才有权限,管理员可以在页面左侧看到“添加Namespace”按钮。 ![create-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace.png) 点击后就进入namespace添加页面,Apollo会把应用所属的部门作为namespace的前缀,如FX。 ![create-namespace-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace-detail.png) ### 4.3.2 关联到环境和集群 Namespace创建完,需要选择在哪些环境和集群下使用 ![link-namespace-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/link-namespace-detail.png) ### 4.3.3 在Namespace中添加配置项 接下来在这个新建的namespace下添加配置项 ![add-item-in-new-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/add-item-in-new-namespace.png) 添加完成后就能在FX.Hermes.Producer的namespace中看到配置。 ![item-created-in-new-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/item-created-in-new-namespace.png) ### 4.3.4 发布namespace的配置 ![publish-items-in-new-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/publish-items-in-new-namespace.png) ### 4.3.5 客户端获取Namespace配置 对自定义namespace的配置获取,稍有不同,需要程序传入namespace的名字。Apollo客户端还支持和Spring整合,更多客户端使用说明请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)和[.Net客户端使用指南](zh/usage/dotnet-sdk-user-guide)。 ```java Config config = ConfigService.getConfig("FX.Hermes.Producer"); Integer defaultSenderBatchSize = 200; Integer senderBatchSize = config.getIntProperty("sender.batchsize", defaultSenderBatchSize); ``` ### 4.3.6 客户端监听Namespace配置变化 ```java Config config = ConfigService.getConfig("FX.Hermes.Producer"); config.addChangeListener(new ConfigChangeListener() { @Override public void onChange(ConfigChangeEvent changeEvent) { System.out.println("Changes for namespace " + changeEvent.getNamespace()); for (String key : changeEvent.changedKeys()) { ConfigChange change = changeEvent.getChange(key); System.out.println(String.format( "Found change - key: %s, oldValue: %s, newValue: %s, changeType: %s", change.getPropertyName(), change.getOldValue(), change.getNewValue(), change.getChangeType())); } } }); ``` ### 4.3.7 Spring集成样例 ```java @Configuration @EnableApolloConfig("FX.Hermes.Producer") public class AppConfig {} ``` ```java @Component public class SomeBean { //timeout的值会自动更新 @Value("${request.timeout:200}") private int timeout; } ``` ## 4.4 配置获取规则 > 【本节仅当应用自定义了集群或namespace才需要,如无相关需求,可以跳过本节】 在有了cluster概念后,配置的规则就显得重要了。 比如应用部署在A机房,但是并没有在Apollo新建cluster,这个时候Apollo的行为是怎样的? 或者在运行时指定了cluster=SomeCluster,但是并没有在Apollo新建cluster,这个时候Apollo的行为是怎样的? 接下来就来介绍一下配置获取的规则。 ### 4.4.1 应用自身配置的获取规则 当应用使用下面的语句获取配置时,我们称之为获取应用自身的配置,也就是应用自身的application namespace的配置。 ```java Config config = ConfigService.getAppConfig(); ``` 对这种情况的配置获取规则,简而言之如下: 1. 首先查找运行时cluster的配置(通过apollo.cluster指定) 2. 如果没有找到,则查找数据中心cluster的配置 3. 如果还是没有找到,则返回默认cluster的配置 图示如下: ![application-config-precedence](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/application-config-precedence.png) 所以如果应用部署在A数据中心,但是用户没有在Apollo创建cluster,那么获取的配置就是默认cluster(default)的。 如果应用部署在A数据中心,同时在运行时指定了SomeCluster,但是没有在Apollo创建cluster,那么获取的配置就是A数据中心cluster的配置,如果A数据中心cluster没有配置的话,那么获取的配置就是默认cluster(default)的。 ### 4.4.2 公共组件配置的获取规则 以`FX.Hermes.Producer`为例,hermes producer是hermes发布的公共组件。当使用下面的语句获取配置时,我们称之为获取公共组件的配置。 ```java Config config = ConfigService.getConfig("FX.Hermes.Producer"); ``` 对这种情况的配置获取规则,简而言之如下: 1. 首先获取当前应用下的`FX.Hermes.Producer` namespace的配置 2. 然后获取hermes应用下`FX.Hermes.Producer` namespace的配置 3. 上面两部分配置的并集就是最终使用的配置,如有key一样的部分,以当前应用优先 图示如下: ![public-namespace-config-precedence](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-config-precedence.png) 通过这种方式,就实现了对框架类组件的配置管理,框架组件提供方提供配置的默认值,应用如果有特殊需求,可以自行覆盖。 ## 4.5 总体设计 ![overall-architecture](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/overall-architecture.png) 上图简要描述了Apollo的总体设计,我们可以从下往上看: * Config Service提供配置的读取、推送等功能,服务对象是Apollo客户端 * Admin Service提供配置的修改、发布等功能,服务对象是Apollo Portal(管理界面) * Config Service和Admin Service都是多实例、无状态部署,所以需要将自己注册到Eureka中并保持心跳 * 在Eureka之上我们架了一层Meta Server用于封装Eureka的服务发现接口 * Client通过域名访问Meta Server获取Config Service服务列表(IP+Port),而后直接通过IP+Port访问服务,同时在Client侧会做load balance、错误重试 * Portal通过域名访问Meta Server获取Admin Service服务列表(IP+Port),而后直接通过IP+Port访问服务,同时在Portal侧会做load balance、错误重试 * 为了简化部署,我们实际上会把Config Service、Eureka和Meta Server三个逻辑角色部署在同一个JVM进程中 ### 4.5.1 Why Eureka 为什么我们采用Eureka作为服务注册中心,而不是使用传统的zk、etcd呢?我大致总结了一下,有以下几方面的原因: * 它提供了完整的Service Registry和Service Discovery实现 * 首先是提供了完整的实现,并且也经受住了Netflix自己的生产环境考验,相对使用起来会比较省心。 * 和Spring Cloud无缝集成 * 我们的项目本身就使用了Spring Cloud和Spring Boot,同时Spring Cloud还有一套非常完善的开源代码来整合Eureka,所以使用起来非常方便。 * 另外,Eureka还支持在我们应用自身的容器中启动,也就是说我们的应用启动完之后,既充当了Eureka的角色,同时也是服务的提供者。这样就极大的提高了服务的可用性。 * **这一点是我们选择Eureka而不是zk、etcd等的主要原因,为了提高配置中心的可用性和降低部署复杂度,我们需要尽可能地减少外部依赖。** * Open Source * 最后一点是开源,由于代码是开源的,所以非常便于我们了解它的实现原理和排查问题。 ## 4.6 客户端设计 ![client-architecture](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/client-architecture.png) 上图简要描述了Apollo客户端的实现原理: 1. 客户端和服务端保持了一个长连接,从而能第一时间获得配置更新的推送。 2. 客户端还会定时从Apollo配置中心服务端拉取应用的最新配置。 * 这是一个fallback机制,为了防止推送机制失效导致配置不更新 * 客户端定时拉取会上报本地版本,所以一般情况下,对于定时拉取的操作,服务端都会返回304 - Not Modified * 定时频率默认为每5分钟拉取一次,客户端也可以通过在运行时指定System Property: `apollo.refreshInterval`来覆盖,单位为分钟。 3. 客户端从Apollo配置中心服务端获取到应用的最新配置后,会保存在内存中 4. 客户端会把从服务端获取到的配置在本地文件系统缓存一份 * 在遇到服务不可用,或网络不通的时候,依然能从本地恢复配置 5. 应用程序从Apollo客户端获取最新的配置、订阅配置更新通知 ### 4.6.1 配置更新推送实现 前面提到了Apollo客户端和服务端保持了一个长连接,从而能第一时间获得配置更新的推送。 长连接实际上我们是通过Http Long Polling实现的,具体而言: * 客户端发起一个Http请求到服务端 * 服务端会保持住这个连接60秒 * 如果在60秒内有客户端关心的配置变化,被保持住的客户端请求会立即返回,并告知客户端有配置变化的namespace信息,客户端会据此拉取对应namespace的最新配置 * 如果在60秒内没有客户端关心的配置变化,那么会返回Http状态码304给客户端 * 客户端在收到服务端请求后会立即重新发起连接,回到第一步 考虑到会有数万客户端向服务端发起长连,在服务端我们使用了async servlet(Spring DeferredResult)来服务Http Long Polling请求。 ## 4.7 可用性考虑 配置中心作为基础服务,可用性要求非常高,下面的表格描述了不同场景下Apollo的可用性: | 场景 | 影响 | 降级 | 原因 | |------------------------|--------------------------------------|---------------------------------------|-----------------------------------------------------------------------------------------| | 某台config service下线 | 无影响 | | Config service无状态,客户端重连其它config service | | 所有config service下线 | 客户端无法读取最新配置,Portal无影响 | 客户端重启时,可以读取本地缓存配置文件 | | | 某台admin service下线 | 无影响 | | Admin service无状态,Portal重连其它admin service | | 所有admin service下线 | 客户端无影响,portal无法更新配置 | | | | 某台portal下线 | 无影响 | | Portal域名通过slb绑定多台服务器,重试后指向可用的服务器 | | 全部portal下线 | 客户端无影响,portal无法更新配置 | | | | 某个数据中心下线 | 无影响 | | 多数据中心部署,数据完全同步,Meta Server/Portal域名通过slb自动切换到其它存活的数据中心 | # 5、Contribute to Apollo Apollo从开发之初就是以开源模式开发的,所以也非常欢迎有兴趣、有余力的朋友一起加入进来。 服务端开发使用的是Java,基于Spring Cloud和Spring Boot框架。客户端目前提供了Java和.Net两种实现。 Github地址:<a href="https://github.com/ctripcorp/apollo" target="_blank">https://github.com/ctripcorp/apollo</a> 欢迎大家发起Pull Request!
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-core/src/test/resources/META-INF/app-with-utf8bom.properties
app.id=110402
app.id=110402
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./docs/zh/community/thank-you.md
# 致谢 <hr /> <img src="en/images/community/jetbrains.svg" alt="jetbrains" style="height: 80px; margin-right: 20px"> <img src="en/images/community/intellij-idea.svg" alt="intellij-idea" style="width: 75px" > Apollo 团队使用 [IntelliJ IDEA](https://www.jetbrains.com/idea/) 开发开源项目,非常感谢 [JetBrains](https://www.jetbrains.com/) 赞助许可证。 <hr /> <img src="en/images/community/docsify.svg" alt="docsify" style="height: 80px"> Apollo 团队使用 [docsify](https://docsify.js.org/) 生成文档站点。
# 致谢 <hr /> <img src="en/images/community/jetbrains.svg" alt="jetbrains" style="height: 80px; margin-right: 20px"> <img src="en/images/community/intellij-idea.svg" alt="intellij-idea" style="width: 75px" > Apollo 团队使用 [IntelliJ IDEA](https://www.jetbrains.com/idea/) 开发开源项目,非常感谢 [JetBrains](https://www.jetbrains.com/) 赞助许可证。 <hr /> <img src="en/images/community/docsify.svg" alt="docsify" style="height: 80px"> Apollo 团队使用 [docsify](https://docsify.js.org/) 生成文档站点。
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/ReleaseMessageService.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.biz.service; import com.ctrip.framework.apollo.biz.entity.ReleaseMessage; import com.ctrip.framework.apollo.biz.repository.ReleaseMessageRepository; import com.ctrip.framework.apollo.tracer.Tracer; import com.google.common.collect.Lists; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import java.util.Collection; import java.util.Collections; import java.util.List; /** * @author Jason Song(song_s@ctrip.com) */ @Service public class ReleaseMessageService { private final ReleaseMessageRepository releaseMessageRepository; public ReleaseMessageService(final ReleaseMessageRepository releaseMessageRepository) { this.releaseMessageRepository = releaseMessageRepository; } public ReleaseMessage findLatestReleaseMessageForMessages(Collection<String> messages) { if (CollectionUtils.isEmpty(messages)) { return null; } return releaseMessageRepository.findTopByMessageInOrderByIdDesc(messages); } public List<ReleaseMessage> findLatestReleaseMessagesGroupByMessages(Collection<String> messages) { if (CollectionUtils.isEmpty(messages)) { return Collections.emptyList(); } List<Object[]> result = releaseMessageRepository.findLatestReleaseMessagesGroupByMessages(messages); List<ReleaseMessage> releaseMessages = Lists.newArrayList(); for (Object[] o : result) { try { ReleaseMessage releaseMessage = new ReleaseMessage((String) o[0]); releaseMessage.setId((Long) o[1]); releaseMessages.add(releaseMessage); } catch (Exception ex) { Tracer.logError("Parsing LatestReleaseMessagesGroupByMessages failed", ex); } } return releaseMessages; } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.biz.service; import com.ctrip.framework.apollo.biz.entity.ReleaseMessage; import com.ctrip.framework.apollo.biz.repository.ReleaseMessageRepository; import com.ctrip.framework.apollo.tracer.Tracer; import com.google.common.collect.Lists; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import java.util.Collection; import java.util.Collections; import java.util.List; /** * @author Jason Song(song_s@ctrip.com) */ @Service public class ReleaseMessageService { private final ReleaseMessageRepository releaseMessageRepository; public ReleaseMessageService(final ReleaseMessageRepository releaseMessageRepository) { this.releaseMessageRepository = releaseMessageRepository; } public ReleaseMessage findLatestReleaseMessageForMessages(Collection<String> messages) { if (CollectionUtils.isEmpty(messages)) { return null; } return releaseMessageRepository.findTopByMessageInOrderByIdDesc(messages); } public List<ReleaseMessage> findLatestReleaseMessagesGroupByMessages(Collection<String> messages) { if (CollectionUtils.isEmpty(messages)) { return Collections.emptyList(); } List<Object[]> result = releaseMessageRepository.findLatestReleaseMessagesGroupByMessages(messages); List<ReleaseMessage> releaseMessages = Lists.newArrayList(); for (Object[] o : result) { try { ReleaseMessage releaseMessage = new ReleaseMessage((String) o[0]); releaseMessage.setId((Long) o[1]); releaseMessages.add(releaseMessage); } catch (Exception ex) { Tracer.logError("Parsing LatestReleaseMessagesGroupByMessages failed", ex); } } return releaseMessages; } }
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-demo/src/main/java/com/ctrip/framework/apollo/demo/spring/common/config/AnotherAppConfig.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.demo.spring.common.config; import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.context.annotation.Configuration; /** * @author Jason Song(song_s@ctrip.com) */ @Configuration @EnableApolloConfig(value = {"TEST1.apollo", "application.yaml"}, order = 11) public class AnotherAppConfig { }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.demo.spring.common.config; import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.context.annotation.Configuration; /** * @author Jason Song(song_s@ctrip.com) */ @Configuration @EnableApolloConfig(value = {"TEST1.apollo", "application.yaml"}, order = 11) public class AnotherAppConfig { }
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/resources/static/views/component/namespace-panel-branch-tab.html
<!-- ~ Copyright 2021 Apollo Authors ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ --> <section class="branch-panel-body" ng-if="namespace.initialized && (namespace.hasBranch && namespace.displayControl.currentOperateBranch != 'master')"> <!--main header--> <header class="panel-heading"> <div class="row"> <div class="col-md-6 col-sm-6 header-namespace"> <b class="namespace-name" ng-bind="namespace.viewName" data-tooltip="tooltip" data-placement="bottom" title="{{namespace.comment}}"></b> <span class="label label-warning no-radius namespace-label" ng-show="namespace.branch.itemModifiedCnt > 0">{{'Component.Namespace.Branch.IsChanged' | translate }} <span class="badge label badge-white namespace-label" ng-bind="namespace.branch.itemModifiedCnt"></span> </span> <span class="label label-primary no-radius namespace-label" ng-show="namespace.branch.lockOwner">{{'Component.Namespace.Branch.ChangeUser' | translate }}: <span ng-bind="namespace.branch.lockOwner"></span> </span> </div> <div class="col-md-6 col-sm-6 text-right header-buttons"> <a type="button" class="btn btn-success btn-sm" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.ContinueGrayscalePublish' | translate }}" ng-show="(namespace.hasReleasePermission || namespace.hasModifyPermission)" ng-click="publish(namespace.branch)"> {{'Component.Namespace.Branch.GrayscalePublish' | translate }} </a> <a type="button" class="btn btn-primary btn-sm" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.MergeToMasterAndPublish' | translate }}" ng-show="(namespace.hasReleasePermission || namespace.hasModifyPermission)" ng-click="mergeAndPublish(namespace.branch)"> {{'Component.Namespace.Branch.AllPublish' | translate }} </a> <a type="button" class="btn btn-warning btn-sm" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.DiscardGrayscaleVersion' | translate }}" ng-show="(namespace.hasReleasePermission || (!namespace.branch.latestRelease && namespace.hasModifyPermission))" ng-click="preDeleteBranch(namespace.branch)"> {{'Component.Namespace.Branch.DiscardGrayscale' | translate }} </a> </div> </div> </header> <div id="BODY{{namespace.branch.id}}" ng-class="{'collapse in': showNamespaceBody, 'collapse' : !showNamespaceBody}"> <div class="J_namespace-release-tip well well-sm no-radius text-center" ng-show="namespace.isConfigHidden"> <span style="color: red">{{'Component.Namespace.Branch.NoPermissionTips' | translate }}</span> </div> <!--second header--> <header class="panel-heading second-panel-heading" ng-show="!namespace.isConfigHidden"> <div class="row"> <div class="col-md-12 pull-left"> <ul class="nav nav-tabs"> <li role="presentation" ng-click="switchView(namespace.branch, 'table')" ng-show="namespace.isPropertiesFormat"> <a ng-class="{node_active:namespace.branch.viewType == 'table'}"> <img src="img/table.png"> {{'Component.Namespace.Branch.Tab.Configuration' | translate }} </a> </li> <li role="presentation" ng-click="switchView(namespace.branch, 'rule')"> <a ng-class="{node_active:namespace.branch.viewType == 'rule'}"> <img src="img/rule.png"> {{'Component.Namespace.Branch.Tab.GrayscaleRule' | translate }} <span class="badge badge-grey" ng-bind="namespace.branch.grayIps.length + namespace.branch.grayApps.length"></span> </a> </li> <li role="presentation" ng-click="switchView(namespace.branch, 'instance')"> <a ng-class="{node_active:namespace.branch.viewType == 'instance'}"> <img src="img/machine.png"> {{'Component.Namespace.Branch.Tab.GrayscaleInstance' | translate }} <span class="badge badge-grey" ng-bind="namespace.branch.latestReleaseInstances.total"></span> </a> </li> <li role="presentation" ng-click="switchView(namespace.branch, 'history')"> <a ng-class="{node_active:namespace.branch.viewType == 'history'}"> <img src="img/change.png"> {{'Component.Namespace.Branch.Tab.ChangeHistory' | translate }} </a> </li> </ul> </div> </div> </header> <!--namespace body--> <section ng-show="!namespace.isConfigHidden"> <!--items--> <div class="namespace-view-table" ng-show="namespace.branch.viewType == 'table'"> <div class="panel panel-default" ng-if="namespace.hasBranch"> <div class="panel-heading"> {{'Component.Namespace.Branch.Body.Item' | translate }} <button type="button" class="btn btn-primary btn-sm pull-right" style="margin-top: -4px;" ng-show="namespace.hasModifyPermission" ng-click="createItem(namespace.branch)"> <img src="img/plus.png"> {{'Component.Namespace.Branch.Body.AddedItem' | translate }} </button> </div> <table class="table table-bordered table-striped table-hover"> <thead> <tr> <th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}" ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;"> {{'Component.Namespace.Branch.Body.PublishState' | translate }} <span class="glyphicon glyphicon-sort"></span> </th> <th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}" ng-click="col='item.key';desc=!desc;"> {{'Component.Namespace.Branch.Body.ItemKey' | translate }}&nbsp; <span class="glyphicon glyphicon-sort"></span> </th> <th> {{'Component.Namespace.Branch.Body.ItemMasterValue' | translate }} </th> <th> {{'Component.Namespace.Branch.Body.ItemGrayscaleValue' | translate }} </th> <th> {{'Component.Namespace.Branch.Body.ItemComment' | translate }} </th> <th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}" ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;"> {{'Component.Namespace.Branch.Body.ItemLastModify' | translate }} <span class="glyphicon glyphicon-sort"></span> </th> <th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}" ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;"> {{'Component.Namespace.Branch.Body.ItemLastModifyTime' | translate }} <span class="glyphicon glyphicon-sort"></span> </th> <th> {{'Component.Namespace.Branch.Body.ItemOperator' | translate }} </th> </tr> </thead> <tbody> <tr ng-repeat="config in namespace.branch.branchItems |orderBy:col:desc" ng-if="config.item.key"> <td width="7%" class="text-center"> <span class="label label-warning no-radius cursor-pointer" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Body.ClickToSeeItemValue' | translate }}" ng-if="config.isModified || config.isDeleted" ng-click="showText(config.oldValue)">{{'Component.Namespace.Branch.Body.ItemNoPublish' | translate }}</span> <span class="label label-default-light no-radius" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Body.ItemEffective' | translate }}" ng-if="!config.isModified">{{'Component.Namespace.Branch.Body.ItemPublished' | translate }}</span> </td> <td width="15%" class="cursor-pointer" title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}" ng-click="showText(config.item.key)"> <span ng-bind="config.item.key | limitTo: 250"></span> <span ng-bind="config.item.key.length > 250 ? '...' :''"></span> <span class="label label-danger" ng-if="config.isDeleted" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Body.DeletedItem' | translate }}">{{'Component.Namespace.Branch.Body.Delete' | translate }}</span> <span class="label label-info" ng-if="!config.isDeleted && config.masterItemExists" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Body.ChangedFromMaster' | translate }}">{{'Component.Namespace.Branch.Body.Modify' | translate }}</span> <span class="label label-success" ng-if="!config.isDeleted && !config.masterItemExists" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Body.AddedByGrayscale' | translate }}">{{'Component.Namespace.Branch.Body.Added' | translate }}</span> </td> <td width="20%" class="cursor-pointer" title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}" ng-click="showText(config.masterReleaseValue)"> <span ng-bind="config.masterReleaseValue | limitTo: 250"></span> <span ng-bind="config.item.value.length > 250 ? '...': ''"></span> </td> <td width="20%" class="cursor-pointer" title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}" ng-click="showText(config.item.value)"> <span ng-bind="config.item.value | limitTo: 250"></span> <span ng-bind="config.item.value.length > 250 ? '...': ''"></span> </td> <td width="10%" title="{{config.item.comment}}"> <span ng-bind="config.item.comment | limitTo: 250"></span> <span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span> </td> <td width="10%" ng-bind="config.item.dataChangeLastModifiedByDisplayName + '(' + config.item.dataChangeLastModifiedBy + ')'"> </td> <td width="10%" ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'"> </td> <td width="9%" class="text-center"> <img src="img/edit.png" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Body.Op.Modify' | translate }}" ng-if="!config.isDeleted" ng-click="editItem(namespace.branch, config.item)" ng-show="namespace.hasModifyPermission"> <img style="margin-left: 5px;" src="img/cancel.png" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Body.Op.Delete' | translate }}" ng-if="!config.isDeleted" ng-click="preDeleteItem(namespace.branch, config.item)" ng-show="namespace.hasModifyPermission"> </td> </tr> </tbody> </table> </div> <div class="panel panel-default" ng-if="namespace.branch.masterItems && namespace.branch.masterItems.length > 0"> <div class="panel-heading"> {{'Component.Namespace.MasterBranch.Body.Title' | translate }} </div> <table class="table table-bordered table-striped table-hover"> <thead> <tr> <th>{{'Component.Namespace.MasterBranch.Body.PublishState' | translate }}</th> <th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}" ng-click="col='item.key';desc=!desc;"> {{'Component.Namespace.MasterBranch.Body.ItemKey' | translate }}&nbsp; <span class="glyphicon glyphicon-sort"></span> </th> <th> {{'Component.Namespace.MasterBranch.Body.ItemValue' | translate }} </th> <th> {{'Component.Namespace.MasterBranch.Body.ItemComment' | translate }} </th> <th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}" ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;"> {{'Component.Namespace.MasterBranch.Body.ItemLastModify' | translate }} <span class="glyphicon glyphicon-sort"></span> </th> <th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}" ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;"> {{'Component.Namespace.MasterBranch.Body.ItemLastModifyTime' | translate }} <span class="glyphicon glyphicon-sort"></span> </th> <th> {{'Component.Namespace.MasterBranch.Body.ItemOperator' | translate }} </th> </tr> </thead> <tbody> <tr ng-repeat="config in namespace.branch.masterItems |orderBy:col:desc" ng-if="config.item.key"> <td width="8%" class="text-center"> <span class="label label-warning no-radius cursor-pointer" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.MasterBranch.Body.ClickToSeeItemValue' | translate }}" ng-if="config.isModified || config.isDeleted" ng-click="showText(config.oldValue)">{{'Component.Namespace.MasterBranch.Body.ItemNoPublish' | translate }}</span> <span class="label label-default-light no-radius" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.MasterBranch.Body.ItemEffective' | translate }}" ng-if="!config.isModified">{{'Component.Namespace.MasterBranch.Body.ItemPublished' | translate }}</span> </td> <td width="15%" class="cursor-pointer" title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}" ng-click="showText(config.item.key)"> <span ng-bind="config.item.key | limitTo: 250"></span> <span ng-bind="config.item.key.length > 250 ? '...' :''"></span> <span class="label label-success" ng-if="config.isModified && !config.oldValue" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.MasterBranch.Body.AddedItem' | translate }}">{{'Component.Namespace.Branch.Body.Added' | translate }}</span> <span class="label label-info" ng-if="config.isModified && config.oldValue && !config.isDeleted" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Body.ModifiedItem' | translate }}">{{'Component.Namespace.Branch.Body.Modify' | translate }}</span> <span class="label label-danger" ng-if="config.isDeleted" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Body.DeletedItem' | translate }}">{{'Component.Namespace.Branch.Body.Delete' | translate }}</span> </td> <td width="35%" class="cursor-pointer" title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}" ng-click="showText(config.item.value)"> <span ng-bind="config.item.value | limitTo: 250"></span> <span ng-bind="config.item.value.length > 250 ? '...': ''"></span> </td> <td width="12%" title="{{config.item.comment}}"> <span ng-bind="config.item.comment | limitTo: 250"></span> <span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span> </td> <td width="10%" ng-bind="config.item.dataChangeLastModifiedByDisplayName + '(' + config.item.dataChangeLastModifiedBy + ')'"> </td> <td width="15%" ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'"> </td> <td width="5%" class="text-center"> <img src="img/gray.png" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.MasterBranch.Body.ModifyItem' | translate }}" ng-if="!config.isDeleted" ng-click="editItem(namespace.branch, config.item)" ng-show="namespace.hasModifyPermission"> </td> </tr> </tbody> </table> </div> </div> <!--gray rules--> <div class="rules-manage-view row" ng-show="namespace.branch.viewType == 'rule'"> <div class="alert alert-warning no-radius" ng-show="!namespace.hasModifyPermission && !namespace.hasReleasePermission"> <strong>Tips:</strong> {{'Component.Namespace.Branch.GrayScaleRule.NoPermissionTips' | translate }} </div> <table class="table table-bordered table-hover"> <thead> <tr> <th>{{'Component.Namespace.Branch.GrayScaleRule.AppId' | translate }}</th> <th>{{'Component.Namespace.Branch.GrayScaleRule.IpList' | translate }}</th> <th>{{'Component.Namespace.Branch.GrayScaleRule.Operator' | translate }}</th> </tr> </thead> <tbody> <tr ng-repeat="ruleItem in namespace.branch.rules.ruleItems"> <td width="20%" ng-bind="ruleItem.clientAppId"></td> <td width="70%" ng-show="!ruleItem.ApplyToAllInstances" ng-bind="ruleItem.clientIpList.join(', ')"></td> <td width="70%" ng-show="ruleItem.ApplyToAllInstances"> {{'Component.Namespace.Branch.GrayScaleRule.ApplyToAllInstances' | translate }}</td> <td class="text-center" width="10%"> <img src="img/edit.png" class="i-20 hover" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.GrayScaleRule.Modify' | translate }}" ng-show="namespace.hasModifyPermission || namespace.hasReleasePermission" ng-click="editRuleItem(namespace.branch, ruleItem)"> <img src="img/cancel.png" class="i-20 hover" style="margin-left: 5px;" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.GrayScaleRule.Delete' | translate }}" ng-show="namespace.hasModifyPermission || namespace.hasReleasePermission" ng-click="deleteRuleItem(namespace.branch, ruleItem)"> </td> </tr> </tbody> </table> <button class="btn btn-primary" ng-if="namespace.hasModifyPermission || namespace.hasReleasePermission" ng-show="(namespace.isPublic && !namespace.isLinkedNamespace) || ((!namespace.isPublic || namespace.isLinkedNamespace) && (!namespace.branch.rules || !namespace.branch.rules.ruleItems || !namespace.branch.rules.ruleItems.length))" ng-click="addRuleItem(namespace.branch)">{{'Component.Namespace.Branch.GrayScaleRule.AddNewRule' | translate }} </button> </div> <!--instances --> <div class="panel panel-default" ng-show="namespace.branch.viewType == 'instance'"> <div class="panel-heading text-right"> <button class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Instance.RefreshList' | translate }}" ng-click="refreshInstancesInfo(namespace.branch)"> <img ng-src="{{ '/img/refresh.png' | prefixPath }}" /> </button> </div> <div class="panel-body"> <div class="panel-default" ng-if="namespace.branch.latestReleaseInstances.total > 0"> <div class="panel-heading"> <a target="_blank" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Instance.ItemToSee' | translate }}" ng-href="{{ '/config/history.html' | prefixPath }}?#/appid={{appId}}&env={{env}}&clusterName={{namespace.baseInfo.clusterName}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{namespace.branch.latestRelease.id}}"> {{namespace.branch.latestRelease.name}} </a> </div> <table class="table table-bordered table-striped"> <thead> <tr> <td>{{'Component.Namespace.Branch.Instance.InstanceAppId' | translate }}</td> <td>{{'Component.Namespace.Branch.Instance.InstanceClusterName' | translate }}</td> <td>{{'Component.Namespace.Branch.Instance.InstanceDataCenter' | translate }}</td> <td>{{'Component.Namespace.Branch.Instance.InstanceIp' | translate }}</td> <td>{{'Component.Namespace.Branch.Instance.InstanceGetItemTime' | translate }}</td> </tr> </thead> <tbody> <tr ng-repeat="instance in namespace.branch.latestReleaseInstances.content"> <td width="20%" ng-bind="instance.appId"></td> <td width="20%" ng-bind="instance.clusterName"></td> <td width="20%" ng-bind="instance.dataCenter"></td> <td width="20%" ng-bind="instance.ip"></td> <td width="20%">{{instance.configs && instance.configs.length ? (instance.configs[0].releaseDeliveryTime | date: 'yyyy-MM-dd HH:mm:ss') : ''}} </td> </tr> </tbody> </table> <div class="row text-center" ng-show="namespace.branch.latestReleaseInstances.content.length < namespace.branch.latestReleaseInstances.total"> <button class="btn btn-default" ng-click="loadInstanceInfo(namespace.branch)">{{'Component.Namespace.Branch.Instance.LoadMore' | translate }}</button> </div> </div> <div class="text-center" ng-if="namespace.branch.latestReleaseInstances.total == 0"> {{'Component.Namespace.Branch.Instance.NoInstance' | translate }} </div> </div> </div> <!--history view--> <div class="J_historyview history-view" ng-show="namespace.branch.viewType == 'history'"> <div class="media" ng-show="namespace.branch.commits && namespace.branch.commits.length" ng-repeat="commits in namespace.branch.commits"> <div class="media-body"> <div class="row"> <div class="col-md-6 col-sm-6 "> <h3 class="media-heading" ng-bind="commits.dataChangeCreatedByDisplayName + '(' + commits.dataChangeCreatedBy + ')'"></h3> </div> <div class="col-md-6 col-sm-6 text-right"> <h5 class="media-heading" ng-bind="commits.dataChangeCreatedTime | date: 'yyyy-MM-dd HH:mm:ss'"></h5> </div> </div> <!--properties format--> <table class="table table-bordered table-striped text-center table-hover" style="margin-top: 5px;" ng-if="namespace.isPropertiesFormat"> <thead> <tr> <th> {{'Component.Namespace.Branch.History.ItemType' | translate }} </th> <th> {{'Component.Namespace.Branch.History.ItemKey' | translate }} </th> <th> {{'Component.Namespace.Branch.History.ItemOldValue' | translate }} </th> <th> {{'Component.Namespace.Branch.History.ItemNewValue' | translate }} </th> <th> {{'Component.Namespace.Branch.History.ItemComment' | translate }} </th> </tr> </thead> <tbody> <!--兼容老数据,不显示item类型为空行和注释的item--> <tr ng-repeat="item in commits.changeSets.createItems" ng-show="item.key"> <td width="6%"> {{'Component.Namespace.Branch.History.NewAdded' | translate }} </td> <td width="20%" title="{{item.key}}"> <span ng-bind="item.key | limitTo: 250"></span> <span ng-bind="item.key.length > 250 ? '...' :''"></span> </td> <td width="28%"> </td> <td width="28%" class="cursor-pointer" title="{{item.value}}" ng-click="showText(item.value)"> <span ng-bind="item.value | limitTo: 250"></span> <span ng-bind="item.value.length > 250 ? '...': ''"></span> </td> <td width="18%" title="{{item.comment}}"> <span ng-bind="item.comment | limitTo: 250"></span> <span ng-bind="item.comment.length > 250 ?'...' : ''"></span> </td> </tr> <tr ng-repeat="item in commits.changeSets.updateItems"> <td width="6%"> {{'Component.Namespace.Branch.History.Modified' | translate }} </td> <td width="20%" title="{{item.newItem.key}}"> <span ng-bind="item.newItem.key | limitTo: 250"></span> <span ng-bind="item.newItem.key.length > 250 ? '...' :''"></span> </td> <td width="28%" class="cursor-pointer" title="{{item.oldItem.value}}" ng-click="showText(item.oldItem.value)"> <span ng-bind="item.oldItem.value | limitTo: 250"></span> <span ng-bind="item.oldItem.value.length > 250 ? '...': ''"></span> </td> <td width="28%" class="cursor-pointer" title="{{item.newItem.value}}" ng-click="showText(item.newItem.value)"> <span ng-bind="item.newItem.value | limitTo: 250"></span> <span ng-bind="item.newItem.value.length > 250 ? '...': ''"></span> </td> <td width="18%" title="{{item.newItem.comment}}"> <span ng-bind="item.newItem.comment | limitTo: 250"></span> <span ng-bind="item.newItem.comment.length > 250 ?'...' : ''"></span> </td> </tr> <tr ng-repeat="item in commits.changeSets.deleteItems" ng-show="item.key || item.comment"> <td width="6%"> {{'Component.Namespace.Branch.History.Deleted' | translate }} </td> <td width="20%" title="{{item.key}}"> <span ng-bind="item.key | limitTo: 250"></span> <span ng-bind="item.key.length > 250 ? '...' :''"></span> </td> <td width="28%" title="{{item.value}}"> <span ng-bind="item.value | limitTo: 250"></span> <span ng-bind="item.value.length > 250 ? '...': ''"></span> </td> <td width="28%"> </td> <td width="18%" title="{{item.comment}}"> <span ng-bind="item.comment | limitTo: 250"></span> <span ng-bind="item.comment.length > 250 ?'...' : ''"></span> </td> </tr> </tbody> </table> <!--not properties format--> <div ng-if="!namespace.isPropertiesFormat"> <div ng-repeat="item in commits.changeSets.createItems"> <textarea class="form-control no-radius" rows="20" ng-disabled="true" ng-bind="item.value"> </textarea> </div> <div ng-repeat="item in commits.changeSets.updateItems"> <textarea class="form-control no-radius" rows="20" ng-disabled="true" ng-bind="item.newItem.value"> </textarea> </div> </div> </div> <hr> </div> <div class="text-center"> <button type="button" class="btn btn-default" ng-show="!namespace.branch.hasLoadAllCommit" ng-click="loadCommitHistory(namespace.branch)">{{'Component.Namespace.Branch.History.LoadMore' | translate }} <span class="glyphicon glyphicon-menu-down"></span></button> </div> <div class="empty-container text-center" ng-show="!namespace.branch.commits || !namespace.branch.commits.length"> {{'Component.Namespace.Branch.History.NoHistory' | translate }} </div> </div> </section> </div> </section>
<!-- ~ Copyright 2021 Apollo Authors ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ --> <section class="branch-panel-body" ng-if="namespace.initialized && (namespace.hasBranch && namespace.displayControl.currentOperateBranch != 'master')"> <!--main header--> <header class="panel-heading"> <div class="row"> <div class="col-md-6 col-sm-6 header-namespace"> <b class="namespace-name" ng-bind="namespace.viewName" data-tooltip="tooltip" data-placement="bottom" title="{{namespace.comment}}"></b> <span class="label label-warning no-radius namespace-label" ng-show="namespace.branch.itemModifiedCnt > 0">{{'Component.Namespace.Branch.IsChanged' | translate }} <span class="badge label badge-white namespace-label" ng-bind="namespace.branch.itemModifiedCnt"></span> </span> <span class="label label-primary no-radius namespace-label" ng-show="namespace.branch.lockOwner">{{'Component.Namespace.Branch.ChangeUser' | translate }}: <span ng-bind="namespace.branch.lockOwner"></span> </span> </div> <div class="col-md-6 col-sm-6 text-right header-buttons"> <a type="button" class="btn btn-success btn-sm" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.ContinueGrayscalePublish' | translate }}" ng-show="(namespace.hasReleasePermission || namespace.hasModifyPermission)" ng-click="publish(namespace.branch)"> {{'Component.Namespace.Branch.GrayscalePublish' | translate }} </a> <a type="button" class="btn btn-primary btn-sm" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.MergeToMasterAndPublish' | translate }}" ng-show="(namespace.hasReleasePermission || namespace.hasModifyPermission)" ng-click="mergeAndPublish(namespace.branch)"> {{'Component.Namespace.Branch.AllPublish' | translate }} </a> <a type="button" class="btn btn-warning btn-sm" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.DiscardGrayscaleVersion' | translate }}" ng-show="(namespace.hasReleasePermission || (!namespace.branch.latestRelease && namespace.hasModifyPermission))" ng-click="preDeleteBranch(namespace.branch)"> {{'Component.Namespace.Branch.DiscardGrayscale' | translate }} </a> </div> </div> </header> <div id="BODY{{namespace.branch.id}}" ng-class="{'collapse in': showNamespaceBody, 'collapse' : !showNamespaceBody}"> <div class="J_namespace-release-tip well well-sm no-radius text-center" ng-show="namespace.isConfigHidden"> <span style="color: red">{{'Component.Namespace.Branch.NoPermissionTips' | translate }}</span> </div> <!--second header--> <header class="panel-heading second-panel-heading" ng-show="!namespace.isConfigHidden"> <div class="row"> <div class="col-md-12 pull-left"> <ul class="nav nav-tabs"> <li role="presentation" ng-click="switchView(namespace.branch, 'table')" ng-show="namespace.isPropertiesFormat"> <a ng-class="{node_active:namespace.branch.viewType == 'table'}"> <img src="img/table.png"> {{'Component.Namespace.Branch.Tab.Configuration' | translate }} </a> </li> <li role="presentation" ng-click="switchView(namespace.branch, 'rule')"> <a ng-class="{node_active:namespace.branch.viewType == 'rule'}"> <img src="img/rule.png"> {{'Component.Namespace.Branch.Tab.GrayscaleRule' | translate }} <span class="badge badge-grey" ng-bind="namespace.branch.grayIps.length + namespace.branch.grayApps.length"></span> </a> </li> <li role="presentation" ng-click="switchView(namespace.branch, 'instance')"> <a ng-class="{node_active:namespace.branch.viewType == 'instance'}"> <img src="img/machine.png"> {{'Component.Namespace.Branch.Tab.GrayscaleInstance' | translate }} <span class="badge badge-grey" ng-bind="namespace.branch.latestReleaseInstances.total"></span> </a> </li> <li role="presentation" ng-click="switchView(namespace.branch, 'history')"> <a ng-class="{node_active:namespace.branch.viewType == 'history'}"> <img src="img/change.png"> {{'Component.Namespace.Branch.Tab.ChangeHistory' | translate }} </a> </li> </ul> </div> </div> </header> <!--namespace body--> <section ng-show="!namespace.isConfigHidden"> <!--items--> <div class="namespace-view-table" ng-show="namespace.branch.viewType == 'table'"> <div class="panel panel-default" ng-if="namespace.hasBranch"> <div class="panel-heading"> {{'Component.Namespace.Branch.Body.Item' | translate }} <button type="button" class="btn btn-primary btn-sm pull-right" style="margin-top: -4px;" ng-show="namespace.hasModifyPermission" ng-click="createItem(namespace.branch)"> <img src="img/plus.png"> {{'Component.Namespace.Branch.Body.AddedItem' | translate }} </button> </div> <table class="table table-bordered table-striped table-hover"> <thead> <tr> <th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}" ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;"> {{'Component.Namespace.Branch.Body.PublishState' | translate }} <span class="glyphicon glyphicon-sort"></span> </th> <th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}" ng-click="col='item.key';desc=!desc;"> {{'Component.Namespace.Branch.Body.ItemKey' | translate }}&nbsp; <span class="glyphicon glyphicon-sort"></span> </th> <th> {{'Component.Namespace.Branch.Body.ItemMasterValue' | translate }} </th> <th> {{'Component.Namespace.Branch.Body.ItemGrayscaleValue' | translate }} </th> <th> {{'Component.Namespace.Branch.Body.ItemComment' | translate }} </th> <th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}" ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;"> {{'Component.Namespace.Branch.Body.ItemLastModify' | translate }} <span class="glyphicon glyphicon-sort"></span> </th> <th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}" ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;"> {{'Component.Namespace.Branch.Body.ItemLastModifyTime' | translate }} <span class="glyphicon glyphicon-sort"></span> </th> <th> {{'Component.Namespace.Branch.Body.ItemOperator' | translate }} </th> </tr> </thead> <tbody> <tr ng-repeat="config in namespace.branch.branchItems |orderBy:col:desc" ng-if="config.item.key"> <td width="7%" class="text-center"> <span class="label label-warning no-radius cursor-pointer" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Body.ClickToSeeItemValue' | translate }}" ng-if="config.isModified || config.isDeleted" ng-click="showText(config.oldValue)">{{'Component.Namespace.Branch.Body.ItemNoPublish' | translate }}</span> <span class="label label-default-light no-radius" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Body.ItemEffective' | translate }}" ng-if="!config.isModified">{{'Component.Namespace.Branch.Body.ItemPublished' | translate }}</span> </td> <td width="15%" class="cursor-pointer" title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}" ng-click="showText(config.item.key)"> <span ng-bind="config.item.key | limitTo: 250"></span> <span ng-bind="config.item.key.length > 250 ? '...' :''"></span> <span class="label label-danger" ng-if="config.isDeleted" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Body.DeletedItem' | translate }}">{{'Component.Namespace.Branch.Body.Delete' | translate }}</span> <span class="label label-info" ng-if="!config.isDeleted && config.masterItemExists" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Body.ChangedFromMaster' | translate }}">{{'Component.Namespace.Branch.Body.Modify' | translate }}</span> <span class="label label-success" ng-if="!config.isDeleted && !config.masterItemExists" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Body.AddedByGrayscale' | translate }}">{{'Component.Namespace.Branch.Body.Added' | translate }}</span> </td> <td width="20%" class="cursor-pointer" title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}" ng-click="showText(config.masterReleaseValue)"> <span ng-bind="config.masterReleaseValue | limitTo: 250"></span> <span ng-bind="config.item.value.length > 250 ? '...': ''"></span> </td> <td width="20%" class="cursor-pointer" title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}" ng-click="showText(config.item.value)"> <span ng-bind="config.item.value | limitTo: 250"></span> <span ng-bind="config.item.value.length > 250 ? '...': ''"></span> </td> <td width="10%" title="{{config.item.comment}}"> <span ng-bind="config.item.comment | limitTo: 250"></span> <span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span> </td> <td width="10%" ng-bind="config.item.dataChangeLastModifiedByDisplayName + '(' + config.item.dataChangeLastModifiedBy + ')'"> </td> <td width="10%" ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'"> </td> <td width="9%" class="text-center"> <img src="img/edit.png" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Body.Op.Modify' | translate }}" ng-if="!config.isDeleted" ng-click="editItem(namespace.branch, config.item)" ng-show="namespace.hasModifyPermission"> <img style="margin-left: 5px;" src="img/cancel.png" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Body.Op.Delete' | translate }}" ng-if="!config.isDeleted" ng-click="preDeleteItem(namespace.branch, config.item)" ng-show="namespace.hasModifyPermission"> </td> </tr> </tbody> </table> </div> <div class="panel panel-default" ng-if="namespace.branch.masterItems && namespace.branch.masterItems.length > 0"> <div class="panel-heading"> {{'Component.Namespace.MasterBranch.Body.Title' | translate }} </div> <table class="table table-bordered table-striped table-hover"> <thead> <tr> <th>{{'Component.Namespace.MasterBranch.Body.PublishState' | translate }}</th> <th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}" ng-click="col='item.key';desc=!desc;"> {{'Component.Namespace.MasterBranch.Body.ItemKey' | translate }}&nbsp; <span class="glyphicon glyphicon-sort"></span> </th> <th> {{'Component.Namespace.MasterBranch.Body.ItemValue' | translate }} </th> <th> {{'Component.Namespace.MasterBranch.Body.ItemComment' | translate }} </th> <th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}" ng-click="col='item.dataChangeLastModifiedBy';desc=!desc;"> {{'Component.Namespace.MasterBranch.Body.ItemLastModify' | translate }} <span class="glyphicon glyphicon-sort"></span> </th> <th class="hover" title="{{'Component.Namespace.Branch.Body.ItemSort' | translate }}" ng-click="col='item.dataChangeLastModifiedTime';desc=!desc;"> {{'Component.Namespace.MasterBranch.Body.ItemLastModifyTime' | translate }} <span class="glyphicon glyphicon-sort"></span> </th> <th> {{'Component.Namespace.MasterBranch.Body.ItemOperator' | translate }} </th> </tr> </thead> <tbody> <tr ng-repeat="config in namespace.branch.masterItems |orderBy:col:desc" ng-if="config.item.key"> <td width="8%" class="text-center"> <span class="label label-warning no-radius cursor-pointer" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.MasterBranch.Body.ClickToSeeItemValue' | translate }}" ng-if="config.isModified || config.isDeleted" ng-click="showText(config.oldValue)">{{'Component.Namespace.MasterBranch.Body.ItemNoPublish' | translate }}</span> <span class="label label-default-light no-radius" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.MasterBranch.Body.ItemEffective' | translate }}" ng-if="!config.isModified">{{'Component.Namespace.MasterBranch.Body.ItemPublished' | translate }}</span> </td> <td width="15%" class="cursor-pointer" title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}" ng-click="showText(config.item.key)"> <span ng-bind="config.item.key | limitTo: 250"></span> <span ng-bind="config.item.key.length > 250 ? '...' :''"></span> <span class="label label-success" ng-if="config.isModified && !config.oldValue" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.MasterBranch.Body.AddedItem' | translate }}">{{'Component.Namespace.Branch.Body.Added' | translate }}</span> <span class="label label-info" ng-if="config.isModified && config.oldValue && !config.isDeleted" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Body.ModifiedItem' | translate }}">{{'Component.Namespace.Branch.Body.Modify' | translate }}</span> <span class="label label-danger" ng-if="config.isDeleted" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Body.DeletedItem' | translate }}">{{'Component.Namespace.Branch.Body.Delete' | translate }}</span> </td> <td width="35%" class="cursor-pointer" title="{{'Component.Namespace.Branch.Body.ClickToSee' | translate }}" ng-click="showText(config.item.value)"> <span ng-bind="config.item.value | limitTo: 250"></span> <span ng-bind="config.item.value.length > 250 ? '...': ''"></span> </td> <td width="12%" title="{{config.item.comment}}"> <span ng-bind="config.item.comment | limitTo: 250"></span> <span ng-bind="config.item.comment.length > 250 ?'...' : ''"></span> </td> <td width="10%" ng-bind="config.item.dataChangeLastModifiedByDisplayName + '(' + config.item.dataChangeLastModifiedBy + ')'"> </td> <td width="15%" ng-bind="config.item.dataChangeLastModifiedTime | date: 'yyyy-MM-dd HH:mm:ss'"> </td> <td width="5%" class="text-center"> <img src="img/gray.png" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.MasterBranch.Body.ModifyItem' | translate }}" ng-if="!config.isDeleted" ng-click="editItem(namespace.branch, config.item)" ng-show="namespace.hasModifyPermission"> </td> </tr> </tbody> </table> </div> </div> <!--gray rules--> <div class="rules-manage-view row" ng-show="namespace.branch.viewType == 'rule'"> <div class="alert alert-warning no-radius" ng-show="!namespace.hasModifyPermission && !namespace.hasReleasePermission"> <strong>Tips:</strong> {{'Component.Namespace.Branch.GrayScaleRule.NoPermissionTips' | translate }} </div> <table class="table table-bordered table-hover"> <thead> <tr> <th>{{'Component.Namespace.Branch.GrayScaleRule.AppId' | translate }}</th> <th>{{'Component.Namespace.Branch.GrayScaleRule.IpList' | translate }}</th> <th>{{'Component.Namespace.Branch.GrayScaleRule.Operator' | translate }}</th> </tr> </thead> <tbody> <tr ng-repeat="ruleItem in namespace.branch.rules.ruleItems"> <td width="20%" ng-bind="ruleItem.clientAppId"></td> <td width="70%" ng-show="!ruleItem.ApplyToAllInstances" ng-bind="ruleItem.clientIpList.join(', ')"></td> <td width="70%" ng-show="ruleItem.ApplyToAllInstances"> {{'Component.Namespace.Branch.GrayScaleRule.ApplyToAllInstances' | translate }}</td> <td class="text-center" width="10%"> <img src="img/edit.png" class="i-20 hover" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.GrayScaleRule.Modify' | translate }}" ng-show="namespace.hasModifyPermission || namespace.hasReleasePermission" ng-click="editRuleItem(namespace.branch, ruleItem)"> <img src="img/cancel.png" class="i-20 hover" style="margin-left: 5px;" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.GrayScaleRule.Delete' | translate }}" ng-show="namespace.hasModifyPermission || namespace.hasReleasePermission" ng-click="deleteRuleItem(namespace.branch, ruleItem)"> </td> </tr> </tbody> </table> <button class="btn btn-primary" ng-if="namespace.hasModifyPermission || namespace.hasReleasePermission" ng-show="(namespace.isPublic && !namespace.isLinkedNamespace) || ((!namespace.isPublic || namespace.isLinkedNamespace) && (!namespace.branch.rules || !namespace.branch.rules.ruleItems || !namespace.branch.rules.ruleItems.length))" ng-click="addRuleItem(namespace.branch)">{{'Component.Namespace.Branch.GrayScaleRule.AddNewRule' | translate }} </button> </div> <!--instances --> <div class="panel panel-default" ng-show="namespace.branch.viewType == 'instance'"> <div class="panel-heading text-right"> <button class="btn btn-default btn-sm" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Instance.RefreshList' | translate }}" ng-click="refreshInstancesInfo(namespace.branch)"> <img ng-src="{{ '/img/refresh.png' | prefixPath }}" /> </button> </div> <div class="panel-body"> <div class="panel-default" ng-if="namespace.branch.latestReleaseInstances.total > 0"> <div class="panel-heading"> <a target="_blank" data-tooltip="tooltip" data-placement="bottom" title="{{'Component.Namespace.Branch.Instance.ItemToSee' | translate }}" ng-href="{{ '/config/history.html' | prefixPath }}?#/appid={{appId}}&env={{env}}&clusterName={{namespace.baseInfo.clusterName}}&namespaceName={{namespace.baseInfo.namespaceName}}&releaseId={{namespace.branch.latestRelease.id}}"> {{namespace.branch.latestRelease.name}} </a> </div> <table class="table table-bordered table-striped"> <thead> <tr> <td>{{'Component.Namespace.Branch.Instance.InstanceAppId' | translate }}</td> <td>{{'Component.Namespace.Branch.Instance.InstanceClusterName' | translate }}</td> <td>{{'Component.Namespace.Branch.Instance.InstanceDataCenter' | translate }}</td> <td>{{'Component.Namespace.Branch.Instance.InstanceIp' | translate }}</td> <td>{{'Component.Namespace.Branch.Instance.InstanceGetItemTime' | translate }}</td> </tr> </thead> <tbody> <tr ng-repeat="instance in namespace.branch.latestReleaseInstances.content"> <td width="20%" ng-bind="instance.appId"></td> <td width="20%" ng-bind="instance.clusterName"></td> <td width="20%" ng-bind="instance.dataCenter"></td> <td width="20%" ng-bind="instance.ip"></td> <td width="20%">{{instance.configs && instance.configs.length ? (instance.configs[0].releaseDeliveryTime | date: 'yyyy-MM-dd HH:mm:ss') : ''}} </td> </tr> </tbody> </table> <div class="row text-center" ng-show="namespace.branch.latestReleaseInstances.content.length < namespace.branch.latestReleaseInstances.total"> <button class="btn btn-default" ng-click="loadInstanceInfo(namespace.branch)">{{'Component.Namespace.Branch.Instance.LoadMore' | translate }}</button> </div> </div> <div class="text-center" ng-if="namespace.branch.latestReleaseInstances.total == 0"> {{'Component.Namespace.Branch.Instance.NoInstance' | translate }} </div> </div> </div> <!--history view--> <div class="J_historyview history-view" ng-show="namespace.branch.viewType == 'history'"> <div class="media" ng-show="namespace.branch.commits && namespace.branch.commits.length" ng-repeat="commits in namespace.branch.commits"> <div class="media-body"> <div class="row"> <div class="col-md-6 col-sm-6 "> <h3 class="media-heading" ng-bind="commits.dataChangeCreatedByDisplayName + '(' + commits.dataChangeCreatedBy + ')'"></h3> </div> <div class="col-md-6 col-sm-6 text-right"> <h5 class="media-heading" ng-bind="commits.dataChangeCreatedTime | date: 'yyyy-MM-dd HH:mm:ss'"></h5> </div> </div> <!--properties format--> <table class="table table-bordered table-striped text-center table-hover" style="margin-top: 5px;" ng-if="namespace.isPropertiesFormat"> <thead> <tr> <th> {{'Component.Namespace.Branch.History.ItemType' | translate }} </th> <th> {{'Component.Namespace.Branch.History.ItemKey' | translate }} </th> <th> {{'Component.Namespace.Branch.History.ItemOldValue' | translate }} </th> <th> {{'Component.Namespace.Branch.History.ItemNewValue' | translate }} </th> <th> {{'Component.Namespace.Branch.History.ItemComment' | translate }} </th> </tr> </thead> <tbody> <!--兼容老数据,不显示item类型为空行和注释的item--> <tr ng-repeat="item in commits.changeSets.createItems" ng-show="item.key"> <td width="6%"> {{'Component.Namespace.Branch.History.NewAdded' | translate }} </td> <td width="20%" title="{{item.key}}"> <span ng-bind="item.key | limitTo: 250"></span> <span ng-bind="item.key.length > 250 ? '...' :''"></span> </td> <td width="28%"> </td> <td width="28%" class="cursor-pointer" title="{{item.value}}" ng-click="showText(item.value)"> <span ng-bind="item.value | limitTo: 250"></span> <span ng-bind="item.value.length > 250 ? '...': ''"></span> </td> <td width="18%" title="{{item.comment}}"> <span ng-bind="item.comment | limitTo: 250"></span> <span ng-bind="item.comment.length > 250 ?'...' : ''"></span> </td> </tr> <tr ng-repeat="item in commits.changeSets.updateItems"> <td width="6%"> {{'Component.Namespace.Branch.History.Modified' | translate }} </td> <td width="20%" title="{{item.newItem.key}}"> <span ng-bind="item.newItem.key | limitTo: 250"></span> <span ng-bind="item.newItem.key.length > 250 ? '...' :''"></span> </td> <td width="28%" class="cursor-pointer" title="{{item.oldItem.value}}" ng-click="showText(item.oldItem.value)"> <span ng-bind="item.oldItem.value | limitTo: 250"></span> <span ng-bind="item.oldItem.value.length > 250 ? '...': ''"></span> </td> <td width="28%" class="cursor-pointer" title="{{item.newItem.value}}" ng-click="showText(item.newItem.value)"> <span ng-bind="item.newItem.value | limitTo: 250"></span> <span ng-bind="item.newItem.value.length > 250 ? '...': ''"></span> </td> <td width="18%" title="{{item.newItem.comment}}"> <span ng-bind="item.newItem.comment | limitTo: 250"></span> <span ng-bind="item.newItem.comment.length > 250 ?'...' : ''"></span> </td> </tr> <tr ng-repeat="item in commits.changeSets.deleteItems" ng-show="item.key || item.comment"> <td width="6%"> {{'Component.Namespace.Branch.History.Deleted' | translate }} </td> <td width="20%" title="{{item.key}}"> <span ng-bind="item.key | limitTo: 250"></span> <span ng-bind="item.key.length > 250 ? '...' :''"></span> </td> <td width="28%" title="{{item.value}}"> <span ng-bind="item.value | limitTo: 250"></span> <span ng-bind="item.value.length > 250 ? '...': ''"></span> </td> <td width="28%"> </td> <td width="18%" title="{{item.comment}}"> <span ng-bind="item.comment | limitTo: 250"></span> <span ng-bind="item.comment.length > 250 ?'...' : ''"></span> </td> </tr> </tbody> </table> <!--not properties format--> <div ng-if="!namespace.isPropertiesFormat"> <div ng-repeat="item in commits.changeSets.createItems"> <textarea class="form-control no-radius" rows="20" ng-disabled="true" ng-bind="item.value"> </textarea> </div> <div ng-repeat="item in commits.changeSets.updateItems"> <textarea class="form-control no-radius" rows="20" ng-disabled="true" ng-bind="item.newItem.value"> </textarea> </div> </div> </div> <hr> </div> <div class="text-center"> <button type="button" class="btn btn-default" ng-show="!namespace.branch.hasLoadAllCommit" ng-click="loadCommitHistory(namespace.branch)">{{'Component.Namespace.Branch.History.LoadMore' | translate }} <span class="glyphicon glyphicon-menu-down"></span></button> </div> <div class="empty-container text-center" ng-show="!namespace.branch.commits || !namespace.branch.commits.length"> {{'Component.Namespace.Branch.History.NoHistory' | translate }} </div> </div> </section> </div> </section>
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./doc/images/create-namespace-select-type.png
PNG  IHDRlg1| IDATx]}of4U$$z^L3b vpKq:Y'qx8n1lzH@ z|1#y{>{yw-,] H@$  T!*U$  H@@"T(D! H@$ $дxUYq+- H@$ ªUuH@$  T%BXTVeYi H@$ '9$  H@bjΊK@$  (f$  H@UK@1[]g%  H@ H@$ %ڮ$  H@Yǀ$  H@@PVmYq H@$ Ŭc@$  Hj (f문$  H@&+VĬY$cvˊ$  H@@$1vڸW^LrK|{ߋ7x#[lYIo㭭֖կ~z-$  H@uMP~d9mllg}6Ǝm]nݺxꩧ +t{aG'x"ȣ9ϟ_y_2֬Y/Z(z ^;.6|u /]4=ط$  H@@hژL81YSnj%n˗/O D,b4>믿?HAK^Zu]? _dɒ,~r},70c7ob$  H@@m(1H1cF 'x1r$R'ONް555%+t]w=#$"W\{ozxbĈqcd>hͥA$  H X╀М:ujyw+<`ժUl^ B! R"|! ZXlq3{ӹٳg6lSLIy㾀!6veb-6S"E^b/&LO?t,\0q3mmRK3iq{QLu͕.X;sj6K6"`lr6). 'ڻƖ[nL{~4iRCrM>3g |wid> H@$Pmկ~u FH^y1}$|$m i=X}GIG<~dE!%&~gmMUC|tAIr~ILxSrHCW\ѽœ9sNTO$&)a?! G8Ν$3<f!)pxg WnG7_}E<A ݃@ vn)ґ7./ypoRF' H@-38#Y,MH<Ӟ&`ٰ\"N9$B<`e:,!%1mڴ4n8$3Α~M;TvXI?3 E( #V.J.{ 7| q'K+e#RsLR6# -e=guVq)w0l('n |i<5$K'O$  TYڄElfK(WyqQ9L:I@|~; GZ#"X ?R@~㦛nJn˞!3WD7.a<#ۄX<y粷j$i;Vd,\rIC!Ʋ9p쥗^J7n\XCC:A.|:yX!F]duQ;Qg/Nǰ"b .N}ڝ$  H@@(1ˣw3 Q<NJic2a _B "X)V0«CaX<fQ?Pϣ~} ԏdњ=?#ꫯNu$Gh"D7&"͏ɯ70E•t"qm8"F!`"4@@K9Nԁ>꙾4/?K@$ J#gX:y4τ)DKmae‘5d ."@b%=X2qU s< ƞ"Xy*K=Uu̒yގ”z"O<1Ycq`>L~S §6d+*CIB~|&D7l8tA⛛q<. H@*FYWB)sMҙ=?7MQpdlE'!Ƅ/i<bzɪAwswO]X UVY,bE ll,;+Zn hVim%/a +/Z\JpCHƱR1ϒfL':=X|q0H@$ j"YsKciD"XWaeGgZD&" eG2 +8sC+(VZboAXsk$h:}Ri@Exb4sBR,.$"auۊ0-MZBL6wJLvK@$c!l-{ H@$P62ZBh׉xbbhc<Uf3 +ǢkocYJ<y`qXC j;^JqJ _~y|M f|r;FcL;K'|!ZLEJ )&r/ #xpKM@Ⲁx?BZ« $  H(L jBPq`$RZsg*o,iՐYʈHCa*E)H&OaE4" P b3Ʉ)&S6D5&AaB "֩#z0 _Xcq9ȫ6d `ғ"<8ԃ:"6s*Kz?wn Pr}HCΖǽ$  H@<kI~Xx%-?>YC"~,5@Z2b cEjP+!Y|}q0H@$  li,q7}[JkR$  H@{`RlF@+I?\ j\<?J@$ A'IAH@$  H`6ji ) H@$  쐡 H@$ rP̖I@$  쐡 H@$ rP̖I@$  쐡 H@$ rP̖I@$  쐡 H@$ rP̖I@$  쐡 H@$ rP̖I@$  +Ya$ H@$ r(˙yI@$  H`Ţbvh[$  H@@Y 3[Vf& H@$0CI۲$  H@J$  H@fFqv;W36B!mI@$PKD|#n. FG<9K->hy1!OQZE$P֭?뮌,JSz ilc_}C1!R3hI$  wD#Fhj{kGb{GDAy3*$)RG}5F͛u)ۤ92 ڞS$w H@Jx]Qhk舅/}XE|"'1 %P(bkcj̟͎ͯ=mMB!zu7PVhZ- H@@X[%ۣa͍}?>ې~hmhM`Xm˖ꕫbtSS$A@1oF$  H`zB07n\=:F䞁g&4"Fh)DwtĺuK1[}n%  H@U@-I˼ƆǏcǦ=U8t`uRn!$  H- $XΤ @ueJl} Y(f;$  4DCW)KiPV}˰k5}mX<( H@`ov9g04$e6VI@,X-JiJld l@ۈaҘBƛŒ1clbԨQ]>S5M`̘11uj6ٍf" H@E`bŊ<yrY^[5IȑcD;p7[ne̞|oYW3dxGC-rP_Z$ La,kS5Et &{,Yrٚ~7&Y^JbtET%  f #h;éٜa's%eӖ}g~+n@ իWoTٍf" H@6@2ҖRˬbvcVO,fe~cbvcəN$ M"U'lX&ᬪYdmS^1[U]oe%  H@Ck\v3p$[eMP3$  H@ETȔC̒_l+u"=,޿Cf1Ln 5H@@چu2#JkaY .JU&ɕ .[Nt+e̚tGileO<Ig}H>gyѣG<G^rKir=qo'?JS%  H?W]uU?;owļ{ul3gȑN;m_@袋b]v7|3M֧ ">Xre_uٟY*mz9)SG>^vZvm}|v-wqyL w_ٳ[V|Cwݱnݺ O?xW^I7U;CL81Ž;2tg}vQ1ɘZfM|߈SN9%=&mɒ%1gΜ4&ǎRK.iLl6)?Ļx{ޓ6ep>[(f7Ds$'w= <>Oxկ裏\}GBk_ZZ$ ̙3A@7o^Ws<AnHֶ˗ǽޛ.ӳ_=^~TG,mOLB(eeC uQi-T|ꩧb7OQ9O>dtA9IA5$&o:N9}gtC,ۄX??cܸqq!z,ύqg̘n~R>`P,=n<L_ +-K{1Ej̚5+ŌV z}{P#-<@|Hn~67ذqT]woF]vYy' 'sg1t_+;d4iRs >?c_ۊ4b \?>}jwYge#JAEz駃&XXĥoE`=fo7Xv0V뮻.M,єV$-xR hodf[o0I7=3-75܈ +-X)O8(o~8䓃8 '/_ ,@~MoNi@"^{ya}ff/[㜧As9nFK缉O:#WNC<frx ^1;TS@Zru';'V1VK,\ QA?2sϥ"<"@DHb1812YD a/<pa?d 05 g3L>=+qPF ]pI,PoE<>ҍobÚƢ;>/\0Y +4e.X TtI}VJb3O?G8!@>X /N!g„ eI馛RyDtٲe|{{M`ˢqq~uJQ*M%"Cpv"^{gsfE1NJ{b1B@b#9眓Se>쳩1pu ?ՍqL3Oȏ <h ^{r77 #L}x8V[+C=ɘ|fQcL2Hh;uo1ɍe3h#}C90㍂'~[܄ $  F s<?j>__&,\\E- \Ho$nf_|8\#W"q89t|qu@ebS̒!ř ;V9#= \ȳyS%7q[~$\/&Cޗ^zi0BG : ?Gz2 &,~'<*o3VI,p`]&_?O)Eʦq)җ{쑎#cX@_ :mG!ְzIp%چH?nvpU>>G㦀;xJn/' ,p@9@ؑ7K+AJQO~L`|#~yrXpI3.KGrs#-NZn$1O<O~2~ƌI%. aq1lnԇt80^lO œyW&qϓ fP&]$P@qB-g\ Xx0#.`C`’&b.{^.V)"A~q*Dn!vZ;<%pn<BX p kM_D""ǞO:5>W$lSd",D`e׿-ʉ("D@ V,(*1EQG&>QG N⊘<yrE`ps|+ɪ9|g,ʈh)'!f\3xԎΓ>я{])>3ԍ,ش &fU77/,Y!D,1kX`Q=ƥK?xq Ɓ4&cv|w/TFQLY??~|#P 27XiZ6Sf]M(cB`7uƌ3_}UL x?}FR/0&3oc'ҿ?K@;ˆBQ 9\ٰ <`"bb" !?|iו@z D".xLe8 GXz!⁶!7b2dž8b<=D?/ˁ2Qg5="-"NH\GL4<on;VD'7|?a@SWnpQC>Ef)1X6I9=iS&XI=!x<"byG>sSxgM eaW IDATS'G<,@&ɀjwܘQ6yGXb%$Ƀ`D'yI?ïtSFO18>t"qC<"rh+>Ro&f/)ވ[>XA1;XdW@RŖ1.lɟIz{.j<ɂ% !DVNŸ7ϓ nl, $VL .V-D/uqşK*u, ԃ<K2aC%Xd!lY :~LFRL}Q5z#ti3y A|E|"H >q‡Bl`F9`Ef|x ?um2|2#ʦnQ)N< JaM7<DnRh#jnȃ1}eesX>jÝ%n`er#CBlR7o0&pȁ~"<hoP>o6nhdRO#'RD0mBc%.!frCp68O: BR*陥#Q&D;4`}e#sg"r]<*- \\8K6D!6.~sK#\rqA,ui\!p@ZD瞛O'煘361-XE9]Ϋt9ꍵK2œ8<w 4M,&07)Bx!W oF%Dַi‘>qa%̍aG`cuesCwڎ@ 7Tska^',m;q_\Cx<ԏ8=sX/77ed-"03(&񷀀Gx㍩/^xaX?i;►0cɗ1eDD51Aɓk<cd1&3p2;hl/ H aD,` K჈!/Cr!/!,X<*&] 9GD֫l }[cqj>6",_Թ`#*C #lh"#Bboi=BPÊr9!⟿SV&>᷉E!p@ >q@AA`9]XolIR" ]L#__>4|D;}<X>P~OEC;7I}wg%q&c ]Xi#y lu%8"X絃_pb_5)~bE SG9VMn>+D/[,/ c(I@`]K.$qIM Moeꀋc,&O~y Cma &<m37X Pn0CX7%$  T$.1Y\)03U ¬40!I \X3eä+DtabM qBr, h.rqEh2|w 5=p].ޔ)BJ,P! 3&),dRWS7^ʅW6h,8B𙴈M !="(H<0ad`ADQG| / ($"=QV9xqApS[H(\ˈBWbG>|/iמ8aORI`Md% DnmA[rYc+?~=㯍Er{ ❉Me!b2eG%'DzO<G)I:  on@;t ㇛} |qO?ߙ/sG<n(|=pԟ'3.f?*q(:`.^|^#Xbx;/ R~$P*f9/A2.f.|YǷ8.+ <Œ! Xȓ|r .q.\xĉ ":[r|4.\ yOwqQ w%|C6URW-D! c,X[q#7`pCÆ1\"RF[U(cQ#Jq 8O@>%9N;9F,H$N.+I^lXl8\ږIs})-?Um]_R$  H@c] }b0ھ'.rl}0 Xm ej<ZV3#,Fj 籸"ɓ Kh':w8L>9^/YW>s\gY 48/ i{֧=:^1;XdW$PApЗPBq4NB>_TqTm(Wq<ןhmQM-S1M/ H@Z^B-P $  H@I@1[b$  H@C@1JƑ$  H@Hي+% H`0v򤐡+ْ$ z'w8(' %  . ,{ĺזfڜ #a+ύ~d!:Ѭ̚C4j P7HF4ǎKƄ|߈W_U-rrYg5o^@(ff H@uCi TB4v+P'7m bP+gA/IaэVB@eo6XZ!Plln V8 -׾ҍA `$$  @o[XXbv}~$  HJ#d ] _N*;ϰ%f`p<% H@(n5) cG6Eui{ a2*&P(DqQx(lQc"aZbܪK@@q'F[L{(z!bhlhH"U  DX& qXͶёk(fo,E$Pk>|Q{ ѼhADdY[ḝwDۄ1D{˨tA& &h=dl$  H`P P5_X3qyݕ1ע֦젒G;8'g4i>l肂Z$P%X`mkk,_&~%V}-֭^UEV%9lo6#FDsDzƄ n,熅uVtEH@cDccnj)Q7>VǺuu8uPϰiqbDK#uXu3a%  H@I1-#GFC]uYpvOŕXAZe-a=-d%  H@Tx6r޽' jf^U6oSVU7ZY H@@uǛڲRڗeh$K@$  T_g[u]f%  H@2l&^$  H(fˬ$  H@@&$K@$  Tlu$  H@{ H@$ #.$  H@b6p/ H@$PuUeVX$  H Pf%  H@b K@$  dL½$  H@@PV]Ya H@$ L@1I$  H@:٪2+, H@$ (f3 $  H@UG@1[u]f%  H@2l&^$  H(fˬ$  H@@&Д?@=XlYL>=fq>x饗=bc=oŊsիc̘1^{ŨQRڶtnSNMs/bo;C>s̉W_}5:::bҤI)m>|xg̑#GԃPs=cܸq9ijy 2#A$PUށV`b[.nִ/r? &{lyI0'?Yfy ^xa1"+z$sSL{7nXfMJ7z8'x"@\~3~$)Q'>˓ y㢋.J믿>I~0>TI@jnғ_~׿x;]wXV98s$ޢE'LNc3<Z<1~Ї>o<@]6Y8ұ;VZ5SN9%:묠>txcܹI4m6I3gLeSN;%#$}m%K;N>$Xx $ Z"ezӶ#c\`A9ʕ+p',3f$ማC=4?$(?#<26|$:q+ =t뭷NbEI$#P9ŵ!EtnA9~ dɒg}҆6f$  Hxe޴-Hc 6,Jw|#> d?6,C\"BGKȾGv0vtG"pN0!aq?'D('NL"<"}W5!_e"T)J}fϞַE0f6H@jnԛh K⯷@<g>_K-VҞ<C|.Bϥ(4Yn XT kz9O  8F~L"Mie-ewNVfW_[$ j'e{pG0وELN,SO'Jϗ~wTψF@(|ƊE=a-/+"d-׿ur]xǃ !QG7xc+Bo%-x|#oƿ=VB-m$ %G1 K l|&9]zct#LPBr-p片H" FV[mWr)QJ QQ?i1H҉kgYD)y~ΑlmQW\>]v%r8XYavۥÓ~N0LS&u\z,%? H@@ P@' ドBl2A,}bF<D>4^{m^|I8eHK`=k"TvwqGʟsEu] .H":qxXI馛d?!<c4~ SYayY&fy ąeu\" GҲb=—5sɛi 7" $ Z"-If3[uDL<ƊKs]qxi  1Ey|'viIbżRٷ~{}٥ɇ3uΥO8$Y#pY /V+@ F-mD#fɃ%$=SO=5@ I'2Xaڴi=7|Xo"vFjpG$ a!v)HO?$Mw˱7B%  H@@@1;P+)K B!['\|}{f<B+-<'?P@Vg#$# s" 9 2?$W(}},͛npBJ; |Hn#0.daŗ" U(] f#9ٟ{I063@oJuH? H@FPn$jHhD!fElaI'[e',yNQ4;EZr#NKl.;{"e- ~z XzO}l\72$ Z">2ےyJ,W\ a5.TZOaRȆ=KQe@0&[yθ$  H/Zf"SQ&ad"A˛ ?lK. ]LF"c?#n"0R  H@A@1[W,<16"?=3M⵪Xḿ'S& ]L4B3 !t=$A/D$  b0kbAʤ"fu=o;-6<Z3_8.XmKUl3e)*5 U7ͽ$  H@I@1ۓH|GL"Bq?}Xpaj`-?kͲlX Xy`&u@\&!f.6U>s3/K_k$  H@"- TK9<e8DqwP怏+y\~:G<-tsXs H@$PNb63W AU1D(Y,–Ib9X)L3A$  'pҷl H@$ M":$  H@I@1;-[$  H`(f7 %  H@bv8[$  H@&Pn>K@$  'pҷl H@$ M"$|&$  H@No$  H@D@1IL, H@$0I߲%  H@6bvX$  H`8 (feK@$  l&3$  H@pP'}˖$  H@$Mgb H@$ $N- H@$I6)%P:::X,ViKP(DCR57 H`(fTużybʕ^uO%B'q$1vؘ<yr477'q$  T BQTt\1sd8qbpܹscʔ)Ih'[ V]unɒ%ԩS}VuO@l'!P-zbmiiѣGWMgdUKccƌI7M([  lt ]|yL0!![kX-e[$AoʓH@\z._s\;ׂ f56倿$ j! K@B@1;(XT$  H`((feH@$  `LYgcdﮭ` H@*S+;*2{o}qꩧ]<alٲx7LhD_O|1r~$  H@"-j'#6ok?!~ƪUoO봲2{gqFWUzAp+V3<W_M3IZ&MQbk>ZN8lBc&A$ P̖gR;?iĴi]1fLGtzuFp-X >hl6N;7!-ZӧO_Oł{9A/b̟?? ie]ⓟdpT,<=gzj6KYK~=QF)h+OI<JoF)nx>]jD<pcM/ Z$P ЋiCkk-D\uUD{{׿}KڵkWnqG&z/~.>GuT* n\~?|}ӦM#F)+Wxݠ/+g1qba޾U*h:]N;-~_rZxo~IC]u˓*ޮ IDATոzk" ZfA7?ǯxt,XI@1[6Z/Fxcڵ-.kg} dA8gΜЇ>yEvܹI"/^K.N8! ;3]UAӅ8[^i2eJ}I^}q%ʕ+Ӆ>pZ' cN;lB`FtMi駧ߒE(f7N-Zq7jUfL/ ku]|fr˸袋cœ g?dea!ݼyJ \Džn3"%{Ih?V /0 V0HpǓ ~#z W^y%ni;No=& H/پq&luMڊ~[ "k6… `や̙3gMVc9&6|$x9ƅKnX`뮘:ujq┮ Ty|,2KmB`2ţUsccƉ' 3LK׳bʮZol$P2@,`\sM(ƍ|p@2oNoaٳb|wyK-ƪ-vO? \3h#{M^zi {A-\O'7ēvrළA 6bvch'D*".KE&j\qI~0QNtkiiIm6YvŢףr*3fD8n\ f͚zΘ1#QI.*ı*-`;a3" 䦗'@ H@!B ס,4+ b9[mUwqq$ $V^#y, ٗ^z).T,f:hǣcSȍ|x{ߛ,W]uU̚5+-c%P=>OtXҎ)& >ɨ`$P~Zfϴ&rDa=eB#<^VnIq$s}JXa1`mվ^x!Xɀ6~#I7//}KL[g ;Fw_zjfqneX  H/Zf"Sǹe~헖ᢳv".,tߟfX}$ţj mՙ0~dh,m+}x≴c⚑{cvқ&(KYp=o$[lqg Yc"O> ν$'-}wyI240Y@bxO\V6\q'MrfI2,Y,Eг XGu7_3+% +_Jb'3ӹR ߧ>[ԇ H@"P(bN2H 0Yq >*z]`f.DjΛW6.'>D̒Ul.p) 7j H@@@l5uVbA"ge0Kkʧg~$  H (fߙ1$H퉣Tn܆Lw H@G `d, H@$ $NJ$  H@#'cI@$  T lvU$  H@l8K$  H (f+SR ,kIJA/zʽ$ '>CD-[,6 Q,FN`…} {WX H`\gvZx&?~L0jplXxA&|XreL:ٛ$ A%lW^-;o޼XbEtttTZzO>@ׂc7|  H(fk d}#WpQ>U / )lv͖$  H@@ `ЋA$  )lv͖$  H@@@1[ h$  H@@Pil H@$P ЋA$  )_P_.#Pl$  P({^MPn<;SV$^s}+Dcf0%  Tp묿ӏ娩bͣb ;*~]?xw/qbd$  1d-¦]i~V9}G˦ϝt_bwf%  T8$NofOb,bϟ+iVo(f7I+@ԐvtbGa6},^ڮ;m5$ (< Z\cB\njb>[[Q,F{׏7'1[- H d{l$B%d PHB E%Vڜ}P^}<ʆm(F{GDb !MHS  H j;-NAۈm@4r!K!MbvS虶r tb}]v]{1-.lA]OW$0Je!TͅXHOFtt"FO;%\>L8hM5bUhu[:6LճX H@(DcG{v6&dm,$tQ(SfS! Ef$P#eXN=~gB]S[t͐uŸն=`\l91YiM dU(QlgÒ,~َ {ͳ+=.oTDCcD9(@M(vD=~hll>:ّ#LKZm51dk@N 횶͝bZlc$  18|Ɉ(FGc!xdi׹V\b#=,l$Pڶb5i)%mԱI1>U;%r3-ݞe6%  ^,Ot-ј.Rwz8R:kټVV H@x7>s?Өɽb&FA! H.HS^ͯF*fh~-[vtk֬x²H3|K4# H@d$ӌ^Ju+ lY0f&v[|߈+^;wn̛7/}.f͊g\)~8oŋKY$0ht4KsUl o@644ĝwޙ-[[[ӱ??*UrҥsٳϏv!lbɒ%1mڴ8K/y9rxg$  lteyjժ$bhkkSƉ'D<=X|1~<e:'kccc=Po H@6bfW_}5"X'MwqG lΘ1#;83( \rIłKx'u]r-0MzJ$ &j^]tQL0!Ų3DPw: \O/BNq$  H@(7lVq~XS$bWX\p 8䓣9znSL . 91bDL>=~EIbnݺXre"C>5H@$ rP̖b@e֨Qb }S  L'Ooˤ:+:K/3g&E?Ir)q1! H@pPwTPXTO:q?qzI>#ɺzGڵkNB rUW]_8qb^ɏvIK@$ M&dXh|$f9V޾kqǧcǷv$1$  H\"Yc hoŭI`W>#rJb Xwv>Ey> H@$PF2¬Ŭ$lEϏ?xqi%,Ky!  .$=3on$  H`(f7^&BuΜ9: Q(a*-k[6|c2H@$ rP̖d 像^;s(RK/*c~zz¸qҤC9$zR!$  H@ z:vش@oEB"d E$ A&ֳA.%  H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#4d%Y@Q-V_';*Tb0{E2[QaeFTlldH@k]v5ŎT)u]lu <#ۖHBGͶEG{EؤRUjbvCt<W}E3u P"pQXJ ɓ' 3gĺ.K,BD]J glm)!lbе+G H@&=5\W7 B40Qg]N@1;pfe}c!b*U$ (Q*d'MiӦ'菢ylj>ӸDN56x@1[Zm6v􆈑l>"xyMt]۠m@!1a>|xv_\l9yJuшm("P HPV !`fD3;mڋi[#~RwGuu! HV 465E#:::bڵ#ĭ3Wڶb# Xv7PPfuHX&fAQ KZcu[RU^x H@UB+-3x#Zb,B,B[Mjbv`]d-Fk;¶bDnGGӒE{*hU$PCd]}kE\ F4D# '!bGGl`|a#k/<B-yUϢsj H2 ~\<ynd8]KteCEeZm"-I [gЦXGG!c H@.YkCC`w\Zouف2nU_pvL<tlw:J@uJN+m+u+g.ƈٺldvBϥ{!.8h@uX^9W~!ρp DuR1)L[Ϳr;x][vfYI H@IKf~;7[ᡘ'jKk/b#$ !w\[=}W*f $  H@:֖$ H@$Pf25; H@$ #:֖$ H@$Pf25; H@$ #:֖$ H@$Pf25; H@$ #l%UhU^ XQƘ4at4/dF$ &հ$쫋[Ng,嫫S̎N9u8vm{6$ "Kꪻ뻱/?c5zt44TMG֬Xc轷$Pj^]f7ew>ƘqVB!ZF?hmkX$$  T=lw bO0ZZFEK_ݟԕ#GU*I$0$CBu嚶( ]O[֬kZebF$PguұX;ҼI~$  bv@, H@$PIE$  H`@ez&o#}\yv H@(7_PnWz|KXk:#Xg`٬c#\6-3%  H@x \Eݹ7&n>?>xǔP2E,ZW=4;ZۋIf׭'h#{u&K@E@1/LFgk[c\KS65>ry̜k1bmǧWh['?%F|O k=LOKeEȾtMŅ3p. H@HdT ,3)f|jO WEk{G,Z6( QH.G7Ř ?>qj$Nf+;G[GGp1/2>cٚ,vJ@6bvc.~^VcS?qαXZFĻv</F1.[)D׵wė/,Ʒl=)~XbmL_9kx䥅q/GCC!jmW貑$P.:蕋X`i[fwny>F57%ԫKKb٪a+N[.\O^O^((v6qs3sEo H@@h%5Ŏ[I i%+ŴYbm7vekūcպv?=uXb] ϦcɪgĸQ#kQ#\X  H@@h'c)V!hjl7kI>qOm77Wk`~Դ*ߞ_i{'ׁK35ZJ_;|Ls\!ŗ޷g com"$ 2; \F'`-F_O$48^]2sX-9vŌy,k*{ŒחׄS|cv{HK{}gR^#bڶH3 m$  l"&4y( I`wt,ænW>4;n~rn\g//͉K?wd>8sA46b;gX͊w9ij6e\mdLɠvǔ-$ ͠LͱF,╭?z8$2 ̈́Qɇ6ߠ˿O+ >wT@75i20IDAT\߼X=NJnmRXۖEO![#fH@2;d- $Zľp8nI1fdSߔ/^[_\ W$,/IM`c[O,F/O~#eΊ>1/01K8R$  pܪ!6%k+Ƈ#vs&\N>bls=i?vO?ypvϤ̉_wZތ{#(ֶu(hftXQ H@n˯hXf7Y*YN?2~xv{nšnuVf.z+ Vw7#xmO |l߻ǹGM".7k$  H { ' g}!v+i'iNY*v<>^x}yZ[i#?[6ٚyŸKW&\ r -n -Mc;lhϟneqߜ&PTI@j5Io,ą,Ik"LZXds܋WחI`#G}%/G  bb7H@$2f`U(b1XFzkW3)F|+$  H@E}$  H@*b:H@$  b) H@$Pa!VG$  Hge*&Ph(֛*nUoo cFFˈOM$PGuTV xGۚUѹr^ZW#G7sv H@s.USYoM͉-Qh{9xۺ5qsiV H@x6$e_{y-,_SzlukiCv:=zfP5$ !* H@$09 H@$ '>$  H@}P$  H@O@1[}d %  H@ %  H@*bJ@$  A@1K@$  T>l5$  H@胀b0$  H@|#k( H@$l`<, H@$PGP$  H>xX$  H (f+$  H@@}$  H@@PV~YC H@$ >(fa H@$ '>$  H@}P$  H@O@1[}d %  H@ %  H@*bJ@$  A@1K@$  T>l5$  H@胀b0$  H@|#k( H@$l`<, H@$PGP$  H>xX$  H pΖoIENDB`
PNG  IHDRlg1| IDATx]}of4U$$z^L3b vpKq:Y'qx8n1lzH@ z|1#y{>{yw-,] H@$  T!*U$  H@@"T(D! H@$ $дxUYq+- H@$ ªUuH@$  T%BXTVeYi H@$ '9$  H@bjΊK@$  (f$  H@UK@1[]g%  H@ H@$ %ڮ$  H@Yǀ$  H@@PVmYq H@$ Ŭc@$  Hj (f문$  H@&+VĬY$cvˊ$  H@@$1vڸW^LrK|{ߋ7x#[lYIo㭭֖կ~z-$  H@uMP~d9mllg}6Ǝm]nݺxꩧ +t{aG'x"ȣ9ϟ_y_2֬Y/Z(z ^;.6|u /]4=ط$  H@@hژL81YSnj%n˗/O D,b4>믿?HAK^Zu]? _dɒ,~r},70c7ob$  H@@m(1H1cF 'x1r$R'ONް555%+t]w=#$"W\{ozxbĈqcd>hͥA$  H X╀М:ujyw+<`ժUl^ B! R"|! ZXlq3{ӹٳg6lSLIy㾀!6veb-6S"E^b/&LO?t,\0q3mmRK3iq{QLu͕.X;sj6K6"`lr6). 'ڻƖ[nL{~4iRCrM>3g |wid> H@$Pmկ~u FH^y1}$|$m i=X}GIG<~dE!%&~gmMUC|tAIr~ILxSrHCW\ѽœ9sNTO$&)a?! G8Ν$3<f!)pxg WnG7_}E<A ݃@ vn)ґ7./ypoRF' H@-38#Y,MH<Ӟ&`ٰ\"N9$B<`e:,!%1mڴ4n8$3Α~M;TvXI?3 E( #V.J.{ 7| q'K+e#RsLR6# -e=guVq)w0l('n |i<5$K'O$  TYڄElfK(WyqQ9L:I@|~; GZ#"X ?R@~㦛nJn˞!3WD7.a<#ۄX<y粷j$i;Vd,\rIC!Ʋ9p쥗^J7n\XCC:A.|:yX!F]duQ;Qg/Nǰ"b .N}ڝ$  H@@(1ˣw3 Q<NJic2a _B "X)V0«CaX<fQ?Pϣ~} ԏdњ=?#ꫯNu$Gh"D7&"͏ɯ70E•t"qm8"F!`"4@@K9Nԁ>꙾4/?K@$ J#gX:y4τ)DKmae‘5d ."@b%=X2qU s< ƞ"Xy*K=Uu̒yގ”z"O<1Ycq`>L~S §6d+*CIB~|&D7l8tA⛛q<. H@*FYWB)sMҙ=?7MQpdlE'!Ƅ/i<bzɪAwswO]X UVY,bE ll,;+Zn hVim%/a +/Z\JpCHƱR1ϒfL':=X|q0H@$ j"YsKciD"XWaeGgZD&" eG2 +8sC+(VZboAXsk$h:}Ri@Exb4sBR,.$"auۊ0-MZBL6wJLvK@$c!l-{ H@$P62ZBh׉xbbhc<Uf3 +ǢkocYJ<y`qXC j;^JqJ _~y|M f|r;FcL;K'|!ZLEJ )&r/ #xpKM@Ⲁx?BZ« $  H(L jBPq`$RZsg*o,iՐYʈHCa*E)H&OaE4" P b3Ʉ)&S6D5&AaB "֩#z0 _Xcq9ȫ6d `ғ"<8ԃ:"6s*Kz?wn Pr}HCΖǽ$  H@<kI~Xx%-?>YC"~,5@Z2b cEjP+!Y|}q0H@$  li,q7}[JkR$  H@{`RlF@+I?\ j\<?J@$ A'IAH@$  H`6ji ) H@$  쐡 H@$ rP̖I@$  쐡 H@$ rP̖I@$  쐡 H@$ rP̖I@$  쐡 H@$ rP̖I@$  쐡 H@$ rP̖I@$  +Ya$ H@$ r(˙yI@$  H`Ţbvh[$  H@@Y 3[Vf& H@$0CI۲$  H@J$  H@fFqv;W36B!mI@$PKD|#n. FG<9K->hy1!OQZE$P֭?뮌,JSz ilc_}C1!R3hI$  wD#Fhj{kGb{GDAy3*$)RG}5F͛u)ۤ92 ڞS$w H@Jx]Qhk舅/}XE|"'1 %P(bkcj̟͎ͯ=mMB!zu7PVhZ- H@@X[%ۣa͍}?>ې~hmhM`Xm˖ꕫbtSS$A@1oF$  H`zB07n\=:F䞁g&4"Fh)DwtĺuK1[}n%  H@U@-I˼ƆǏcǦ=U8t`uRn!$  H- $XΤ @ueJl} Y(f;$  4DCW)KiPV}˰k5}mX<( H@`ov9g04$e6VI@,X-JiJld l@ۈaҘBƛŒ1clbԨQ]>S5M`̘11uj6ٍf" H@E`bŊ<yrY^[5IȑcD;p7[ne̞|oYW3dxGC-rP_Z$ La,kS5Et &{,Yrٚ~7&Y^JbtET%  f #h;éٜa's%eӖ}g~+n@ իWoTٍf" H@6@2ҖRˬbvcVO,fe~cbvcəN$ M"U'lX&ᬪYdmS^1[U]oe%  H@Ck\v3p$[eMP3$  H@ETȔC̒_l+u"=,޿Cf1Ln 5H@@چu2#JkaY .JU&ɕ .[Nt+e̚tGileO<Ig}H>gyѣG<G^rKir=qo'?JS%  H?W]uU?;owļ{ul3gȑN;m_@袋b]v7|3M֧ ">Xre_uٟY*mz9)SG>^vZvm}|v-wqyL w_ٳ[V|Cwݱnݺ O?xW^I7U;CL81Ž;2tg}vQ1ɘZfM|߈SN9%=&mɒ%1gΜ4&ǎRK.iLl6)?Ļx{ޓ6ep>[(f7Ds$'w= <>Oxկ裏\}GBk_ZZ$ ̙3A@7o^Ws<AnHֶ˗ǽޛ.ӳ_=^~TG,mOLB(eeC uQi-T|ꩧb7OQ9O>dtA9IA5$&o:N9}gtC,ۄX??cܸqq!z,ύqg̘n~R>`P,=n<L_ +-K{1Ej̚5+ŌV z}{P#-<@|Hn~67ذqT]woF]vYy' 'sg1t_+;d4iRs >?c_ۊ4b \?>}jwYge#JAEz駃&XXĥoE`=fo7Xv0V뮻.M,єV$-xR hodf[o0I7=3-75܈ +-X)O8(o~8䓃8 '/_ ,@~MoNi@"^{ya}ff/[㜧As9nFK缉O:#WNC<frx ^1;TS@Zru';'V1VK,\ QA?2sϥ"<"@DHb1812YD a/<pa?d 05 g3L>=+qPF ]pI,PoE<>ҍobÚƢ;>/\0Y +4e.X TtI}VJb3O?G8!@>X /N!g„ eI馛RyDtٲe|{{M`ˢqq~uJQ*M%"Cpv"^{gsfE1NJ{b1B@b#9眓Se>쳩1pu ?ՍqL3Oȏ <h ^{r77 #L}x8V[+C=ɘ|fQcL2Hh;uo1ɍe3h#}C90㍂'~[܄ $  F s<?j>__&,\\E- \Ho$nf_|8\#W"q89t|qu@ebS̒!ř ;V9#= \ȳyS%7q[~$\/&Cޗ^zi0BG : ?Gz2 &,~'<*o3VI,p`]&_?O)Eʦq)җ{쑎#cX@_ :mG!ְzIp%چH?nvpU>>G㦀;xJn/' ,p@9@ؑ7K+AJQO~L`|#~yrXpI3.KGrs#-NZn$1O<O~2~ƌI%. aq1lnԇt80^lO œyW&qϓ fP&]$P@qB-g\ Xx0#.`C`’&b.{^.V)"A~q*Dn!vZ;<%pn<BX p kM_D""ǞO:5>W$lSd",D`e׿-ʉ("D@ V,(*1EQG&>QG N⊘<yrE`ps|+ɪ9|g,ʈh)'!f\3xԎΓ>я{])>3ԍ,ش &fU77/,Y!D,1kX`Q=ƥK?xq Ɓ4&cv|w/TFQLY??~|#P 27XiZ6Sf]M(cB`7uƌ3_}UL x?}FR/0&3oc'ҿ?K@;ˆBQ 9\ٰ <`"bb" !?|iו@z D".xLe8 GXz!⁶!7b2dž8b<=D?/ˁ2Qg5="-"NH\GL4<on;VD'7|?a@SWnpQC>Ef)1X6I9=iS&XI=!x<"byG>sSxgM eaW IDATS'G<,@&ɀjwܘQ6yGXb%$Ƀ`D'yI?ïtSFO18>t"qC<"rh+>Ro&f/)ވ[>XA1;XdW@RŖ1.lɟIz{.j<ɂ% !DVNŸ7ϓ nl, $VL .V-D/uqşK*u, ԃ<K2aC%Xd!lY :~LFRL}Q5z#ti3y A|E|"H >q‡Bl`F9`Ef|x ?um2|2#ʦnQ)N< JaM7<DnRh#jnȃ1}eesX>jÝ%n`er#CBlR7o0&pȁ~"<hoP>o6nhdRO#'RD0mBc%.!frCp68O: BR*陥#Q&D;4`}e#sg"r]<*- \\8K6D!6.~sK#\rqA,ui\!p@ZD瞛O'煘361-XE9]Ϋt9ꍵK2œ8<w 4M,&07)Bx!W oF%Dַi‘>qa%̍aG`cuesCwڎ@ 7Tska^',m;q_\Cx<ԏ8=sX/77ed-"03(&񷀀Gx㍩/^xaX?i;►0cɗ1eDD51Aɓk<cd1&3p2;hl/ H aD,` K჈!/Cr!/!,X<*&] 9GD֫l }[cqj>6",_Թ`#*C #lh"#Bboi=BPÊr9!⟿SV&>᷉E!p@ >q@AA`9]XolIR" ]L#__>4|D;}<X>P~OEC;7I}wg%q&c ]Xi#y lu%8"X絃_pb_5)~bE SG9VMn>+D/[,/ c(I@`]K.$qIM Moeꀋc,&O~y Cma &<m37X Pn0CX7%$  T$.1Y\)03U ¬40!I \X3eä+DtabM qBr, h.rqEh2|w 5=p].ޔ)BJ,P! 3&),dRWS7^ʅW6h,8B𙴈M !="(H<0ad`ADQG| / ($"=QV9xqApS[H(\ˈBWbG>|/iמ8aORI`Md% DnmA[rYc+?~=㯍Er{ ❉Me!b2eG%'DzO<G)I:  on@;t ㇛} |qO?ߙ/sG<n(|=pԟ'3.f?*q(:`.^|^#Xbx;/ R~$P*f9/A2.f.|YǷ8.+ <Œ! Xȓ|r .q.\xĉ ":[r|4.\ yOwqQ w%|C6URW-D! c,X[q#7`pCÆ1\"RF[U(cQ#Jq 8O@>%9N;9F,H$N.+I^lXl8\ږIs})-?Um]_R$  H@c] }b0ھ'.rl}0 Xm ej<ZV3#,Fj 籸"ɓ Kh':w8L>9^/YW>s\gY 48/ i{֧=:^1;XdW$PApЗPBq4NB>_TqTm(Wq<ןhmQM-S1M/ H@Z^B-P $  H@I@1[b$  H@C@1JƑ$  H@Hي+% H`0v򤐡+ْ$ z'w8(' %  . ,{ĺזfڜ #a+ύ~d!:Ѭ̚C4j P7HF4ǎKƄ|߈W_U-rrYg5o^@(ff H@uCi TB4v+P'7m bP+gA/IaэVB@eo6XZ!Plln V8 -׾ҍA `$$  @o[XXbv}~$  HJ#d ] _N*;ϰ%f`p<% H@(n5) cG6Eui{ a2*&P(DqQx(lQc"aZbܪK@@q'F[L{(z!bhlhH"U  DX& qXͶёk(fo,E$Pk>|Q{ ѼhADdY[ḝwDۄ1D{˨tA& &h=dl$  H`P P5_X3qyݕ1ע֦젒G;8'g4i>l肂Z$P%X`mkk,_&~%V}-֭^UEV%9lo6#FDsDzƄ n,熅uVtEH@cDccnj)Q7>VǺuu8uPϰiqbDK#uXu3a%  H@I1-#GFC]uYpvOŕXAZe-a=-d%  H@Tx6r޽' jf^U6oSVU7ZY H@@uǛڲRڗeh$K@$  T_g[u]f%  H@2l&^$  H(fˬ$  H@@&$K@$  Tlu$  H@{ H@$ #.$  H@b6p/ H@$PuUeVX$  H Pf%  H@b K@$  dL½$  H@@PV]Ya H@$ L@1I$  H@:٪2+, H@$ (f3 $  H@UG@1[u]f%  H@2l&^$  H(fˬ$  H@@&Д?@=XlYL>=fq>x饗=bc=oŊsիc̘1^{ŨQRڶtnSNMs/bo;C>s̉W_}5:::bҤI)m>|xg̑#GԃPs=cܸq9ijy 2#A$PUށV`b[.nִ/r? &{lyI0'?Yfy ^xa1"+z$sSL{7nXfMJ7z8'x"@\~3~$)Q'>˓ y㢋.J믿>I~0>TI@jnғ_~׿x;]wXV98s$ޢE'LNc3<Z<1~Ї>o<@]6Y8ұ;VZ5SN9%:묠>txcܹI4m6I3gLeSN;%#$}m%K;N>$Xx $ Z"ezӶ#c\`A9ʕ+p',3f$ማC=4?$(?#<26|$:q+ =t뭷NbEI$#P9ŵ!EtnA9~ dɒg}҆6f$  Hxe޴-Hc 6,Jw|#> d?6,C\"BGKȾGv0vtG"pN0!aq?'D('NL"<"}W5!_e"T)J}fϞַE0f6H@jnԛh K⯷@<g>_K-VҞ<C|.Bϥ(4Yn XT kz9O  8F~L"Mie-ewNVfW_[$ j'e{pG0وELN,SO'Jϗ~wTψF@(|ƊE=a-/+"d-׿ur]xǃ !QG7xc+Bo%-x|#oƿ=VB-m$ %G1 K l|&9]zct#LPBr-p片H" FV[mWr)QJ QQ?i1H҉kgYD)y~ΑlmQW\>]v%r8XYavۥÓ~N0LS&u\z,%? H@@ P@' ドBl2A,}bF<D>4^{m^|I8eHK`=k"TvwqGʟsEu] .H":qxXI馛d?!<c4~ SYayY&fy ąeu\" GҲb=—5sɛi 7" $ Z"-If3[uDL<ƊKs]qxi  1Ey|'viIbżRٷ~{}٥ɇ3uΥO8$Y#pY /V+@ F-mD#fɃ%$=SO=5@ I'2Xaڴi=7|Xo"vFjpG$ a!v)HO?$Mw˱7B%  H@@@1;P+)K B!['\|}{f<B+-<'?P@Vg#$# s" 9 2?$W(}},͛npBJ; |Hn#0.daŗ" U(] f#9ٟ{I063@oJuH? H@FPn$jHhD!fElaI'[e',yNQ4;EZr#NKl.;{"e- ~z XzO}l\72$ Z">2ےyJ,W\ a5.TZOaRȆ=KQe@0&[yθ$  H/Zf"SQ&ad"A˛ ?lK. ]LF"c?#n"0R  H@A@1[W,<16"?=3M⵪Xḿ'S& ]L4B3 !t=$A/D$  b0kbAʤ"fu=o;-6<Z3_8.XmKUl3e)*5 U7ͽ$  H@I@1ۓH|GL"Bq?}Xpaj`-?kͲlX Xy`&u@\&!f.6U>s3/K_k$  H@"- TK9<e8DqwP怏+y\~:G<-tsXs H@$PNb63W AU1D(Y,–Ib9X)L3A$  'pҷl H@$ M":$  H@I@1;-[$  H`(f7 %  H@bv8[$  H@&Pn>K@$  'pҷl H@$ M"$|&$  H@No$  H@D@1IL, H@$0I߲%  H@6bvX$  H`8 (feK@$  l&3$  H@pP'}˖$  H@$Mgb H@$ $N- H@$I6)%P:::X,ViKP(DCR57 H`(fTużybʕ^uO%B'q$1vؘ<yr477'q$  T BQTt\1sd8qbpܹscʔ)Ih'[ V]unɒ%ԩS}VuO@l'!P-zbmiiѣGWMgdUKccƌI7M([  lt ]|yL0!![kX-e[$AoʓH@\z._s\;ׂ f56倿$ j! K@B@1;(XT$  H`((feH@$  `LYgcdﮭ` H@*S+;*2{o}qꩧ]<alٲx7LhD_O|1r~$  H@"-j'#6ok?!~ƪUoO봲2{gqFWUzAp+V3<W_M3IZ&MQbk>ZN8lBc&A$ P̖gR;?iĴi]1fLGtzuFp-X >hl6N;7!-ZӧO_Oł{9A/b̟?? ie]ⓟdpT,<=gzj6KYK~=QF)h+OI<JoF)nx>]jD<pcM/ Z$P ЋiCkk-D\uUD{{׿}KڵkWnqG&z/~.>GuT* n\~?|}ӦM#F)+Wxݠ/+g1qba޾U*h:]N;-~_rZxo~IC]u˓*ޮ IDATոzk" ZfA7?ǯxt,XI@1[6Z/Fxcڵ-.kg} dA8gΜЇ>yEvܹI"/^K.N8! ;3]UAӅ8[^i2eJ}I^}q%ʕ+Ӆ>pZ' cN;lB`FtMi駧ߒE(f7N-Zq7jUfL/ ku]|fr˸袋cœ g?dea!ݼyJ \Džn3"%{Ih?V /0 V0HpǓ ~#z W^y%ni;No=& H/پq&luMڊ~[ "k6… `や̙3gMVc9&6|$x9ƅKnX`뮘:ujq┮ Ty|,2KmB`2ţUsccƉ' 3LK׳bʮZol$P2@,`\sM(ƍ|p@2oNoaٳb|wyK-ƪ-vO? \3h#{M^zi {A-\O'7ēvrළA 6bvch'D*".KE&j\qI~0QNtkiiIm6YvŢףr*3fD8n\ f͚zΘ1#QI.*ı*-`;a3" 䦗'@ H@!B ס,4+ b9[mUwqq$ $V^#y, ٗ^z).T,f:hǣcSȍ|x{ߛ,W]uU̚5+-c%P=>OtXҎ)& >ɨ`$P~Zfϴ&rDa=eB#<^VnIq$s}JXa1`mվ^x!Xɀ6~#I7//}KL[g ;Fw_zjfqneX  H/Zf"Sǹe~헖ᢳv".,tߟfX}$ţj mՙ0~dh,m+}x≴c⚑{cvқ&(KYp=o$[lqg Yc"O> ν$'-}wyI240Y@bxO\V6\q'MrfI2,Y,Eг XGu7_3+% +_Jb'3ӹR ߧ>[ԇ H@"P(bN2H 0Yq >*z]`f.DjΛW6.'>D̒Ul.p) 7j H@@@l5uVbA"ge0Kkʧg~$  H (fߙ1$H퉣Tn܆Lw H@G `d, H@$ $NJ$  H@#'cI@$  T lvU$  H@l8K$  H (f+SR ,kIJA/zʽ$ '>CD-[,6 Q,FN`…} {WX H`\gvZx&?~L0jplXxA&|XreL:ٛ$ A%lW^-;o޼XbEtttTZzO>@ׂc7|  H(fk d}#WpQ>U / )lv͖$  H@@ `ЋA$  )lv͖$  H@@@1[ h$  H@@Pil H@$P ЋA$  )_P_.#Pl$  P({^MPn<;SV$^s}+Dcf0%  Tp묿ӏ娩bͣb ;*~]?xw/qbd$  1d-¦]i~V9}G˦ϝt_bwf%  T8$NofOb,bϟ+iVo(f7I+@ԐvtbGa6},^ڮ;m5$ (< Z\cB\njb>[[Q,F{׏7'1[- H d{l$B%d PHB E%Vڜ}P^}<ʆm(F{GDb !MHS  H j;-NAۈm@4r!K!MbvS虶r tb}]v]{1-.lA]OW$0Je!TͅXHOFtt"FO;%\>L8hM5bUhu[:6LճX H@(DcG{v6&dm,$tQ(SfS! Ef$P#eXN=~gB]S[t͐uŸն=`\l91YiM dU(QlgÒ,~َ {ͳ+=.oTDCcD9(@M(vD=~hll>:ّ#LKZm51dk@N 횶͝bZlc$  18|Ɉ(FGc!xdi׹V\b#=,l$Pڶb5i)%mԱI1>U;%r3-ݞe6%  ^,Ot-ј.Rwz8R:kټVV H@x7>s?Өɽb&FA! H.HS^ͯF*fh~-[vtk֬x²H3|K4# H@d$ӌ^Ju+ lY0f&v[|߈+^;wn̛7/}.f͊g\)~8oŋKY$0ht4KsUl o@644ĝwޙ-[[[ӱ??*UrҥsٳϏv!lbɒ%1mڴ8K/y9rxg$  lteyjժ$bhkkSƉ'D<=X|1~<e:'kccc=Po H@6bfW_}5"X'MwqG lΘ1#;83( \rIłKx'u]r-0MzJ$ &j^]tQL0!Ų3DPw: \O/BNq$  H@(7lVq~XS$bWX\p 8䓣9znSL . 91bDL>=~EIbnݺXre"C>5H@$ rP̖b@e֨Qb }S  L'Ooˤ:+:K/3g&E?Ir)q1! H@pPwTPXTO:q?qzI>#ɺzGڵkNB rUW]_8qb^ɏvIK@$ M&dXh|$f9V޾kqǧcǷv$1$  H\"Yc hoŭI`W>#rJb Xwv>Ey> H@$PF2¬Ŭ$lEϏ?xqi%,Ky!  .$=3on$  H`(f7^&BuΜ9: Q(a*-k[6|c2H@$ rP̖d 像^;s(RK/*c~zz¸qҤC9$zR!$  H@ z:vش@oEB"d E$ A&ֳA.%  H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#2$ H@$Pnr5? H@$ !#4d%Y@Q-V_';*Tb0{E2[QaeFTlldH@k]v5ŎT)u]lu <#ۖHBGͶEG{EؤRUjbvCt<W}E3u P"pQXJ ɓ' 3gĺ.K,BD]J glm)!lbе+G H@&=5\W7 B40Qg]N@1;pfe}c!b*U$ (Q*d'MiӦ'菢ylj>ӸDN56x@1[Zm6v􆈑l>"xyMt]۠m@!1a>|xv_\l9yJuшm("P HPV !`fD3;mڋi[#~RwGuu! HV 465E#:::bڵ#ĭ3Wڶb# Xv7PPfuHX&fAQ KZcu[RU^x H@UB+-3x#Zb,B,B[Mjbv`]d-Fk;¶bDnGGӒE{*hU$PCd]}kE\ F4D# '!bGGl`|a#k/<B-yUϢsj H2 ~\<ynd8]KteCEeZm"-I [gЦXGG!c H@.YkCC`w\Zouف2nU_pvL<tlw:J@uJN+m+u+g.ƈٺldvBϥ{!.8h@uX^9W~!ρp DuR1)L[Ϳr;x][vfYI H@IKf~;7[ᡘ'jKk/b#$ !w\[=}W*f $  H@:֖$ H@$Pf25; H@$ #:֖$ H@$Pf25; H@$ #:֖$ H@$Pf25; H@$ #l%UhU^ XQƘ4at4/dF$ &հ$쫋[Ng,嫫S̎N9u8vm{6$ "Kꪻ뻱/?c5zt44TMG֬Xc轷$Pj^]f7ew>ƘqVB!ZF?hmkX$$  T=lw bO0ZZFEK_ݟԕ#GU*I$0$CBu嚶( ]O[֬kZebF$PguұX;ҼI~$  bv@, H@$PIE$  H`@ez&o#}\yv H@(7_PnWz|KXk:#Xg`٬c#\6-3%  H@x \Eݹ7&n>?>xǔP2E,ZW=4;ZۋIf׭'h#{u&K@E@1/LFgk[c\KS65>ry̜k1bmǧWh['?%F|O k=LOKeEȾtMŅ3p. H@HdT ,3)f|jO WEk{G,Z6( QH.G7Ř ?>qj$Nf+;G[GGp1/2>cٚ,vJ@6bvc.~^VcS?qαXZFĻv</F1.[)D׵wė/,Ʒl=)~XbmL_9kx䥅q/GCC!jmW貑$P.:蕋X`i[fwny>F57%ԫKKb٪a+N[.\O^O^((v6qs3sEo H@@h%5Ŏ[I i%+ŴYbm7vekūcպv?=uXb] ϦcɪgĸQ#kQ#\X  H@@h'c)V!hjl7kI>qOm77Wk`~Դ*ߞ_i{'ׁK35ZJ_;|Ls\!ŗ޷g com"$ 2; \F'`-F_O$48^]2sX-9vŌy,k*{ŒחׄS|cv{HK{}gR^#bڶH3 m$  l"&4y( I`wt,ænW>4;n~rn\g//͉K?wd>8sA46b;gX͊w9ij6e\mdLɠvǔ-$ ͠LͱF,╭?z8$2 ̈́Qɇ6ߠ˿O+ >wT@75i20IDAT\߼X=NJnmRXۖEO![#fH@2;d- $Zľp8nI1fdSߔ/^[_\ W$,/IM`c[O,F/O~#eΊ>1/01K8R$  pܪ!6%k+Ƈ#vs&\N>bls=i?vO?ypvϤ̉_wZތ{#(ֶu(hftXQ H@n˯hXf7Y*YN?2~xv{nšnuVf.z+ Vw7#xmO |l߻ǹGM".7k$  H { ' g}!v+i'iNY*v<>^x}yZ[i#?[6ٚyŸKW&\ r -n -Mc;lhϟneqߜ&PTI@j5Io,ą,Ik"LZXds܋WחI`#G}%/G  bb7H@$2f`U(b1XFzkW3)F|+$  H@E}$  H@*b:H@$  b) H@$Pa!VG$  Hge*&Ph(֛*nUoo cFFˈOM$PGuTV xGۚUѹr^ZW#G7sv H@s.USYoM͉-Qh{9xۺ5qsiV H@x6$e_{y-,_SzlukiCv:=zfP5$ !* H@$09 H@$ '>$  H@}P$  H@O@1[}d %  H@ %  H@*bJ@$  A@1K@$  T>l5$  H@胀b0$  H@|#k( H@$l`<, H@$PGP$  H>xX$  H (f+$  H@@}$  H@@PV~YC H@$ >(fa H@$ '>$  H@}P$  H@O@1[}d %  H@ %  H@*bJ@$  A@1K@$  T>l5$  H@胀b0$  H@|#k( H@$l`<, H@$PGP$  H>xX$  H pΖoIENDB`
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./.git/hooks/pre-commit.sample
#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against --
#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=$(git hash-object -t tree /dev/null) fi # If you want to allow non-ASCII filenames set this variable to true. allownonascii=$(git config --bool hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ASCII filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. To be portable it is advisable to rename the file. If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against --
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/resources/static/img/text.png
PNG  IHDRXIDATx^AreF'U $ N !@%aA<@xx]JUPP2~nO{* uG Բ>N@tHCg@;r\ Dټpϖ;ʕA'y?ӺcX01\0zL@z,G 308 = r}4N@8CO1\0zL@z,G 308 = r}4N@8CO1\0zL@z,G 308 = r}4N@8CO1T^hrcom|{i^'>g4OO=٘5Ӫ>-qifo_3 $GKjig'%nt0K[;{;ZY M6{3ڞN7.{15޿=5쟓ZY ɔܺm $xcJj%4gqk y6w> i~>;>| @2meh M>k4ס2o<lZWŴ\t $]-X CQ7}|SU;{u]׆w@pou忽zM}g?w3H~9޿qXU_L^ܭAVõ[;isQ Mp~|x/4k d},o=ywt W}!͝WQ d@Qn mhu"/Ȑ^ao@ʸvޫ+m4HZ9j|@ {҆Vε7*!Fu^_8Fw` }FiC+__ao@ʼW2Wh46r@:R*@Jwȁqe x_}jQpHvwa j>7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@ dkHMuq5UuQWE]'Wi]u I-NಮN&/@>j ?[RiHaRhHaRhHaRhHaRhHaRhHaRhHaRhHaRhHaRhHa;{ Fh"u,k.V.&` '` yŀ Ȁ |F^1`2`>|2W 2IENDB`
PNG  IHDRXIDATx^AreF'U $ N !@%aA<@xx]JUPP2~nO{* uG Բ>N@tHCg@;r\ Dټpϖ;ʕA'y?ӺcX01\0zL@z,G 308 = r}4N@8CO1\0zL@z,G 308 = r}4N@8CO1\0zL@z,G 308 = r}4N@8CO1T^hrcom|{i^'>g4OO=٘5Ӫ>-qifo_3 $GKjig'%nt0K[;{;ZY M6{3ڞN7.{15޿=5쟓ZY ɔܺm $xcJj%4gqk y6w> i~>;>| @2meh M>k4ס2o<lZWŴ\t $]-X CQ7}|SU;{u]׆w@pou忽zM}g?w3H~9޿qXU_L^ܭAVõ[;isQ Mp~|x/4k d},o=ywt W}!͝WQ d@Qn mhu"/Ȑ^ao@ʸvޫ+m4HZ9j|@ {҆Vε7*!Fu^_8Fw` }FiC+__ao@ʼW2Wh46r@:R*@Jwȁqe x_}jQpHvwa j>7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@s  d `@ >7(@ @A  20|n P@ dkHMuq5UuQWE]'Wi]u I-NಮN&/@>j ?[RiHaRhHaRhHaRhHaRhHaRhHaRhHaRhHaRhHaRhHa;{ Fh"u,k.V.&` '` yŀ Ȁ |F^1`2`>|2W 2IENDB`
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./doc/images/namespace-model-example.png
PNG  IHDRc-\ pHYs   IDATx{U?~R@.*D@03LP 0 sJB:%]_yHM`AG9'$ D~0wn#|1,̵9+*UR񒒒C)//OQufxTߠ&,VՋ4u*%%%T^ktcv^9sTu @ҷoߪ.NEk|c>fvHO..HP a @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @Tu@UmUVXxM:tYe5&vTsſ2ɬu0n tz_ cj}&a|@oSU&pWu>myI~Nv@ `c? G5P7Xka `6@`=1PXuv@ d`c? O5P7Xk6a ``6@`1PYuf@-``c? AUKt0K`ӧOU@u1PH?a 2M@@-%1P dߦ5vHP a @1HP a @1Uj޼ҷ\zח穧^͕W>k\հ`;w#&OѷeѢeUP)@ehPl1LJIII~ۿ}%UoI[Gr2v].ݟcS ScjFd͚5j[)zJ*=>۳~}yv6zO]PLh:,\Nd9:뎌w1cnĉmU t[s6zO]fg Un޼2jԭ14kh,?s9" !nP#@mps3uS<yd:vmƸ'se67}iѢCʥN˚5Ұa,Y"g׮]_zvN8m~.@]aPՄաFGr㍏NJ.o8Çί9t˥NˬYwʹiϤg=ҥKm˦^˿ 7Fj+Vk5t^H:jѡ5|6IOgذmΫ~$O>0\3"e {3jhҤGs/~t[߿}{myYwM]2n?Us{٧M.pk(Fn„swe}fĈ>=l[O>ں>zm)+{3 .ˠAݷiI͟RnydZju{PԆlˏy.͛7αخqgz!۷ĉqtMΣɓGU<7@]ba Hm9; ;Ҍ{L.4k(웾}'TEs\:gԾnIAY.HF>n|-Tw<N[xuQϞ{T=dH ҳ)/o-Pd5ACQώPm䳣IRSώY#50*(uI..3r潖Qn͌YF_uf}梋JϞ{V_L4=gχɁs] }UFbg PgNv~\pԔW},)3:?&ر(8Z:U]0?-[6IM2xYle O9吜xbl$Z5)yezUu^﫺6ja PLh:,\NE[yysm#^6Ygݑq6f8-:.]vkCjzknqܖ΍V[a/sHrNus3uS<yd:v-Id̘ۓ$_rל}M>eMhE&+^:-k֬KÆdɊ̞=??p_v}~9ᄃY5mߖ`KHWoc}7~BkMy,7Xt{E{~3{k.]K.&>w̹hmy -I2kߒ$Ӧ==H.mi.zJ/rv~&Rl0j:R ]7"W\1zjk}$GzA_z%)-m38,=}hԨ~>{|$<a*nW_H|rafD5jjz3knqLjgҤGs/~t[!g:뎴iKƍ1cn>Ʌb >潶&L8>{WݷmF賉JҠAMl϶䣭Gߖ7p }4/GUfzy]M]ﷶ6a ΍~֜gGOs~c{NYٛ9ny睕喙4hM1|x {ѣCڷoH}L7< <ydZj/i[" 7T'mYY K/Ymw补;\ri֬QۯmnGYF8pwޑ;eC{k;MnvosdР+5kiG-MI `[=U})O9sTu)5ooSjժY8[~c6zW?3^-|cliYbu?˩NI'͐!=_G= $;wn^+k:kVP k|u~kT5Hsrgu?va ΍&~Gݞ`S1T+>7:`dwBE[WT<gE;>j>a Ug=*Ct"SOSOAjUuu0@ c $(0@ c $(0@ c $(0@ c $(0@ c $(0@ c $(0@54 {N(0@ c $(oSUdg ޼yҷo߬\2oF?_~ϳ3dž cQڵk;}_i,X}kYz6]In,XPeP cͶu'ȑ#ӯ_wq5kV3gӿ}YlV'$Y~}LC_~9cn$5jT۷F^fMn 2bɓ'W||?#G_bN<Ċac1@a:@[bEƎ3fd*{ケs=ĉcL:5?O2sL4)2eJd֬Y3gF?~|O*3ḡ >7tSN뮻.>`ڷo'[˧ Om`q)--K/]v%-ڵk+UVi۶mF{i^?́ 4:tتz6gٲer[niРAzѣGgԩ=묳ҦMl2'|rd1@!l[mwq[2$Jm۶w=+WܦO[hQ֭[oٜŋ<{,]8[E)//ЇG¶uցW_͔)SrM7+q5~O۶m+RnI[Su|zv9vPm[jŋg6fҤIYbEϟ_$[vSVVu矯o-[&Iz,_|۴i#<2Ǐ /uk~N?U]P7\{ӫW4n8Io[\=#7jhI:wO>9^xaڶmO>93gάtM^rgժU<xpomSƌ?>^{mƌ+Vs?~|JKK7[ON2lذs9e]?igҤI93lٲ^5jTJ  6)--ͬY2mڴJ׼i֬YMo[\}rz=Ƶm.\xO>J{fMٳ'Nf͚~os=_|q.Γ$M4\ .`~M't0Zro)gw'vi9C7m駞zjmߘǧgϞ3fL;찌7.Vb=ܶ~ 'lt۷o<??3jԨ JϢO>Il"GąQ2cƌmՂ r9;plΝ[ʚZ_mi;lbXなPx;c`3}ݍ~El/a {'2r/w\f͚njfΜÇ9쳳lٲOYJ>v)SdСׯ_=<쳛'IF$߿Ez׬Yo1C {ǘ>ȑ#/~1'xb- bŊ;63fȀreU{s7{o'nS\}ՙ:uj~d̙4iRvu-3eʔ$ɬY6}v>}z̜93&LtM:uj<i߾}~lno-4 wG4/RveJj$wҪUm6Fc=V[{/wqG~L RZZ:lU=lٲw}ӭ[4h zѣ3uJמuYiӦMZlO>9eeen P5{{իW7n$BmVgʕi-ʺu~mW=x┗R{KVu?h"Yv1vPW_}5SLM7ݔ+2w׼?ϟ??m۶Mzvm$x}+ڵl]M~SPYxq/_nmk&M+Vd/A@Ok׮]??>eeeYn]JǑ6UO˖-$O=T/_mڴɑG^Ⱥu׿5?sim ucJs9sm۶93sJ+|VZ[6osf̘1YbE:wǧtt)Æ 9眓]v%ӟ6?q&M3<3˖-^{QFe@mVR|})Oof7o^F3fl3;_g>wVtz*x(5 awL @g FϞ=7EuKPP a @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @TuTVulŋפCU];1P,^</`@ !1Pdj>a 0M5@@ %1P dja pE@@-!1Pd?a 2M@@-%1P dU]e}A(0@ c $(0@ c $(0@ c $(0@y^K߾r__z5W^p֮]_puꪇ3pu9䐟Sd޼תjU]lcJ"Sk~)%%5w.`jJIIPCsu#rêO˖MҢE |@-[* AC7iң9p;Io<;2nƌ='>T<yɈ}Rm1lcJTkw97S>ɓGcݶkz2]6m}ӧ-l>th\z鴬Y. ϒ%+2{$㏿1cnO|]s6a # 7.]vq{os K/YiӞIϞ{K6I~:gWdܸs%CFǔuѣCs7jT?G=>lΰaU^gz.׻g [fg ք sʾ͈}{9|tTiRVf.\Aob4hP=c*ˏy.͛7αخqR!۷ĉq)+{3G-S223]Pc=4cK.?͚5ʀo _Q9k|*ښ6m[o}<?}i֬Q?wICӳ!CzfȐwF)/گR[o~sza5P/@1HP a @1T;潖}'dꪇ3pu9䐟Sd޼ lV4a 5N^{foLMyyuLl^yeIP cq?-[6IM2xYle Nc>`M3j OC7iң9p;m/mOFzJv|guGƍRۘ1gć*r| ҳ;l^U]lΝwԩOeq$㏿1cnO|]s6z2]6m}ӧ-l>th\z鴬Y. ϒ%+2{$ɂ7wyw?+Pm=HYnpIe~:gWdܸs%C7:3|xmwni5o96Gti$?ucJT[^H:jazJRZ&gqXz蹬_ӨQ}t<Ix:Æ$ykaPC5a9ܻm3bDM\U o1sL)ѷ,\,uO{\yIR |um IDATC&L8> HCս{\~9ߥy9ySVf8[ygenef cl1$ѣCڷoHUa7﵌ukx4khqLjCK3v13} iڴan~U]wwN{О;wa%쌡s̙sQ!CzfȐ SSmO [bg @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @1AU@UQ@bg @1HP a @1HP a @1f޼y۷o>M^:Io3p| _W?ߪ훃>8̏{|o?>ׯl/0=䓹6ٿv|[JVrwd֬Y2eJzUϘ1#O<D&O_~9?я6ymvrw^Wa׾V&c(駟+2K.hK/EfZn d}ɗ^zg}rgNf;uja ;餓>d„ СC4i뮻.+WLsZ*M6Mz*1{W+mʕ9묳2nܸJ3fL&N$y'2r/w\f͚UqݨQ$O߾}+W^9#ra?Aل1$?я2cƌ<l2_~y{ :4/9Y~}yx9餓*=ѣGWj:thO5k$I,YٳggذaI+Vdر1cF .SLI̚5+s̩h<ss}wɕW^MECԩSƌ &dva{2|z>|xʶj/ׯ_Ǝ}kwSNKͳ.Tj0`@Tx6mZz.]$I8∔楗^.Eeڵw\tEi׮]vu|h@Ѡ :S+Ȉ#6oѢEF#G梋.~u]Yn]9䐊9g?x<cƌ4kl^moԨQ><9TUs{M^Ҹq$h^_}k֬IÆ 7\j/a U^z7n\o2 I>:t;N֯_W: JJJ67tЌ=:eeeYpa $yW3eʔMiiif͚iӦmvVZ%Io~vqL*չsq\I^x!'O΂ nݺ,Y$s!|毠ޒ=z}8qb\H/smUz^˖-$O=TűvڥO>+odݺu)++O<S_՛0*wik׮[l9sf/SNI+0wg:thΝ[qO΅^N;-zht)Æ 9眓N8/Oz2||K_ʸqR^^^zyO>I>ӑMkΝ[ʚZTŰU:vHP a @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @TuT3K`;XnNhqPnԪK`5+se}YziU6@ j* @ p2w;+`+,^K: v;cCv[DzxU]cn=1Pdj7 e2@j>a BM 50j) @&K@v@$ZN P d@ 2Pcn91Pdj7 c2@U]}:t:lʇ{@%9?]Yեag @-d T_vʼWWdg3>ihn|>s^yoݑ>N8xNհ5IH-+oX53<Vc88^kjF־KfYӦMاO$MjI-Q7 h}Zg]vʜg,~Rۘ[2;e>nqL iܸ]v駟jopofꜷ2ұU$ɂ%9o3{e8]ehN&7hڻM.9S/ɒdttݗ.MK~.=vG+`|bEի׺qVu#<;EnҶiE,_ֻ4ܪ0fv/Ms\9|]3mܳyE,3I%yrݯG[=_?`S~t^z-9蠃/---璤m۶cz$nIҢE:4iR$ݻw$}Lj8G> ޽{^ս{y͚5*--A+}pa|سyEۣ/kV~mw܍螭_I<v?JҤaԯW:4˙̬g}F;cN:ܸq^x>}N:]=y7nұc_p{-~r<w>kܹMcJkZng}$vޓ{>IRZZ:~-z.Iҭ[;S.pboqG˽sΑ?}*I+7FtI-7g{)%UR,\am^>^6DT/n?|>$y7g}n{pR[pk֭[ޚL,ZI'[ou}׮]~ֻq=>k׮_>C=߼[ʯwtͼWWdgn+Rسyڷl\Zqȳdsk+sݟl@$F5kw祉t7Jz,]m~+I6{0b+LZ^fͲ$%I6k֬c\O- ס]?C;{^I3`] hֹWڻR+rݯdiۢa&JBkj.a @5R^^f<쳝>~nƍC-[_|쳎9֭{7I5jի?ymVϽg%W<rP 9V]9K7h?稽rQ |>`Xiڴi$ 7o~`͏%;w~_~_6mz`V~wy_Jj+ܬUV>^{MHҪI&oT3eee'&Y~=ӻw;v|td(:tA^{K,׾۱cǫdժUϿ7w^z=5cn_|Fuݻ;w[ou}P8P/Xŋ/^xǏ,Y%K,X c~ܹsK6׶z~ K.V(0@)ʼWWdg3>ihn/H%ϝ3 :LFyu|?7됫5ZUk\ @%jYúQO4k\N\TkZ&o.]u3eڻN_eݯTjskY&>ں73u[|~تq/0֬?_;/o._ޝZdӶeqr}77ӢɆZnK0?k딆K5r1;O#ϼ^N.m&IVZ$߅W> k֭|)Jn8F3 o-a~fnoL4=l.mVls ^M}5+Wm?|ʭvG[«oUšg?Sx ѵ.Qo{6hk],g #-O]faxF JrtVy$I ;xBkj/;c^6;^Y\%s/WoVWI-̈́_}5͈C&I:jfUҦE$IIIҸAIl|9|tTi)K+pc1hk?Xǯ]uL+,|7ޝ땃F$iجI5VhO~b7clK2O\_ adͺ zl1$go(0{Nm(ޞ>1%j'&>:ꂼ͊9ܟ=_,)sk3}ܔJm&3'ޞOe6f XU9J?,IrΠi۲Qf^FLko SڻuNJ}쌡FxγSq/:~Uo湻w{1̸;}5iԢ =4]fm5lKgr'WUkwr?_oeQiv6aȐ!ѣG<yk^3璃+9u]'dN;N/ϩ_jA{50jo7ޓ!7V]hy}4kr˜% 6y@<v鯳ptyiiseGx_ʰ_]ukݔL?pHmO駟u]nݺ#WՔ]X)QޕG{th{-ON~z҃$ysÓ$ 6J|qiܲYnFEO<r_,?2bĈp ϧ:P]C7p·_NJ}J$;3セ4$'Ifoc=ǔ*7,){5.|+>:mӰY~4k..I7n_TW^y%/_"{gկ#L=R.1T{wAwC5o}brLkޘr5!xiجFٞcJIҶ>٥nwQyI&^PDE U EeeUDp+baEEEł *b]TtP $d22$ddB397s<s< P>~158b~{Vڵf$))Kht/_k'55UӼy f:wL0PϸCУ{V<Or6TҢ(mzL * ՠ*Z~.zM|vU╤&]WaÆW6tUMԡCG,R[uQzIRm]Ťu'jeЫ]AogsgVZԶm3v$L^KҴ6@E@UV]Ǖ؝jSfhۨk a Lǎտ]r%j֬Y}s\O6fhQu۲lVǦuzv(*ج)״tjh0dٲe2<fCZ>]ߚX-24s1t=,mۊW!G鿟&tp ,(պu 'U@e14 )vK^&UFUKy%Z'_ =Yuu]kuOzWz'MY4Z'Z@e<xާωef! s} S#[YzA@t\^iڰֺgNn1?ݘΜMI*Ui;@e벎']@e1+onhRIWwd^ -*SİdnSMb3Ӏs#[u@qmj۔qv=]G+1SWvpZ?HmHw{jgFҩY?zΑtӊ*?rtqqF\S53#c<0c<0c<0c<0c<0c<0c<0c<0c<0c<0c<0c<0c<0c<0c<0c<ȧ @.PZ4: " " "Aشi4qJJJ$I?k׮ӧfϞ}BOJJ\S~~~+,,<nu5pбƍ0jƍZlYv]wq"""pB^ZsUNN֮]_]y䑺*%66VK, jqՀzu뭷gUVVݻw+55UFRdd|||ԪU+]|'|ѨVZ;?_.;#ԫnAZҴiܶ_/bCOfbht;aR_l:u]'NTNNN},ásjȐ! uUWi֭T;a `#<^|M=SZj 7|C[l/nV~'z״tReddg9>?/^\?fΜZ ~@cS-Z]wݥiӦk׮{쩥Kjzwjƌj۶qݫW/F%$$׍7XƍIҨQOs|-\P/;<IYgUs@chlp-iӦ>}`;V|ZlzHTVVzZFRRƍWe^֭ŋuM7`0Ԫ*˅ǜk 55UeeeJLLyw4&W02en&5k֬BBBt뭷jܸqr82LZ~}g6%I $Tۮ՞c>-#<<\w^uرu@chLѲeKy睚;wkΝ;k޽*++Sff>cu!ڲeKj4o޼j͜9SVUz75dȐc766V{ԩSciJMM=Zw4W9r[m޼YR_@ׯ_ @ի&O|JԩS5}t}ᇊV~f͚*uIW_}JJJ4p@=Ǟ:u^xu]ZjٲNzJ@ch jw㴗ҥSI OIJJ$mذA }=ogɈ IDATsxa xa xa xa xa xa xa xa xa xa xa xa xa xa xa w.phljNsE}qr:k뻆3}<R}<#c^mƍAbd xa s0:h(f_p,N;S}p4Œ<(&&.ݾP}{h|jkvVⓐ0Ti=q*=+PBXPP<<<vft$JA6m{.]T; պ.##cv^^rNh,44[{43L沲պ>99y䩜@<btHLL߉lk2BZnv=n` 6x:pS:?44 X,MsWd߁0u0Q]Wrl7o]۱M-++K񉏈i6[HR||xYR~ b4oݺf9ANgYnnVgÑ-88^ƠAX, {efflZ7wMScZٳclbfYOOUU}hZ:t-Il67+)):!آEEAf۱skKJJa@@@T!4(Lg"ͶKRʯM2-KBCCܝb{}||rrrl>b||~d2Ev+GQIIS94"^GDD\p$9ݻw_YRRm 0ަAMդI'U:33N|8N͛ώھ}+***c0L+_GEEk3yƍђ+sw.ȚNbi?Jh輱w|m5x2aW-99.Iŧp0 Fc`DDm SPPP$I*oFV:ua~$&&n,?--_z37?пC@F't ׷$mb2B"""ZXTt:YYY4LѷiPPP/h*++kQPP}اcߣLุ)NӐ>@cOtŲn?tx-/%**jTrff朸%)<<|a Xv8%6mi3!==ϛ4i$\(44ʊy޴)-,,F脄NӞj{Qj2Ld0Nyy__+I:&&~rI$P__eaATT(??6AAA} V$$T<V4pCC+BCC4/dFT~Rzzbbb66kl$N"/--d2?|VuIUV|u95!!$b/<""|-QQQbccj۶W*״ *WV16w"##f4%)77w/%`0DGGx CLŲnϒw*EEE!Iyyy_Id h4IRNNңi>EWfssOo\sPFFFYjx-oBdd$);;ðۇx:k߿ErIII$(--Mm:TRxzzuV{+㹆r{En3gkP\%%%<j}zzqۇJ:pf}II~;1*>$Y,AAA}I e-[ ~~~6mI~pFX|TIrdgg/dZ)**Z[TTVBBBKVue6X:--ߕ+.2jj;,E=,,솊N@#fە2)!!EI ޹s]ً~w:6__ߦAAA=zlذKP'cU}/I ɃuxܯKRDDĈ$C```V蔔3Ul6;[rssJWns]엖Ԣ))((XZ91i}zzKeee͛49j0^'C娨1QQQcm9<--a'h,˅qTZZzs\###oM l۶>Vx}%IrXt:Ov3СC(5>++ͬ /d2IԦ~XcUj1QQQw***j'X,%ȶfEPPPjOv,..n|rNN·㏵  rxaZkЫ[nAYYYdXp8 *oa)ZC+9x8) a OU Ij]m'I cD:thfHHe'{,Ͷ'88`𓤂ՒrOnnN^¼ba OewMؘzFFG0Cï߻wI {q7رcGRIOO=33s$I*]pv{z^^C8:G5#7 BCCD~ݎK6m:CL&SXhhkqn8l]zgZ7mݺRwɣ+?sjFG|EEEXwxX!w)..N.,,~#c#^8hc5}ݻw_}'޶m[IU 8k01 `/3o}P ]?O8_wnwӹyL&M&Pߵ9}| ԵW0ٝNiumN}nȌ޳kP*ͳa] A @ii ZQ20 Иgh@dH2@cF c!  @D @"3a#@D 4f2@E  @hd08 И a dH2@cF 4,1p   pj6]yyMr:ߜ9?_bw*Y9+Z>u@g*S*;͠Wqim<J;rt0H?U?-SٶZG54dv[vzé-ۖ l}6{VZe7U}?+/5zD 4 1ʕ;5~Bx㛺t%/h5kh޼52j>ΝtX't;-[TYWXX)S>ܹ?fK^zi}M]>C_,I]k?8ѷ\dp&(s8uۜm3H4gUf}z}rJ8*w9W"7kIaCSv8ziy>^C_ʲ$]o'yo"ACUj-/?պWVYirW*+)uog OΗ$eL/?QHjZz3Jߒ\62WJeּX GuCSeY޹lk/&X7) O}k[np=U{i~Dϳr归}*,,@[C8Wƍ) ׻\UNW&%ŋHReoR)פɤ>^RZEY$IϋMlM*.Ă.La>ڒZM]7&+ߤwl/O߭&o 钧~ HReoUȜ5qy8Q` |-uu+kW6R_O~!GxֽT|AV]y)r˴uStǖUӲog)}EwhZ`N4݇d2J.0TN/W7,~L,{#%i甿>n3յ "Ubcz}kh˫ԩ+\ٰayzQ2M<B ֩5E~q$)11VO>yۚ \niŇ5[/2|L ~<=2bҧ6V;^'[p$9۔]hw_A9]#]$ǝĸ=y}y\__.]}tg8K&$Q\mR+nIOdYKv[7-ig zӂoTVZ"I~,";W6dE<ZfNjO-+Wޫ^.]&O^zm>.Rs $9N-XN[i\u~ԫ= v $)?XÆ+XgHc t{4h<JۘM4z?5d1hqqqG~7W]IRa$I`Amol6L#6k2 Y_\|eYQe#+Nzi q?IRia$FZUspjӂJ߲Gy3Ԭ{5IjέϢaS;Tb-֢aS$I"-6Emvxڴm{*G9,iET.*O?}$髯5EVS=zk̩޽vۗ )+˪IIt:Uo?f^:5w=C;k_ ߩgֺԦM-5khzaoSZh$Iк8FV{ۥ`_$isU-gɠnjvhZEI]~ujLJw[54)Zק녯SԳMIVX6oSZ Iߩqp)7-*Ȉ 2>Gi^Ngƫڲx~~#5I64l٢/U/NT~ҰES$Inc!uzkx'v[wZKW\AAsv17/ք }_jРW{b iҤ֒1czu(5~|-[I&-VLL^z*M1/$)=@&S xYߦh0ae4_\vCZᒤI=Q.ݣ7e鎾Mj}"FUA$6A꘾M:Ƣh: MzbziD[m&\1/?<:&=T|t8fݶ{dݪuZ;$LszM>ix䓒A15$)i`ny./['0]=Otᄡnh}yWI5=GHp|\.pq:ўpz-[I{f+d2iYZl,|Ygߤ-"oZ~nsdڵt"i4om);P_/zp8umܸO 6f}獵>h|}M: ՖQ)]1^񽗤R>ܧ=Ů(Gs:Oyuڷun}9ժMul]C\eéiژ\PI?1omW0 ?߫~IɠIѺJS׸[:>mKԪ'+mny+1Ƭ{U{ KGJyڷp'POѨVp(}kl%@%jt̳j\;2{*}}ah/uoX}u!gq+G ˜j9s&N@~{b}[4}z_fNt=_0fYU KTP`Sp,*m;wv֭s;@ySS΃E6-AMWzf.O37vG*(Ǩ [5U h$iWy]XR2d9j_ͽsv}t=t2oѣcPocR}x<Jy#r^XX J|Jkg.V`tUnWzwUQZhSIAT}b[Pl⵮c5fy a }M WYhF+d2jРs4y xtЄ 4aBWR{zܸ;jPmw@9jgͺA-Z0'p2JNg_fj^>K(Ymezd*ې?Sw>^}%[4W϶UtsEjǁB{"_" zjgF=lHREnv98@_MzY}%lWރ*+볻f䛴m-OR.:ÿx=Peا%"Shs:uB[Ğ[H*wO!!U}AZS)RVUم?իU_tc'%Msf'AzAz_4b\/S,-Wm]r@9%iMv+.uhet[uQ'IԡWWu4hױ&\Lm=:Y\!Um+u?ԈW .ުT>2z'/{~xmg_Ϻ22W;X.RLVe'k+6AQڷzJ m:B[j竮cTy<V~OQMS~WeOVcݮ!Ub$̩nZ*7Hqq!j.NQQj<B~ZS١C*--2}d4T_?ԣYzh4曻}8=1;}:t̙+nd$KSm=\O7f(bRie;e4H~&Mj,KL{SO4S.j$kk[db' )V;WmBMghnMW4N S&Mnd$T:G8c ôڷO;f,IDATz>PnEξ% 'մ[; xa.;ĵo|̝)Z=C z^FE%6{gt-Y)?o~VB⹻d0jB@?H-z-v*Tp72F.;Dmu?=3p9c*{zɫklOKJJjZw1l6is4|x~%4i:veKhڶVܥ,&Oƹ*sƠf6ǵ,VlYds:.ܭ9YP@_穷ŇUXФwc@ </R-R-P+(Z[ c AMmΘmK~P~?4el+ U%GR.Dq8@*z+Rm^qϱmMEYy9faLC1i= :ma a jma N11" " " " " @H(YIENDB`
PNG  IHDRc-\ pHYs   IDATx{U?~R@.*D@03LP 0 sJB:%]_yHM`AG9'$ D~0wn#|1,̵9+*UR񒒒C)//OQufxTߠ&,VՋ4u*%%%T^ktcv^9sTu @ҷoߪ.NEk|c>fvHO..HP a @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @Tu@UmUVXxM:tYe5&vTsſ2ɬu0n tz_ cj}&a|@oSU&pWu>myI~Nv@ `c? G5P7Xka `6@`=1PXuv@ d`c? O5P7Xk6a ``6@`1PYuf@-``c? AUKt0K`ӧOU@u1PH?a 2M@@-%1P dߦ5vHP a @1HP a @1Uj޼ҷ\zח穧^͕W>k\հ`;w#&OѷeѢeUP)@ehPl1LJIII~ۿ}%UoI[Gr2v].ݟcS ScjFd͚5j[)zJ*=>۳~}yv6zO]PLh:,\Nd9:뎌w1cnĉmU t[s6zO]fg Un޼2jԭ14kh,?s9" !nP#@mps3uS<yd:vmƸ'se67}iѢCʥN˚5Ұa,Y"g׮]_zvN8m~.@]aPՄաFGr㍏NJ.o8Çί9t˥NˬYwʹiϤg=ҥKm˦^˿ 7Fj+Vk5t^H:jѡ5|6IOgذmΫ~$O>0\3"e {3jhҤGs/~t[߿}{myYwM]2n?Us{٧M.pk(Fn„swe}fĈ>=l[O>ں>zm)+{3 .ˠAݷiI͟RnydZju{PԆlˏy.͛7αخqgz!۷ĉqtMΣɓGU<7@]ba Hm9; ;Ҍ{L.4k(웾}'TEs\:gԾnIAY.HF>n|-Tw<N[xuQϞ{T=dH ҳ)/o-Pd5ACQώPm䳣IRSώY#50*(uI..3r潖Qn͌YF_uf}梋JϞ{V_L4=gχɁs] }UFbg PgNv~\pԔW},)3:?&ر(8Z:U]0?-[6IM2xYle O9吜xbl$Z5)yezUu^﫺6ja PLh:,\NE[yysm#^6Ygݑq6f8-:.]vkCjzknqܖ΍V[a/sHrNus3uS<yd:v-Id̘ۓ$_rל}M>eMhE&+^:-k֬KÆdɊ̞=??p_v}~9ᄃY5mߖ`KHWoc}7~BkMy,7Xt{E{~3{k.]K.&>w̹hmy -I2kߒ$Ӧ==H.mi.zJ/rv~&Rl0j:R ]7"W\1zjk}$GzA_z%)-m38,=}hԨ~>{|$<a*nW_H|rafD5jjz3knqLjgҤGs/~t[!g:뎴iKƍ1cn>Ʌb >潶&L8>{WݷmF賉JҠAMl϶䣭Gߖ7p }4/GUfzy]M]ﷶ6a ΍~֜gGOs~c{NYٛ9ny睕喙4hM1|x {ѣCڷoH}L7< <ydZj/i[" 7T'mYY K/Ymw补;\ri֬QۯmnGYF8pwޑ;eC{k;MnvosdР+5kiG-MI `[=U})O9sTu)5ooSjժY8[~c6zW?3^-|cliYbu?˩NI'͐!=_G= $;wn^+k:kVP k|u~kT5Hsrgu?va ΍&~Gݞ`S1T+>7:`dwBE[WT<gE;>j>a Ug=*Ct"SOSOAjUuu0@ c $(0@ c $(0@ c $(0@ c $(0@ c $(0@ c $(0@54 {N(0@ c $(oSUdg ޼yҷo߬\2oF?_~ϳ3dž cQڵk;}_i,X}kYz6]In,XPeP cͶu'ȑ#ӯ_wq5kV3gӿ}YlV'$Y~}LC_~9cn$5jT۷F^fMn 2bɓ'W||?#G_bN<Ċac1@a:@[bEƎ3fd*{ケs=ĉcL:5?O2sL4)2eJd֬Y3gF?~|O*3ḡ >7tSN뮻.>`ڷo'[˧ Om`q)--K/]v%-ڵk+UVi۶mF{i^?́ 4:tتz6gٲer[niРAzѣGgԩ=묳ҦMl2'|rd1@!l[mwq[2$Jm۶w=+WܦO[hQ֭[oٜŋ<{,]8[E)//ЇG¶uցW_͔)SrM7+q5~O۶m+RnI[Su|zv9vPm[jŋg6fҤIYbEϟ_$[vSVVu矯o-[&Iz,_|۴i#<2Ǐ /uk~N?U]P7\{ӫW4n8Io[\=#7jhI:wO>9^xaڶmO>93gάtM^rgժU<xpomSƌ?>^{mƌ+Vs?~|JKK7[ON2lذs9e]?igҤI93lٲ^5jTJ  6)--ͬY2mڴJ׼i֬YMo[\}rz=Ƶm.\xO>J{fMٳ'Nf͚~os=_|q.Γ$M4\ .`~M't0Zro)gw'vi9C7m駞zjmߘǧgϞ3fL;찌7.Vb=ܶ~ 'lt۷o<??3jԨ JϢO>Il"GąQ2cƌmՂ r9;plΝ[ʚZ_mi;lbXなPx;c`3}ݍ~El/a {'2r/w\f͚njfΜÇ9쳳lٲOYJ>v)SdСׯ_=<쳛'IF$߿Ez׬Yo1C {ǘ>ȑ#/~1'xb- bŊ;63fȀreU{s7{o'nS\}ՙ:uj~d̙4iRvu-3eʔ$ɬY6}v>}z̜93&LtM:uj<i߾}~lno-4 wG4/RveJj$wҪUm6Fc=V[{/wqG~L RZZ:lU=lٲw}ӭ[4h zѣ3uJמuYiӦMZlO>9eeen P5{{իW7n$BmVgʕi-ʺu~mW=x┗R{KVu?h"Yv1vPW_}5SLM7ݔ+2w׼?ϟ??m۶Mzvm$x}+ڵl]M~SPYxq/_nmk&M+Vd/A@Ok׮]??>eeeYn]JǑ6UO˖-$O=T/_mڴɑG^Ⱥu׿5?sim ucJs9sm۶93sJ+|VZ[6osf̘1YbE:wǧtt)Æ 9眓]v%ӟ6?q&M3<3˖-^{QFe@mVR|})Oof7o^F3fl3;_g>wVtz*x(5 awL @g FϞ=7EuKPP a @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @TuTVulŋפCU];1P,^</`@ !1Pdj>a 0M5@@ %1P dja pE@@-!1Pd?a 2M@@-%1P dU]e}A(0@ c $(0@ c $(0@ c $(0@y^K߾r__z5W^p֮]_puꪇ3pu9䐟Sd޼תjU]lcJ"Sk~)%%5w.`jJIIPCsu#rêO˖MҢE |@-[* AC7iң9p;Io<;2nƌ='>T<yɈ}Rm1lcJTkw97S>ɓGcݶkz2]6m}ӧ-l>th\z鴬Y. ϒ%+2{$㏿1cnO|]s6a # 7.]vq{os K/YiӞIϞ{K6I~:gWdܸs%CFǔuѣCs7jT?G=>lΰaU^gz.׻g [fg ք sʾ͈}{9|tTiRVf.\Aob4hP=c*ˏy.͛7αخqR!۷ĉq)+{3G-S223]Pc=4cK.?͚5ʀo _Q9k|*ښ6m[o}<?}i֬Q?wICӳ!CzfȐwF)/گR[o~sza5P/@1HP a @1T;潖}'dꪇ3pu9䐟Sd޼ lV4a 5N^{foLMyyuLl^yeIP cq?-[6IM2xYle Nc>`M3j OC7iң9p;m/mOFzJv|guGƍRۘ1gć*r| ҳ;l^U]lΝwԩOeq$㏿1cnO|]s6z2]6m}ӧ-l>th\z鴬Y. ϒ%+2{$ɂ7wyw?+Pm=HYnpIe~:gWdܸs%C7:3|xmwni5o96Gti$?ucJT[^H:jazJRZ&gqXz蹬_ӨQ}t<Ix:Æ$ykaPC5a9ܻm3bDM\U o1sL)ѷ,\,uO{\yIR |um IDATC&L8> HCս{\~9ߥy9ySVf8[ygenef cl1$ѣCڷoHUa7﵌ukx4khqLjCK3v13} iڴan~U]wwN{О;wa%쌡s̙sQ!CzfȐ SSmO [bg @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @1AU@UQ@bg @1HP a @1HP a @1f޼y۷o>M^:Io3p| _W?ߪ훃>8̏{|o?>ׯl/0=䓹6ٿv|[JVrwd֬Y2eJzUϘ1#O<D&O_~9?я6ymvrw^Wa׾V&c(駟+2K.hK/EfZn d}ɗ^zg}rgNf;uja ;餓>d„ СC4i뮻.+WLsZ*M6Mz*1{W+mʕ9묳2nܸJ3fL&N$y'2r/w\f͚UqݨQ$O߾}+W^9#ra?Aل1$?я2cƌ<l2_~y{ :4/9Y~}yx9餓*=ѣGWj:thO5k$I,YٳggذaI+Vdر1cF .SLI̚5+s̩h<ss}wɕW^MECԩSƌ &dva{2|z>|xʶj/ׯ_Ǝ}kwSNKͳ.Tj0`@Tx6mZz.]$I8∔楗^.Eeڵw\tEi׮]vu|h@Ѡ :S+Ȉ#6oѢEF#G梋.~u]Yn]9䐊9g?x<cƌ4kl^moԨQ><9TUs{M^Ҹq$h^_}k֬IÆ 7\j/a U^z7n\o2 I>:t;N֯_W: JJJ67tЌ=:eeeYpa $yW3eʔMiiif͚iӦmvVZ%Io~vqL*չsq\I^x!'O΂ nݺ,Y$s!|毠ޒ=z}8qb\H/smUz^˖-$O=TűvڥO>+odݺu)++O<S_՛0*wik׮[l9sf/SNI+0wg:thΝ[qO΅^N;-zht)Æ 9眓N8/Oz2||K_ʸqR^^^zyO>I>ӑMkΝ[ʚZTŰU:vHP a @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @1HP a @TuT3K`;XnNhqPnԪK`5+se}YziU6@ j* @ p2w;+`+,^K: v;cCv[DzxU]cn=1Pdj7 e2@j>a BM 50j) @&K@v@$ZN P d@ 2Pcn91Pdj7 c2@U]}:t:lʇ{@%9?]Yեag @-d T_vʼWWdg3>ihn|>s^yoݑ>N8xNհ5IH-+oX53<Vc88^kjF־KfYӦMاO$MjI-Q7 h}Zg]vʜg,~Rۘ[2;e>nqL iܸ]v駟jopofꜷ2ұU$ɂ%9o3{e8]ehN&7hڻM.9S/ɒdttݗ.MK~.=vG+`|bEի׺qVu#<;EnҶiE,_ֻ4ܪ0fv/Ms\9|]3mܳyE,3I%yrݯG[=_?`S~t^z-9蠃/---璤m۶cz$nIҢE:4iR$ݻw$}Lj8G> ޽{^ս{y͚5*--A+}pa|سyEۣ/kV~mw܍螭_I<v?JҤaԯW:4˙̬g}F;cN:ܸq^x>}N:]=y7nұc_p{-~r<w>kܹMcJkZng}$vޓ{>IRZZ:~-z.Iҭ[;S.pboqG˽sΑ?}*I+7FtI-7g{)%UR,\am^>^6DT/n?|>$y7g}n{pR[pk֭[ޚL,ZI'[ou}׮]~ֻq=>k׮_>C=߼[ʯwtͼWWdgn+Rسyڷl\Zqȳdsk+sݟl@$F5kw祉t7Jz,]m~+I6{0b+LZ^fͲ$%I6k֬c\O- ס]?C;{^I3`] hֹWڻR+rݯdiۢa&JBkj.a @5R^^f<쳝>~nƍC-[_|쳎9֭{7I5jի?ymVϽg%W<rP 9V]9K7h?稽rQ |>`Xiڴi$ 7o~`͏%;w~_~_6mz`V~wy_Jj+ܬUV>^{MHҪI&oT3eee'&Y~=ӻw;v|td(:tA^{K,׾۱cǫdժUϿ7w^z=5cn_|Fuݻ;w[ou}P8P/Xŋ/^xǏ,Y%K,X c~ܹsK6׶z~ K.V(0@)ʼWWdg3>ihn/H%ϝ3 :LFyu|?7됫5ZUk\ @%jYúQO4k\N\TkZ&o.]u3eڻN_eݯTjskY&>ں73u[|~تq/0֬?_;/o._ޝZdӶeqr}77ӢɆZnK0?k딆K5r1;O#ϼ^N.m&IVZ$߅W> k֭|)Jn8F3 o-a~fnoL4=l.mVls ^M}5+Wm?|ʭvG[«oUšg?Sx ѵ.Qo{6hk],g #-O]faxF JrtVy$I ;xBkj/;c^6;^Y\%s/WoVWI-̈́_}5͈C&I:jfUҦE$IIIҸAIl|9|tTi)K+pc1hk?Xǯ]uL+,|7ޝ땃F$iجI5VhO~b7clK2O\_ adͺ zl1$go(0{Nm(ޞ>1%j'&>:ꂼ͊9ܟ=_,)sk3}ܔJm&3'ޞOe6f XU9J?,IrΠi۲Qf^FLko SڻuNJ}쌡FxγSq/:~Uo湻w{1̸;}5iԢ =4]fm5lKgr'WUkwr?_oeQiv6aȐ!ѣG<yk^3璃+9u]'dN;N/ϩ_jA{50jo7ޓ!7V]hy}4kr˜% 6y@<v鯳ptyiiseGx_ʰ_]ukݔL?pHmO駟u]nݺ#WՔ]X)QޕG{th{-ON~z҃$ysÓ$ 6J|qiܲYnFEO<r_,?2bĈp ϧ:P]C7p·_NJ}J$;3セ4$'Ifoc=ǔ*7,){5.|+>:mӰY~4k..I7n_TW^y%/_"{gկ#L=R.1T{wAwC5o}brLkޘr5!xiجFٞcJIҶ>٥nwQyI&^PDE U EeeUDp+baEEEł *b]TtP $d22$ddB397s<s< P>~158b~{Vڵf$))Kht/_k'55UӼy f:wL0PϸCУ{V<Or6TҢ(mzL * ՠ*Z~.zM|vU╤&]WaÆW6tUMԡCG,R[uQzIRm]Ťu'jeЫ]AogsgVZԶm3v$L^KҴ6@E@UV]Ǖ؝jSfhۨk a Lǎտ]r%j֬Y}s\O6fhQu۲lVǦuzv(*ج)״tjh0dٲe2<fCZ>]ߚX-24s1t=,mۊW!G鿟&tp ,(պu 'U@e14 )vK^&UFUKy%Z'_ =Yuu]kuOzWz'MY4Z'Z@e<xާωef! s} S#[YzA@t\^iڰֺgNn1?ݘΜMI*Ui;@e벎']@e1+onhRIWwd^ -*SİdnSMb3Ӏs#[u@qmj۔qv=]G+1SWvpZ?HmHw{jgFҩY?zΑtӊ*?rtqqF\S53#c<0c<0c<0c<0c<0c<0c<0c<0c<0c<0c<0c<0c<0c<0c<0c<ȧ @.PZ4: " " "Aشi4qJJJ$I?k׮ӧfϞ}BOJJ\S~~~+,,<nu5pбƍ0jƍZlYv]wq"""pB^ZsUNN֮]_]y䑺*%66VK, jqՀzu뭷gUVVݻw+55UFRdd|||ԪU+]|'|ѨVZ;?_.;#ԫnAZҴiܶ_/bCOfbht;aR_l:u]'NTNNN},ásjȐ! uUWi֭T;a `#<^|M=SZj 7|C[l/nV~'z״tReddg9>?/^\?fΜZ ~@cS-Z]wݥiӦk׮{쩥Kjzwjƌj۶qݫW/F%$$׍7XƍIҨQOs|-\P/;<IYgUs@chlp-iӦ>}`;V|ZlzHTVVzZFRRƍWe^֭ŋuM7`0Ԫ*˅ǜk 55UeeeJLLyw4&W02en&5k֬BBBt뭷jܸqr82LZ~}g6%I $Tۮ՞c>-#<<\w^uرu@chLѲeKy睚;wkΝ;k޽*++Sff>cu!ڲeKj4o޼j͜9SVUz75dȐc766V{ԩSciJMM=Zw4W9r[m޼YR_@ׯ_ @ի&O|JԩS5}t}ᇊV~f͚*uIW_}JJJ4p@=Ǟ:u^xu]ZjٲNzJ@ch jw㴗ҥSI OIJJ$mذA }=ogɈ IDATsxa xa xa xa xa xa xa xa xa xa xa xa xa xa xa w.phljNsE}qr:k뻆3}<R}<#c^mƍAbd xa s0:h(f_p,N;S}p4Œ<(&&.ݾP}{h|jkvVⓐ0Ti=q*=+PBXPP<<<vft$JA6m{.]T; պ.##cv^^rNh,44[{43L沲պ>99y䩜@<btHLL߉lk2BZnv=n` 6x:pS:?44 X,MsWd߁0u0Q]Wrl7o]۱M-++K񉏈i6[HR||xYR~ b4oݺf9ANgYnnVgÑ-88^ƠAX, {efflZ7wMScZٳclbfYOOUU}hZ:t-Il67+)):!آEEAf۱skKJJa@@@T!4(Lg"ͶKRʯM2-KBCCܝb{}||rrrl>b||~d2Ev+GQIIS94"^GDD\p$9ݻw_YRRm 0ަAMդI'U:33N|8N͛ώھ}+***c0L+_GEEk3yƍђ+sw.ȚNbi?Jh輱w|m5x2aW-99.Iŧp0 Fc`DDm SPPP$I*oFV:ua~$&&n,?--_z37?пC@F't ׷$mb2B"""ZXTt:YYY4LѷiPPP/h*++kQPP}اcߣLุ)NӐ>@cOtŲn?tx-/%**jTrff朸%)<<|a Xv8%6mi3!==ϛ4i$\(44ʊy޴)-,,F脄NӞj{Qj2Ld0Nyy__+I:&&~rI$P__eaATT(??6AAA} V$$T<V4pCC+BCC4/dFT~Rzzbbb66kl$N"/--d2?|VuIUV|u95!!$b/<""|-QQQbccj۶W*״ *WV16w"##f4%)77w/%`0DGGx CLŲnϒw*EEE!Iyyy_Id h4IRNNңi>EWfssOo\sPFFFYjx-oBdd$);;ðۇx:k߿ErIII$(--Mm:TRxzzuV{+㹆r{En3gkP\%%%<j}zzqۇJ:pf}II~;1*>$Y,AAA}I e-[ ~~~6mI~pFX|TIrdgg/dZ)**Z[TTVBBBKVue6X:--ߕ+.2jj;,E=,,솊N@#fە2)!!EI ޹s]ً~w:6__ߦAAA=zlذKP'cU}/I ɃuxܯKRDDĈ$C```V蔔3Ul6;[rssJWns]엖Ԣ))((XZ91i}zzKeee͛49j0^'C娨1QQQcm9<--a'h,˅qTZZzs\###oM l۶>Vx}%IrXt:Ov3СC(5>++ͬ /d2IԦ~XcUj1QQQw***j'X,%ȶfEPPPjOv,..n|rNN·㏵  rxaZkЫ[nAYYYdXp8 *oa)ZC+9x8) a OU Ij]m'I cD:thfHHe'{,Ͷ'88`𓤂ՒrOnnN^¼ba OewMؘzFFG0Cï߻wI {q7رcGRIOO=33s$I*]pv{z^^C8:G5#7 BCCD~ݎK6m:CL&SXhhkqn8l]zgZ7mݺRwɣ+?sjFG|EEEXwxX!w)..N.,,~#c#^8hc5}ݻw_}'޶m[IU 8k01 `/3o}P ]?O8_wnwӹyL&M&Pߵ9}| ԵW0ٝNiumN}nȌ޳kP*ͳa] A @ii ZQ20 Иgh@dH2@cF c!  @D @"3a#@D 4f2@E  @hd08 И a dH2@cF 4,1p   pj6]yyMr:ߜ9?_bw*Y9+Z>u@g*S*;͠Wqim<J;rt0H?U?-SٶZG54dv[vzé-ۖ l}6{VZe7U}?+/5zD 4 1ʕ;5~Bx㛺t%/h5kh޼52j>ΝtX't;-[TYWXX)S>ܹ?fK^zi}M]>C_,I]k?8ѷ\dp&(s8uۜm3H4gUf}z}rJ8*w9W"7kIaCSv8ziy>^C_ʲ$]o'yo"ACUj-/?պWVYirW*+)uog OΗ$eL/?QHjZz3Jߒ\62WJeּX GuCSeY޹lk/&X7) O}k[np=U{i~Dϳr归}*,,@[C8Wƍ) ׻\UNW&%ŋHReoR)פɤ>^RZEY$IϋMlM*.Ă.La>ڒZM]7&+ߤwl/O߭&o 钧~ HReoUȜ5qy8Q` |-uu+kW6R_O~!GxֽT|AV]y)r˴uStǖUӲog)}EwhZ`N4݇d2J.0TN/W7,~L,{#%i甿>n3յ "Ubcz}kh˫ԩ+\ٰayzQ2M<B ֩5E~q$)11VO>yۚ \niŇ5[/2|L ~<=2bҧ6V;^'[p$9۔]hw_A9]#]$ǝĸ=y}y\__.]}tg8K&$Q\mR+nIOdYKv[7-ig zӂoTVZ"I~,";W6dE<ZfNjO-+Wޫ^.]&O^zm>.Rs $9N-XN[i\u~ԫ= v $)?XÆ+XgHc t{4h<JۘM4z?5d1hqqqG~7W]IRa$I`Amol6L#6k2 Y_\|eYQe#+Nzi q?IRia$FZUspjӂJ߲Gy3Ԭ{5IjέϢaS;Tb-֢aS$I"-6Emvxڴm{*G9,iET.*O?}$髯5EVS=zk̩޽vۗ )+˪IIt:Uo?f^:5w=C;k_ ߩgֺԦM-5khzaoSZh$Iк8FV{ۥ`_$isU-gɠnjvhZEI]~ujLJw[54)Zק녯SԳMIVX6oSZ Iߩqp)7-*Ȉ 2>Gi^Ngƫڲx~~#5I64l٢/U/NT~ҰES$Inc!uzkx'v[wZKW\AAsv17/ք }_jРW{b iҤ֒1czu(5~|-[I&-VLL^z*M1/$)=@&S xYߦh0ae4_\vCZᒤI=Q.ݣ7e鎾Mj}"FUA$6A꘾M:Ƣh: MzbziD[m&\1/?<:&=T|t8fݶ{dݪuZ;$LszM>ix䓒A15$)i`ny./['0]=Otᄡnh}yWI5=GHp|\.pq:ўpz-[I{f+d2iYZl,|Ygߤ-"oZ~nsdڵt"i4om);P_/zp8umܸO 6f}獵>h|}M: ՖQ)]1^񽗤R>ܧ=Ů(Gs:Oyuڷun}9ժMul]C\eéiژ\PI?1omW0 ?߫~IɠIѺJS׸[:>mKԪ'+mny+1Ƭ{U{ KGJyڷp'POѨVp(}kl%@%jt̳j\;2{*}}ah/uoX}u!gq+G ˜j9s&N@~{b}[4}z_fNt=_0fYU KTP`Sp,*m;wv֭s;@ySS΃E6-AMWzf.O37vG*(Ǩ [5U h$iWy]XR2d9j_ͽsv}t=t2oѣcPocR}x<Jy#r^XX J|Jkg.V`tUnWzwUQZhSIAT}b[Pl⵮c5fy a }M WYhF+d2jРs4y xtЄ 4aBWR{zܸ;jPmw@9jgͺA-Z0'p2JNg_fj^>K(Ymezd*ې?Sw>^}%[4W϶UtsEjǁB{"_" zjgF=lHREnv98@_MzY}%lWރ*+볻f䛴m-OR.:ÿx=Peا%"Shs:uB[Ğ[H*wO!!U}AZS)RVUم?իU_tc'%Msf'AzAz_4b\/S,-Wm]r@9%iMv+.uhet[uQ'IԡWWu4hױ&\Lm=:Y\!Um+u?ԈW .ުT>2z'/{~xmg_Ϻ22W;X.RLVe'k+6AQڷzJ m:B[j竮cTy<V~OQMS~WeOVcݮ!Ub$̩nZ*7Hqq!j.NQQj<B~ZS١C*--2}d4T_?ԣYzh4曻}8=1;}:t̙+nd$KSm=\O7f(bRie;e4H~&Mj,KL{SO4S.j$kk[db' )V;WmBMghnMW4N S&Mnd$T:G8c ôڷO;f,IDATz>PnEξ% 'մ[; xa.;ĵo|̝)Z=C z^FE%6{gt-Y)?o~VB⹻d0jB@?H-z-v*Tp72F.;Dmu?=3p9c*{zɫklOKJJjZw1l6is4|x~%4i:veKhڶVܥ,&Oƹ*sƠf6ǵ,VlYds:.ܭ9YP@_穷ŇUXФwc@ </R-R-P+(Z[ c AMmΘmK~P~?4el+ U%GR.Dq8@*z+Rm^qϱmMEYy9faLC1i= :ma a jma N11" " " " " @H(YIENDB`
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/AccessKey.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.biz.entity; import com.ctrip.framework.apollo.common.entity.BaseEntity; import org.hibernate.annotations.SQLDelete; import org.hibernate.annotations.Where; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; @Entity @Table(name = "AccessKey") @SQLDelete(sql = "Update AccessKey set isDeleted = 1 where id = ?") @Where(clause = "isDeleted = 0") public class AccessKey extends BaseEntity { @Column(name = "appId", nullable = false) private String appId; @Column(name = "Secret", nullable = false) private String secret; @Column(name = "isEnabled", columnDefinition = "Bit default '0'") private boolean enabled; public String getAppId() { return appId; } public void setAppId(String appId) { this.appId = appId; } public String getSecret() { return secret; } public void setSecret(String secret) { this.secret = secret; } public boolean isEnabled() { return enabled; } public void setEnabled(boolean enabled) { this.enabled = enabled; } @Override public String toString() { return toStringHelper().add("appId", appId).add("secret", secret) .add("enabled", enabled).toString(); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.biz.entity; import com.ctrip.framework.apollo.common.entity.BaseEntity; import org.hibernate.annotations.SQLDelete; import org.hibernate.annotations.Where; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; @Entity @Table(name = "AccessKey") @SQLDelete(sql = "Update AccessKey set isDeleted = 1 where id = ?") @Where(clause = "isDeleted = 0") public class AccessKey extends BaseEntity { @Column(name = "appId", nullable = false) private String appId; @Column(name = "Secret", nullable = false) private String secret; @Column(name = "isEnabled", columnDefinition = "Bit default '0'") private boolean enabled; public String getAppId() { return appId; } public void setAppId(String appId) { this.appId = appId; } public String getSecret() { return secret; } public void setSecret(String secret) { this.secret = secret; } public boolean isEnabled() { return enabled; } public void setEnabled(boolean enabled) { this.enabled = enabled; } @Override public String toString() { return toStringHelper().add("appId", appId).add("secret", secret) .add("enabled", enabled).toString(); } }
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/PortalApplication.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal; import com.ctrip.framework.apollo.common.ApolloCommonConfig; import com.ctrip.framework.apollo.openapi.PortalOpenApiConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.transaction.annotation.EnableTransactionManagement; @EnableAspectJAutoProxy @Configuration @EnableAutoConfiguration(exclude = {LdapAutoConfiguration.class}) @EnableTransactionManagement @ComponentScan(basePackageClasses = {ApolloCommonConfig.class, PortalApplication.class, PortalOpenApiConfig.class}) public class PortalApplication { public static void main(String[] args) throws Exception { SpringApplication.run(PortalApplication.class, args); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal; import com.ctrip.framework.apollo.common.ApolloCommonConfig; import com.ctrip.framework.apollo.openapi.PortalOpenApiConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.transaction.annotation.EnableTransactionManagement; @EnableAspectJAutoProxy @Configuration @EnableAutoConfiguration(exclude = {LdapAutoConfiguration.class}) @EnableTransactionManagement @ComponentScan(basePackageClasses = {ApolloCommonConfig.class, PortalApplication.class, PortalOpenApiConfig.class}) public class PortalApplication { public static void main(String[] args) throws Exception { SpringApplication.run(PortalApplication.class, args); } }
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/v1/controller/NamespaceController.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.openapi.v1.controller; import com.ctrip.framework.apollo.common.dto.NamespaceDTO; import com.ctrip.framework.apollo.common.dto.NamespaceLockDTO; import com.ctrip.framework.apollo.common.entity.AppNamespace; import com.ctrip.framework.apollo.common.exception.BadRequestException; import com.ctrip.framework.apollo.common.utils.InputValidator; import com.ctrip.framework.apollo.common.utils.RequestPrecondition; import com.ctrip.framework.apollo.core.enums.ConfigFileFormat; import com.ctrip.framework.apollo.portal.environment.Env; import com.ctrip.framework.apollo.openapi.dto.OpenAppNamespaceDTO; import com.ctrip.framework.apollo.openapi.dto.OpenNamespaceDTO; import com.ctrip.framework.apollo.openapi.dto.OpenNamespaceLockDTO; import com.ctrip.framework.apollo.openapi.util.OpenApiBeanUtils; import com.ctrip.framework.apollo.portal.entity.bo.NamespaceBO; import com.ctrip.framework.apollo.portal.listener.AppNamespaceCreationEvent; import com.ctrip.framework.apollo.portal.service.AppNamespaceService; import com.ctrip.framework.apollo.portal.service.NamespaceLockService; import com.ctrip.framework.apollo.portal.service.NamespaceService; import com.ctrip.framework.apollo.portal.spi.UserService; import org.springframework.context.ApplicationEventPublisher; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; import java.util.List; import java.util.Objects; @RestController("openapiNamespaceController") public class NamespaceController { private final NamespaceLockService namespaceLockService; private final NamespaceService namespaceService; private final AppNamespaceService appNamespaceService; private final ApplicationEventPublisher publisher; private final UserService userService; public NamespaceController( final NamespaceLockService namespaceLockService, final NamespaceService namespaceService, final AppNamespaceService appNamespaceService, final ApplicationEventPublisher publisher, final UserService userService) { this.namespaceLockService = namespaceLockService; this.namespaceService = namespaceService; this.appNamespaceService = appNamespaceService; this.publisher = publisher; this.userService = userService; } @PreAuthorize(value = "@consumerPermissionValidator.hasCreateNamespacePermission(#request, #appId)") @PostMapping(value = "/openapi/v1/apps/{appId}/appnamespaces") public OpenAppNamespaceDTO createNamespace(@PathVariable String appId, @RequestBody OpenAppNamespaceDTO appNamespaceDTO, HttpServletRequest request) { if (!Objects.equals(appId, appNamespaceDTO.getAppId())) { throw new BadRequestException(String.format("AppId not equal. AppId in path = %s, AppId in payload = %s", appId, appNamespaceDTO.getAppId())); } RequestPrecondition.checkArgumentsNotEmpty(appNamespaceDTO.getAppId(), appNamespaceDTO.getName(), appNamespaceDTO.getFormat(), appNamespaceDTO.getDataChangeCreatedBy()); if (!InputValidator.isValidAppNamespace(appNamespaceDTO.getName())) { throw new BadRequestException(String.format("Invalid Namespace format: %s", InputValidator.INVALID_CLUSTER_NAMESPACE_MESSAGE + " & " + InputValidator.INVALID_NAMESPACE_NAMESPACE_MESSAGE)); } if (!ConfigFileFormat.isValidFormat(appNamespaceDTO.getFormat())) { throw new BadRequestException(String.format("Invalid namespace format. format = %s", appNamespaceDTO.getFormat())); } String operator = appNamespaceDTO.getDataChangeCreatedBy(); if (userService.findByUserId(operator) == null) { throw new BadRequestException(String.format("Illegal user. user = %s", operator)); } AppNamespace appNamespace = OpenApiBeanUtils.transformToAppNamespace(appNamespaceDTO); AppNamespace createdAppNamespace = appNamespaceService.createAppNamespaceInLocal(appNamespace, appNamespaceDTO.isAppendNamespacePrefix()); publisher.publishEvent(new AppNamespaceCreationEvent(createdAppNamespace)); return OpenApiBeanUtils.transformToOpenAppNamespaceDTO(createdAppNamespace); } @GetMapping(value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces") public List<OpenNamespaceDTO> findNamespaces(@PathVariable String appId, @PathVariable String env, @PathVariable String clusterName) { return OpenApiBeanUtils .batchTransformFromNamespaceBOs(namespaceService.findNamespaceBOs(appId, Env .valueOf(env), clusterName)); } @GetMapping(value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName:.+}") public OpenNamespaceDTO loadNamespace(@PathVariable String appId, @PathVariable String env, @PathVariable String clusterName, @PathVariable String namespaceName) { NamespaceBO namespaceBO = namespaceService.loadNamespaceBO(appId, Env.valueOf (env), clusterName, namespaceName); if (namespaceBO == null) { return null; } return OpenApiBeanUtils.transformFromNamespaceBO(namespaceBO); } @GetMapping(value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock") public OpenNamespaceLockDTO getNamespaceLock(@PathVariable String appId, @PathVariable String env, @PathVariable String clusterName, @PathVariable String namespaceName) { NamespaceDTO namespace = namespaceService.loadNamespaceBaseInfo(appId, Env .valueOf(env), clusterName, namespaceName); NamespaceLockDTO lockDTO = namespaceLockService.getNamespaceLock(appId, Env .valueOf(env), clusterName, namespaceName); return OpenApiBeanUtils.transformFromNamespaceLockDTO(namespace.getNamespaceName(), lockDTO); } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.openapi.v1.controller; import com.ctrip.framework.apollo.common.dto.NamespaceDTO; import com.ctrip.framework.apollo.common.dto.NamespaceLockDTO; import com.ctrip.framework.apollo.common.entity.AppNamespace; import com.ctrip.framework.apollo.common.exception.BadRequestException; import com.ctrip.framework.apollo.common.utils.InputValidator; import com.ctrip.framework.apollo.common.utils.RequestPrecondition; import com.ctrip.framework.apollo.core.enums.ConfigFileFormat; import com.ctrip.framework.apollo.portal.environment.Env; import com.ctrip.framework.apollo.openapi.dto.OpenAppNamespaceDTO; import com.ctrip.framework.apollo.openapi.dto.OpenNamespaceDTO; import com.ctrip.framework.apollo.openapi.dto.OpenNamespaceLockDTO; import com.ctrip.framework.apollo.openapi.util.OpenApiBeanUtils; import com.ctrip.framework.apollo.portal.entity.bo.NamespaceBO; import com.ctrip.framework.apollo.portal.listener.AppNamespaceCreationEvent; import com.ctrip.framework.apollo.portal.service.AppNamespaceService; import com.ctrip.framework.apollo.portal.service.NamespaceLockService; import com.ctrip.framework.apollo.portal.service.NamespaceService; import com.ctrip.framework.apollo.portal.spi.UserService; import org.springframework.context.ApplicationEventPublisher; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; import java.util.List; import java.util.Objects; @RestController("openapiNamespaceController") public class NamespaceController { private final NamespaceLockService namespaceLockService; private final NamespaceService namespaceService; private final AppNamespaceService appNamespaceService; private final ApplicationEventPublisher publisher; private final UserService userService; public NamespaceController( final NamespaceLockService namespaceLockService, final NamespaceService namespaceService, final AppNamespaceService appNamespaceService, final ApplicationEventPublisher publisher, final UserService userService) { this.namespaceLockService = namespaceLockService; this.namespaceService = namespaceService; this.appNamespaceService = appNamespaceService; this.publisher = publisher; this.userService = userService; } @PreAuthorize(value = "@consumerPermissionValidator.hasCreateNamespacePermission(#request, #appId)") @PostMapping(value = "/openapi/v1/apps/{appId}/appnamespaces") public OpenAppNamespaceDTO createNamespace(@PathVariable String appId, @RequestBody OpenAppNamespaceDTO appNamespaceDTO, HttpServletRequest request) { if (!Objects.equals(appId, appNamespaceDTO.getAppId())) { throw new BadRequestException(String.format("AppId not equal. AppId in path = %s, AppId in payload = %s", appId, appNamespaceDTO.getAppId())); } RequestPrecondition.checkArgumentsNotEmpty(appNamespaceDTO.getAppId(), appNamespaceDTO.getName(), appNamespaceDTO.getFormat(), appNamespaceDTO.getDataChangeCreatedBy()); if (!InputValidator.isValidAppNamespace(appNamespaceDTO.getName())) { throw new BadRequestException(String.format("Invalid Namespace format: %s", InputValidator.INVALID_CLUSTER_NAMESPACE_MESSAGE + " & " + InputValidator.INVALID_NAMESPACE_NAMESPACE_MESSAGE)); } if (!ConfigFileFormat.isValidFormat(appNamespaceDTO.getFormat())) { throw new BadRequestException(String.format("Invalid namespace format. format = %s", appNamespaceDTO.getFormat())); } String operator = appNamespaceDTO.getDataChangeCreatedBy(); if (userService.findByUserId(operator) == null) { throw new BadRequestException(String.format("Illegal user. user = %s", operator)); } AppNamespace appNamespace = OpenApiBeanUtils.transformToAppNamespace(appNamespaceDTO); AppNamespace createdAppNamespace = appNamespaceService.createAppNamespaceInLocal(appNamespace, appNamespaceDTO.isAppendNamespacePrefix()); publisher.publishEvent(new AppNamespaceCreationEvent(createdAppNamespace)); return OpenApiBeanUtils.transformToOpenAppNamespaceDTO(createdAppNamespace); } @GetMapping(value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces") public List<OpenNamespaceDTO> findNamespaces(@PathVariable String appId, @PathVariable String env, @PathVariable String clusterName) { return OpenApiBeanUtils .batchTransformFromNamespaceBOs(namespaceService.findNamespaceBOs(appId, Env .valueOf(env), clusterName)); } @GetMapping(value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName:.+}") public OpenNamespaceDTO loadNamespace(@PathVariable String appId, @PathVariable String env, @PathVariable String clusterName, @PathVariable String namespaceName) { NamespaceBO namespaceBO = namespaceService.loadNamespaceBO(appId, Env.valueOf (env), clusterName, namespaceName); if (namespaceBO == null) { return null; } return OpenApiBeanUtils.transformFromNamespaceBO(namespaceBO); } @GetMapping(value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock") public OpenNamespaceLockDTO getNamespaceLock(@PathVariable String appId, @PathVariable String env, @PathVariable String clusterName, @PathVariable String namespaceName) { NamespaceDTO namespace = namespaceService.loadNamespaceBaseInfo(appId, Env .valueOf(env), clusterName, namespaceName); NamespaceLockDTO lockDTO = namespaceLockService.getNamespaceLock(appId, Env .valueOf(env), clusterName, namespaceName); return OpenApiBeanUtils.transformFromNamespaceLockDTO(namespace.getNamespaceName(), lockDTO); } }
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./scripts/docker-quick-start/sql/apolloconfigdb.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; # Create Database # ------------------------------------------------------------ CREATE DATABASE IF NOT EXISTS ApolloConfigDB DEFAULT CHARACTER SET = utf8mb4; Use ApolloConfigDB; # Dump of table app # ------------------------------------------------------------ DROP TABLE IF EXISTS `App`; CREATE TABLE `App` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名', `OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id', `OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字', `OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName', `OwnerEmail` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerEmail', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Name` (`Name`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用表'; # Dump of table appnamespace # ------------------------------------------------------------ DROP TABLE IF EXISTS `AppNamespace`; CREATE TABLE `AppNamespace` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `Name` varchar(32) NOT NULL DEFAULT '' COMMENT 'namespace名字,注意,需要全局唯一', `AppId` varchar(64) NOT NULL DEFAULT '' COMMENT 'app id', `Format` varchar(32) NOT NULL DEFAULT 'properties' COMMENT 'namespace的format类型', `IsPublic` bit(1) NOT NULL DEFAULT b'0' COMMENT 'namespace是否为公共', `Comment` varchar(64) NOT NULL DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_AppId` (`AppId`), KEY `Name_AppId` (`Name`,`AppId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用namespace定义'; # Dump of table audit # ------------------------------------------------------------ DROP TABLE IF EXISTS `Audit`; CREATE TABLE `Audit` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `EntityName` varchar(50) NOT NULL DEFAULT 'default' COMMENT '表名', `EntityId` int(10) unsigned DEFAULT NULL COMMENT '记录ID', `OpName` varchar(50) NOT NULL DEFAULT 'default' COMMENT '操作类型', `Comment` varchar(500) DEFAULT NULL COMMENT '备注', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='日志审计表'; # Dump of table cluster # ------------------------------------------------------------ DROP TABLE IF EXISTS `Cluster`; CREATE TABLE `Cluster` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `Name` varchar(32) NOT NULL DEFAULT '' COMMENT '集群名字', `AppId` varchar(64) NOT NULL DEFAULT '' COMMENT 'App id', `ParentClusterId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父cluster', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_AppId_Name` (`AppId`,`Name`), KEY `IX_ParentClusterId` (`ParentClusterId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='集群'; # Dump of table commit # ------------------------------------------------------------ DROP TABLE IF EXISTS `Commit`; CREATE TABLE `Commit` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `ChangeSets` longtext NOT NULL COMMENT '修改变更集', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ClusterName', `NamespaceName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'namespaceName', `Comment` varchar(500) DEFAULT NULL COMMENT '备注', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `AppId` (`AppId`(191)), KEY `ClusterName` (`ClusterName`(191)), KEY `NamespaceName` (`NamespaceName`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='commit 历史表'; # Dump of table grayreleaserule # ------------------------------------------------------------ DROP TABLE IF EXISTS `GrayReleaseRule`; CREATE TABLE `GrayReleaseRule` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `AppId` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'Cluster Name', `NamespaceName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'Namespace Name', `BranchName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'branch name', `Rules` varchar(16000) DEFAULT '[]' COMMENT '灰度规则', `ReleaseId` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '灰度对应的release', `BranchStatus` tinyint(2) DEFAULT '1' COMMENT '灰度分支状态: 0:删除分支,1:正在使用的规则 2:全量发布', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Namespace` (`AppId`,`ClusterName`,`NamespaceName`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='灰度规则表'; # Dump of table instance # ------------------------------------------------------------ DROP TABLE IF EXISTS `Instance`; CREATE TABLE `Instance` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `AppId` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'ClusterName', `DataCenter` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'Data Center Name', `Ip` varchar(32) NOT NULL DEFAULT '' COMMENT 'instance ip', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), UNIQUE KEY `IX_UNIQUE_KEY` (`AppId`,`ClusterName`,`Ip`,`DataCenter`), KEY `IX_IP` (`Ip`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='使用配置的应用实例'; # Dump of table instanceconfig # ------------------------------------------------------------ DROP TABLE IF EXISTS `InstanceConfig`; CREATE TABLE `InstanceConfig` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `InstanceId` int(11) unsigned DEFAULT NULL COMMENT 'Instance Id', `ConfigAppId` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'Config App Id', `ConfigClusterName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'Config Cluster Name', `ConfigNamespaceName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'Config Namespace Name', `ReleaseKey` varchar(64) NOT NULL DEFAULT '' COMMENT '发布的Key', `ReleaseDeliveryTime` timestamp NULL DEFAULT NULL COMMENT '配置获取时间', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), UNIQUE KEY `IX_UNIQUE_KEY` (`InstanceId`,`ConfigAppId`,`ConfigNamespaceName`), KEY `IX_ReleaseKey` (`ReleaseKey`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Valid_Namespace` (`ConfigAppId`,`ConfigClusterName`,`ConfigNamespaceName`,`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用实例的配置信息'; # Dump of table item # ------------------------------------------------------------ DROP TABLE IF EXISTS `Item`; CREATE TABLE `Item` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `NamespaceId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '集群NamespaceId', `Key` varchar(128) NOT NULL DEFAULT 'default' COMMENT '配置项Key', `Value` longtext NOT NULL COMMENT '配置项值', `Comment` varchar(1024) DEFAULT '' COMMENT '注释', `LineNum` int(10) unsigned DEFAULT '0' COMMENT '行号', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_GroupId` (`NamespaceId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置项目'; # Dump of table namespace # ------------------------------------------------------------ DROP TABLE IF EXISTS `Namespace`; CREATE TABLE `Namespace` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'Cluster Name', `NamespaceName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'Namespace Name', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId_ClusterName_NamespaceName` (`AppId`(191),`ClusterName`(191),`NamespaceName`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_NamespaceName` (`NamespaceName`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='命名空间'; # Dump of table namespacelock # ------------------------------------------------------------ DROP TABLE IF EXISTS `NamespaceLock`; CREATE TABLE `NamespaceLock` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', `NamespaceId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '集群NamespaceId', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', `IsDeleted` bit(1) DEFAULT b'0' COMMENT '软删除', PRIMARY KEY (`Id`), UNIQUE KEY `IX_NamespaceId` (`NamespaceId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='namespace的编辑锁'; # Dump of table release # ------------------------------------------------------------ DROP TABLE IF EXISTS `Release`; CREATE TABLE `Release` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `ReleaseKey` varchar(64) NOT NULL DEFAULT '' COMMENT '发布的Key', `Name` varchar(64) NOT NULL DEFAULT 'default' COMMENT '发布名字', `Comment` varchar(256) DEFAULT NULL COMMENT '发布说明', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ClusterName', `NamespaceName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'namespaceName', `Configurations` longtext NOT NULL COMMENT '发布配置', `IsAbandoned` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否废弃', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId_ClusterName_GroupName` (`AppId`(191),`ClusterName`(191),`NamespaceName`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_ReleaseKey` (`ReleaseKey`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发布'; # Dump of table releasehistory # ------------------------------------------------------------ DROP TABLE IF EXISTS `ReleaseHistory`; CREATE TABLE `ReleaseHistory` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `AppId` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'ClusterName', `NamespaceName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'namespaceName', `BranchName` varchar(32) NOT NULL DEFAULT 'default' COMMENT '发布分支名', `ReleaseId` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '关联的Release Id', `PreviousReleaseId` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '前一次发布的ReleaseId', `Operation` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '发布类型,0: 普通发布,1: 回滚,2: 灰度发布,3: 灰度规则更新,4: 灰度合并回主分支发布,5: 主分支发布灰度自动发布,6: 主分支回滚灰度自动发布,7: 放弃灰度', `OperationContext` longtext NOT NULL COMMENT '发布上下文信息', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_Namespace` (`AppId`,`ClusterName`,`NamespaceName`,`BranchName`), KEY `IX_ReleaseId` (`ReleaseId`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发布历史'; # Dump of table releasemessage # ------------------------------------------------------------ DROP TABLE IF EXISTS `ReleaseMessage`; CREATE TABLE `ReleaseMessage` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `Message` varchar(1024) NOT NULL DEFAULT '' COMMENT '发布的消息内容', `DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Message` (`Message`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发布消息'; # Dump of table serverconfig # ------------------------------------------------------------ DROP TABLE IF EXISTS `ServerConfig`; CREATE TABLE `ServerConfig` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Key` varchar(64) NOT NULL DEFAULT 'default' COMMENT '配置项Key', `Cluster` varchar(32) NOT NULL DEFAULT 'default' COMMENT '配置对应的集群,default为不针对特定的集群', `Value` varchar(2048) NOT NULL DEFAULT 'default' COMMENT '配置项值', `Comment` varchar(1024) DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_Key` (`Key`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置服务自身配置'; # Dump of table accesskey # ------------------------------------------------------------ DROP TABLE IF EXISTS `AccessKey`; CREATE TABLE `AccessKey` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Secret` varchar(128) NOT NULL DEFAULT '' COMMENT 'Secret', `IsEnabled` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: enabled, 0: disabled', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='访问密钥'; # Config # ------------------------------------------------------------ INSERT INTO `ServerConfig` (`Key`, `Cluster`, `Value`, `Comment`) VALUES ('eureka.service.url', 'default', 'http://localhost:8080/eureka/', 'Eureka服务Url,多个service以英文逗号分隔'), ('namespace.lock.switch', 'default', 'false', '一次发布只能有一个人修改开关'), ('item.value.length.limit', 'default', '20000', 'item value最大长度限制'), ('config-service.cache.enabled', 'default', 'false', 'ConfigService是否开启缓存,开启后能提高性能,但是会增大内存消耗!'), ('item.key.length.limit', 'default', '128', 'item key 最大长度限制'); # Sample Data # ------------------------------------------------------------ INSERT INTO `App` (`AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`) VALUES ('SampleApp', 'Sample App', 'TEST1', '样例部门1', 'apollo', 'apollo@acme.com'); INSERT INTO `AppNamespace` (`Name`, `AppId`, `Format`, `IsPublic`, `Comment`) VALUES ('application', 'SampleApp', 'properties', 0, 'default app namespace'); INSERT INTO `Cluster` (`Name`, `AppId`) VALUES ('default', 'SampleApp'); INSERT INTO `Namespace` (`Id`, `AppId`, `ClusterName`, `NamespaceName`) VALUES (1, 'SampleApp', 'default', 'application'); INSERT INTO `Item` (`NamespaceId`, `Key`, `Value`, `Comment`, `LineNum`) VALUES (1, 'timeout', '100', 'sample timeout配置', 1); INSERT INTO `Release` (`ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`) VALUES ('20161009155425-d3a0749c6e20bc15', '20161009155424-release', 'Sample发布', 'SampleApp', 'default', 'application', '{\"timeout\":\"100\"}'); INSERT INTO `ReleaseHistory` (`AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `ReleaseId`, `PreviousReleaseId`, `Operation`, `OperationContext`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES ('SampleApp', 'default', 'application', 'default', 1, 0, 0, '{}', 'apollo', 'apollo'); INSERT INTO `ReleaseMessage` (`Message`) VALUES ('SampleApp+default+application'); /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; # Create Database # ------------------------------------------------------------ CREATE DATABASE IF NOT EXISTS ApolloConfigDB DEFAULT CHARACTER SET = utf8mb4; Use ApolloConfigDB; # Dump of table app # ------------------------------------------------------------ DROP TABLE IF EXISTS `App`; CREATE TABLE `App` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Name` varchar(500) NOT NULL DEFAULT 'default' COMMENT '应用名', `OrgId` varchar(32) NOT NULL DEFAULT 'default' COMMENT '部门Id', `OrgName` varchar(64) NOT NULL DEFAULT 'default' COMMENT '部门名字', `OwnerName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerName', `OwnerEmail` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ownerEmail', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Name` (`Name`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用表'; # Dump of table appnamespace # ------------------------------------------------------------ DROP TABLE IF EXISTS `AppNamespace`; CREATE TABLE `AppNamespace` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `Name` varchar(32) NOT NULL DEFAULT '' COMMENT 'namespace名字,注意,需要全局唯一', `AppId` varchar(64) NOT NULL DEFAULT '' COMMENT 'app id', `Format` varchar(32) NOT NULL DEFAULT 'properties' COMMENT 'namespace的format类型', `IsPublic` bit(1) NOT NULL DEFAULT b'0' COMMENT 'namespace是否为公共', `Comment` varchar(64) NOT NULL DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_AppId` (`AppId`), KEY `Name_AppId` (`Name`,`AppId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用namespace定义'; # Dump of table audit # ------------------------------------------------------------ DROP TABLE IF EXISTS `Audit`; CREATE TABLE `Audit` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `EntityName` varchar(50) NOT NULL DEFAULT 'default' COMMENT '表名', `EntityId` int(10) unsigned DEFAULT NULL COMMENT '记录ID', `OpName` varchar(50) NOT NULL DEFAULT 'default' COMMENT '操作类型', `Comment` varchar(500) DEFAULT NULL COMMENT '备注', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='日志审计表'; # Dump of table cluster # ------------------------------------------------------------ DROP TABLE IF EXISTS `Cluster`; CREATE TABLE `Cluster` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `Name` varchar(32) NOT NULL DEFAULT '' COMMENT '集群名字', `AppId` varchar(64) NOT NULL DEFAULT '' COMMENT 'App id', `ParentClusterId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父cluster', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_AppId_Name` (`AppId`,`Name`), KEY `IX_ParentClusterId` (`ParentClusterId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='集群'; # Dump of table commit # ------------------------------------------------------------ DROP TABLE IF EXISTS `Commit`; CREATE TABLE `Commit` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `ChangeSets` longtext NOT NULL COMMENT '修改变更集', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ClusterName', `NamespaceName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'namespaceName', `Comment` varchar(500) DEFAULT NULL COMMENT '备注', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `AppId` (`AppId`(191)), KEY `ClusterName` (`ClusterName`(191)), KEY `NamespaceName` (`NamespaceName`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='commit 历史表'; # Dump of table grayreleaserule # ------------------------------------------------------------ DROP TABLE IF EXISTS `GrayReleaseRule`; CREATE TABLE `GrayReleaseRule` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', `AppId` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'Cluster Name', `NamespaceName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'Namespace Name', `BranchName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'branch name', `Rules` varchar(16000) DEFAULT '[]' COMMENT '灰度规则', `ReleaseId` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '灰度对应的release', `BranchStatus` tinyint(2) DEFAULT '1' COMMENT '灰度分支状态: 0:删除分支,1:正在使用的规则 2:全量发布', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Namespace` (`AppId`,`ClusterName`,`NamespaceName`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='灰度规则表'; # Dump of table instance # ------------------------------------------------------------ DROP TABLE IF EXISTS `Instance`; CREATE TABLE `Instance` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `AppId` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'ClusterName', `DataCenter` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'Data Center Name', `Ip` varchar(32) NOT NULL DEFAULT '' COMMENT 'instance ip', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), UNIQUE KEY `IX_UNIQUE_KEY` (`AppId`,`ClusterName`,`Ip`,`DataCenter`), KEY `IX_IP` (`Ip`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='使用配置的应用实例'; # Dump of table instanceconfig # ------------------------------------------------------------ DROP TABLE IF EXISTS `InstanceConfig`; CREATE TABLE `InstanceConfig` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `InstanceId` int(11) unsigned DEFAULT NULL COMMENT 'Instance Id', `ConfigAppId` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'Config App Id', `ConfigClusterName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'Config Cluster Name', `ConfigNamespaceName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'Config Namespace Name', `ReleaseKey` varchar(64) NOT NULL DEFAULT '' COMMENT '发布的Key', `ReleaseDeliveryTime` timestamp NULL DEFAULT NULL COMMENT '配置获取时间', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), UNIQUE KEY `IX_UNIQUE_KEY` (`InstanceId`,`ConfigAppId`,`ConfigNamespaceName`), KEY `IX_ReleaseKey` (`ReleaseKey`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Valid_Namespace` (`ConfigAppId`,`ConfigClusterName`,`ConfigNamespaceName`,`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用实例的配置信息'; # Dump of table item # ------------------------------------------------------------ DROP TABLE IF EXISTS `Item`; CREATE TABLE `Item` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `NamespaceId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '集群NamespaceId', `Key` varchar(128) NOT NULL DEFAULT 'default' COMMENT '配置项Key', `Value` longtext NOT NULL COMMENT '配置项值', `Comment` varchar(1024) DEFAULT '' COMMENT '注释', `LineNum` int(10) unsigned DEFAULT '0' COMMENT '行号', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_GroupId` (`NamespaceId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置项目'; # Dump of table namespace # ------------------------------------------------------------ DROP TABLE IF EXISTS `Namespace`; CREATE TABLE `Namespace` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'Cluster Name', `NamespaceName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'Namespace Name', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId_ClusterName_NamespaceName` (`AppId`(191),`ClusterName`(191),`NamespaceName`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_NamespaceName` (`NamespaceName`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='命名空间'; # Dump of table namespacelock # ------------------------------------------------------------ DROP TABLE IF EXISTS `NamespaceLock`; CREATE TABLE `NamespaceLock` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id', `NamespaceId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '集群NamespaceId', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', `IsDeleted` bit(1) DEFAULT b'0' COMMENT '软删除', PRIMARY KEY (`Id`), UNIQUE KEY `IX_NamespaceId` (`NamespaceId`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='namespace的编辑锁'; # Dump of table release # ------------------------------------------------------------ DROP TABLE IF EXISTS `Release`; CREATE TABLE `Release` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `ReleaseKey` varchar(64) NOT NULL DEFAULT '' COMMENT '发布的Key', `Name` varchar(64) NOT NULL DEFAULT 'default' COMMENT '发布名字', `Comment` varchar(256) DEFAULT NULL COMMENT '发布说明', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'ClusterName', `NamespaceName` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'namespaceName', `Configurations` longtext NOT NULL COMMENT '发布配置', `IsAbandoned` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否废弃', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId_ClusterName_GroupName` (`AppId`(191),`ClusterName`(191),`NamespaceName`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_ReleaseKey` (`ReleaseKey`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发布'; # Dump of table releasehistory # ------------------------------------------------------------ DROP TABLE IF EXISTS `ReleaseHistory`; CREATE TABLE `ReleaseHistory` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `AppId` varchar(64) NOT NULL DEFAULT 'default' COMMENT 'AppID', `ClusterName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'ClusterName', `NamespaceName` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'namespaceName', `BranchName` varchar(32) NOT NULL DEFAULT 'default' COMMENT '发布分支名', `ReleaseId` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '关联的Release Id', `PreviousReleaseId` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '前一次发布的ReleaseId', `Operation` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '发布类型,0: 普通发布,1: 回滚,2: 灰度发布,3: 灰度规则更新,4: 灰度合并回主分支发布,5: 主分支发布灰度自动发布,6: 主分支回滚灰度自动发布,7: 放弃灰度', `OperationContext` longtext NOT NULL COMMENT '发布上下文信息', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_Namespace` (`AppId`,`ClusterName`,`NamespaceName`,`BranchName`), KEY `IX_ReleaseId` (`ReleaseId`), KEY `IX_DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发布历史'; # Dump of table releasemessage # ------------------------------------------------------------ DROP TABLE IF EXISTS `ReleaseMessage`; CREATE TABLE `ReleaseMessage` ( `Id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `Message` varchar(1024) NOT NULL DEFAULT '' COMMENT '发布的消息内容', `DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `DataChange_LastTime` (`DataChange_LastTime`), KEY `IX_Message` (`Message`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发布消息'; # Dump of table serverconfig # ------------------------------------------------------------ DROP TABLE IF EXISTS `ServerConfig`; CREATE TABLE `ServerConfig` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增Id', `Key` varchar(64) NOT NULL DEFAULT 'default' COMMENT '配置项Key', `Cluster` varchar(32) NOT NULL DEFAULT 'default' COMMENT '配置对应的集群,default为不针对特定的集群', `Value` varchar(2048) NOT NULL DEFAULT 'default' COMMENT '配置项值', `Comment` varchar(1024) DEFAULT '' COMMENT '注释', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `IX_Key` (`Key`), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置服务自身配置'; # Dump of table accesskey # ------------------------------------------------------------ DROP TABLE IF EXISTS `AccessKey`; CREATE TABLE `AccessKey` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键', `AppId` varchar(500) NOT NULL DEFAULT 'default' COMMENT 'AppID', `Secret` varchar(128) NOT NULL DEFAULT '' COMMENT 'Secret', `IsEnabled` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: enabled, 0: disabled', `IsDeleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '1: deleted, 0: normal', `DataChange_CreatedBy` varchar(64) NOT NULL DEFAULT 'default' COMMENT '创建人邮箱前缀', `DataChange_CreatedTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀', `DataChange_LastTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`Id`), KEY `AppId` (`AppId`(191)), KEY `DataChange_LastTime` (`DataChange_LastTime`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='访问密钥'; # Config # ------------------------------------------------------------ INSERT INTO `ServerConfig` (`Key`, `Cluster`, `Value`, `Comment`) VALUES ('eureka.service.url', 'default', 'http://localhost:8080/eureka/', 'Eureka服务Url,多个service以英文逗号分隔'), ('namespace.lock.switch', 'default', 'false', '一次发布只能有一个人修改开关'), ('item.value.length.limit', 'default', '20000', 'item value最大长度限制'), ('config-service.cache.enabled', 'default', 'false', 'ConfigService是否开启缓存,开启后能提高性能,但是会增大内存消耗!'), ('item.key.length.limit', 'default', '128', 'item key 最大长度限制'); # Sample Data # ------------------------------------------------------------ INSERT INTO `App` (`AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`) VALUES ('SampleApp', 'Sample App', 'TEST1', '样例部门1', 'apollo', 'apollo@acme.com'); INSERT INTO `AppNamespace` (`Name`, `AppId`, `Format`, `IsPublic`, `Comment`) VALUES ('application', 'SampleApp', 'properties', 0, 'default app namespace'); INSERT INTO `Cluster` (`Name`, `AppId`) VALUES ('default', 'SampleApp'); INSERT INTO `Namespace` (`Id`, `AppId`, `ClusterName`, `NamespaceName`) VALUES (1, 'SampleApp', 'default', 'application'); INSERT INTO `Item` (`NamespaceId`, `Key`, `Value`, `Comment`, `LineNum`) VALUES (1, 'timeout', '100', 'sample timeout配置', 1); INSERT INTO `Release` (`ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`) VALUES ('20161009155425-d3a0749c6e20bc15', '20161009155424-release', 'Sample发布', 'SampleApp', 'default', 'application', '{\"timeout\":\"100\"}'); INSERT INTO `ReleaseHistory` (`AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `ReleaseId`, `PreviousReleaseId`, `Operation`, `OperationContext`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES ('SampleApp', 'default', 'application', 'default', 1, 0, 0, '{}', 'apollo', 'apollo'); INSERT INTO `ReleaseMessage` (`Message`) VALUES ('SampleApp+default+application'); /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-common/src/main/resources/banner.txt
_ _ _ / \ _ __ ___ | | | ___ / _ \ | '_ \ / _ \| | |/ _ \ / ___ \| |_) | (_) | | | (_) | /_/ \_\ .__/ \___/|_|_|\___/ |_| :: Spring Boot :: ${spring-boot.formatted-version}
_ _ _ / \ _ __ ___ | | | ___ / _ \ | '_ \ / _ \| | |/ _ \ / ___ \| |_) | (_) | | | (_) | /_/ \_\ .__/ \___/|_|_|\___/ |_| :: Spring Boot :: ${spring-boot.formatted-version}
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./scripts/apollo-on-kubernetes/kubernetes/apollo-env-test-alpha/service-mysql-for-apollo-test-alpha-env.yaml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --- kind: Service apiVersion: v1 metadata: namespace: sre name: service-mysql-for-apollo-test-alpha-env labels: app: service-mysql-for-apollo-test-alpha-env spec: ports: - protocol: TCP port: 3306 targetPort: 3306 type: ClusterIP sessionAffinity: None --- kind: Endpoints apiVersion: v1 metadata: namespace: sre name: service-mysql-for-apollo-test-alpha-env subsets: - addresses: - ip: your-mysql-addresses ports: - protocol: TCP port: 3306
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --- kind: Service apiVersion: v1 metadata: namespace: sre name: service-mysql-for-apollo-test-alpha-env labels: app: service-mysql-for-apollo-test-alpha-env spec: ports: - protocol: TCP port: 3306 targetPort: 3306 type: ClusterIP sessionAffinity: None --- kind: Endpoints apiVersion: v1 metadata: namespace: sre name: service-mysql-for-apollo-test-alpha-env subsets: - addresses: - ip: your-mysql-addresses ports: - protocol: TCP port: 3306
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-core/src/main/resources/META-INF/services/com.ctrip.framework.apollo.core.spi.MetaServerProvider
com.ctrip.framework.apollo.core.internals.LegacyMetaServerProvider
com.ctrip.framework.apollo.core.internals.LegacyMetaServerProvider
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/resources/static/scripts/directive/rollback-modal-directive.js
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ directive_module.directive('rollbackmodal', rollbackModalDirective); function rollbackModalDirective($translate, AppUtil, EventManager, ReleaseService, toastr) { return { restrict: 'E', templateUrl: AppUtil.prefixPath() + '/views/component/rollback-modal.html', transclude: true, replace: true, scope: { appId: '=', env: '=', cluster: '=' }, link: function (scope) { scope.isRollbackTo = false; scope.showRollbackAlertDialog = showRollbackAlertDialog; EventManager.subscribe(EventManager.EventType.PRE_ROLLBACK_NAMESPACE, function (context) { if (context.toReleaseId) { preRollbackTo(context.namespace, context.toReleaseId); } else { preRollback(context.namespace); } }); EventManager.subscribe(EventManager.EventType.ROLLBACK_NAMESPACE, function (context) { if (context.toReleaseId) { rollbackTo(context.toReleaseId); } else { rollback(); } }); function preRollback(namespace) { scope.toRollbackNamespace = namespace; //load latest two active releases ReleaseService.findActiveReleases(scope.appId, scope.env, scope.cluster, scope.toRollbackNamespace.baseInfo.namespaceName, 0, 2) .then(function (result) { if (result.length <= 1) { toastr.error($translate.instant('Rollback.NoRollbackList')); return; } scope.toRollbackNamespace.firstRelease = result[0]; scope.toRollbackNamespace.secondRelease = result[1]; ReleaseService.compare(scope.env, scope.toRollbackNamespace.firstRelease.id, scope.toRollbackNamespace.secondRelease.id) .then(function (result) { scope.toRollbackNamespace.releaseCompareResult = result.changes; AppUtil.showModal('#rollbackModal'); }) }); } function preRollbackTo(namespace, toReleaseId) { scope.isRollbackTo = true; scope.toRollbackNamespace = namespace; scope.toRollbackNamespace.isPropertiesFormat = namespace.format == 'properties'; ReleaseService.findLatestActiveRelease(scope.appId, scope.env, namespace.baseInfo.clusterName, namespace.baseInfo.namespaceName) .then(function (result) { if (!result) { toastr.error($translate.instant('Rollback.NoRollbackList')); return; } scope.toRollbackNamespace.firstRelease = result; ReleaseService.get(scope.env, toReleaseId) .then(function (result) { scope.toRollbackNamespace.secondRelease = result; if (scope.toRollbackNamespace.firstRelease.id == scope.toRollbackNamespace.secondRelease.id) { toastr.error($translate.instant('Rollback.SameAsCurrentRelease')); return; } ReleaseService.compare(scope.env, scope.toRollbackNamespace.firstRelease.id, scope.toRollbackNamespace.secondRelease.id) .then(function (result) { scope.toRollbackNamespace.releaseCompareResult = result.changes; AppUtil.showModal('#rollbackModal'); }) }) }) } function rollback() { scope.toRollbackNamespace.rollbackBtnDisabled = true; ReleaseService.rollback(scope.env, scope.toRollbackNamespace.firstRelease.id) .then(function (result) { toastr.success($translate.instant('Rollback.RollbackSuccessfully')); scope.toRollbackNamespace.rollbackBtnDisabled = false; AppUtil.hideModal('#rollbackModal'); EventManager.emit(EventManager.EventType.REFRESH_NAMESPACE, { namespace: scope.toRollbackNamespace }); }, function (result) { scope.toRollbackNamespace.rollbackBtnDisabled = false; AppUtil.showErrorMsg(result, $translate.instant('Rollback.RollbackFailed')); }) } function rollbackTo(toReleaseId) { scope.toRollbackNamespace.rollbackBtnDisabled = true; ReleaseService.rollbackTo(scope.env, scope.toRollbackNamespace.firstRelease.id, toReleaseId ) .then(function (result) { toastr.success($translate.instant('Rollback.RollbackSuccessfully')); scope.toRollbackNamespace.rollbackBtnDisabled = false; AppUtil.hideModal('#rollbackModal'); EventManager.emit(EventManager.EventType.REFRESH_RELEASE_HISTORY, {releaseId: toReleaseId}); }, function (result) { scope.toRollbackNamespace.rollbackBtnDisabled = false; AppUtil.showErrorMsg(result, $translate.instant('Rollback.RollbackFailed')); }) } function showRollbackAlertDialog() { AppUtil.hideModal("#rollbackModal"); AppUtil.showModal("#rollbackAlertDialog"); } } } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ directive_module.directive('rollbackmodal', rollbackModalDirective); function rollbackModalDirective($translate, AppUtil, EventManager, ReleaseService, toastr) { return { restrict: 'E', templateUrl: AppUtil.prefixPath() + '/views/component/rollback-modal.html', transclude: true, replace: true, scope: { appId: '=', env: '=', cluster: '=' }, link: function (scope) { scope.isRollbackTo = false; scope.showRollbackAlertDialog = showRollbackAlertDialog; EventManager.subscribe(EventManager.EventType.PRE_ROLLBACK_NAMESPACE, function (context) { if (context.toReleaseId) { preRollbackTo(context.namespace, context.toReleaseId); } else { preRollback(context.namespace); } }); EventManager.subscribe(EventManager.EventType.ROLLBACK_NAMESPACE, function (context) { if (context.toReleaseId) { rollbackTo(context.toReleaseId); } else { rollback(); } }); function preRollback(namespace) { scope.toRollbackNamespace = namespace; //load latest two active releases ReleaseService.findActiveReleases(scope.appId, scope.env, scope.cluster, scope.toRollbackNamespace.baseInfo.namespaceName, 0, 2) .then(function (result) { if (result.length <= 1) { toastr.error($translate.instant('Rollback.NoRollbackList')); return; } scope.toRollbackNamespace.firstRelease = result[0]; scope.toRollbackNamespace.secondRelease = result[1]; ReleaseService.compare(scope.env, scope.toRollbackNamespace.firstRelease.id, scope.toRollbackNamespace.secondRelease.id) .then(function (result) { scope.toRollbackNamespace.releaseCompareResult = result.changes; AppUtil.showModal('#rollbackModal'); }) }); } function preRollbackTo(namespace, toReleaseId) { scope.isRollbackTo = true; scope.toRollbackNamespace = namespace; scope.toRollbackNamespace.isPropertiesFormat = namespace.format == 'properties'; ReleaseService.findLatestActiveRelease(scope.appId, scope.env, namespace.baseInfo.clusterName, namespace.baseInfo.namespaceName) .then(function (result) { if (!result) { toastr.error($translate.instant('Rollback.NoRollbackList')); return; } scope.toRollbackNamespace.firstRelease = result; ReleaseService.get(scope.env, toReleaseId) .then(function (result) { scope.toRollbackNamespace.secondRelease = result; if (scope.toRollbackNamespace.firstRelease.id == scope.toRollbackNamespace.secondRelease.id) { toastr.error($translate.instant('Rollback.SameAsCurrentRelease')); return; } ReleaseService.compare(scope.env, scope.toRollbackNamespace.firstRelease.id, scope.toRollbackNamespace.secondRelease.id) .then(function (result) { scope.toRollbackNamespace.releaseCompareResult = result.changes; AppUtil.showModal('#rollbackModal'); }) }) }) } function rollback() { scope.toRollbackNamespace.rollbackBtnDisabled = true; ReleaseService.rollback(scope.env, scope.toRollbackNamespace.firstRelease.id) .then(function (result) { toastr.success($translate.instant('Rollback.RollbackSuccessfully')); scope.toRollbackNamespace.rollbackBtnDisabled = false; AppUtil.hideModal('#rollbackModal'); EventManager.emit(EventManager.EventType.REFRESH_NAMESPACE, { namespace: scope.toRollbackNamespace }); }, function (result) { scope.toRollbackNamespace.rollbackBtnDisabled = false; AppUtil.showErrorMsg(result, $translate.instant('Rollback.RollbackFailed')); }) } function rollbackTo(toReleaseId) { scope.toRollbackNamespace.rollbackBtnDisabled = true; ReleaseService.rollbackTo(scope.env, scope.toRollbackNamespace.firstRelease.id, toReleaseId ) .then(function (result) { toastr.success($translate.instant('Rollback.RollbackSuccessfully')); scope.toRollbackNamespace.rollbackBtnDisabled = false; AppUtil.hideModal('#rollbackModal'); EventManager.emit(EventManager.EventType.REFRESH_RELEASE_HISTORY, {releaseId: toReleaseId}); }, function (result) { scope.toRollbackNamespace.rollbackBtnDisabled = false; AppUtil.showErrorMsg(result, $translate.instant('Rollback.RollbackFailed')); }) } function showRollbackAlertDialog() { AppUtil.hideModal("#rollbackModal"); AppUtil.showModal("#rollbackAlertDialog"); } } } }
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/EmailService.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal.spi; import com.ctrip.framework.apollo.portal.entity.bo.Email; public interface EmailService { void send(Email email); }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal.spi; import com.ctrip.framework.apollo.portal.entity.bo.Email; public interface EmailService { void send(Email email); }
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/message/MessageSender.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.biz.message; /** * @author Jason Song(song_s@ctrip.com) */ public interface MessageSender { void sendMessage(String message, String channel); }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.biz.message; /** * @author Jason Song(song_s@ctrip.com) */ public interface MessageSender { void sendMessage(String message, String channel); }
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/resources/static/system-role-manage.html
<!-- ~ Copyright 2021 Apollo Authors ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ --> <!doctype html> <html ng-app="systemRole"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="icon" href="img/config.png"> <!-- styles --> <link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="vendor/angular/angular-toastr-1.4.1.min.css"> <link rel="stylesheet" type="text/css" media='all' href="vendor/angular/loading-bar.min.css"> <link rel="stylesheet" type="text/css" href="styles/common-style.css"> <link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css"> <title>{{'SystemRole.Title' | translate }}</title> </head> <body> <apollonav></apollonav> <div class="container-fluid" ng-controller="SystemRoleController"> <div class="col-md-10 col-md-offset-1 panel"> <section class="panel-body" ng-show="isRootUser"> <section class="row"> <h5>{{'SystemRole.AddCreateAppRoleToUser' | translate }} <small> {{'SystemRole.AddCreateAppRoleToUserTips' | translate }} </small> </h5> <hr> <div class="row"> <div class="form-horizontal"> <div class="form-group"> <label class="col-sm-2 control-label">{{'SystemRole.ChooseUser' | translate }}<br></label> <div class="col-sm-8"> <form class="form-inline" ng-submit="addCreateApplicationRoleToUser()"> <div class="form-group"> <apollouserselector apollo-id="modifySystemRoleWidgetId"> </apollouserselector> </div> <button type="submit" class="btn btn-default" style="margin-left: 20px;">{{'SystemRole.Add' | translate }}</button> </form> <div class="item-container"> <h5>{{'SystemRole.AuthorizedUser' | translate }}</h5> <div class="btn-group item-info" ng-repeat="user in hasCreateApplicationPermissionUserList"> <button type="button" class="btn btn-default" ng-bind="user"></button> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" ng-click="deleteCreateApplicationRoleFromUser(user)"> <span class="glyphicon glyphicon-remove"></span> </button> </div> </div> </div> </div> </div> </div> </section> <section class="row"> <h5>{{'SystemRole.ModifyAppAdminUser' | translate }} <small> {{'SystemRole.ModifyAppAdminUserTips' | translate }} </small> </h5> <hr> <form class="form-horizontal"> <div class="form-group" valdr-form-group> <label class="col-sm-2 control-label"> <apollorequiredfield></apollorequiredfield> {{'SystemRole.AppIdTips' | translate }} </label> <div class="col-sm-5"> <input type="text" class="form-control" ng-model="app.appId"> <small>{{'SystemRole.Title' | translate }}</small> </div> <div class="col-sm-1"> <button class="btn btn-info" ng-click="getAppInfo()">{{'Common.Search' | translate }}</button> </div> </div> <div class="form-group" valdr-form-group> <label class="col-sm-2 control-label"> {{'SystemRole.AppInfo' | translate }}</label> <div class="col-sm-5"> <h5 ng-show="app.info" ng-bind="app.info"></h5> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label">{{'SystemRole.ChooseUser' | translate }}<br></label> <div class="col-sm-8"> <form class="form-inline"> <div class="form-group"> <apollouserselector apollo-id="modifyManageAppMasterRoleWidgetId"> </apollouserselector> </div> </form> </div> </div> <div class="form-group"> <div class="col-sm-offset-2 col-sm-9"> <button type="submit" class="btn btn-primary" ng-disabled="operateManageAppMasterRoleBtn" ng-click="allowAppMasterAssignRole()"> {{'SystemRole.AllowAppMasterAssignRole' | translate }} </button> <button type="submit" class="btn btn-primary" ng-disabled="operateManageAppMasterRoleBtn" ng-click="deleteAppMasterAssignRole()"> {{'SystemRole.DeleteAppMasterAssignRole' | translate }} </button> </div> </div> </form> </section> </section> <section class="panel-body text-center" ng-if="!isRootUser"> <h4>{{'Common.IsRootUser' | translate }}</h4> </section> </div> </div> <div ng-include="'views/common/footer.html'"></div> <!-- jquery.js --> <script src="vendor/jquery.min.js" type="text/javascript"></script> <!--angular--> <script src="vendor/angular/angular.min.js"></script> <script src="vendor/angular/angular-route.min.js"></script> <script src="vendor/angular/angular-resource.min.js"></script> <script src="vendor/angular/angular-toastr-1.4.1.tpls.min.js"></script> <script src="vendor/angular/loading-bar.min.js"></script> <script src="vendor/angular/angular-cookies.min.js"></script> <script src="vendor/angular/angular-translate.2.18.1/angular-translate.min.js"></script> <script src="vendor/angular/angular-translate.2.18.1/angular-translate-loader-static-files.min.js"></script> <script src="vendor/angular/angular-translate.2.18.1/angular-translate-storage-cookie.min.js"></script> <!--valdr--> <script src="vendor/valdr/valdr.min.js" type="text/javascript"></script> <script src="vendor/valdr/valdr-message.min.js" type="text/javascript"></script> <!-- bootstrap.js --> <script src="vendor/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> <script src="vendor/lodash.min.js"></script> <script src="vendor/select2/select2.min.js" type="text/javascript"></script> <!--biz--> <!--must import--> <script type="application/javascript" src="scripts/app.js"></script> <script type="application/javascript" src="scripts/services/AppService.js"></script> <script type="application/javascript" src="scripts/services/EnvService.js"></script> <script type="application/javascript" src="scripts/services/UserService.js"></script> <script type="application/javascript" src="scripts/services/CommonService.js"></script> <script type="application/javascript" src="scripts/services/PermissionService.js"></script> <script type="application/javascript" src="scripts/services/ClusterService.js"></script> <script type="application/javascript" src="scripts/services/NamespaceService.js"></script> <script type="application/javascript" src="scripts/services/SystemRoleService.js"></script> <script type="application/javascript" src="scripts/AppUtils.js"></script> <script type="application/javascript" src="scripts/PageCommon.js"></script> <script type="application/javascript" src="scripts/directive/directive.js"></script> <script type="application/javascript" src="scripts/valdr.js"></script> <script type="application/javascript" src="scripts/controller/role/SystemRoleController.js"></script> </body> </html>
<!-- ~ Copyright 2021 Apollo Authors ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. ~ --> <!doctype html> <html ng-app="systemRole"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="icon" href="img/config.png"> <!-- styles --> <link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="vendor/angular/angular-toastr-1.4.1.min.css"> <link rel="stylesheet" type="text/css" media='all' href="vendor/angular/loading-bar.min.css"> <link rel="stylesheet" type="text/css" href="styles/common-style.css"> <link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css"> <title>{{'SystemRole.Title' | translate }}</title> </head> <body> <apollonav></apollonav> <div class="container-fluid" ng-controller="SystemRoleController"> <div class="col-md-10 col-md-offset-1 panel"> <section class="panel-body" ng-show="isRootUser"> <section class="row"> <h5>{{'SystemRole.AddCreateAppRoleToUser' | translate }} <small> {{'SystemRole.AddCreateAppRoleToUserTips' | translate }} </small> </h5> <hr> <div class="row"> <div class="form-horizontal"> <div class="form-group"> <label class="col-sm-2 control-label">{{'SystemRole.ChooseUser' | translate }}<br></label> <div class="col-sm-8"> <form class="form-inline" ng-submit="addCreateApplicationRoleToUser()"> <div class="form-group"> <apollouserselector apollo-id="modifySystemRoleWidgetId"> </apollouserselector> </div> <button type="submit" class="btn btn-default" style="margin-left: 20px;">{{'SystemRole.Add' | translate }}</button> </form> <div class="item-container"> <h5>{{'SystemRole.AuthorizedUser' | translate }}</h5> <div class="btn-group item-info" ng-repeat="user in hasCreateApplicationPermissionUserList"> <button type="button" class="btn btn-default" ng-bind="user"></button> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" ng-click="deleteCreateApplicationRoleFromUser(user)"> <span class="glyphicon glyphicon-remove"></span> </button> </div> </div> </div> </div> </div> </div> </section> <section class="row"> <h5>{{'SystemRole.ModifyAppAdminUser' | translate }} <small> {{'SystemRole.ModifyAppAdminUserTips' | translate }} </small> </h5> <hr> <form class="form-horizontal"> <div class="form-group" valdr-form-group> <label class="col-sm-2 control-label"> <apollorequiredfield></apollorequiredfield> {{'SystemRole.AppIdTips' | translate }} </label> <div class="col-sm-5"> <input type="text" class="form-control" ng-model="app.appId"> <small>{{'SystemRole.Title' | translate }}</small> </div> <div class="col-sm-1"> <button class="btn btn-info" ng-click="getAppInfo()">{{'Common.Search' | translate }}</button> </div> </div> <div class="form-group" valdr-form-group> <label class="col-sm-2 control-label"> {{'SystemRole.AppInfo' | translate }}</label> <div class="col-sm-5"> <h5 ng-show="app.info" ng-bind="app.info"></h5> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label">{{'SystemRole.ChooseUser' | translate }}<br></label> <div class="col-sm-8"> <form class="form-inline"> <div class="form-group"> <apollouserselector apollo-id="modifyManageAppMasterRoleWidgetId"> </apollouserselector> </div> </form> </div> </div> <div class="form-group"> <div class="col-sm-offset-2 col-sm-9"> <button type="submit" class="btn btn-primary" ng-disabled="operateManageAppMasterRoleBtn" ng-click="allowAppMasterAssignRole()"> {{'SystemRole.AllowAppMasterAssignRole' | translate }} </button> <button type="submit" class="btn btn-primary" ng-disabled="operateManageAppMasterRoleBtn" ng-click="deleteAppMasterAssignRole()"> {{'SystemRole.DeleteAppMasterAssignRole' | translate }} </button> </div> </div> </form> </section> </section> <section class="panel-body text-center" ng-if="!isRootUser"> <h4>{{'Common.IsRootUser' | translate }}</h4> </section> </div> </div> <div ng-include="'views/common/footer.html'"></div> <!-- jquery.js --> <script src="vendor/jquery.min.js" type="text/javascript"></script> <!--angular--> <script src="vendor/angular/angular.min.js"></script> <script src="vendor/angular/angular-route.min.js"></script> <script src="vendor/angular/angular-resource.min.js"></script> <script src="vendor/angular/angular-toastr-1.4.1.tpls.min.js"></script> <script src="vendor/angular/loading-bar.min.js"></script> <script src="vendor/angular/angular-cookies.min.js"></script> <script src="vendor/angular/angular-translate.2.18.1/angular-translate.min.js"></script> <script src="vendor/angular/angular-translate.2.18.1/angular-translate-loader-static-files.min.js"></script> <script src="vendor/angular/angular-translate.2.18.1/angular-translate-storage-cookie.min.js"></script> <!--valdr--> <script src="vendor/valdr/valdr.min.js" type="text/javascript"></script> <script src="vendor/valdr/valdr-message.min.js" type="text/javascript"></script> <!-- bootstrap.js --> <script src="vendor/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> <script src="vendor/lodash.min.js"></script> <script src="vendor/select2/select2.min.js" type="text/javascript"></script> <!--biz--> <!--must import--> <script type="application/javascript" src="scripts/app.js"></script> <script type="application/javascript" src="scripts/services/AppService.js"></script> <script type="application/javascript" src="scripts/services/EnvService.js"></script> <script type="application/javascript" src="scripts/services/UserService.js"></script> <script type="application/javascript" src="scripts/services/CommonService.js"></script> <script type="application/javascript" src="scripts/services/PermissionService.js"></script> <script type="application/javascript" src="scripts/services/ClusterService.js"></script> <script type="application/javascript" src="scripts/services/NamespaceService.js"></script> <script type="application/javascript" src="scripts/services/SystemRoleService.js"></script> <script type="application/javascript" src="scripts/AppUtils.js"></script> <script type="application/javascript" src="scripts/PageCommon.js"></script> <script type="application/javascript" src="scripts/directive/directive.js"></script> <script type="application/javascript" src="scripts/valdr.js"></script> <script type="application/javascript" src="scripts/controller/role/SystemRoleController.js"></script> </body> </html>
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-openapi/src/main/java/com/ctrip/framework/apollo/openapi/dto/OpenClusterDTO.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.openapi.dto; public class OpenClusterDTO extends BaseDTO { private String name; private String appId; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAppId() { return appId; } public void setAppId(String appId) { this.appId = appId; } @Override public String toString() { return "OpenClusterDTO{" + "name='" + name + '\'' + ", appId='" + appId + '\'' + ", dataChangeCreatedBy='" + dataChangeCreatedBy + '\'' + ", dataChangeLastModifiedBy='" + dataChangeLastModifiedBy + '\'' + ", dataChangeCreatedTime=" + dataChangeCreatedTime + ", dataChangeLastModifiedTime=" + dataChangeLastModifiedTime + '}'; } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.openapi.dto; public class OpenClusterDTO extends BaseDTO { private String name; private String appId; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAppId() { return appId; } public void setAppId(String appId) { this.appId = appId; } @Override public String toString() { return "OpenClusterDTO{" + "name='" + name + '\'' + ", appId='" + appId + '\'' + ", dataChangeCreatedBy='" + dataChangeCreatedBy + '\'' + ", dataChangeLastModifiedBy='" + dataChangeLastModifiedBy + '\'' + ", dataChangeCreatedTime=" + dataChangeCreatedTime + ", dataChangeLastModifiedTime=" + dataChangeLastModifiedTime + '}'; } }
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/resources/static/scripts/directive/item-modal-directive.js
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ directive_module.directive('itemmodal', itemModalDirective); function itemModalDirective($translate, toastr, $sce, AppUtil, EventManager, ConfigService) { return { restrict: 'E', templateUrl: AppUtil.prefixPath() + '/views/component/item-modal.html', transclude: true, replace: true, scope: { appId: '=', env: '=', cluster: '=', toOperationNamespace: '=', item: '=' }, link: function (scope) { var TABLE_VIEW_OPER_TYPE = { CREATE: 'create', UPDATE: 'update' }; scope.doItem = doItem; scope.collectSelectedClusters = collectSelectedClusters; scope.showHiddenChars = showHiddenChars; $('#itemModal').on('show.bs.modal', function (e) { scope.showHiddenCharsContext = false; scope.hiddenCharCounter = 0; scope.valueWithHiddenChars = $sce.trustAsHtml(''); }); $("#valueEditor").textareafullscreen(); function doItem() { if (!scope.item.value) { scope.item.value = ""; } if (scope.item.tableViewOperType == TABLE_VIEW_OPER_TYPE.CREATE) { //check key unique var hasRepeatKey = false; scope.toOperationNamespace.items.forEach(function (item) { if (!item.isDeleted && scope.item.key == item.item.key) { toastr.error($translate.instant('ItemModal.KeyExists', { key: scope.item.key })); hasRepeatKey = true; } }); if (hasRepeatKey) { return; } scope.item.addItemBtnDisabled = true; if (scope.toOperationNamespace.isBranch) { ConfigService.create_item(scope.appId, scope.env, scope.toOperationNamespace.baseInfo.clusterName, scope.toOperationNamespace.baseInfo.namespaceName, scope.item).then( function (result) { toastr.success($translate.instant('ItemModal.AddedTips')); scope.item.addItemBtnDisabled = false; AppUtil.hideModal('#itemModal'); EventManager.emit(EventManager.EventType.REFRESH_NAMESPACE, { namespace: scope.toOperationNamespace }); }, function (result) { toastr.error(AppUtil.errorMsg(result), $translate.instant('ItemModal.AddFailed')); scope.item.addItemBtnDisabled = false; }); } else { if (selectedClusters.length == 0) { toastr.error($translate.instant('ItemModal.PleaseChooseCluster')); scope.item.addItemBtnDisabled = false; return; } selectedClusters.forEach(function (cluster) { ConfigService.create_item(scope.appId, cluster.env, cluster.name, scope.toOperationNamespace.baseInfo.namespaceName, scope.item).then( function (result) { scope.item.addItemBtnDisabled = false; AppUtil.hideModal('#itemModal'); toastr.success(cluster.env + " , " + scope.item.key, $translate.instant('ItemModal.AddedTips')); if (cluster.env == scope.env && cluster.name == scope.cluster) { EventManager.emit(EventManager.EventType.REFRESH_NAMESPACE, { namespace: scope.toOperationNamespace }); } }, function (result) { toastr.error(AppUtil.errorMsg(result), $translate.instant('ItemModal.AddFailed')); scope.item.addItemBtnDisabled = false; }); }); } } else { if (!scope.item.comment) { scope.item.comment = ""; } ConfigService.update_item(scope.appId, scope.env, scope.toOperationNamespace.baseInfo.clusterName, scope.toOperationNamespace.baseInfo.namespaceName, scope.item).then( function (result) { EventManager.emit(EventManager.EventType.REFRESH_NAMESPACE, { namespace: scope.toOperationNamespace }); AppUtil.hideModal('#itemModal'); toastr.success($translate.instant('ItemModal.ModifiedTips')); }, function (result) { toastr.error(AppUtil.errorMsg(result), $translate.instant('ItemModal.ModifyFailed')); }); } } var selectedClusters = []; function collectSelectedClusters(data) { selectedClusters = data; } function showHiddenChars() { var value = scope.item.value; if (!value) { return; } var hiddenCharCounter = 0, valueWithHiddenChars = _.escape(value); for (var i = 0; i < value.length; i++) { var c = value[i]; if (isHiddenChar(c)) { valueWithHiddenChars = valueWithHiddenChars.replace(c, viewHiddenChar); hiddenCharCounter++; } } scope.showHiddenCharsContext = true; scope.hiddenCharCounter = hiddenCharCounter; scope.valueWithHiddenChars = $sce.trustAsHtml(valueWithHiddenChars); } function isHiddenChar(c) { return c == '\t' || c == '\n' || c == ' '; } function viewHiddenChar(c) { if (c == '\t') { return '<mark>#' + $translate.instant('ItemModal.Tabs') + '#</mark>'; } else if (c == '\n') { return '<mark>#' + $translate.instant('ItemModal.NewLine') + '#</mark>'; } else if (c == ' ') { return '<mark>#' + $translate.instant('ItemModal.Space') + '#</mark>'; } } } } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ directive_module.directive('itemmodal', itemModalDirective); function itemModalDirective($translate, toastr, $sce, AppUtil, EventManager, ConfigService) { return { restrict: 'E', templateUrl: AppUtil.prefixPath() + '/views/component/item-modal.html', transclude: true, replace: true, scope: { appId: '=', env: '=', cluster: '=', toOperationNamespace: '=', item: '=' }, link: function (scope) { var TABLE_VIEW_OPER_TYPE = { CREATE: 'create', UPDATE: 'update' }; scope.doItem = doItem; scope.collectSelectedClusters = collectSelectedClusters; scope.showHiddenChars = showHiddenChars; $('#itemModal').on('show.bs.modal', function (e) { scope.showHiddenCharsContext = false; scope.hiddenCharCounter = 0; scope.valueWithHiddenChars = $sce.trustAsHtml(''); }); $("#valueEditor").textareafullscreen(); function doItem() { if (!scope.item.value) { scope.item.value = ""; } if (scope.item.tableViewOperType == TABLE_VIEW_OPER_TYPE.CREATE) { //check key unique var hasRepeatKey = false; scope.toOperationNamespace.items.forEach(function (item) { if (!item.isDeleted && scope.item.key == item.item.key) { toastr.error($translate.instant('ItemModal.KeyExists', { key: scope.item.key })); hasRepeatKey = true; } }); if (hasRepeatKey) { return; } scope.item.addItemBtnDisabled = true; if (scope.toOperationNamespace.isBranch) { ConfigService.create_item(scope.appId, scope.env, scope.toOperationNamespace.baseInfo.clusterName, scope.toOperationNamespace.baseInfo.namespaceName, scope.item).then( function (result) { toastr.success($translate.instant('ItemModal.AddedTips')); scope.item.addItemBtnDisabled = false; AppUtil.hideModal('#itemModal'); EventManager.emit(EventManager.EventType.REFRESH_NAMESPACE, { namespace: scope.toOperationNamespace }); }, function (result) { toastr.error(AppUtil.errorMsg(result), $translate.instant('ItemModal.AddFailed')); scope.item.addItemBtnDisabled = false; }); } else { if (selectedClusters.length == 0) { toastr.error($translate.instant('ItemModal.PleaseChooseCluster')); scope.item.addItemBtnDisabled = false; return; } selectedClusters.forEach(function (cluster) { ConfigService.create_item(scope.appId, cluster.env, cluster.name, scope.toOperationNamespace.baseInfo.namespaceName, scope.item).then( function (result) { scope.item.addItemBtnDisabled = false; AppUtil.hideModal('#itemModal'); toastr.success(cluster.env + " , " + scope.item.key, $translate.instant('ItemModal.AddedTips')); if (cluster.env == scope.env && cluster.name == scope.cluster) { EventManager.emit(EventManager.EventType.REFRESH_NAMESPACE, { namespace: scope.toOperationNamespace }); } }, function (result) { toastr.error(AppUtil.errorMsg(result), $translate.instant('ItemModal.AddFailed')); scope.item.addItemBtnDisabled = false; }); }); } } else { if (!scope.item.comment) { scope.item.comment = ""; } ConfigService.update_item(scope.appId, scope.env, scope.toOperationNamespace.baseInfo.clusterName, scope.toOperationNamespace.baseInfo.namespaceName, scope.item).then( function (result) { EventManager.emit(EventManager.EventType.REFRESH_NAMESPACE, { namespace: scope.toOperationNamespace }); AppUtil.hideModal('#itemModal'); toastr.success($translate.instant('ItemModal.ModifiedTips')); }, function (result) { toastr.error(AppUtil.errorMsg(result), $translate.instant('ItemModal.ModifyFailed')); }); } } var selectedClusters = []; function collectSelectedClusters(data) { selectedClusters = data; } function showHiddenChars() { var value = scope.item.value; if (!value) { return; } var hiddenCharCounter = 0, valueWithHiddenChars = _.escape(value); for (var i = 0; i < value.length; i++) { var c = value[i]; if (isHiddenChar(c)) { valueWithHiddenChars = valueWithHiddenChars.replace(c, viewHiddenChar); hiddenCharCounter++; } } scope.showHiddenCharsContext = true; scope.hiddenCharCounter = hiddenCharCounter; scope.valueWithHiddenChars = $sce.trustAsHtml(valueWithHiddenChars); } function isHiddenChar(c) { return c == '\t' || c == '\n' || c == ' '; } function viewHiddenChar(c) { if (c == '\t') { return '<mark>#' + $translate.instant('ItemModal.Tabs') + '#</mark>'; } else if (c == '\n') { return '<mark>#' + $translate.instant('ItemModal.NewLine') + '#</mark>'; } else if (c == ' ') { return '<mark>#' + $translate.instant('ItemModal.Space') + '#</mark>'; } } } } }
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/filter/AdminServiceAuthenticationFilter.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.adminservice.filter; import com.ctrip.framework.apollo.biz.config.BizConfig; import com.google.common.base.Splitter; import com.google.common.base.Strings; import java.io.IOException; import java.util.List; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpHeaders; public class AdminServiceAuthenticationFilter implements Filter { private static final Logger logger = LoggerFactory .getLogger(AdminServiceAuthenticationFilter.class); private static final Splitter ACCESS_TOKEN_SPLITTER = Splitter.on(",").omitEmptyStrings() .trimResults(); private final BizConfig bizConfig; private volatile String lastAccessTokens; private volatile List<String> accessTokenList; public AdminServiceAuthenticationFilter(BizConfig bizConfig) { this.bizConfig = bizConfig; } @Override public void init(FilterConfig filterConfig) throws ServletException { } @Override public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException { if (bizConfig.isAdminServiceAccessControlEnabled()) { HttpServletRequest request = (HttpServletRequest) req; HttpServletResponse response = (HttpServletResponse) resp; String token = request.getHeader(HttpHeaders.AUTHORIZATION); if (!checkAccessToken(token)) { logger.warn("Invalid access token: {} for uri: {}", token, request.getRequestURI()); response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized"); return; } } chain.doFilter(req, resp); } private boolean checkAccessToken(String token) { String accessTokens = bizConfig.getAdminServiceAccessTokens(); // if user forget to configure access tokens, then default to pass if (Strings.isNullOrEmpty(accessTokens)) { return true; } // no need to check if (Strings.isNullOrEmpty(token)) { return false; } // update cache if (!accessTokens.equals(lastAccessTokens)) { synchronized (this) { accessTokenList = ACCESS_TOKEN_SPLITTER.splitToList(accessTokens); lastAccessTokens = accessTokens; } } return accessTokenList.contains(token); } @Override public void destroy() { } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.adminservice.filter; import com.ctrip.framework.apollo.biz.config.BizConfig; import com.google.common.base.Splitter; import com.google.common.base.Strings; import java.io.IOException; import java.util.List; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpHeaders; public class AdminServiceAuthenticationFilter implements Filter { private static final Logger logger = LoggerFactory .getLogger(AdminServiceAuthenticationFilter.class); private static final Splitter ACCESS_TOKEN_SPLITTER = Splitter.on(",").omitEmptyStrings() .trimResults(); private final BizConfig bizConfig; private volatile String lastAccessTokens; private volatile List<String> accessTokenList; public AdminServiceAuthenticationFilter(BizConfig bizConfig) { this.bizConfig = bizConfig; } @Override public void init(FilterConfig filterConfig) throws ServletException { } @Override public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException { if (bizConfig.isAdminServiceAccessControlEnabled()) { HttpServletRequest request = (HttpServletRequest) req; HttpServletResponse response = (HttpServletResponse) resp; String token = request.getHeader(HttpHeaders.AUTHORIZATION); if (!checkAccessToken(token)) { logger.warn("Invalid access token: {} for uri: {}", token, request.getRequestURI()); response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized"); return; } } chain.doFilter(req, resp); } private boolean checkAccessToken(String token) { String accessTokens = bizConfig.getAdminServiceAccessTokens(); // if user forget to configure access tokens, then default to pass if (Strings.isNullOrEmpty(accessTokens)) { return true; } // no need to check if (Strings.isNullOrEmpty(token)) { return false; } // update cache if (!accessTokens.equals(lastAccessTokens)) { synchronized (this) { accessTokenList = ACCESS_TOKEN_SPLITTER.splitToList(accessTokens); lastAccessTokens = accessTokens; } } return accessTokenList.contains(token); } @Override public void destroy() { } }
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/CommitService.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal.service; import com.ctrip.framework.apollo.common.dto.CommitDTO; import com.ctrip.framework.apollo.portal.enricher.adapter.BaseDtoUserInfoEnrichedAdapter; import com.ctrip.framework.apollo.portal.environment.Env; import com.ctrip.framework.apollo.portal.api.AdminServiceAPI; import org.springframework.stereotype.Service; import java.util.List; @Service public class CommitService { private final AdminServiceAPI.CommitAPI commitAPI; private final AdditionalUserInfoEnrichService additionalUserInfoEnrichService; public CommitService(final AdminServiceAPI.CommitAPI commitAPI, AdditionalUserInfoEnrichService additionalUserInfoEnrichService) { this.commitAPI = commitAPI; this.additionalUserInfoEnrichService = additionalUserInfoEnrichService; } public List<CommitDTO> find(String appId, Env env, String clusterName, String namespaceName, int page, int size) { List<CommitDTO> dtoList = commitAPI.find(appId, env, clusterName, namespaceName, page, size); this.additionalUserInfoEnrichService.enrichAdditionalUserInfo(dtoList, BaseDtoUserInfoEnrichedAdapter::new); return dtoList; } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal.service; import com.ctrip.framework.apollo.common.dto.CommitDTO; import com.ctrip.framework.apollo.portal.enricher.adapter.BaseDtoUserInfoEnrichedAdapter; import com.ctrip.framework.apollo.portal.environment.Env; import com.ctrip.framework.apollo.portal.api.AdminServiceAPI; import org.springframework.stereotype.Service; import java.util.List; @Service public class CommitService { private final AdminServiceAPI.CommitAPI commitAPI; private final AdditionalUserInfoEnrichService additionalUserInfoEnrichService; public CommitService(final AdminServiceAPI.CommitAPI commitAPI, AdditionalUserInfoEnrichService additionalUserInfoEnrichService) { this.commitAPI = commitAPI; this.additionalUserInfoEnrichService = additionalUserInfoEnrichService; } public List<CommitDTO> find(String appId, Env env, String clusterName, String namespaceName, int page, int size) { List<CommitDTO> dtoList = commitAPI.find(appId, env, clusterName, namespaceName, page, size); this.additionalUserInfoEnrichService.enrichAdditionalUserInfo(dtoList, BaseDtoUserInfoEnrichedAdapter::new); return dtoList; } }
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/LdapProperties.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal.spi.configuration; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.core.env.Environment; import org.springframework.util.Assert; import org.springframework.util.ObjectUtils; import java.util.HashMap; import java.util.Map; /** * @author xm.lin xm.lin@anxincloud.com * @Description * @date 18-8-9 下午4:36 */ @ConfigurationProperties(prefix = "spring.ldap") public class LdapProperties { private static final int DEFAULT_PORT = 389; /** * LDAP URLs of the server. */ private String[] urls; /** * Base suffix from which all operations should originate. */ private String base; /** * Login username of the server. */ private String username; /** * Login password of the server. */ private String password; /** * Whether read-only operations should use an anonymous environment. */ private boolean anonymousReadOnly; /** * User search filter */ private String searchFilter; /** * LDAP specification settings. */ private final Map<String, String> baseEnvironment = new HashMap<>(); public String[] getUrls() { return this.urls; } public void setUrls(String[] urls) { this.urls = urls; } public String getBase() { return this.base; } public void setBase(String base) { this.base = base; } public String getUsername() { return this.username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return this.password; } public void setPassword(String password) { this.password = password; } public boolean getAnonymousReadOnly() { return this.anonymousReadOnly; } public void setAnonymousReadOnly(boolean anonymousReadOnly) { this.anonymousReadOnly = anonymousReadOnly; } public String getSearchFilter() { return searchFilter; } public void setSearchFilter(String searchFilter) { this.searchFilter = searchFilter; } public Map<String, String> getBaseEnvironment() { return this.baseEnvironment; } public String[] determineUrls(Environment environment) { if (ObjectUtils.isEmpty(this.urls)) { return new String[]{"ldap://localhost:" + determinePort(environment)}; } return this.urls; } private int determinePort(Environment environment) { Assert.notNull(environment, "Environment must not be null"); String localPort = environment.getProperty("local.ldap.port"); if (localPort != null) { return Integer.parseInt(localPort); } return DEFAULT_PORT; } }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.portal.spi.configuration; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.core.env.Environment; import org.springframework.util.Assert; import org.springframework.util.ObjectUtils; import java.util.HashMap; import java.util.Map; /** * @author xm.lin xm.lin@anxincloud.com * @Description * @date 18-8-9 下午4:36 */ @ConfigurationProperties(prefix = "spring.ldap") public class LdapProperties { private static final int DEFAULT_PORT = 389; /** * LDAP URLs of the server. */ private String[] urls; /** * Base suffix from which all operations should originate. */ private String base; /** * Login username of the server. */ private String username; /** * Login password of the server. */ private String password; /** * Whether read-only operations should use an anonymous environment. */ private boolean anonymousReadOnly; /** * User search filter */ private String searchFilter; /** * LDAP specification settings. */ private final Map<String, String> baseEnvironment = new HashMap<>(); public String[] getUrls() { return this.urls; } public void setUrls(String[] urls) { this.urls = urls; } public String getBase() { return this.base; } public void setBase(String base) { this.base = base; } public String getUsername() { return this.username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return this.password; } public void setPassword(String password) { this.password = password; } public boolean getAnonymousReadOnly() { return this.anonymousReadOnly; } public void setAnonymousReadOnly(boolean anonymousReadOnly) { this.anonymousReadOnly = anonymousReadOnly; } public String getSearchFilter() { return searchFilter; } public void setSearchFilter(String searchFilter) { this.searchFilter = searchFilter; } public Map<String, String> getBaseEnvironment() { return this.baseEnvironment; } public String[] determineUrls(Environment environment) { if (ObjectUtils.isEmpty(this.urls)) { return new String[]{"ldap://localhost:" + determinePort(environment)}; } return this.urls; } private int determinePort(Environment environment) { Assert.notNull(environment, "Environment must not be null"); String localPort = environment.getProperty("local.ldap.port"); if (localPort != null) { return Integer.parseInt(localPort); } return DEFAULT_PORT; } }
-1
apolloconfig/apollo
3,786
feature: shared session for multi apollo portal
## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
vdiskg
2021-06-24T12:21:54Z
2021-06-27T13:17:09Z
f1eca02f4033d050bd71ede288d1707954d3dea4
bf80850aab4f70647d6217fc6995588085b91719
feature: shared session for multi apollo portal. ## What's the purpose of this PR shared session for multi apollo portal ## Which issue(s) this PR fixes: Fixes #3672 ## Brief changelog add spring session support and configure the property `spring.session.store-type=none` on the `application.yml` as a default value ## How to use ### 1. No session data-store(dufault) clear all of the property `spring.session.store-type` on the `properties files(such as application-github.properties)`, `environment variables` and `system properties` ### 2. Redis backed sessions configure the properties `spring.session.store-type=redis`, `spring.redis.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` ### 3. JDBC backed sessions configure the properties `spring.session.store-type=jdbc`, `spring.datasource.*` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` configure the property `spring.session.jdbc.initialize-schema=always` on the `properties files(such as application-github.properties)`, `environment variables` or `system properties` to create the table automatically while first time startup and then configure the property `spring.session.jdbc.initialize-schema=never` ## Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything. - [x] Update the [`CHANGES` log](https://github.com/ctripcorp/apollo/blob/master/CHANGES.md).
./apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/ReleaseHistoryRepository.java
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.biz.repository; import com.ctrip.framework.apollo.biz.entity.ReleaseHistory; import java.util.Set; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.PagingAndSortingRepository; /** * @author Jason Song(song_s@ctrip.com) */ public interface ReleaseHistoryRepository extends PagingAndSortingRepository<ReleaseHistory, Long> { Page<ReleaseHistory> findByAppIdAndClusterNameAndNamespaceNameOrderByIdDesc(String appId, String clusterName, String namespaceName, Pageable pageable); Page<ReleaseHistory> findByReleaseIdAndOperationOrderByIdDesc(long releaseId, int operation, Pageable pageable); Page<ReleaseHistory> findByPreviousReleaseIdAndOperationOrderByIdDesc(long previousReleaseId, int operation, Pageable pageable); Page<ReleaseHistory> findByReleaseIdAndOperationInOrderByIdDesc(long releaseId, Set<Integer> operations, Pageable pageable); @Modifying @Query("update ReleaseHistory set isdeleted=1,DataChange_LastModifiedBy = ?4 where appId=?1 and clusterName=?2 and namespaceName = ?3") int batchDelete(String appId, String clusterName, String namespaceName, String operator); }
/* * Copyright 2021 Apollo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.ctrip.framework.apollo.biz.repository; import com.ctrip.framework.apollo.biz.entity.ReleaseHistory; import java.util.Set; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.PagingAndSortingRepository; /** * @author Jason Song(song_s@ctrip.com) */ public interface ReleaseHistoryRepository extends PagingAndSortingRepository<ReleaseHistory, Long> { Page<ReleaseHistory> findByAppIdAndClusterNameAndNamespaceNameOrderByIdDesc(String appId, String clusterName, String namespaceName, Pageable pageable); Page<ReleaseHistory> findByReleaseIdAndOperationOrderByIdDesc(long releaseId, int operation, Pageable pageable); Page<ReleaseHistory> findByPreviousReleaseIdAndOperationOrderByIdDesc(long previousReleaseId, int operation, Pageable pageable); Page<ReleaseHistory> findByReleaseIdAndOperationInOrderByIdDesc(long releaseId, Set<Integer> operations, Pageable pageable); @Modifying @Query("update ReleaseHistory set isdeleted=1,DataChange_LastModifiedBy = ?4 where appId=?1 and clusterName=?2 and namespaceName = ?3") int batchDelete(String appId, String clusterName, String namespaceName, String operator); }
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./.licenserc.yaml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # header: license: spdx-id: Apache-2.0 copyright-owner: Apollo Authors paths-ignore: - '.github/ISSUE_TEMPLATE' - '.github/PULL_REQUEST_TEMPLATE' - '**/.gitignore' - '**/.helmignore' - '.gitmodules' - '.gitattributes' - '.mvn' - '**/*.md' - '**/*.json' - '**/*.conf' - '**/*.ftl' - '**/*.iml' - '**/*.tpl' - '**/*.factories' - '**/*.handlers' - '**/*.schemas' - '**/*.nojekyll' - 'mvnw' - 'mvnw.cmd' - '**/target/**' - 'LICENSE' - 'NOTICE' - 'CNAME' - '**/resources/META-INF/services/**' - '**/vendor/**' - 'apollo-buildtools/src/main/resources/google_checks.xml' - 'apollo-core/src/test/resources/META-INF/app-with-utf8bom.properties' - 'apollo-core/src/test/resources/properties/server-with-utf8bom.properties' comment: on-failure license-location-threshold: 130
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # header: license: spdx-id: Apache-2.0 copyright-owner: Apollo Authors paths-ignore: - '.github/ISSUE_TEMPLATE' - '.github/PULL_REQUEST_TEMPLATE' - '**/.gitignore' - '**/.helmignore' - '.gitmodules' - '.gitattributes' - '.mvn' - '**/*.md' - '**/*.svg' - '**/*.json' - '**/*.conf' - '**/*.ftl' - '**/*.iml' - '**/*.tpl' - '**/*.factories' - '**/*.handlers' - '**/*.schemas' - '**/*.nojekyll' - 'mvnw' - 'mvnw.cmd' - '**/target/**' - 'LICENSE' - 'NOTICE' - 'CNAME' - '**/resources/META-INF/services/**' - '**/vendor/**' - 'apollo-buildtools/src/main/resources/google_checks.xml' - 'apollo-core/src/test/resources/META-INF/app-with-utf8bom.properties' - 'apollo-core/src/test/resources/properties/server-with-utf8bom.properties' comment: on-failure license-location-threshold: 130
1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./docs/en/_navbar.md
- Community - [Team](en/community/team.md) - [Community Governance](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md) - [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) - Translations - [:uk: English](/en/) - [:cn: 中文](/zh/)
- Community - [Team](en/community/team.md) - [Community Governance](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md) - [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) - [Acknowledgements](en/community/thank-you.md) - Translations - [:uk: English](/en/) - [:cn: 中文](/zh/)
1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./docs/en/_sidebar.md
- [**Home**](en/README.md) - [Releases](https://github.com/ctripcorp/apollo/releases) - Community - [Team](en/community/team.md) - [Community Governance](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md) - [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md)
- [**Home**](en/README.md) - [Releases](https://github.com/ctripcorp/apollo/releases) - Community - [Team](en/community/team.md) - [Community Governance](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md) - [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) - [Acknowledgements](en/community/thank-you.md)
1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./docs/zh/_navbar.md
- 社区 - [团队](zh/community/team.md) - [社区治理](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md) - [贡献指南](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) - Translations - [:uk: English](/en/) - [:cn: 中文](/zh/)
- 社区 - [团队](zh/community/team.md) - [社区治理](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md) - [贡献指南](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) - [致谢](zh/community/thank-you.md) - Translations - [:uk: English](/en/) - [:cn: 中文](/zh/)
1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./docs/zh/_sidebar.md
- [**首页**](zh/README.md) - 设计文档 - [Apollo配置中心设计](zh/design/apollo-design.md) - [Apollo配置中心介绍](zh/design/apollo-introduction.md) - [Apollo核心概念之“Namespace”](zh/design/apollo-core-concept-namespace.md) - [Apollo源码解析(全)](http://www.iocoder.cn/categories/Apollo/) - 部署文档 - [Quick Start](zh/deployment/quick-start.md) - [Docker方式部署Quick Start](zh/deployment/quick-start-docker.md) - [分布式部署指南](zh/deployment/distributed-deployment-guide.md) - 开发文档 - [Apollo开发指南](zh/development/apollo-development-guide.md) - Code Styles - [Eclipse Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/eclipse-java-google-style.xml) - [Intellij Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/intellij-java-google-style.xml) - [Portal实现用户登录功能](zh/development/portal-how-to-implement-user-login-function.md) - [Portal接入邮件服务](zh/development/portal-how-to-enable-email-service.md) - [Portal启用webhook通知](zh/development/portal-how-to-enable-webhook-notification.md) - 使用文档 - [Apollo使用指南](zh/usage/apollo-user-guide.md) - [Java客户端使用指南](zh/usage/java-sdk-user-guide.md) - [.Net客户端使用指南](zh/usage/dotnet-sdk-user-guide.md) - [Go、Python、NodeJS、PHP等客户端使用指南](zh/usage/third-party-sdks-user-guide.md) - [其它语言客户端接入指南](zh/usage/other-language-client-user-guide.md) - [Apollo开放平台接入指南](zh/usage/apollo-open-api-platform.md) - [Apollo使用场景和示例代码](https://github.com/ctripcorp/apollo-use-cases) - [Apollo实践案例](zh/usage/apollo-user-practices.md) - [Apollo安全相关最佳实践](zh/usage/apollo-user-guide?id=_71-%e5%ae%89%e5%85%a8%e7%9b%b8%e5%85%b3) - FAQ - [常见问题回答](zh/faq/faq.md) - [部署&开发遇到的常见问题](zh/faq/common-issues-in-deployment-and-development-phase.md) - 其它 - [版本历史](https://github.com/ctripcorp/apollo/releases) - [Apollo性能测试报告](zh/misc/apollo-benchmark.md) - 社区 - [团队](zh/community/team.md) - [社区治理](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md) - [贡献指南](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md)
- [**首页**](zh/README.md) - 设计文档 - [Apollo配置中心设计](zh/design/apollo-design.md) - [Apollo配置中心介绍](zh/design/apollo-introduction.md) - [Apollo核心概念之“Namespace”](zh/design/apollo-core-concept-namespace.md) - [Apollo源码解析(全)](http://www.iocoder.cn/categories/Apollo/) - 部署文档 - [Quick Start](zh/deployment/quick-start.md) - [Docker方式部署Quick Start](zh/deployment/quick-start-docker.md) - [分布式部署指南](zh/deployment/distributed-deployment-guide.md) - 开发文档 - [Apollo开发指南](zh/development/apollo-development-guide.md) - Code Styles - [Eclipse Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/eclipse-java-google-style.xml) - [Intellij Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/intellij-java-google-style.xml) - [Portal实现用户登录功能](zh/development/portal-how-to-implement-user-login-function.md) - [Portal接入邮件服务](zh/development/portal-how-to-enable-email-service.md) - [Portal启用webhook通知](zh/development/portal-how-to-enable-webhook-notification.md) - 使用文档 - [Apollo使用指南](zh/usage/apollo-user-guide.md) - [Java客户端使用指南](zh/usage/java-sdk-user-guide.md) - [.Net客户端使用指南](zh/usage/dotnet-sdk-user-guide.md) - [Go、Python、NodeJS、PHP等客户端使用指南](zh/usage/third-party-sdks-user-guide.md) - [其它语言客户端接入指南](zh/usage/other-language-client-user-guide.md) - [Apollo开放平台接入指南](zh/usage/apollo-open-api-platform.md) - [Apollo使用场景和示例代码](https://github.com/ctripcorp/apollo-use-cases) - [Apollo实践案例](zh/usage/apollo-user-practices.md) - [Apollo安全相关最佳实践](zh/usage/apollo-user-guide?id=_71-%e5%ae%89%e5%85%a8%e7%9b%b8%e5%85%b3) - FAQ - [常见问题回答](zh/faq/faq.md) - [部署&开发遇到的常见问题](zh/faq/common-issues-in-deployment-and-development-phase.md) - 其它 - [版本历史](https://github.com/ctripcorp/apollo/releases) - [Apollo性能测试报告](zh/misc/apollo-benchmark.md) - 社区 - [团队](zh/community/team.md) - [社区治理](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md) - [贡献指南](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) - [致谢](zh/community/thank-you.md)
1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./scripts/helm/apollo-portal/values.yaml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # name: apollo-portal fullNameOverride: "" replicaCount: 1 containerPort: 8070 image: repository: apolloconfig/apollo-portal tag: "" pullPolicy: IfNotPresent imagePullSecrets: [] service: fullNameOverride: "" port: 8070 targetPort: 8070 type: ClusterIP sessionAffinity: ClientIP ingress: enabled: false annotations: {} hosts: - host: "" paths: [] tls: [] liveness: initialDelaySeconds: 100 periodSeconds: 10 readiness: initialDelaySeconds: 30 periodSeconds: 5 # environment variables passed to the container, e.g. JAVA_OPTS env: {} strategy: {} resources: {} nodeSelector: {} tolerations: [] affinity: {} config: # spring profiles to activate profiles: "github,auth" # specify the env names, e.g. dev,pro envs: "" # specify the meta servers, e.g. # dev: http://apollo-configservice-dev:8080 # pro: http://apollo-configservice-pro:8080 metaServers: {} # specify the context path, e.g. /apollo contextPath: "" # extra config files for apollo-portal, e.g. application-ldap.yml files: {} portaldb: name: apollo-portaldb # apolloportaldb host host: port: 3306 dbName: ApolloPortalDB # apolloportaldb user name userName: # apolloportaldb password password: connectionStringProperties: characterEncoding=utf8 service: # whether to create a Service for this host or not enabled: false fullNameOverride: "" port: 3306 type: ClusterIP
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # name: apollo-portal fullNameOverride: "" replicaCount: 1 containerPort: 8070 image: repository: apolloconfig/apollo-portal tag: "" pullPolicy: IfNotPresent imagePullSecrets: [] service: fullNameOverride: "" port: 8070 targetPort: 8070 type: ClusterIP sessionAffinity: ClientIP ingress: enabled: false annotations: {} hosts: - host: "" paths: [] tls: [] liveness: initialDelaySeconds: 100 periodSeconds: 10 readiness: initialDelaySeconds: 30 periodSeconds: 5 # environment variables passed to the container, e.g. JAVA_OPTS env: {} strategy: {} resources: {} nodeSelector: {} tolerations: [] affinity: {} config: # spring profiles to activate profiles: "github,auth" # specify the env names, e.g. dev,pro envs: "" # specify the meta servers, e.g. # dev: http://apollo-configservice-dev:8080 # pro: http://apollo-configservice-pro:8080 metaServers: {} # specify the context path, e.g. /apollo contextPath: "" # extra config files for apollo-portal, e.g. application-ldap.yml files: {} portaldb: name: apollo-portaldb # apolloportaldb host host: port: 3306 dbName: ApolloPortalDB # apolloportaldb user name userName: # apolloportaldb password password: connectionStringProperties: characterEncoding=utf8 service: # whether to create a Service for this host or not enabled: false fullNameOverride: "" port: 3306 type: ClusterIP
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./docs/zh/development/portal-how-to-enable-email-service.md
在配置发布时候,我们希望发布信息邮件通知到相关的负责人。现支持发送邮件的动作有:普通发布、灰度发布、全量发布、回滚,通知对象包括:具有namespace编辑和发布权限的人员以及App负责人。 由于各公司的邮件服务往往有不同的实现,所以Apollo定义了一些SPI用来解耦,Apollo接入邮件服务的关键就是实现这些SPI。 ## 一、实现方式一:使用Apollo提供的smtp邮件服务 ### 1.1 接入步骤 在ApolloPortalDB.ServerConfig表配置以下参数,也可以通过管理员工具 - 系统参数页面进行配置,修改完一分钟实时生效。如下: * **email.enabled** 设置为true即可启用默认的smtp邮件服务 * **email.config.host** smtp的服务地址,如`smtp.163.com` * **email.config.user** smtp帐号用户名 * **email.config.password** smtp帐号密码 * **email.supported.envs** 支持发送邮件的环境列表,英文逗号隔开。我们不希望发布邮件变成用户的垃圾邮件,只有某些环境下的发布动作才会发送邮件。 * **email.sender** 邮件的发送人,可以不配置,默认为`email.config.user`。 * **apollo.portal.address** Apollo Portal的地址。方便用户从邮件点击跳转到Apollo Portal查看详细的发布信息。 * **email.template.framework** 邮件内容模板框架。将邮件内容模板化、可配置化,方便管理和变更邮件内容。 * **email.template.release.module.diff** 发布邮件的diff模块。 * **email.template.rollback.module.diff** 回滚邮件的diff模块。 * **email.template.release.module.rules** 灰度发布的灰度规则模块。 我们提供了[邮件模板样例](#三、邮件模板样例),方便大家使用。 ## 二、实现方式二:接入公司的统一邮件服务 和SSO类似,每个公司也有自己的邮件服务实现,所以我们相应的定义了[EmailService](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/EmailService.java)接口,现有两个实现类: 1. CtripEmailService:携程实现的EmailService 2. DefaultEmailService:smtp实现 ### 2.1 接入步骤 1. 提供自己公司的[EmailService](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/EmailService.java)实现,并在[EmailConfiguration](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/EmailConfiguration.java)中注册。 2. 在ApolloPortalDB.ServerConfig表配置以下参数,也可以通过管理员工具 - 系统参数页面进行配置,修改完一分钟实时生效。如下: * **email.supported.envs** 支持发送邮件的环境列表,英文逗号隔开。我们不希望发布邮件变成用户的垃圾邮件,只有某些环境下的发布动作才会发送邮件。 * **email.sender** 邮件的发送人。 * **apollo.portal.address** Apollo Portal的地址。方便用户从邮件点击跳转到Apollo Portal查看详细的发布信息。 * **email.template.framework** 邮件内容模板框架。将邮件内容模板化、可配置化,方便管理和变更邮件内容。 * **email.template.release.module.diff** 发布邮件的diff模块。 * **email.template.rollback.module.diff** 回滚邮件的diff模块。 * **email.template.release.module.rules** 灰度发布的灰度规则模块。 我们提供了[邮件模板样例](#三、邮件模板样例),方便大家使用。 >注:运行时使用不同的实现是通过[Profiles](http://docs.spring.io/autorepo/docs/spring-boot/current/reference/html/boot-features-profiles.html)实现的,比如你自己的Email实现是在`custom` profile中的话,在打包脚本中可以指定-Dapollo_profile=github,custom。其中`github`是Apollo必须的一个profile,用于数据库的配置,`custom`是你自己实现的profile。同时需要注意在[EmailConfiguration](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/EmailConfiguration.java)中修改默认实现的条件`@Profile({"!custom"})`。 ### 2.2 相关代码 1. [ConfigPublishListener](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/listener/ConfigPublishListener.java)监听发布事件,调用emailbuilder构建邮件内容,然后调用EmailService发送邮件 2. [emailbuilder](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/components/emailbuilder)包是构建邮件内容的实现 3. [EmailService](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/EmailService.java) 邮件发送服务 4. [EmailConfiguration](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/EmailConfiguration.java) 邮件服务注册类 ## 三、邮件模板样例 以下为发布邮件和回滚邮件的模板内容样式,邮件模板为html格式,发送html格式的邮件时,可能需要做一些额外的处理,取决于每个公司的邮件服务实现。为了减少字符数,模板经过了压缩处理,可自行格式化提高可读性。 ### 3.1 email.template.framework ```html <html><head><style type="text/css">.table{width:100%;max-width:100%;margin-bottom:20px;border-collapse:collapse;background-color:transparent}td{padding:8px;line-height:1.42857143;vertical-align:top;border:1px solid #ddd;border-top:1px solid #ddd}.table-bordered{border:1px solid #ddd}</style></head><body><h3>发布基本信息</h3><table class="table table-bordered"><tr><td width="10%"><b>AppId</b></td><td width="15%">#{appId}</td><td width="10%"><b>环境</b></td><td width="15%">#{env}</td><td width="10%"><b>集群</b></td><td width="15%">#{clusterName}</td><td width="10%"><b>Namespace</b></td><td width="15%">#{namespaceName}</td></tr><tr><td><b>发布者</b></td><td>#{operator}</td><td><b>发布时间</b></td><td>#{releaseTime}</td><td><b>发布标题</b></td><td>#{releaseTitle}</td><td><b>备注</b></td><td>#{releaseComment}</td></tr></table>#{diffModule}#{rulesModule}<br><a href="#{apollo.portal.address}/config/history.html?#/appid=#{appId}&env=#{env}&clusterName=#{clusterName}&namespaceName=#{namespaceName}&releaseHistoryId=#{releaseHistoryId}">点击查看详细的发布信息</a><br><br>如有Apollo使用问题请先查阅<a href="http://conf.ctripcorp.com/display/FRAM/Apollo">文档</a>,或直接回复本邮件咨询。</body></html> ``` > 注:使用此模板需要在 portal 的系统参数中配置 apollo.portal.address,指向 apollo portal 的地址 ### 3.2 email.template.release.module.diff ```html <h3>变更的配置</h3> <table class="table table-bordered"> <tr> <td width="10%"><b>Type</b></td> <td width="20%"><b>Key</b></td> <td width="35%"><b>Old Value</b></td> <td width="35%"><b>New Value</b></td> </tr> #{diffContent} </table> ``` ### 3.3 email.template.rollback.module.diff ```html <div> <br><br> <h3>变更的配置</h3> <table class="table table-bordered"> <tr> <td width="10%"><b>Type</b></td> <td width="20%"><b>Key</b></td> <td width="35%"><b>回滚前</b></td> <td width="35%"><b>回滚后</b></td> </tr> #{diffContent} </table> <br> </div> ``` ### 3.4 email.template.release.module.rules ```html <div> <br> <h3>灰度规则</h3> #{rulesContent} <br> </div> ``` ### 3.5 发布邮件样例 ![发布邮件模板](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/email-template-release.png) ### 3.6 回滚邮件样例 ![回滚邮件模板](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/email-template-rollback.png)
在配置发布时候,我们希望发布信息邮件通知到相关的负责人。现支持发送邮件的动作有:普通发布、灰度发布、全量发布、回滚,通知对象包括:具有namespace编辑和发布权限的人员以及App负责人。 由于各公司的邮件服务往往有不同的实现,所以Apollo定义了一些SPI用来解耦,Apollo接入邮件服务的关键就是实现这些SPI。 ## 一、实现方式一:使用Apollo提供的smtp邮件服务 ### 1.1 接入步骤 在ApolloPortalDB.ServerConfig表配置以下参数,也可以通过管理员工具 - 系统参数页面进行配置,修改完一分钟实时生效。如下: * **email.enabled** 设置为true即可启用默认的smtp邮件服务 * **email.config.host** smtp的服务地址,如`smtp.163.com` * **email.config.user** smtp帐号用户名 * **email.config.password** smtp帐号密码 * **email.supported.envs** 支持发送邮件的环境列表,英文逗号隔开。我们不希望发布邮件变成用户的垃圾邮件,只有某些环境下的发布动作才会发送邮件。 * **email.sender** 邮件的发送人,可以不配置,默认为`email.config.user`。 * **apollo.portal.address** Apollo Portal的地址。方便用户从邮件点击跳转到Apollo Portal查看详细的发布信息。 * **email.template.framework** 邮件内容模板框架。将邮件内容模板化、可配置化,方便管理和变更邮件内容。 * **email.template.release.module.diff** 发布邮件的diff模块。 * **email.template.rollback.module.diff** 回滚邮件的diff模块。 * **email.template.release.module.rules** 灰度发布的灰度规则模块。 我们提供了[邮件模板样例](#三、邮件模板样例),方便大家使用。 ## 二、实现方式二:接入公司的统一邮件服务 和SSO类似,每个公司也有自己的邮件服务实现,所以我们相应的定义了[EmailService](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/EmailService.java)接口,现有两个实现类: 1. CtripEmailService:携程实现的EmailService 2. DefaultEmailService:smtp实现 ### 2.1 接入步骤 1. 提供自己公司的[EmailService](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/EmailService.java)实现,并在[EmailConfiguration](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/EmailConfiguration.java)中注册。 2. 在ApolloPortalDB.ServerConfig表配置以下参数,也可以通过管理员工具 - 系统参数页面进行配置,修改完一分钟实时生效。如下: * **email.supported.envs** 支持发送邮件的环境列表,英文逗号隔开。我们不希望发布邮件变成用户的垃圾邮件,只有某些环境下的发布动作才会发送邮件。 * **email.sender** 邮件的发送人。 * **apollo.portal.address** Apollo Portal的地址。方便用户从邮件点击跳转到Apollo Portal查看详细的发布信息。 * **email.template.framework** 邮件内容模板框架。将邮件内容模板化、可配置化,方便管理和变更邮件内容。 * **email.template.release.module.diff** 发布邮件的diff模块。 * **email.template.rollback.module.diff** 回滚邮件的diff模块。 * **email.template.release.module.rules** 灰度发布的灰度规则模块。 我们提供了[邮件模板样例](#三、邮件模板样例),方便大家使用。 >注:运行时使用不同的实现是通过[Profiles](http://docs.spring.io/autorepo/docs/spring-boot/current/reference/html/boot-features-profiles.html)实现的,比如你自己的Email实现是在`custom` profile中的话,在打包脚本中可以指定-Dapollo_profile=github,custom。其中`github`是Apollo必须的一个profile,用于数据库的配置,`custom`是你自己实现的profile。同时需要注意在[EmailConfiguration](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/EmailConfiguration.java)中修改默认实现的条件`@Profile({"!custom"})`。 ### 2.2 相关代码 1. [ConfigPublishListener](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/listener/ConfigPublishListener.java)监听发布事件,调用emailbuilder构建邮件内容,然后调用EmailService发送邮件 2. [emailbuilder](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/components/emailbuilder)包是构建邮件内容的实现 3. [EmailService](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/EmailService.java) 邮件发送服务 4. [EmailConfiguration](https://github.com/ctripcorp/apollo/blob/master/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/EmailConfiguration.java) 邮件服务注册类 ## 三、邮件模板样例 以下为发布邮件和回滚邮件的模板内容样式,邮件模板为html格式,发送html格式的邮件时,可能需要做一些额外的处理,取决于每个公司的邮件服务实现。为了减少字符数,模板经过了压缩处理,可自行格式化提高可读性。 ### 3.1 email.template.framework ```html <html><head><style type="text/css">.table{width:100%;max-width:100%;margin-bottom:20px;border-collapse:collapse;background-color:transparent}td{padding:8px;line-height:1.42857143;vertical-align:top;border:1px solid #ddd;border-top:1px solid #ddd}.table-bordered{border:1px solid #ddd}</style></head><body><h3>发布基本信息</h3><table class="table table-bordered"><tr><td width="10%"><b>AppId</b></td><td width="15%">#{appId}</td><td width="10%"><b>环境</b></td><td width="15%">#{env}</td><td width="10%"><b>集群</b></td><td width="15%">#{clusterName}</td><td width="10%"><b>Namespace</b></td><td width="15%">#{namespaceName}</td></tr><tr><td><b>发布者</b></td><td>#{operator}</td><td><b>发布时间</b></td><td>#{releaseTime}</td><td><b>发布标题</b></td><td>#{releaseTitle}</td><td><b>备注</b></td><td>#{releaseComment}</td></tr></table>#{diffModule}#{rulesModule}<br><a href="#{apollo.portal.address}/config/history.html?#/appid=#{appId}&env=#{env}&clusterName=#{clusterName}&namespaceName=#{namespaceName}&releaseHistoryId=#{releaseHistoryId}">点击查看详细的发布信息</a><br><br>如有Apollo使用问题请先查阅<a href="http://conf.ctripcorp.com/display/FRAM/Apollo">文档</a>,或直接回复本邮件咨询。</body></html> ``` > 注:使用此模板需要在 portal 的系统参数中配置 apollo.portal.address,指向 apollo portal 的地址 ### 3.2 email.template.release.module.diff ```html <h3>变更的配置</h3> <table class="table table-bordered"> <tr> <td width="10%"><b>Type</b></td> <td width="20%"><b>Key</b></td> <td width="35%"><b>Old Value</b></td> <td width="35%"><b>New Value</b></td> </tr> #{diffContent} </table> ``` ### 3.3 email.template.rollback.module.diff ```html <div> <br><br> <h3>变更的配置</h3> <table class="table table-bordered"> <tr> <td width="10%"><b>Type</b></td> <td width="20%"><b>Key</b></td> <td width="35%"><b>回滚前</b></td> <td width="35%"><b>回滚后</b></td> </tr> #{diffContent} </table> <br> </div> ``` ### 3.4 email.template.release.module.rules ```html <div> <br> <h3>灰度规则</h3> #{rulesContent} <br> </div> ``` ### 3.5 发布邮件样例 ![发布邮件模板](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/email-template-release.png) ### 3.6 回滚邮件样例 ![回滚邮件模板](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/email-template-rollback.png)
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./apollo-client/src/test/resources/spring/yaml/case1-new.yaml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # timeout: 1001 batch: 2001
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # timeout: 1001 batch: 2001
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./.github/ISSUE_TEMPLATE/bug_report_zh.md
--- name: 报告Bug/使用疑问 about: 提交Apollo Bug/使用疑问,使用这个模板 title: '' labels: '' assignees: '' --- <!-- 这段文字不会显示在你的内容中。为了避免重复的信息,方便后续的检索,在提issue之前,请检查如下事项。如果是比较新手级别的问题,推荐到讨论区https://github.com/ctripcorp/apollo/discussions 提问 --> - [ ] 我已经检查过[discussions](https://github.com/ctripcorp/apollo/discussions) - [ ] 我已经搜索过[issues](https://github.com/ctripcorp/apollo/issues) - [ ] 我已经仔细检查过[FAQ](https://www.apolloconfig.com/#/zh/faq/common-issues-in-deployment-and-development-phase) **描述bug** 简洁明了地描述一下bug **复现** 通过如下步骤可以复现: 1. 2. 3. 4. **期望** 简介明了地描述你希望正常情况下应该发生什么 **截图** 如果可以,附上截图来描述你的问题 ### 额外的细节和日志 - 版本: - 错误日志 - 配置: - 平台和操作系统
--- name: 报告Bug/使用疑问 about: 提交Apollo Bug/使用疑问,使用这个模板 title: '' labels: '' assignees: '' --- <!-- 这段文字不会显示在你的内容中。为了避免重复的信息,方便后续的检索,在提issue之前,请检查如下事项。如果是比较新手级别的问题,推荐到讨论区https://github.com/ctripcorp/apollo/discussions 提问 --> - [ ] 我已经检查过[discussions](https://github.com/ctripcorp/apollo/discussions) - [ ] 我已经搜索过[issues](https://github.com/ctripcorp/apollo/issues) - [ ] 我已经仔细检查过[FAQ](https://www.apolloconfig.com/#/zh/faq/common-issues-in-deployment-and-development-phase) **描述bug** 简洁明了地描述一下bug **复现** 通过如下步骤可以复现: 1. 2. 3. 4. **期望** 简介明了地描述你希望正常情况下应该发生什么 **截图** 如果可以,附上截图来描述你的问题 ### 额外的细节和日志 - 版本: - 错误日志 - 配置: - 平台和操作系统
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./docs/zh/misc/apollo-benchmark.md
很多同学关心Apollo的性能和可靠性,以下数据是采集携程内部生产环境单台机器的数据。监控工具是[Cat](https://github.com/dianping/cat)。 ### 一、测试机器配置 #### 1.1 机器配置 4C12G #### 1.2 JVM参数 ```` -Xms6144m -Xmx6144m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=4096m -XX:MaxNewSize=4096m -XX:SurvivorRatio=8 -XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+ScavengeBeforeFullGC -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSPermGenSweepingEnabled -XX:CMSInitiatingPermOccupancyFraction=70 -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8 -Djava.security.egd=file:/dev/./urandom ```` #### 1.3 JVM版本 1.8.0_60 #### 1.4 Apollo版本 0.9.0 #### 1.5 单台机器客户端连接数(客户端数) 5600 #### 1.6 集群总客户端连接数(客户端数) 10W+ ### 二、性能指标 #### 2.1 获取配置Http接口响应时间 QPS: 160 平均响应时间: 0.1ms 95线响应时间: 0.3ms 999线响应时间: 2.5ms >注:config service开启了配置缓存,更多信息可以参考[分布式部署指南中的缓存配置](zh/deployment/distributed-deployment-guide#_323-config-servicecacheenabled-是否开启配置缓存) #### 2.2 Config Server GC情况 YGC: 平均2Min一次,一次耗时300ms OGC: 平均1H一次,一次耗时380ms #### 2.3 CPU指标 LoadAverage:0.5 System CPU利用率:6% Process CPU利用率:8%
很多同学关心Apollo的性能和可靠性,以下数据是采集携程内部生产环境单台机器的数据。监控工具是[Cat](https://github.com/dianping/cat)。 ### 一、测试机器配置 #### 1.1 机器配置 4C12G #### 1.2 JVM参数 ```` -Xms6144m -Xmx6144m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=4096m -XX:MaxNewSize=4096m -XX:SurvivorRatio=8 -XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+ScavengeBeforeFullGC -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSPermGenSweepingEnabled -XX:CMSInitiatingPermOccupancyFraction=70 -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8 -Djava.security.egd=file:/dev/./urandom ```` #### 1.3 JVM版本 1.8.0_60 #### 1.4 Apollo版本 0.9.0 #### 1.5 单台机器客户端连接数(客户端数) 5600 #### 1.6 集群总客户端连接数(客户端数) 10W+ ### 二、性能指标 #### 2.1 获取配置Http接口响应时间 QPS: 160 平均响应时间: 0.1ms 95线响应时间: 0.3ms 999线响应时间: 2.5ms >注:config service开启了配置缓存,更多信息可以参考[分布式部署指南中的缓存配置](zh/deployment/distributed-deployment-guide#_323-config-servicecacheenabled-是否开启配置缓存) #### 2.2 Config Server GC情况 YGC: 平均2Min一次,一次耗时300ms OGC: 平均1H一次,一次耗时380ms #### 2.3 CPU指标 LoadAverage:0.5 System CPU利用率:6% Process CPU利用率:8%
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./scripts/helm/apollo-service/templates/ingress-adminservice.yaml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # {{- if .Values.adminService.ingress.enabled -}} {{- $fullName := include "apollo.adminService.fullName" . -}} {{- $svcPort := .Values.adminService.service.port -}} {{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} apiVersion: networking.k8s.io/v1beta1 {{- else -}} apiVersion: extensions/v1beta1 {{- end }} kind: Ingress metadata: name: {{ $fullName }} labels: {{- include "apollo.service.labels" . | nindent 4 }} {{- with .Values.adminService.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: {{- if .Values.adminService.ingress.tls }} tls: {{- range .Values.adminService.ingress.tls }} - hosts: {{- range .hosts }} - {{ . | quote }} {{- end }} secretName: {{ .secretName }} {{- end }} {{- end }} rules: {{- range .Values.adminService.ingress.hosts }} - host: {{ .host | quote }} http: paths: {{- range .paths }} - path: {{ . }} backend: serviceName: {{ $fullName }} servicePort: {{ $svcPort }} {{- end }} {{- end }} {{- end }}
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # {{- if .Values.adminService.ingress.enabled -}} {{- $fullName := include "apollo.adminService.fullName" . -}} {{- $svcPort := .Values.adminService.service.port -}} {{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} apiVersion: networking.k8s.io/v1beta1 {{- else -}} apiVersion: extensions/v1beta1 {{- end }} kind: Ingress metadata: name: {{ $fullName }} labels: {{- include "apollo.service.labels" . | nindent 4 }} {{- with .Values.adminService.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: {{- if .Values.adminService.ingress.tls }} tls: {{- range .Values.adminService.ingress.tls }} - hosts: {{- range .hosts }} - {{ . | quote }} {{- end }} secretName: {{ .secretName }} {{- end }} {{- end }} rules: {{- range .Values.adminService.ingress.hosts }} - host: {{ .host | quote }} http: paths: {{- range .paths }} - path: {{ . }} backend: serviceName: {{ $fullName }} servicePort: {{ $svcPort }} {{- end }} {{- end }} {{- end }}
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./docs/zh/community/team.md
# Apollo 团队 Apollo 团队由 Member 和 Contributor 组成。Member 可以直接访问 Apollo 项目的源代码并基于代码库积极演进。Contributor 通过向 Member 提交补丁和建议来改善项目,项目的贡献者数量是没有限制的。无论是进行小规模的清理,提交新的功能或其它形式的贡献,都将受到极大的赞赏。 有关社区治理模型的更多信息,请参考[GOVERNANCE.md](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md)。 ## Member Member 包括 PMC 成员和 Committer,该列表按字母顺序排列。 ### Project Management Committee(PMC) | Github ID | Name | Organization | | ---------- | ---------- | ------------ | | JaredTan95 | Jared Tan | DaoCloud | | kezhenxu94 | Zhenxu Ke | Tetrate | | nobodyiam | Jason Song | Ant Group | ### Committer | Github ID | Name | Organization | | ----------- | ------------- | ------------ | | Anilople | Xiaoquan Wang | Some Bank | | klboke | Kailing Chen | TapTap | | lepdou | Le Zhang | Ant Group | | nisiyong | Stephen Ni | Qihoo 360 | | vdisk-group | Lvqiu Ye | Hundsun | ## Contributor ### Apollo 主仓库 <a href="https://github.com/ctripcorp/apollo/graphs/contributors"><img src="https://opencollective.com/apollo/contributors.svg?width=880&button=false" /></a> ### apollo.net <a href="https://github.com/ctripcorp/apollo.net/graphs/contributors"><img src="https://opencollective.com/apollonet/contributors.svg?width=880&button=false" /></a> ## **如何成为提交者** 请参考 [How to become a Committer](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md#how-to-become-a-committer).
# Apollo 团队 Apollo 团队由 Member 和 Contributor 组成。Member 可以直接访问 Apollo 项目的源代码并基于代码库积极演进。Contributor 通过向 Member 提交补丁和建议来改善项目,项目的贡献者数量是没有限制的。无论是进行小规模的清理,提交新的功能或其它形式的贡献,都将受到极大的赞赏。 有关社区治理模型的更多信息,请参考[GOVERNANCE.md](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md)。 ## Member Member 包括 PMC 成员和 Committer,该列表按字母顺序排列。 ### Project Management Committee(PMC) | Github ID | Name | Organization | | ---------- | ---------- | ------------ | | JaredTan95 | Jared Tan | DaoCloud | | kezhenxu94 | Zhenxu Ke | Tetrate | | nobodyiam | Jason Song | Ant Group | ### Committer | Github ID | Name | Organization | | ----------- | ------------- | ------------ | | Anilople | Xiaoquan Wang | Some Bank | | klboke | Kailing Chen | TapTap | | lepdou | Le Zhang | Ant Group | | nisiyong | Stephen Ni | Qihoo 360 | | vdisk-group | Lvqiu Ye | Hundsun | ## Contributor ### Apollo 主仓库 <a href="https://github.com/ctripcorp/apollo/graphs/contributors"><img src="https://opencollective.com/apollo/contributors.svg?width=880&button=false" /></a> ### apollo.net <a href="https://github.com/ctripcorp/apollo.net/graphs/contributors"><img src="https://opencollective.com/apollonet/contributors.svg?width=880&button=false" /></a> ## **如何成为提交者** 请参考 [How to become a Committer](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md#how-to-become-a-committer).
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./README.md
<img src="https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/logo/logo-simple.png" alt="apollo-logo" width="40%"> # Apollo - A reliable configuration management system [![Build Status](https://github.com/ctripcorp/apollo/workflows/build/badge.svg)](https://github.com/ctripcorp/apollo/actions) [![GitHub Release](https://img.shields.io/github/release/ctripcorp/apollo.svg)](https://github.com/ctripcorp/apollo/releases) [![Maven Central Repo](https://img.shields.io/maven-central/v/com.ctrip.framework.apollo/apollo.svg)](https://mvnrepository.com/artifact/com.ctrip.framework.apollo/apollo-client) [![codecov.io](https://codecov.io/github/ctripcorp/apollo/coverage.svg?branch=master)](https://codecov.io/github/ctripcorp/apollo?branch=master) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) Apollo is a reliable configuration management system. It can centrally manage the configurations of different applications and different clusters. It is suitable for microservice configuration management scenarios. The server side is developed based on Spring Boot and Spring Cloud, which can simply run without the need to install additional application containers such as Tomcat. The Java SDK does not rely on any framework and can run in all Java runtime environments. It also has good support for Spring/Spring Boot environments. The .Net SDK does not rely on any framework and can run in all .Net runtime environments. For more details of the product introduction, please refer [Introduction to Apollo Configuration Center](https://www.apolloconfig.com/#/zh/design/apollo-introduction). For local demo purpose, please refer [Quick Start](https://www.apolloconfig.com/#/zh/deployment/quick-start). Demo Environment: - [http://106.54.227.205](http://106.54.227.205/) - User/Password: apollo/admin # Screenshots ![Screenshot](https://raw.githubusercontent.com/ctripcorp/apollo/master/docs/en/images/apollo-home-screenshot.jpg) # Features * **Unified management of the configurations of different environments and different clusters** * Apollo provides a unified interface to centrally manage the configurations of different environments, different clusters, and different namespaces * The same codebase could have different configurations when deployed in different clusters * With the namespace concept, it is easy to support multiple applications to share the same configurations, while also allowing them to customize the configurations * Multiple languages is provided in user interface(currently Chinese and English) * **Configuration changes takes effect in real time (hot release)** * After the user modified the configuration and released it in Apollo, the sdk will receive the latest configurations in real time (1 second) and notify the application * **Release version management** * Every configuration releases are versioned, which is friendly to support configuration rollback * **Grayscale release** * Support grayscale configuration release, for example, after clicking release, it will only take effect for some application instances. After a period of observation, we could push the configurations to all application instances if there is no problem * **Authorization management, release approval and operation audit** * Great authorization mechanism is designed for applications and configurations management, and the management of configurations is divided into two operations: editing and publishing, therefore greatly reducing human errors * All operations have audit logs for easy tracking of problems * **Client side configuration information monitoring** * It's very easy to see which instances are using the configurations and what versions they are using * **Rich SDKs available** * Provides native sdks of Java and .Net to facilitate application integration * Support Spring Placeholder, Annotation and Spring Boot ConfigurationProperties for easy application use (requires Spring 3.1.1+) * Http APIs are provided, so non-Java and .Net applications can integrate conveniently * Rich third party sdks are also available, e.g. Golang, Python, NodeJS, PHP, C, etc * **Open platform API** * Apollo itself provides a unified configuration management interface, which supports features such as multi-environment, multi-data center configuration management, permissions, and process governance * However, for the sake of versatility, Apollo will not put too many restrictions on the modification of the configuration, as long as it conforms to the basic format, it can be saved. * In our research, we found that for some users, their configurations may have more complicated formats, such as xml, json, and the format needs to be verified * There are also some users such as DAL, which not only have a specific format, but also need to verify the entered value before saving, such as checking whether the database, username and password match * For this type of application, Apollo allows the application to modify and release configurations through open APIs, which has great authorization and permission control mechanism built in * **Simple deployment** * As an infrastructure service, the configuration center has very high availability requirements, which forces Apollo to rely on external dependencies as little as possible * Currently, the only external dependency is MySQL, so the deployment is very simple. Apollo can run as long as Java and MySQL are installed * Apollo also provides a packaging script, which can generate all required installation packages with just one click, and supports customization of runtime parameters # Usage 1. [Apollo User Guide](https://www.apolloconfig.com/#/zh/usage/apollo-user-guide) 2. [Java SDK User Guide](https://www.apolloconfig.com/#/zh/usage/java-sdk-user-guide) 3. [.Net SDK user Guide](https://www.apolloconfig.com/#/zh/usage/dotnet-sdk-user-guide) 4. [Third Party SDK User Guide](https://www.apolloconfig.com/#/zh/usage/third-party-sdks-user-guide) 5. [Other Language Client User Guide](https://www.apolloconfig.com/#/zh/usage/other-language-client-user-guide) 6. [Apollo Open APIs](https://www.apolloconfig.com/#/zh/usage/apollo-open-api-platform) 7. [Apollo Use Cases](https://github.com/ctripcorp/apollo-use-cases) 8. [Apollo User Practices](https://www.apolloconfig.com/#/zh/usage/apollo-user-practices) 9. [Apollo Security Best Practices](https://www.apolloconfig.com/#/zh/usage/apollo-user-guide?id=_71-%e5%ae%89%e5%85%a8%e7%9b%b8%e5%85%b3) # Design * [Apollo Design](https://www.apolloconfig.com/#/zh/design/apollo-design) * [Apollo Core Concept - Namespace](https://www.apolloconfig.com/#/zh/design/apollo-core-concept-namespace) * [Apollo Architecture Analysis](https://mp.weixin.qq.com/s/-hUaQPzfsl9Lm3IqQW3VDQ) * [Apollo Source Code Explanation](http://www.iocoder.cn/categories/Apollo/) # Development * [Apollo Development Guide](https://www.apolloconfig.com/#/zh/development/apollo-development-guide) * Code Styles * [Eclipse Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/eclipse-java-google-style.xml) * [Intellij Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/intellij-java-google-style.xml) # Deployment * [Quick Start](https://www.apolloconfig.com/#/zh/deployment/quick-start) * [Distributed Deployment Guide](https://www.apolloconfig.com/#/zh/deployment/distributed-deployment-guide) # Release Notes * [Releases](https://github.com/ctripcorp/apollo/releases) # FAQ * [FAQ](https://www.apolloconfig.com/#/zh/faq/faq) * [Common Issues in Deployment & Development Phase](https://www.apolloconfig.com/#/zh/faq/common-issues-in-deployment-and-development-phase) # Presentation * [Design and Implementation Details of Apollo](http://www.itdks.com/dakalive/detail/3420) * [Slides](https://myslide.cn/slides/10168) * [Configuration Center Makes Microservices Smart](https://2018.qconshanghai.com/presentation/799) * [Slides](https://myslide.cn/slides/10035) # Publication * [Design and Implementation Details of Apollo](https://www.infoq.cn/article/open-source-configuration-center-apollo) * [Configuration Center Makes Microservices Smart](https://mp.weixin.qq.com/s/iDmYJre_ULEIxuliu1EbIQ) # Community * [Apollo Team](https://www.apolloconfig.com/#/en/community/team) * [Community Governance](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md) * [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) # License The project is licensed under the [Apache 2 license](https://github.com/ctripcorp/apollo/blob/master/LICENSE). # Known Users > Sorted by registration order,users are welcome to register in [https://github.com/ctripcorp/apollo/issues/451](https://github.com/ctripcorp/apollo/issues/451) (reference purpose only for the community) <table> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ctrip.png" alt="携程"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bluestone.png" alt="青石证券"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sagreen.png" alt="沙绿"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/umetrip.jpg" alt="航旅纵横"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhuanzhuan.png" alt="58转转"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/phone580.png" alt="蜂助手"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hainan-airlines.png" alt="海南航空"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cvte.png" alt="CVTE"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mainbo.jpg" alt="明博教育"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/madailicai.png" alt="麻袋理财"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mxnavi.jpg" alt="美行科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fshows.jpg" alt="首展科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/feezu.png" alt="易微行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rencaijia.png" alt="人才加"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/keking.png" alt="凯京集团"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/leoao.png" alt="乐刻运动"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dji.png" alt="大疆"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kkmh.png" alt="快看漫画"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wolaidai.png" alt="我来贷"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xsrj.png" alt="虚实软件"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yanxuan.png" alt="网易严选"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sjzg.png" alt="视觉中国"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zc360.png" alt="资产360"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ecarx.png" alt="亿咖通"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/5173.png" alt="5173"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hujiang.png" alt="沪江"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/163yun.png" alt="网易云基础服务"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cash-bus.png" alt="现金巴士"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/smartisan.png" alt="锤子科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/toodc.png" alt="头等仓"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/juneyaoair.png" alt="吉祥航空"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/263mobile.png" alt="263移动通信"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/toutoujinrong.png" alt="投投金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mytijian.png" alt="每天健康"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maiyabank.png" alt="麦芽金服"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fengunion.png" alt="蜂向科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/geex-logo.png" alt="即科金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/beike.png" alt="贝壳网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/youzan.png" alt="有赞"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yunjihuitong.png" alt="云集汇通"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rhinotech.png" alt="犀牛瀚海科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/nxin.png" alt="农信互联"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mgzf.png" alt="蘑菇租房"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/huli-logo.png" alt="狐狸金服"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mandao.png" alt="漫道集团"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/enmonster.png" alt="怪兽充电"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/nanguazufang.png" alt="南瓜租房"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shitoujinrong.png" alt="石投金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tubatu.png" alt="土巴兔"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/payh_logo.png" alt="平安银行"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xinxindai.png" alt="新新贷"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chrtc.png" alt="中国华戎科技集团"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tuya_logo.png" alt="涂鸦智能"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/szlcsc.jpg" alt="立创商城"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hairongyi.png" alt="乐赚金服"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kxqc.png" alt="开心汽车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ppcredit.png" alt="乐赚金服"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/primeton.png" alt="普元信息"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hoskeeper.png" alt="医帮管家"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fula.png" alt="付啦信用卡管家"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/uzai.png" alt="悠哉网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/91wutong.png" alt="梧桐诚选"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ppdai.png" alt="拍拍贷"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xinyongfei.png" alt="信用飞"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dxy.png" alt="丁香园"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ghtech.png" alt="国槐科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/qbb.png" alt="亲宝宝"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/huawei_logo.png" alt="华为视频直播"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/weiboyi.png" alt="微播易"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ofpay.png" alt="欧飞"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mishuo.png" alt="迷说"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yixia.png" alt="一下科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/daocloud.png" alt="DaoCloud"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cnvex.png" alt="汽摩交易所"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/100tal.png" alt="好未来教育集团"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ainirobot.png" alt="猎户星空"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhuojian.png" alt="卓健科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/enjoyor.png" alt="银江股份"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tuhu.png" alt="途虎养车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/homedo.png" alt="河姆渡"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xwbank.png" alt="新网银行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ctspcl.png" alt="中旅安信云贷"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/meiyou.png" alt="美柚"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zkh-logo.png" alt="震坤行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wgss.png" alt="万谷盛世"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/plateno.png" alt="铂涛旅行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lifesense.png" alt="乐心"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/reachmedia.png" alt="亿投传媒"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/guxiansheng.png" alt="股先生"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/caixuetang.png" alt="财学堂"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/4399.png" alt="4399"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/autohome.png" alt="汽车之家"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mbcaijing.png" alt="面包财经"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hoopchina.png" alt="虎扑"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sohu-auto.png" alt="搜狐汽车"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/liangfuzhengxin.png" alt="量富征信"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maihaoche.png" alt="卖好车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zyiot.jpg" alt="中移物联网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/biauto.png" alt="易车网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maiyaole.png" alt="一药网"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiaoying.png" alt="小影"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/caibeike.png" alt="彩贝壳"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yeelight.png" alt="YEELIGHT"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/itsgmu.png" alt="积目"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/acmedcare.png" alt="极致医疗"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jinhui365.png" alt="金汇金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/900etrip.png" alt="久柏易游"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/24xiaomai.png" alt="小麦铺"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/vvic.png" alt="搜款网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mizlicai.png" alt="米庄理财"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bjt.png" alt="贝吉塔网络科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/weimob.png" alt="微盟"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kada.png" alt="网易卡搭"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kapbook.png" alt="股书"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jumore.png" alt="聚贸"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bimface.png" alt="广联达bimface"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/globalgrow.png" alt="环球易购"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jollychic.png" alt="浙江执御"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/2dfire.jpg" alt="二维火"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shopin.png" alt="上品"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/inspur.png" alt="浪潮集团"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ngarihealth.png" alt="纳里健康"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/oraro.png" alt="橙红科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dragonpass.png" alt="龙腾出行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lizhi.fm.png" alt="荔枝"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/htd.png" alt="汇通达"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yunrong.png" alt="云融金科"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tszg360.png" alt="天生掌柜"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rongplus.png" alt="容联光辉"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/intellif.png" alt="云天励飞"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jiayundata.png" alt="嘉云数据"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zts.png" alt="中泰证券网络金融部"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/163dun.png" alt="网易易盾"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiangwushuo.png" alt="享物说"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sto.png" alt="申通"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jinhe.png" alt="金和网络"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/2345.png" alt="二三四五"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chtwm.jpg" alt="恒天财富"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/uweixin.png" alt="沐雪微信"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wzeye.png" alt="温州医科大学附属眼视光医院"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/10010pay.png" alt="联通支付"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shanshu.png" alt="杉数科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fenlibao.png" alt="分利宝"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hetao101.png" alt="核桃编程"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiaohongshu.png" alt="小红书"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/blissmall.png" alt="幸福西饼"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ky-express.png" alt="跨越速运"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/oyohotels.png" alt="OYO"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/100-me.png" alt="叮咚买菜"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhidaohulian.jpg" alt="智道网联"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xueqiu.jpg" alt="雪球"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/autocloudpro.png" alt="车通云"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dadaabc.png" alt="哒哒英语"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xedaojia.jpg" alt="小E微店"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/daling.png" alt="达令家"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/renliwo.png" alt="人力窝"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mocire.jpg" alt="嘉美在线"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/uepay.png" alt="极易付"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wdom.png" alt="智慧开源"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cheshiku.png" alt="车仕库"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/taimeitech.png" alt="太美医疗科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yilianbaihui.png" alt="亿联百汇"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhoupu123.png" alt="舟谱数据"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/frxs.png" alt="芙蓉兴盛"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/beastshop.png" alt="野兽派"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kaishustory.png" alt="凯叔讲故事"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/haodf.png" alt="好大夫在线"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/insyunmi.png" alt="云幂信息技术"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/duiba.png" alt="兑吧"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/9ji.png" alt="九机网"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sui.png" alt="随手科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/aixiangdao.png" alt="万谷盛世"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yunzhangfang.png" alt="云账房"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yuantutech.png" alt="浙江远图互联"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/qk365.png" alt="青客公寓"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/eastmoney.png" alt="东方财富"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jikexiu.png" alt="极客修"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/meix.png" alt="美市科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zto.png" alt="中通快递"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/e6yun.png" alt="易流科技"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiaoyuanzhao.png" alt="实习僧"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dalingjia.png" alt="达令家"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/secoo.png" alt="寺库"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lianlianpay.png" alt="连连支付"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhongan.png" alt="众安保险"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/360jinrong.png" alt="360金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/caschina.png" alt="中航服商旅"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ke.png" alt="贝壳"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yeahmobi.png" alt="Yeahmobi易点天下"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/idengyun.png" alt="北京登云美业网络科技有限公司"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jinher.png" alt="金和网络"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/komect.png" alt="中移(杭州)信息技术有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/beisen.png" alt="北森"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/log56.png" alt="合肥维天运通"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/meboth.png" alt="北京蜜步科技有限公司"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/postop.png" alt="术康"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rfchina.png" alt="富力集团"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tfxing.png" alt="天府行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/8travelpay.png" alt="八商山"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/centaline.png" alt="中原地产"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zkyda.png" alt="智科云达"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/house730.png" alt="中原730"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/pagoda.png" alt="百果园"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bolome.png" alt="波罗蜜"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xignite.png" alt="Xignite"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/aduer.png" alt="杭州有云科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jojoreading.png" alt="成都书声科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sweetome.png" alt="斯维登集团"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/vipthink.png" alt="广东快乐种子科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tongxuecool.png" alt="上海盈翼文化传播有限公司"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sccfc.png" alt="上海尚诚消费金融股份有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ziroom.png" alt="自如网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jd.png" alt="京东"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rabbitpre.png" alt="兔展智能"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhubei.png" alt="竹贝"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/imile.png" alt="iMile(中东)"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/helloglobal.png" alt="哈罗出行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhaopin.png" alt="智联招聘"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/acadsoc.png" alt="阿卡索"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mojory.png" alt="妙知旅"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chengduoduo.png" alt="程多多"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/baojunev.png" alt="上汽通用五菱"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/leyan.png" alt="乐言科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dushu.png" alt="樊登读书"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zyiz.png" alt="找一找教程网"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bppc.png" alt="中油碧辟石油有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shanglv51.png" alt="四川商旅无忧科技服务有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/waijiao365.png" alt="懿鸢网络科技(上海)有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gaoding.jpg" alt="稿定科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ricacorp.png" alt="搵樓 - 利嘉閣"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/t3go.png" alt="南京领行科技股份有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mokahr.jpg" alt="北京希瑞亚斯科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/printrainbow.png" alt="印彩虹印刷公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/milliontech.png" alt="Million Tech"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/guoguokeji.jpg" alt="果果科技"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/airkunming.png" alt="昆明航空"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/5i5j.png" alt="我爱我家"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gjzq.png" alt="国金证券"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/enjoymusic.jpg" alt="不亦乐乎"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cnhnb.png" alt="惠农网"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/daoklab.jpg" alt="成都道壳"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ausnutria.jpg" alt="澳优乳业"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/deiyoudian.png" alt="河南有态度信息科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ezhiyang.png" alt="智阳第一人力"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shie.png" alt="上海保险交易所"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wsecar.png" alt="万顺叫车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shouqinba.jpg" alt="收钱吧"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/baozun.png" alt="宝尊电商"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xbnwl.png" alt="喜百年供应链"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gwwisdom.png" alt="南京观为智慧软件科技有限公司"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ztrip.png" alt="在途商旅"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hualala.png" alt="哗啦啦"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xin.png" alt="优信二手车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maycur.png" alt="每刻科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bullyun.png" alt="杭州蛮牛"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bestpay.png" alt="翼支付"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mockuai.png" alt="魔筷科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ct108.png" alt="畅唐网络"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jusdaglobal.jpg" alt="准时达"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/izaodao.png" alt="早道网校"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ovopark.jpg" alt="万店掌"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/funstory.jpg" alt="推文科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lemonbox.png" alt="Lemonbox"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/polyt.png" alt="保利票务"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chipwing.png" alt="芯翼科技"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/czbank.png" alt="浙商银行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/czbyqy.png" alt="易企银科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yundun.jpg" alt="上海云盾"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gaiaworks.jpg" alt="苏州盖雅信息技术有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mengxiang.png" alt="爱库存"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jidouauto.png" alt="极豆车联网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ipalfish.png" alt="伴鱼少儿英语"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/iqboard.png" alt="锐达科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/koolearn.png" alt="新东方在线"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kingcome.png" alt="金康高科"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/soulapp.png" alt="soul"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ezrpro.png" alt="驿氪"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hc360.png" alt="慧聪"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/21cp.png" alt="中塑在线"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/goinglink.jpg" alt="甄云科技"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/aitrace.jpg" alt="追溯科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/moqipobing.png" alt="玩吧"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cassan.png" alt="广州卡桑信息技术有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shuidichou.png" alt="水滴"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kuwo.png" alt="酷我音乐"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mi.png" alt="小米"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mvmyun.png" alt="今典"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/visabao.jpg" alt="签宝科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/inrice.png" alt="广州趣米网络科技有限公司"></td> </tr> </table> # Awards <img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/awards/oschina-2018-award.jpg" width="240px" alt="The most popular Chinese open source software in 2018"> # Stargazers over time [![Stargazers over time](https://starcharts.herokuapp.com/ctripcorp/apollo.svg)](https://starcharts.herokuapp.com/ctripcorp/apollo)
<img src="https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/logo/logo-simple.png" alt="apollo-logo" width="40%"> # Apollo - A reliable configuration management system [![Build Status](https://github.com/ctripcorp/apollo/workflows/build/badge.svg)](https://github.com/ctripcorp/apollo/actions) [![GitHub Release](https://img.shields.io/github/release/ctripcorp/apollo.svg)](https://github.com/ctripcorp/apollo/releases) [![Maven Central Repo](https://img.shields.io/maven-central/v/com.ctrip.framework.apollo/apollo.svg)](https://mvnrepository.com/artifact/com.ctrip.framework.apollo/apollo-client) [![codecov.io](https://codecov.io/github/ctripcorp/apollo/coverage.svg?branch=master)](https://codecov.io/github/ctripcorp/apollo?branch=master) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) Apollo is a reliable configuration management system. It can centrally manage the configurations of different applications and different clusters. It is suitable for microservice configuration management scenarios. The server side is developed based on Spring Boot and Spring Cloud, which can simply run without the need to install additional application containers such as Tomcat. The Java SDK does not rely on any framework and can run in all Java runtime environments. It also has good support for Spring/Spring Boot environments. The .Net SDK does not rely on any framework and can run in all .Net runtime environments. For more details of the product introduction, please refer [Introduction to Apollo Configuration Center](https://www.apolloconfig.com/#/zh/design/apollo-introduction). For local demo purpose, please refer [Quick Start](https://www.apolloconfig.com/#/zh/deployment/quick-start). Demo Environment: - [http://106.54.227.205](http://106.54.227.205/) - User/Password: apollo/admin # Screenshots ![Screenshot](https://raw.githubusercontent.com/ctripcorp/apollo/master/docs/en/images/apollo-home-screenshot.jpg) # Features * **Unified management of the configurations of different environments and different clusters** * Apollo provides a unified interface to centrally manage the configurations of different environments, different clusters, and different namespaces * The same codebase could have different configurations when deployed in different clusters * With the namespace concept, it is easy to support multiple applications to share the same configurations, while also allowing them to customize the configurations * Multiple languages is provided in user interface(currently Chinese and English) * **Configuration changes takes effect in real time (hot release)** * After the user modified the configuration and released it in Apollo, the sdk will receive the latest configurations in real time (1 second) and notify the application * **Release version management** * Every configuration releases are versioned, which is friendly to support configuration rollback * **Grayscale release** * Support grayscale configuration release, for example, after clicking release, it will only take effect for some application instances. After a period of observation, we could push the configurations to all application instances if there is no problem * **Authorization management, release approval and operation audit** * Great authorization mechanism is designed for applications and configurations management, and the management of configurations is divided into two operations: editing and publishing, therefore greatly reducing human errors * All operations have audit logs for easy tracking of problems * **Client side configuration information monitoring** * It's very easy to see which instances are using the configurations and what versions they are using * **Rich SDKs available** * Provides native sdks of Java and .Net to facilitate application integration * Support Spring Placeholder, Annotation and Spring Boot ConfigurationProperties for easy application use (requires Spring 3.1.1+) * Http APIs are provided, so non-Java and .Net applications can integrate conveniently * Rich third party sdks are also available, e.g. Golang, Python, NodeJS, PHP, C, etc * **Open platform API** * Apollo itself provides a unified configuration management interface, which supports features such as multi-environment, multi-data center configuration management, permissions, and process governance * However, for the sake of versatility, Apollo will not put too many restrictions on the modification of the configuration, as long as it conforms to the basic format, it can be saved. * In our research, we found that for some users, their configurations may have more complicated formats, such as xml, json, and the format needs to be verified * There are also some users such as DAL, which not only have a specific format, but also need to verify the entered value before saving, such as checking whether the database, username and password match * For this type of application, Apollo allows the application to modify and release configurations through open APIs, which has great authorization and permission control mechanism built in * **Simple deployment** * As an infrastructure service, the configuration center has very high availability requirements, which forces Apollo to rely on external dependencies as little as possible * Currently, the only external dependency is MySQL, so the deployment is very simple. Apollo can run as long as Java and MySQL are installed * Apollo also provides a packaging script, which can generate all required installation packages with just one click, and supports customization of runtime parameters # Usage 1. [Apollo User Guide](https://www.apolloconfig.com/#/zh/usage/apollo-user-guide) 2. [Java SDK User Guide](https://www.apolloconfig.com/#/zh/usage/java-sdk-user-guide) 3. [.Net SDK user Guide](https://www.apolloconfig.com/#/zh/usage/dotnet-sdk-user-guide) 4. [Third Party SDK User Guide](https://www.apolloconfig.com/#/zh/usage/third-party-sdks-user-guide) 5. [Other Language Client User Guide](https://www.apolloconfig.com/#/zh/usage/other-language-client-user-guide) 6. [Apollo Open APIs](https://www.apolloconfig.com/#/zh/usage/apollo-open-api-platform) 7. [Apollo Use Cases](https://github.com/ctripcorp/apollo-use-cases) 8. [Apollo User Practices](https://www.apolloconfig.com/#/zh/usage/apollo-user-practices) 9. [Apollo Security Best Practices](https://www.apolloconfig.com/#/zh/usage/apollo-user-guide?id=_71-%e5%ae%89%e5%85%a8%e7%9b%b8%e5%85%b3) # Design * [Apollo Design](https://www.apolloconfig.com/#/zh/design/apollo-design) * [Apollo Core Concept - Namespace](https://www.apolloconfig.com/#/zh/design/apollo-core-concept-namespace) * [Apollo Architecture Analysis](https://mp.weixin.qq.com/s/-hUaQPzfsl9Lm3IqQW3VDQ) * [Apollo Source Code Explanation](http://www.iocoder.cn/categories/Apollo/) # Development * [Apollo Development Guide](https://www.apolloconfig.com/#/zh/development/apollo-development-guide) * Code Styles * [Eclipse Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/eclipse-java-google-style.xml) * [Intellij Code Style](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/intellij-java-google-style.xml) # Deployment * [Quick Start](https://www.apolloconfig.com/#/zh/deployment/quick-start) * [Distributed Deployment Guide](https://www.apolloconfig.com/#/zh/deployment/distributed-deployment-guide) # Release Notes * [Releases](https://github.com/ctripcorp/apollo/releases) # FAQ * [FAQ](https://www.apolloconfig.com/#/zh/faq/faq) * [Common Issues in Deployment & Development Phase](https://www.apolloconfig.com/#/zh/faq/common-issues-in-deployment-and-development-phase) # Presentation * [Design and Implementation Details of Apollo](http://www.itdks.com/dakalive/detail/3420) * [Slides](https://myslide.cn/slides/10168) * [Configuration Center Makes Microservices Smart](https://2018.qconshanghai.com/presentation/799) * [Slides](https://myslide.cn/slides/10035) # Publication * [Design and Implementation Details of Apollo](https://www.infoq.cn/article/open-source-configuration-center-apollo) * [Configuration Center Makes Microservices Smart](https://mp.weixin.qq.com/s/iDmYJre_ULEIxuliu1EbIQ) # Community * [Apollo Team](https://www.apolloconfig.com/#/en/community/team) * [Community Governance](https://github.com/ctripcorp/apollo/blob/master/GOVERNANCE.md) * [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) # License The project is licensed under the [Apache 2 license](https://github.com/ctripcorp/apollo/blob/master/LICENSE). # Known Users > Sorted by registration order,users are welcome to register in [https://github.com/ctripcorp/apollo/issues/451](https://github.com/ctripcorp/apollo/issues/451) (reference purpose only for the community) <table> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ctrip.png" alt="携程"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bluestone.png" alt="青石证券"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sagreen.png" alt="沙绿"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/umetrip.jpg" alt="航旅纵横"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhuanzhuan.png" alt="58转转"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/phone580.png" alt="蜂助手"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hainan-airlines.png" alt="海南航空"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cvte.png" alt="CVTE"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mainbo.jpg" alt="明博教育"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/madailicai.png" alt="麻袋理财"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mxnavi.jpg" alt="美行科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fshows.jpg" alt="首展科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/feezu.png" alt="易微行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rencaijia.png" alt="人才加"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/keking.png" alt="凯京集团"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/leoao.png" alt="乐刻运动"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dji.png" alt="大疆"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kkmh.png" alt="快看漫画"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wolaidai.png" alt="我来贷"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xsrj.png" alt="虚实软件"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yanxuan.png" alt="网易严选"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sjzg.png" alt="视觉中国"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zc360.png" alt="资产360"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ecarx.png" alt="亿咖通"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/5173.png" alt="5173"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hujiang.png" alt="沪江"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/163yun.png" alt="网易云基础服务"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cash-bus.png" alt="现金巴士"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/smartisan.png" alt="锤子科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/toodc.png" alt="头等仓"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/juneyaoair.png" alt="吉祥航空"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/263mobile.png" alt="263移动通信"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/toutoujinrong.png" alt="投投金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mytijian.png" alt="每天健康"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maiyabank.png" alt="麦芽金服"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fengunion.png" alt="蜂向科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/geex-logo.png" alt="即科金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/beike.png" alt="贝壳网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/youzan.png" alt="有赞"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yunjihuitong.png" alt="云集汇通"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rhinotech.png" alt="犀牛瀚海科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/nxin.png" alt="农信互联"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mgzf.png" alt="蘑菇租房"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/huli-logo.png" alt="狐狸金服"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mandao.png" alt="漫道集团"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/enmonster.png" alt="怪兽充电"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/nanguazufang.png" alt="南瓜租房"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shitoujinrong.png" alt="石投金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tubatu.png" alt="土巴兔"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/payh_logo.png" alt="平安银行"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xinxindai.png" alt="新新贷"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chrtc.png" alt="中国华戎科技集团"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tuya_logo.png" alt="涂鸦智能"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/szlcsc.jpg" alt="立创商城"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hairongyi.png" alt="乐赚金服"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kxqc.png" alt="开心汽车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ppcredit.png" alt="乐赚金服"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/primeton.png" alt="普元信息"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hoskeeper.png" alt="医帮管家"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fula.png" alt="付啦信用卡管家"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/uzai.png" alt="悠哉网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/91wutong.png" alt="梧桐诚选"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ppdai.png" alt="拍拍贷"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xinyongfei.png" alt="信用飞"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dxy.png" alt="丁香园"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ghtech.png" alt="国槐科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/qbb.png" alt="亲宝宝"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/huawei_logo.png" alt="华为视频直播"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/weiboyi.png" alt="微播易"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ofpay.png" alt="欧飞"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mishuo.png" alt="迷说"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yixia.png" alt="一下科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/daocloud.png" alt="DaoCloud"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cnvex.png" alt="汽摩交易所"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/100tal.png" alt="好未来教育集团"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ainirobot.png" alt="猎户星空"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhuojian.png" alt="卓健科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/enjoyor.png" alt="银江股份"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tuhu.png" alt="途虎养车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/homedo.png" alt="河姆渡"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xwbank.png" alt="新网银行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ctspcl.png" alt="中旅安信云贷"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/meiyou.png" alt="美柚"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zkh-logo.png" alt="震坤行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wgss.png" alt="万谷盛世"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/plateno.png" alt="铂涛旅行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lifesense.png" alt="乐心"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/reachmedia.png" alt="亿投传媒"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/guxiansheng.png" alt="股先生"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/caixuetang.png" alt="财学堂"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/4399.png" alt="4399"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/autohome.png" alt="汽车之家"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mbcaijing.png" alt="面包财经"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hoopchina.png" alt="虎扑"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sohu-auto.png" alt="搜狐汽车"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/liangfuzhengxin.png" alt="量富征信"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maihaoche.png" alt="卖好车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zyiot.jpg" alt="中移物联网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/biauto.png" alt="易车网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maiyaole.png" alt="一药网"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiaoying.png" alt="小影"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/caibeike.png" alt="彩贝壳"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yeelight.png" alt="YEELIGHT"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/itsgmu.png" alt="积目"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/acmedcare.png" alt="极致医疗"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jinhui365.png" alt="金汇金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/900etrip.png" alt="久柏易游"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/24xiaomai.png" alt="小麦铺"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/vvic.png" alt="搜款网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mizlicai.png" alt="米庄理财"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bjt.png" alt="贝吉塔网络科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/weimob.png" alt="微盟"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kada.png" alt="网易卡搭"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kapbook.png" alt="股书"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jumore.png" alt="聚贸"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bimface.png" alt="广联达bimface"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/globalgrow.png" alt="环球易购"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jollychic.png" alt="浙江执御"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/2dfire.jpg" alt="二维火"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shopin.png" alt="上品"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/inspur.png" alt="浪潮集团"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ngarihealth.png" alt="纳里健康"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/oraro.png" alt="橙红科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dragonpass.png" alt="龙腾出行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lizhi.fm.png" alt="荔枝"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/htd.png" alt="汇通达"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yunrong.png" alt="云融金科"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tszg360.png" alt="天生掌柜"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rongplus.png" alt="容联光辉"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/intellif.png" alt="云天励飞"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jiayundata.png" alt="嘉云数据"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zts.png" alt="中泰证券网络金融部"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/163dun.png" alt="网易易盾"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiangwushuo.png" alt="享物说"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sto.png" alt="申通"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jinhe.png" alt="金和网络"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/2345.png" alt="二三四五"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chtwm.jpg" alt="恒天财富"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/uweixin.png" alt="沐雪微信"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wzeye.png" alt="温州医科大学附属眼视光医院"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/10010pay.png" alt="联通支付"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shanshu.png" alt="杉数科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/fenlibao.png" alt="分利宝"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hetao101.png" alt="核桃编程"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiaohongshu.png" alt="小红书"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/blissmall.png" alt="幸福西饼"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ky-express.png" alt="跨越速运"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/oyohotels.png" alt="OYO"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/100-me.png" alt="叮咚买菜"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhidaohulian.jpg" alt="智道网联"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xueqiu.jpg" alt="雪球"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/autocloudpro.png" alt="车通云"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dadaabc.png" alt="哒哒英语"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xedaojia.jpg" alt="小E微店"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/daling.png" alt="达令家"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/renliwo.png" alt="人力窝"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mocire.jpg" alt="嘉美在线"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/uepay.png" alt="极易付"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wdom.png" alt="智慧开源"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cheshiku.png" alt="车仕库"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/taimeitech.png" alt="太美医疗科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yilianbaihui.png" alt="亿联百汇"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhoupu123.png" alt="舟谱数据"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/frxs.png" alt="芙蓉兴盛"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/beastshop.png" alt="野兽派"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kaishustory.png" alt="凯叔讲故事"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/haodf.png" alt="好大夫在线"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/insyunmi.png" alt="云幂信息技术"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/duiba.png" alt="兑吧"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/9ji.png" alt="九机网"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sui.png" alt="随手科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/aixiangdao.png" alt="万谷盛世"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yunzhangfang.png" alt="云账房"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yuantutech.png" alt="浙江远图互联"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/qk365.png" alt="青客公寓"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/eastmoney.png" alt="东方财富"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jikexiu.png" alt="极客修"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/meix.png" alt="美市科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zto.png" alt="中通快递"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/e6yun.png" alt="易流科技"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xiaoyuanzhao.png" alt="实习僧"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dalingjia.png" alt="达令家"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/secoo.png" alt="寺库"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lianlianpay.png" alt="连连支付"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhongan.png" alt="众安保险"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/360jinrong.png" alt="360金融"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/caschina.png" alt="中航服商旅"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ke.png" alt="贝壳"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yeahmobi.png" alt="Yeahmobi易点天下"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/idengyun.png" alt="北京登云美业网络科技有限公司"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jinher.png" alt="金和网络"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/komect.png" alt="中移(杭州)信息技术有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/beisen.png" alt="北森"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/log56.png" alt="合肥维天运通"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/meboth.png" alt="北京蜜步科技有限公司"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/postop.png" alt="术康"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rfchina.png" alt="富力集团"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tfxing.png" alt="天府行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/8travelpay.png" alt="八商山"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/centaline.png" alt="中原地产"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zkyda.png" alt="智科云达"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/house730.png" alt="中原730"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/pagoda.png" alt="百果园"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bolome.png" alt="波罗蜜"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xignite.png" alt="Xignite"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/aduer.png" alt="杭州有云科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jojoreading.png" alt="成都书声科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sweetome.png" alt="斯维登集团"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/vipthink.png" alt="广东快乐种子科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/tongxuecool.png" alt="上海盈翼文化传播有限公司"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/sccfc.png" alt="上海尚诚消费金融股份有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ziroom.png" alt="自如网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jd.png" alt="京东"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/rabbitpre.png" alt="兔展智能"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhubei.png" alt="竹贝"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/imile.png" alt="iMile(中东)"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/helloglobal.png" alt="哈罗出行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zhaopin.png" alt="智联招聘"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/acadsoc.png" alt="阿卡索"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mojory.png" alt="妙知旅"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chengduoduo.png" alt="程多多"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/baojunev.png" alt="上汽通用五菱"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/leyan.png" alt="乐言科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/dushu.png" alt="樊登读书"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/zyiz.png" alt="找一找教程网"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bppc.png" alt="中油碧辟石油有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shanglv51.png" alt="四川商旅无忧科技服务有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/waijiao365.png" alt="懿鸢网络科技(上海)有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gaoding.jpg" alt="稿定科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ricacorp.png" alt="搵樓 - 利嘉閣"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/t3go.png" alt="南京领行科技股份有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mokahr.jpg" alt="北京希瑞亚斯科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/printrainbow.png" alt="印彩虹印刷公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/milliontech.png" alt="Million Tech"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/guoguokeji.jpg" alt="果果科技"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/airkunming.png" alt="昆明航空"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/5i5j.png" alt="我爱我家"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gjzq.png" alt="国金证券"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/enjoymusic.jpg" alt="不亦乐乎"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cnhnb.png" alt="惠农网"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/daoklab.jpg" alt="成都道壳"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ausnutria.jpg" alt="澳优乳业"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/deiyoudian.png" alt="河南有态度信息科技有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ezhiyang.png" alt="智阳第一人力"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shie.png" alt="上海保险交易所"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/wsecar.png" alt="万顺叫车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shouqinba.jpg" alt="收钱吧"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/baozun.png" alt="宝尊电商"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xbnwl.png" alt="喜百年供应链"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gwwisdom.png" alt="南京观为智慧软件科技有限公司"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ztrip.png" alt="在途商旅"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hualala.png" alt="哗啦啦"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/xin.png" alt="优信二手车"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/maycur.png" alt="每刻科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bullyun.png" alt="杭州蛮牛"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/bestpay.png" alt="翼支付"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mockuai.png" alt="魔筷科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ct108.png" alt="畅唐网络"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jusdaglobal.jpg" alt="准时达"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/izaodao.png" alt="早道网校"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ovopark.jpg" alt="万店掌"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/funstory.jpg" alt="推文科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/lemonbox.png" alt="Lemonbox"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/polyt.png" alt="保利票务"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/chipwing.png" alt="芯翼科技"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/czbank.png" alt="浙商银行"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/czbyqy.png" alt="易企银科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/yundun.jpg" alt="上海云盾"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/gaiaworks.jpg" alt="苏州盖雅信息技术有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mengxiang.png" alt="爱库存"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/jidouauto.png" alt="极豆车联网"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ipalfish.png" alt="伴鱼少儿英语"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/iqboard.png" alt="锐达科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/koolearn.png" alt="新东方在线"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kingcome.png" alt="金康高科"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/soulapp.png" alt="soul"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/ezrpro.png" alt="驿氪"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/hc360.png" alt="慧聪"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/21cp.png" alt="中塑在线"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/goinglink.jpg" alt="甄云科技"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/aitrace.jpg" alt="追溯科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/moqipobing.png" alt="玩吧"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/cassan.png" alt="广州卡桑信息技术有限公司"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/shuidichou.png" alt="水滴"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/kuwo.png" alt="酷我音乐"></td> </tr> <tr> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mi.png" alt="小米"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/mvmyun.png" alt="今典"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/visabao.jpg" alt="签宝科技"></td> <td><img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/known-users/inrice.png" alt="广州趣米网络科技有限公司"></td> </tr> </table> # Awards <img src="https://raw.githubusercontent.com/ctripcorp/apollo-community/master/images/awards/oschina-2018-award.jpg" width="240px" alt="The most popular Chinese open source software in 2018"> # Stargazers over time [![Stargazers over time](https://starcharts.herokuapp.com/ctripcorp/apollo.svg)](https://starcharts.herokuapp.com/ctripcorp/apollo)
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./docs/zh/design/apollo-introduction.md
# &nbsp; # 1、What is Apollo ## 1.1 背景 随着程序功能的日益复杂,程序的配置日益增多:各种功能的开关、参数的配置、服务器的地址…… 对程序配置的期望值也越来越高:配置修改后实时生效,灰度发布,分环境、分集群管理配置,完善的权限、审核机制…… 在这样的大环境下,传统的通过配置文件、数据库等方式已经越来越无法满足开发人员对配置管理的需求。 Apollo配置中心应运而生! ## 1.2 Apollo简介 Apollo(阿波罗)是携程框架部门研发的开源配置管理中心,能够集中化管理应用不同环境、不同集群的配置,配置修改后能够实时推送到应用端,并且具备规范的权限、流程治理等特性。 Apollo支持4个维度管理Key-Value格式的配置: 1. application (应用) 2. environment (环境) 3. cluster (集群) 4. namespace (命名空间) 同时,Apollo基于开源模式开发,开源地址:<a href="https://github.com/ctripcorp/apollo" target="_blank">https://github.com/ctripcorp/apollo</a> ## 1.2 配置基本概念 既然Apollo定位于配置中心,那么在这里有必要先简单介绍一下什么是配置。 按照我们的理解,配置有以下几个属性: * **配置是独立于程序的只读变量** * 配置首先是独立于程序的,同一份程序在不同的配置下会有不同的行为。 * 其次,配置对于程序是只读的,程序通过读取配置来改变自己的行为,但是程序不应该去改变配置。 * 常见的配置有:DB Connection Str、Thread Pool Size、Buffer Size、Request Timeout、Feature Switch、Server Urls等。 * **配置伴随应用的整个生命周期** * 配置贯穿于应用的整个生命周期,应用在启动时通过读取配置来初始化,在运行时根据配置调整行为。 * **配置可以有多种加载方式** * 配置也有很多种加载方式,常见的有程序内部hard code,配置文件,环境变量,启动参数,基于数据库等 * **配置需要治理** * 权限控制 * 由于配置能改变程序的行为,不正确的配置甚至能引起灾难,所以对配置的修改必须有比较完善的权限控制 * 不同环境、集群配置管理 * 同一份程序在不同的环境(开发,测试,生产)、不同的集群(如不同的数据中心)经常需要有不同的配置,所以需要有完善的环境、集群配置管理 * 框架类组件配置管理 * 还有一类比较特殊的配置 - 框架类组件配置,比如CAT客户端的配置。 * 虽然这类框架类组件是由其他团队开发、维护,但是运行时是在业务实际应用内的,所以本质上可以认为框架类组件也是应用的一部分。 * 这类组件对应的配置也需要有比较完善的管理方式。 # 2、Why Apollo 正是基于配置的特殊性,所以Apollo从设计之初就立志于成为一个有治理能力的配置发布平台,目前提供了以下的特性: * **统一管理不同环境、不同集群的配置** * Apollo提供了一个统一界面集中式管理不同环境(environment)、不同集群(cluster)、不同命名空间(namespace)的配置。 * 同一份代码部署在不同的集群,可以有不同的配置,比如zookeeper的地址等 * 通过命名空间(namespace)可以很方便地支持多个不同应用共享同一份配置,同时还允许应用对共享的配置进行覆盖 * **配置修改实时生效(热发布)** * 用户在Apollo修改完配置并发布后,客户端能实时(1秒)接收到最新的配置,并通知到应用程序 * **版本发布管理** * 所有的配置发布都有版本概念,从而可以方便地支持配置的回滚 * **灰度发布** * 支持配置的灰度发布,比如点了发布后,只对部分应用实例生效,等观察一段时间没问题后再推给所有应用实例 * **权限管理、发布审核、操作审计** * 应用和配置的管理都有完善的权限管理机制,对配置的管理还分为了编辑和发布两个环节,从而减少人为的错误。 * 所有的操作都有审计日志,可以方便地追踪问题 * **客户端配置信息监控** * 可以在界面上方便地看到配置在被哪些实例使用 * **提供Java和.Net原生客户端** * 提供了Java和.Net的原生客户端,方便应用集成 * 支持Spring Placeholder, Annotation和Spring Boot的ConfigurationProperties,方便应用使用(需要Spring 3.1.1+) * 同时提供了Http接口,非Java和.Net应用也可以方便地使用 * **提供开放平台API** * Apollo自身提供了比较完善的统一配置管理界面,支持多环境、多数据中心配置管理、权限、流程治理等特性。不过Apollo出于通用性考虑,不会对配置的修改做过多限制,只要符合基本的格式就能保存,不会针对不同的配置值进行针对性的校验,如数据库用户名、密码,Redis服务地址等 * 对于这类应用配置,Apollo支持应用方通过开放平台API在Apollo进行配置的修改和发布,并且具备完善的授权和权限控制 * **部署简单** * 配置中心作为基础服务,可用性要求非常高,这就要求Apollo对外部依赖尽可能地少 * 目前唯一的外部依赖是MySQL,所以部署非常简单,只要安装好Java和MySQL就可以让Apollo跑起来 * Apollo还提供了打包脚本,一键就可以生成所有需要的安装包,并且支持自定义运行时参数 # 3、Apollo at a glance ## 3.1 基础模型 如下即是Apollo的基础模型: 1. 用户在配置中心对配置进行修改并发布 2. 配置中心通知Apollo客户端有配置更新 3. Apollo客户端从配置中心拉取最新的配置、更新本地配置并通知到应用 ![basic-architecture](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/basic-architecture.png) ## 3.2 界面概览 ![apollo-home-screenshot](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/apollo-home-screenshot.jpg) 上图是Apollo配置中心中一个项目的配置首页 * 在页面左上方的环境列表模块展示了所有的环境和集群,用户可以随时切换。 * 页面中央展示了两个namespace(application和FX.apollo)的配置信息,默认按照表格模式展示、编辑。用户也可以切换到文本模式,以文件形式查看、编辑。 * 页面上可以方便地进行发布、回滚、灰度、授权、查看更改历史和发布历史等操作 ## 3.3 添加/修改配置项 用户可以通过配置中心界面方便的添加/修改配置项,更多使用说明请参见[应用接入指南](zh/usage/apollo-user-guide) ![edit-item-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/edit-item-entry.png) 输入配置信息: ![edit-item](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/edit-item.png) ## 3.4 发布配置 通过配置中心发布配置: ![publish-items](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/publish-items-entry.png) 填写发布信息: ![publish-items](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/publish-items.png) ## 3.5 客户端获取配置(Java API样例) 配置发布后,就能在客户端获取到了,以Java为例,获取配置的示例代码如下。Apollo客户端还支持和Spring整合,更多客户端使用说明请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)和[.Net客户端使用指南](zh/usage/dotnet-sdk-user-guide)。 ```java Config config = ConfigService.getAppConfig(); Integer defaultRequestTimeout = 200; Integer requestTimeout = config.getIntProperty("requestTimeout", defaultRequestTimeout); ``` ## 3.6 客户端监听配置变化 通过上述获取配置代码,应用就能实时获取到最新的配置了。 不过在某些场景下,应用还需要在配置变化时获得通知,比如数据库连接的切换等,所以Apollo还提供了监听配置变化的功能,Java示例如下: ```java Config config = ConfigService.getAppConfig(); config.addChangeListener(new ConfigChangeListener() { @Override public void onChange(ConfigChangeEvent changeEvent) { for (String key : changeEvent.changedKeys()) { ConfigChange change = changeEvent.getChange(key); System.out.println(String.format( "Found change - key: %s, oldValue: %s, newValue: %s, changeType: %s", change.getPropertyName(), change.getOldValue(), change.getNewValue(), change.getChangeType())); } } }); ``` ## 3.7 Spring集成样例 Apollo和Spring也可以很方便地集成,只需要标注`@EnableApolloConfig`后就可以通过`@Value`获取配置信息: ```java @Configuration @EnableApolloConfig public class AppConfig {} ``` ```java @Component public class SomeBean { //timeout的值会自动更新 @Value("${request.timeout:200}") private int timeout; } ``` # 4、Apollo in depth 通过上面的介绍,相信大家已经对Apollo有了一个初步的了解,并且相信已经覆盖到了大部分的使用场景。 接下来会主要介绍Apollo的cluster管理(集群)、namespace管理(命名空间)和对应的配置获取规则。 ## 4.1 Core Concepts 在介绍高级特性前,我们有必要先来了解一下Apollo中的几个核心概念: 1. **application (应用)** * 这个很好理解,就是实际使用配置的应用,Apollo客户端在运行时需要知道当前应用是谁,从而可以去获取对应的配置 * 每个应用都需要有唯一的身份标识 -- appId,我们认为应用身份是跟着代码走的,所以需要在代码中配置,具体信息请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)。 2. **environment (环境)** * 配置对应的环境,Apollo客户端在运行时需要知道当前应用处于哪个环境,从而可以去获取应用的配置 * 我们认为环境和代码无关,同一份代码部署在不同的环境就应该能够获取到不同环境的配置 * 所以环境默认是通过读取机器上的配置(server.properties中的env属性)指定的,不过为了开发方便,我们也支持运行时通过System Property等指定,具体信息请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)。 3. **cluster (集群)** * 一个应用下不同实例的分组,比如典型的可以按照数据中心分,把上海机房的应用实例分为一个集群,把北京机房的应用实例分为另一个集群。 * 对不同的cluster,同一个配置可以有不一样的值,如zookeeper地址。 * 集群默认是通过读取机器上的配置(server.properties中的idc属性)指定的,不过也支持运行时通过System Property指定,具体信息请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)。 4. **namespace (命名空间)** * 一个应用下不同配置的分组,可以简单地把namespace类比为文件,不同类型的配置存放在不同的文件中,如数据库配置文件,RPC配置文件,应用自身的配置文件等 * 应用可以直接读取到公共组件的配置namespace,如DAL,RPC等 * 应用也可以通过继承公共组件的配置namespace来对公共组件的配置做调整,如DAL的初始数据库连接数 ## 4.2 自定义Cluster > 【本节内容仅对应用需要对不同集群应用不同配置才需要,如没有相关需求,可以跳过本节】 比如我们有应用在A数据中心和B数据中心都有部署,那么如果希望两个数据中心的配置不一样的话,我们可以通过新建cluster来解决。 ### 4.2.1 新建Cluster 新建Cluster只有项目的管理员才有权限,管理员可以在页面左侧看到“添加集群”按钮。 ![create-cluster](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-cluster.png) 点击后就进入到集群添加页面,一般情况下可以按照数据中心来划分集群,如SHAJQ、SHAOY等。 不过也支持自定义集群,比如可以为A机房的某一台机器和B机房的某一台机创建一个集群,使用一套配置。 ![create-cluster-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-cluster-detail.png) ### 4.2.2 在Cluster中添加配置并发布 集群添加成功后,就可以为该集群添加配置了,首先需要按照下图所示切换到SHAJQ集群,之后配置添加流程和[3.3 添加/修改配置项](#_33-添加修改配置项)一样,这里就不再赘述了。 ![cluster-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/cluster-created.png) ### 4.2.3 指定应用实例所属的Cluster Apollo会默认使用应用实例所在的数据中心作为cluster,所以如果两者一致的话,不需要额外配置。 如果cluster和数据中心不一致的话,那么就需要通过System Property方式来指定运行时cluster: * -Dapollo.cluster=SomeCluster * 这里注意`apollo.cluster`为全小写 ## 4.3 自定义Namespace > 【本节仅对公共组件配置或需要多个应用共享配置才需要,如没有相关需求,可以跳过本节】 如果应用有公共组件(如hermes-producer,cat-client等)供其它应用使用,就需要通过自定义namespace来实现公共组件的配置。 ### 4.3.1 新建Namespace 以hermes-producer为例,需要先新建一个namespace,新建namespace只有项目的管理员才有权限,管理员可以在页面左侧看到“添加Namespace”按钮。 ![create-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace.png) 点击后就进入namespace添加页面,Apollo会把应用所属的部门作为namespace的前缀,如FX。 ![create-namespace-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace-detail.png) ### 4.3.2 关联到环境和集群 Namespace创建完,需要选择在哪些环境和集群下使用 ![link-namespace-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/link-namespace-detail.png) ### 4.3.3 在Namespace中添加配置项 接下来在这个新建的namespace下添加配置项 ![add-item-in-new-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/add-item-in-new-namespace.png) 添加完成后就能在FX.Hermes.Producer的namespace中看到配置。 ![item-created-in-new-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/item-created-in-new-namespace.png) ### 4.3.4 发布namespace的配置 ![publish-items-in-new-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/publish-items-in-new-namespace.png) ### 4.3.5 客户端获取Namespace配置 对自定义namespace的配置获取,稍有不同,需要程序传入namespace的名字。Apollo客户端还支持和Spring整合,更多客户端使用说明请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)和[.Net客户端使用指南](zh/usage/dotnet-sdk-user-guide)。 ```java Config config = ConfigService.getConfig("FX.Hermes.Producer"); Integer defaultSenderBatchSize = 200; Integer senderBatchSize = config.getIntProperty("sender.batchsize", defaultSenderBatchSize); ``` ### 4.3.6 客户端监听Namespace配置变化 ```java Config config = ConfigService.getConfig("FX.Hermes.Producer"); config.addChangeListener(new ConfigChangeListener() { @Override public void onChange(ConfigChangeEvent changeEvent) { System.out.println("Changes for namespace " + changeEvent.getNamespace()); for (String key : changeEvent.changedKeys()) { ConfigChange change = changeEvent.getChange(key); System.out.println(String.format( "Found change - key: %s, oldValue: %s, newValue: %s, changeType: %s", change.getPropertyName(), change.getOldValue(), change.getNewValue(), change.getChangeType())); } } }); ``` ### 4.3.7 Spring集成样例 ```java @Configuration @EnableApolloConfig("FX.Hermes.Producer") public class AppConfig {} ``` ```java @Component public class SomeBean { //timeout的值会自动更新 @Value("${request.timeout:200}") private int timeout; } ``` ## 4.4 配置获取规则 > 【本节仅当应用自定义了集群或namespace才需要,如无相关需求,可以跳过本节】 在有了cluster概念后,配置的规则就显得重要了。 比如应用部署在A机房,但是并没有在Apollo新建cluster,这个时候Apollo的行为是怎样的? 或者在运行时指定了cluster=SomeCluster,但是并没有在Apollo新建cluster,这个时候Apollo的行为是怎样的? 接下来就来介绍一下配置获取的规则。 ### 4.4.1 应用自身配置的获取规则 当应用使用下面的语句获取配置时,我们称之为获取应用自身的配置,也就是应用自身的application namespace的配置。 ```java Config config = ConfigService.getAppConfig(); ``` 对这种情况的配置获取规则,简而言之如下: 1. 首先查找运行时cluster的配置(通过apollo.cluster指定) 2. 如果没有找到,则查找数据中心cluster的配置 3. 如果还是没有找到,则返回默认cluster的配置 图示如下: ![application-config-precedence](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/application-config-precedence.png) 所以如果应用部署在A数据中心,但是用户没有在Apollo创建cluster,那么获取的配置就是默认cluster(default)的。 如果应用部署在A数据中心,同时在运行时指定了SomeCluster,但是没有在Apollo创建cluster,那么获取的配置就是A数据中心cluster的配置,如果A数据中心cluster没有配置的话,那么获取的配置就是默认cluster(default)的。 ### 4.4.2 公共组件配置的获取规则 以`FX.Hermes.Producer`为例,hermes producer是hermes发布的公共组件。当使用下面的语句获取配置时,我们称之为获取公共组件的配置。 ```java Config config = ConfigService.getConfig("FX.Hermes.Producer"); ``` 对这种情况的配置获取规则,简而言之如下: 1. 首先获取当前应用下的`FX.Hermes.Producer` namespace的配置 2. 然后获取hermes应用下`FX.Hermes.Producer` namespace的配置 3. 上面两部分配置的并集就是最终使用的配置,如有key一样的部分,以当前应用优先 图示如下: ![public-namespace-config-precedence](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-config-precedence.png) 通过这种方式,就实现了对框架类组件的配置管理,框架组件提供方提供配置的默认值,应用如果有特殊需求,可以自行覆盖。 ## 4.5 总体设计 ![overall-architecture](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/overall-architecture.png) 上图简要描述了Apollo的总体设计,我们可以从下往上看: * Config Service提供配置的读取、推送等功能,服务对象是Apollo客户端 * Admin Service提供配置的修改、发布等功能,服务对象是Apollo Portal(管理界面) * Config Service和Admin Service都是多实例、无状态部署,所以需要将自己注册到Eureka中并保持心跳 * 在Eureka之上我们架了一层Meta Server用于封装Eureka的服务发现接口 * Client通过域名访问Meta Server获取Config Service服务列表(IP+Port),而后直接通过IP+Port访问服务,同时在Client侧会做load balance、错误重试 * Portal通过域名访问Meta Server获取Admin Service服务列表(IP+Port),而后直接通过IP+Port访问服务,同时在Portal侧会做load balance、错误重试 * 为了简化部署,我们实际上会把Config Service、Eureka和Meta Server三个逻辑角色部署在同一个JVM进程中 ### 4.5.1 Why Eureka 为什么我们采用Eureka作为服务注册中心,而不是使用传统的zk、etcd呢?我大致总结了一下,有以下几方面的原因: * 它提供了完整的Service Registry和Service Discovery实现 * 首先是提供了完整的实现,并且也经受住了Netflix自己的生产环境考验,相对使用起来会比较省心。 * 和Spring Cloud无缝集成 * 我们的项目本身就使用了Spring Cloud和Spring Boot,同时Spring Cloud还有一套非常完善的开源代码来整合Eureka,所以使用起来非常方便。 * 另外,Eureka还支持在我们应用自身的容器中启动,也就是说我们的应用启动完之后,既充当了Eureka的角色,同时也是服务的提供者。这样就极大的提高了服务的可用性。 * **这一点是我们选择Eureka而不是zk、etcd等的主要原因,为了提高配置中心的可用性和降低部署复杂度,我们需要尽可能地减少外部依赖。** * Open Source * 最后一点是开源,由于代码是开源的,所以非常便于我们了解它的实现原理和排查问题。 ## 4.6 客户端设计 ![client-architecture](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/client-architecture.png) 上图简要描述了Apollo客户端的实现原理: 1. 客户端和服务端保持了一个长连接,从而能第一时间获得配置更新的推送。 2. 客户端还会定时从Apollo配置中心服务端拉取应用的最新配置。 * 这是一个fallback机制,为了防止推送机制失效导致配置不更新 * 客户端定时拉取会上报本地版本,所以一般情况下,对于定时拉取的操作,服务端都会返回304 - Not Modified * 定时频率默认为每5分钟拉取一次,客户端也可以通过在运行时指定System Property: `apollo.refreshInterval`来覆盖,单位为分钟。 3. 客户端从Apollo配置中心服务端获取到应用的最新配置后,会保存在内存中 4. 客户端会把从服务端获取到的配置在本地文件系统缓存一份 * 在遇到服务不可用,或网络不通的时候,依然能从本地恢复配置 5. 应用程序从Apollo客户端获取最新的配置、订阅配置更新通知 ### 4.6.1 配置更新推送实现 前面提到了Apollo客户端和服务端保持了一个长连接,从而能第一时间获得配置更新的推送。 长连接实际上我们是通过Http Long Polling实现的,具体而言: * 客户端发起一个Http请求到服务端 * 服务端会保持住这个连接60秒 * 如果在60秒内有客户端关心的配置变化,被保持住的客户端请求会立即返回,并告知客户端有配置变化的namespace信息,客户端会据此拉取对应namespace的最新配置 * 如果在60秒内没有客户端关心的配置变化,那么会返回Http状态码304给客户端 * 客户端在收到服务端请求后会立即重新发起连接,回到第一步 考虑到会有数万客户端向服务端发起长连,在服务端我们使用了async servlet(Spring DeferredResult)来服务Http Long Polling请求。 ## 4.7 可用性考虑 配置中心作为基础服务,可用性要求非常高,下面的表格描述了不同场景下Apollo的可用性: | 场景 | 影响 | 降级 | 原因 | |------------------------|--------------------------------------|---------------------------------------|-----------------------------------------------------------------------------------------| | 某台config service下线 | 无影响 | | Config service无状态,客户端重连其它config service | | 所有config service下线 | 客户端无法读取最新配置,Portal无影响 | 客户端重启时,可以读取本地缓存配置文件 | | | 某台admin service下线 | 无影响 | | Admin service无状态,Portal重连其它admin service | | 所有admin service下线 | 客户端无影响,portal无法更新配置 | | | | 某台portal下线 | 无影响 | | Portal域名通过slb绑定多台服务器,重试后指向可用的服务器 | | 全部portal下线 | 客户端无影响,portal无法更新配置 | | | | 某个数据中心下线 | 无影响 | | 多数据中心部署,数据完全同步,Meta Server/Portal域名通过slb自动切换到其它存活的数据中心 | # 5、Contribute to Apollo Apollo从开发之初就是以开源模式开发的,所以也非常欢迎有兴趣、有余力的朋友一起加入进来。 服务端开发使用的是Java,基于Spring Cloud和Spring Boot框架。客户端目前提供了Java和.Net两种实现。 Github地址:<a href="https://github.com/ctripcorp/apollo" target="_blank">https://github.com/ctripcorp/apollo</a> 欢迎大家发起Pull Request!
# &nbsp; # 1、What is Apollo ## 1.1 背景 随着程序功能的日益复杂,程序的配置日益增多:各种功能的开关、参数的配置、服务器的地址…… 对程序配置的期望值也越来越高:配置修改后实时生效,灰度发布,分环境、分集群管理配置,完善的权限、审核机制…… 在这样的大环境下,传统的通过配置文件、数据库等方式已经越来越无法满足开发人员对配置管理的需求。 Apollo配置中心应运而生! ## 1.2 Apollo简介 Apollo(阿波罗)是携程框架部门研发的开源配置管理中心,能够集中化管理应用不同环境、不同集群的配置,配置修改后能够实时推送到应用端,并且具备规范的权限、流程治理等特性。 Apollo支持4个维度管理Key-Value格式的配置: 1. application (应用) 2. environment (环境) 3. cluster (集群) 4. namespace (命名空间) 同时,Apollo基于开源模式开发,开源地址:<a href="https://github.com/ctripcorp/apollo" target="_blank">https://github.com/ctripcorp/apollo</a> ## 1.2 配置基本概念 既然Apollo定位于配置中心,那么在这里有必要先简单介绍一下什么是配置。 按照我们的理解,配置有以下几个属性: * **配置是独立于程序的只读变量** * 配置首先是独立于程序的,同一份程序在不同的配置下会有不同的行为。 * 其次,配置对于程序是只读的,程序通过读取配置来改变自己的行为,但是程序不应该去改变配置。 * 常见的配置有:DB Connection Str、Thread Pool Size、Buffer Size、Request Timeout、Feature Switch、Server Urls等。 * **配置伴随应用的整个生命周期** * 配置贯穿于应用的整个生命周期,应用在启动时通过读取配置来初始化,在运行时根据配置调整行为。 * **配置可以有多种加载方式** * 配置也有很多种加载方式,常见的有程序内部hard code,配置文件,环境变量,启动参数,基于数据库等 * **配置需要治理** * 权限控制 * 由于配置能改变程序的行为,不正确的配置甚至能引起灾难,所以对配置的修改必须有比较完善的权限控制 * 不同环境、集群配置管理 * 同一份程序在不同的环境(开发,测试,生产)、不同的集群(如不同的数据中心)经常需要有不同的配置,所以需要有完善的环境、集群配置管理 * 框架类组件配置管理 * 还有一类比较特殊的配置 - 框架类组件配置,比如CAT客户端的配置。 * 虽然这类框架类组件是由其他团队开发、维护,但是运行时是在业务实际应用内的,所以本质上可以认为框架类组件也是应用的一部分。 * 这类组件对应的配置也需要有比较完善的管理方式。 # 2、Why Apollo 正是基于配置的特殊性,所以Apollo从设计之初就立志于成为一个有治理能力的配置发布平台,目前提供了以下的特性: * **统一管理不同环境、不同集群的配置** * Apollo提供了一个统一界面集中式管理不同环境(environment)、不同集群(cluster)、不同命名空间(namespace)的配置。 * 同一份代码部署在不同的集群,可以有不同的配置,比如zookeeper的地址等 * 通过命名空间(namespace)可以很方便地支持多个不同应用共享同一份配置,同时还允许应用对共享的配置进行覆盖 * **配置修改实时生效(热发布)** * 用户在Apollo修改完配置并发布后,客户端能实时(1秒)接收到最新的配置,并通知到应用程序 * **版本发布管理** * 所有的配置发布都有版本概念,从而可以方便地支持配置的回滚 * **灰度发布** * 支持配置的灰度发布,比如点了发布后,只对部分应用实例生效,等观察一段时间没问题后再推给所有应用实例 * **权限管理、发布审核、操作审计** * 应用和配置的管理都有完善的权限管理机制,对配置的管理还分为了编辑和发布两个环节,从而减少人为的错误。 * 所有的操作都有审计日志,可以方便地追踪问题 * **客户端配置信息监控** * 可以在界面上方便地看到配置在被哪些实例使用 * **提供Java和.Net原生客户端** * 提供了Java和.Net的原生客户端,方便应用集成 * 支持Spring Placeholder, Annotation和Spring Boot的ConfigurationProperties,方便应用使用(需要Spring 3.1.1+) * 同时提供了Http接口,非Java和.Net应用也可以方便地使用 * **提供开放平台API** * Apollo自身提供了比较完善的统一配置管理界面,支持多环境、多数据中心配置管理、权限、流程治理等特性。不过Apollo出于通用性考虑,不会对配置的修改做过多限制,只要符合基本的格式就能保存,不会针对不同的配置值进行针对性的校验,如数据库用户名、密码,Redis服务地址等 * 对于这类应用配置,Apollo支持应用方通过开放平台API在Apollo进行配置的修改和发布,并且具备完善的授权和权限控制 * **部署简单** * 配置中心作为基础服务,可用性要求非常高,这就要求Apollo对外部依赖尽可能地少 * 目前唯一的外部依赖是MySQL,所以部署非常简单,只要安装好Java和MySQL就可以让Apollo跑起来 * Apollo还提供了打包脚本,一键就可以生成所有需要的安装包,并且支持自定义运行时参数 # 3、Apollo at a glance ## 3.1 基础模型 如下即是Apollo的基础模型: 1. 用户在配置中心对配置进行修改并发布 2. 配置中心通知Apollo客户端有配置更新 3. Apollo客户端从配置中心拉取最新的配置、更新本地配置并通知到应用 ![basic-architecture](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/basic-architecture.png) ## 3.2 界面概览 ![apollo-home-screenshot](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/apollo-home-screenshot.jpg) 上图是Apollo配置中心中一个项目的配置首页 * 在页面左上方的环境列表模块展示了所有的环境和集群,用户可以随时切换。 * 页面中央展示了两个namespace(application和FX.apollo)的配置信息,默认按照表格模式展示、编辑。用户也可以切换到文本模式,以文件形式查看、编辑。 * 页面上可以方便地进行发布、回滚、灰度、授权、查看更改历史和发布历史等操作 ## 3.3 添加/修改配置项 用户可以通过配置中心界面方便的添加/修改配置项,更多使用说明请参见[应用接入指南](zh/usage/apollo-user-guide) ![edit-item-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/edit-item-entry.png) 输入配置信息: ![edit-item](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/edit-item.png) ## 3.4 发布配置 通过配置中心发布配置: ![publish-items](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/publish-items-entry.png) 填写发布信息: ![publish-items](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/publish-items.png) ## 3.5 客户端获取配置(Java API样例) 配置发布后,就能在客户端获取到了,以Java为例,获取配置的示例代码如下。Apollo客户端还支持和Spring整合,更多客户端使用说明请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)和[.Net客户端使用指南](zh/usage/dotnet-sdk-user-guide)。 ```java Config config = ConfigService.getAppConfig(); Integer defaultRequestTimeout = 200; Integer requestTimeout = config.getIntProperty("requestTimeout", defaultRequestTimeout); ``` ## 3.6 客户端监听配置变化 通过上述获取配置代码,应用就能实时获取到最新的配置了。 不过在某些场景下,应用还需要在配置变化时获得通知,比如数据库连接的切换等,所以Apollo还提供了监听配置变化的功能,Java示例如下: ```java Config config = ConfigService.getAppConfig(); config.addChangeListener(new ConfigChangeListener() { @Override public void onChange(ConfigChangeEvent changeEvent) { for (String key : changeEvent.changedKeys()) { ConfigChange change = changeEvent.getChange(key); System.out.println(String.format( "Found change - key: %s, oldValue: %s, newValue: %s, changeType: %s", change.getPropertyName(), change.getOldValue(), change.getNewValue(), change.getChangeType())); } } }); ``` ## 3.7 Spring集成样例 Apollo和Spring也可以很方便地集成,只需要标注`@EnableApolloConfig`后就可以通过`@Value`获取配置信息: ```java @Configuration @EnableApolloConfig public class AppConfig {} ``` ```java @Component public class SomeBean { //timeout的值会自动更新 @Value("${request.timeout:200}") private int timeout; } ``` # 4、Apollo in depth 通过上面的介绍,相信大家已经对Apollo有了一个初步的了解,并且相信已经覆盖到了大部分的使用场景。 接下来会主要介绍Apollo的cluster管理(集群)、namespace管理(命名空间)和对应的配置获取规则。 ## 4.1 Core Concepts 在介绍高级特性前,我们有必要先来了解一下Apollo中的几个核心概念: 1. **application (应用)** * 这个很好理解,就是实际使用配置的应用,Apollo客户端在运行时需要知道当前应用是谁,从而可以去获取对应的配置 * 每个应用都需要有唯一的身份标识 -- appId,我们认为应用身份是跟着代码走的,所以需要在代码中配置,具体信息请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)。 2. **environment (环境)** * 配置对应的环境,Apollo客户端在运行时需要知道当前应用处于哪个环境,从而可以去获取应用的配置 * 我们认为环境和代码无关,同一份代码部署在不同的环境就应该能够获取到不同环境的配置 * 所以环境默认是通过读取机器上的配置(server.properties中的env属性)指定的,不过为了开发方便,我们也支持运行时通过System Property等指定,具体信息请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)。 3. **cluster (集群)** * 一个应用下不同实例的分组,比如典型的可以按照数据中心分,把上海机房的应用实例分为一个集群,把北京机房的应用实例分为另一个集群。 * 对不同的cluster,同一个配置可以有不一样的值,如zookeeper地址。 * 集群默认是通过读取机器上的配置(server.properties中的idc属性)指定的,不过也支持运行时通过System Property指定,具体信息请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)。 4. **namespace (命名空间)** * 一个应用下不同配置的分组,可以简单地把namespace类比为文件,不同类型的配置存放在不同的文件中,如数据库配置文件,RPC配置文件,应用自身的配置文件等 * 应用可以直接读取到公共组件的配置namespace,如DAL,RPC等 * 应用也可以通过继承公共组件的配置namespace来对公共组件的配置做调整,如DAL的初始数据库连接数 ## 4.2 自定义Cluster > 【本节内容仅对应用需要对不同集群应用不同配置才需要,如没有相关需求,可以跳过本节】 比如我们有应用在A数据中心和B数据中心都有部署,那么如果希望两个数据中心的配置不一样的话,我们可以通过新建cluster来解决。 ### 4.2.1 新建Cluster 新建Cluster只有项目的管理员才有权限,管理员可以在页面左侧看到“添加集群”按钮。 ![create-cluster](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-cluster.png) 点击后就进入到集群添加页面,一般情况下可以按照数据中心来划分集群,如SHAJQ、SHAOY等。 不过也支持自定义集群,比如可以为A机房的某一台机器和B机房的某一台机创建一个集群,使用一套配置。 ![create-cluster-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-cluster-detail.png) ### 4.2.2 在Cluster中添加配置并发布 集群添加成功后,就可以为该集群添加配置了,首先需要按照下图所示切换到SHAJQ集群,之后配置添加流程和[3.3 添加/修改配置项](#_33-添加修改配置项)一样,这里就不再赘述了。 ![cluster-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/cluster-created.png) ### 4.2.3 指定应用实例所属的Cluster Apollo会默认使用应用实例所在的数据中心作为cluster,所以如果两者一致的话,不需要额外配置。 如果cluster和数据中心不一致的话,那么就需要通过System Property方式来指定运行时cluster: * -Dapollo.cluster=SomeCluster * 这里注意`apollo.cluster`为全小写 ## 4.3 自定义Namespace > 【本节仅对公共组件配置或需要多个应用共享配置才需要,如没有相关需求,可以跳过本节】 如果应用有公共组件(如hermes-producer,cat-client等)供其它应用使用,就需要通过自定义namespace来实现公共组件的配置。 ### 4.3.1 新建Namespace 以hermes-producer为例,需要先新建一个namespace,新建namespace只有项目的管理员才有权限,管理员可以在页面左侧看到“添加Namespace”按钮。 ![create-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace.png) 点击后就进入namespace添加页面,Apollo会把应用所属的部门作为namespace的前缀,如FX。 ![create-namespace-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace-detail.png) ### 4.3.2 关联到环境和集群 Namespace创建完,需要选择在哪些环境和集群下使用 ![link-namespace-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/link-namespace-detail.png) ### 4.3.3 在Namespace中添加配置项 接下来在这个新建的namespace下添加配置项 ![add-item-in-new-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/add-item-in-new-namespace.png) 添加完成后就能在FX.Hermes.Producer的namespace中看到配置。 ![item-created-in-new-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/item-created-in-new-namespace.png) ### 4.3.4 发布namespace的配置 ![publish-items-in-new-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/publish-items-in-new-namespace.png) ### 4.3.5 客户端获取Namespace配置 对自定义namespace的配置获取,稍有不同,需要程序传入namespace的名字。Apollo客户端还支持和Spring整合,更多客户端使用说明请参见[Java客户端使用指南](zh/usage/java-sdk-user-guide)和[.Net客户端使用指南](zh/usage/dotnet-sdk-user-guide)。 ```java Config config = ConfigService.getConfig("FX.Hermes.Producer"); Integer defaultSenderBatchSize = 200; Integer senderBatchSize = config.getIntProperty("sender.batchsize", defaultSenderBatchSize); ``` ### 4.3.6 客户端监听Namespace配置变化 ```java Config config = ConfigService.getConfig("FX.Hermes.Producer"); config.addChangeListener(new ConfigChangeListener() { @Override public void onChange(ConfigChangeEvent changeEvent) { System.out.println("Changes for namespace " + changeEvent.getNamespace()); for (String key : changeEvent.changedKeys()) { ConfigChange change = changeEvent.getChange(key); System.out.println(String.format( "Found change - key: %s, oldValue: %s, newValue: %s, changeType: %s", change.getPropertyName(), change.getOldValue(), change.getNewValue(), change.getChangeType())); } } }); ``` ### 4.3.7 Spring集成样例 ```java @Configuration @EnableApolloConfig("FX.Hermes.Producer") public class AppConfig {} ``` ```java @Component public class SomeBean { //timeout的值会自动更新 @Value("${request.timeout:200}") private int timeout; } ``` ## 4.4 配置获取规则 > 【本节仅当应用自定义了集群或namespace才需要,如无相关需求,可以跳过本节】 在有了cluster概念后,配置的规则就显得重要了。 比如应用部署在A机房,但是并没有在Apollo新建cluster,这个时候Apollo的行为是怎样的? 或者在运行时指定了cluster=SomeCluster,但是并没有在Apollo新建cluster,这个时候Apollo的行为是怎样的? 接下来就来介绍一下配置获取的规则。 ### 4.4.1 应用自身配置的获取规则 当应用使用下面的语句获取配置时,我们称之为获取应用自身的配置,也就是应用自身的application namespace的配置。 ```java Config config = ConfigService.getAppConfig(); ``` 对这种情况的配置获取规则,简而言之如下: 1. 首先查找运行时cluster的配置(通过apollo.cluster指定) 2. 如果没有找到,则查找数据中心cluster的配置 3. 如果还是没有找到,则返回默认cluster的配置 图示如下: ![application-config-precedence](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/application-config-precedence.png) 所以如果应用部署在A数据中心,但是用户没有在Apollo创建cluster,那么获取的配置就是默认cluster(default)的。 如果应用部署在A数据中心,同时在运行时指定了SomeCluster,但是没有在Apollo创建cluster,那么获取的配置就是A数据中心cluster的配置,如果A数据中心cluster没有配置的话,那么获取的配置就是默认cluster(default)的。 ### 4.4.2 公共组件配置的获取规则 以`FX.Hermes.Producer`为例,hermes producer是hermes发布的公共组件。当使用下面的语句获取配置时,我们称之为获取公共组件的配置。 ```java Config config = ConfigService.getConfig("FX.Hermes.Producer"); ``` 对这种情况的配置获取规则,简而言之如下: 1. 首先获取当前应用下的`FX.Hermes.Producer` namespace的配置 2. 然后获取hermes应用下`FX.Hermes.Producer` namespace的配置 3. 上面两部分配置的并集就是最终使用的配置,如有key一样的部分,以当前应用优先 图示如下: ![public-namespace-config-precedence](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-config-precedence.png) 通过这种方式,就实现了对框架类组件的配置管理,框架组件提供方提供配置的默认值,应用如果有特殊需求,可以自行覆盖。 ## 4.5 总体设计 ![overall-architecture](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/overall-architecture.png) 上图简要描述了Apollo的总体设计,我们可以从下往上看: * Config Service提供配置的读取、推送等功能,服务对象是Apollo客户端 * Admin Service提供配置的修改、发布等功能,服务对象是Apollo Portal(管理界面) * Config Service和Admin Service都是多实例、无状态部署,所以需要将自己注册到Eureka中并保持心跳 * 在Eureka之上我们架了一层Meta Server用于封装Eureka的服务发现接口 * Client通过域名访问Meta Server获取Config Service服务列表(IP+Port),而后直接通过IP+Port访问服务,同时在Client侧会做load balance、错误重试 * Portal通过域名访问Meta Server获取Admin Service服务列表(IP+Port),而后直接通过IP+Port访问服务,同时在Portal侧会做load balance、错误重试 * 为了简化部署,我们实际上会把Config Service、Eureka和Meta Server三个逻辑角色部署在同一个JVM进程中 ### 4.5.1 Why Eureka 为什么我们采用Eureka作为服务注册中心,而不是使用传统的zk、etcd呢?我大致总结了一下,有以下几方面的原因: * 它提供了完整的Service Registry和Service Discovery实现 * 首先是提供了完整的实现,并且也经受住了Netflix自己的生产环境考验,相对使用起来会比较省心。 * 和Spring Cloud无缝集成 * 我们的项目本身就使用了Spring Cloud和Spring Boot,同时Spring Cloud还有一套非常完善的开源代码来整合Eureka,所以使用起来非常方便。 * 另外,Eureka还支持在我们应用自身的容器中启动,也就是说我们的应用启动完之后,既充当了Eureka的角色,同时也是服务的提供者。这样就极大的提高了服务的可用性。 * **这一点是我们选择Eureka而不是zk、etcd等的主要原因,为了提高配置中心的可用性和降低部署复杂度,我们需要尽可能地减少外部依赖。** * Open Source * 最后一点是开源,由于代码是开源的,所以非常便于我们了解它的实现原理和排查问题。 ## 4.6 客户端设计 ![client-architecture](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/client-architecture.png) 上图简要描述了Apollo客户端的实现原理: 1. 客户端和服务端保持了一个长连接,从而能第一时间获得配置更新的推送。 2. 客户端还会定时从Apollo配置中心服务端拉取应用的最新配置。 * 这是一个fallback机制,为了防止推送机制失效导致配置不更新 * 客户端定时拉取会上报本地版本,所以一般情况下,对于定时拉取的操作,服务端都会返回304 - Not Modified * 定时频率默认为每5分钟拉取一次,客户端也可以通过在运行时指定System Property: `apollo.refreshInterval`来覆盖,单位为分钟。 3. 客户端从Apollo配置中心服务端获取到应用的最新配置后,会保存在内存中 4. 客户端会把从服务端获取到的配置在本地文件系统缓存一份 * 在遇到服务不可用,或网络不通的时候,依然能从本地恢复配置 5. 应用程序从Apollo客户端获取最新的配置、订阅配置更新通知 ### 4.6.1 配置更新推送实现 前面提到了Apollo客户端和服务端保持了一个长连接,从而能第一时间获得配置更新的推送。 长连接实际上我们是通过Http Long Polling实现的,具体而言: * 客户端发起一个Http请求到服务端 * 服务端会保持住这个连接60秒 * 如果在60秒内有客户端关心的配置变化,被保持住的客户端请求会立即返回,并告知客户端有配置变化的namespace信息,客户端会据此拉取对应namespace的最新配置 * 如果在60秒内没有客户端关心的配置变化,那么会返回Http状态码304给客户端 * 客户端在收到服务端请求后会立即重新发起连接,回到第一步 考虑到会有数万客户端向服务端发起长连,在服务端我们使用了async servlet(Spring DeferredResult)来服务Http Long Polling请求。 ## 4.7 可用性考虑 配置中心作为基础服务,可用性要求非常高,下面的表格描述了不同场景下Apollo的可用性: | 场景 | 影响 | 降级 | 原因 | |------------------------|--------------------------------------|---------------------------------------|-----------------------------------------------------------------------------------------| | 某台config service下线 | 无影响 | | Config service无状态,客户端重连其它config service | | 所有config service下线 | 客户端无法读取最新配置,Portal无影响 | 客户端重启时,可以读取本地缓存配置文件 | | | 某台admin service下线 | 无影响 | | Admin service无状态,Portal重连其它admin service | | 所有admin service下线 | 客户端无影响,portal无法更新配置 | | | | 某台portal下线 | 无影响 | | Portal域名通过slb绑定多台服务器,重试后指向可用的服务器 | | 全部portal下线 | 客户端无影响,portal无法更新配置 | | | | 某个数据中心下线 | 无影响 | | 多数据中心部署,数据完全同步,Meta Server/Portal域名通过slb自动切换到其它存活的数据中心 | # 5、Contribute to Apollo Apollo从开发之初就是以开源模式开发的,所以也非常欢迎有兴趣、有余力的朋友一起加入进来。 服务端开发使用的是Java,基于Spring Cloud和Spring Boot框架。客户端目前提供了Java和.Net两种实现。 Github地址:<a href="https://github.com/ctripcorp/apollo" target="_blank">https://github.com/ctripcorp/apollo</a> 欢迎大家发起Pull Request!
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./apollo-client/src/test/resources/yaml/case1.yaml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # root: key1: "someValue" key2: 100 key3: key4: key5: '(%sender%) %message%' key6: '* %sender% %message%' # commented: "xxx" list: - 'item 1' - 'item 2' intList: - 100 - 200 listOfMap: - key: '#mychannel' value: '' - key: '#myprivatechannel' value: 'mypassword' listOfList: - - 'a1' - 'a2' - - 'b1' - 'b2' listOfList2: [ ['a1', 'a2'], ['b1', 'b2'] ]
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # root: key1: "someValue" key2: 100 key3: key4: key5: '(%sender%) %message%' key6: '* %sender% %message%' # commented: "xxx" list: - 'item 1' - 'item 2' intList: - 100 - 200 listOfMap: - key: '#mychannel' value: '' - key: '#myprivatechannel' value: 'mypassword' listOfList: - - 'a1' - 'a2' - - 'b1' - 'b2' listOfList2: [ ['a1', 'a2'], ['b1', 'b2'] ]
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./SECURITY.md
# Security Policy ## Reporting a Vulnerability If you have apprehensions regarding Apollo's security or you discover vulnerability or potential threat, don’t hesitate to get in touch with us by dropping a mail at apollo-config@googlegroups.com. In the mail, specify the description of the issue or potential threat. You are also urged to recommend the way to reproduce and replicate the issue. The Apollo community will get back to you after assessing and analysing the findings. PLEASE PAY ATTENTION to report the security issue on the security email before disclosing it on public domain.
# Security Policy ## Reporting a Vulnerability If you have apprehensions regarding Apollo's security or you discover vulnerability or potential threat, don’t hesitate to get in touch with us by dropping a mail at apollo-config@googlegroups.com. In the mail, specify the description of the issue or potential threat. You are also urged to recommend the way to reproduce and replicate the issue. The Apollo community will get back to you after assessing and analysing the findings. PLEASE PAY ATTENTION to report the security issue on the security email before disclosing it on public domain.
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./scripts/helm/README.md
# Apollo Helm Chart [Apollo](https://github.com/ctripcorp/apollo) is a reliable configuration management system. ## 1. Introduction The apollo-service and apollo-portal charts create deployments for apollo-configservice, apollo-adminservice and apollo-portal, which utilize the kubernetes native service discovery. ## 2. Prerequisites - Kubernetes 1.10+ - Helm 3 ## 3. Add Apollo Helm Chart Repository ```bash $ helm repo add apollo https://www.apolloconfig.com/charts $ helm search repo apollo ``` ## 4. Deployments of apollo-configservice and apollo-adminservice ### 4.1 Install apollo-configservice and apollo-adminservice should be installed per environment, so it is suggested to indicate environment in the release name, e.g. `apollo-service-dev` ```bash $ helm install apollo-service-dev \ --set configdb.host=1.2.3.4 \ --set configdb.userName=apollo \ --set configdb.password=apollo \ --set configdb.service.enabled=true \ --set configService.replicaCount=1 \ --set adminService.replicaCount=1 \ -n your-namespace \ apollo/apollo-service ``` Or customize it with values.yaml ```bash $ helm install apollo-service-dev -f values.yaml -n your-namespace apollo/apollo-service ``` ### 4.2 Uninstall To uninstall/delete the `apollo-service-dev` deployment: ```bash $ helm uninstall -n your-namespace apollo-service-dev ``` ### 4.3 Configuration The following table lists the configurable parameters of the apollo-service chart and their default values. | Parameter | Description | Default | |----------------------|---------------------------------------------|---------------------| | `configdb.host` | The host for apollo config db | `nil` | | `configdb.port` | The port for apollo config db | `3306` | | `configdb.dbName` | The database name for apollo config db | `ApolloConfigDB` | | `configdb.userName` | The user name for apollo config db | `nil` | | `configdb.password` | The password for apollo config db | `nil` | | `configdb.connectionStringProperties` | The connection string properties for apollo config db | `characterEncoding=utf8` | | `configdb.service.enabled` | Whether to create a Kubernetes Service for `configdb.host` or not. Set it to `true` if `configdb.host` is an endpoint outside of the kubernetes cluster | `false` | | `configdb.service.fullNameOverride` | Override the service name for apollo config db | `nil` | | `configdb.service.port` | The port for the service of apollo config db | `3306` | | `configdb.service.type` | The service type of apollo config db: `ClusterIP` or `ExternalName`. If the host is a DNS name, please specify `ExternalName` as the service type, e.g. xxx.mysql.rds.aliyuncs.com | `ClusterIP` | | `configService.fullNameOverride` | Override the deployment name for apollo-configservice | `nil` | | `configService.replicaCount` | Replica count of apollo-configservice | `2` | | `configService.containerPort` | Container port of apollo-configservice | `8080` | | `configService.image.repository` | Image repository of apollo-configservice | `apolloconfig/apollo-configservice` | | `configService.image.tag` | Image tag of apollo-configservice, e.g. `1.8.0`, leave it to `nil` to use the default version | `nil` | | `configService.image.pullPolicy` | Image pull policy of apollo-configservice | `IfNotPresent` | | `configService.imagePullSecrets` | Image pull secrets of apollo-configservice | `[]` | | `configService.service.fullNameOverride` | Override the service name for apollo-configservice | `nil` | | `configService.service.port` | The port for the service of apollo-configservice | `8080` | | `configService.service.targetPort` | The target port for the service of apollo-configservice | `8080` | | `configService.service.type` | The service type of apollo-configservice | `ClusterIP` | | `configService.ingress.enabled` | Whether to enable the ingress for config-service or not | `false` | | `configService.ingress.annotations` | The annotations of the ingress for config-service | `{}` | | `configService.ingress.hosts.host` | The host of the ingress for config-service | `nil` | | `configService.ingress.hosts.paths` | The paths of the ingress for config-service | `[]` | | `configService.ingress.tls` | The tls definition of the ingress for config-service | `[]` | | `configService.liveness.initialDelaySeconds` | The initial delay seconds of liveness probe | `100` | | `configService.liveness.periodSeconds` | The period seconds of liveness probe | `10` | | `configService.readiness.initialDelaySeconds` | The initial delay seconds of readiness probe | `30` | | `configService.readiness.periodSeconds` | The period seconds of readiness probe | `5` | | `configService.config.profiles` | specify the spring profiles to activate | `github,kubernetes` | | `configService.config.configServiceUrlOverride` | Override `apollo.config-service.url`: config service url to be accessed by apollo-client | `nil` | | `configService.config.adminServiceUrlOverride` | Override `apollo.admin-service.url`: admin service url to be accessed by apollo-portal | `nil` | | `configService.config.contextPath` | specify the context path, e.g. `/apollo`, then users could access config service via `http://{config_service_address}/apollo` | `nil` | | `configService.env` | Environment variables passed to the container, e.g. <br />`JAVA_OPTS: -Xss256k` | `{}` | | `configService.strategy` | The deployment strategy of apollo-configservice | `{}` | | `configService.resources` | The resources definition of apollo-configservice | `{}` | | `configService.nodeSelector` | The node selector definition of apollo-configservice | `{}` | | `configService.tolerations` | The tolerations definition of apollo-configservice | `[]` | | `configService.affinity` | The affinity definition of apollo-configservice | `{}` | | `adminService.fullNameOverride` | Override the deployment name for apollo-adminservice | `nil` | | `adminService.replicaCount` | Replica count of apollo-adminservice | `2` | | `adminService.containerPort` | Container port of apollo-adminservice | `8090` | | `adminService.image.repository` | Image repository of apollo-adminservice | `apolloconfig/apollo-adminservice` | | `adminService.image.tag` | Image tag of apollo-adminservice, e.g. `1.8.0`, leave it to `nil` to use the default version | `nil` | | `adminService.image.pullPolicy` | Image pull policy of apollo-adminservice | `IfNotPresent` | | `adminService.imagePullSecrets` | Image pull secrets of apollo-adminservice | `[]` | | `adminService.service.fullNameOverride` | Override the service name for apollo-adminservice | `nil` | | `adminService.service.port` | The port for the service of apollo-adminservice | `8090` | | `adminService.service.targetPort` | The target port for the service of apollo-adminservice | `8090` | | `adminService.service.type` | The service type of apollo-adminservice | `ClusterIP` | | `adminService.ingress.enabled` | Whether to enable the ingress for admin-service or not | `false` | | `adminService.ingress.annotations` | The annotations of the ingress for admin-service | `{}` | | `adminService.ingress.hosts.host` | The host of the ingress for admin-service | `nil` | | `adminService.ingress.hosts.paths` | The paths of the ingress for admin-service | `[]` | | `adminService.ingress.tls` | The tls definition of the ingress for admin-service | `[]` | | `adminService.liveness.initialDelaySeconds` | The initial delay seconds of liveness probe | `100` | | `adminService.liveness.periodSeconds` | The period seconds of liveness probe | `10` | | `adminService.readiness.initialDelaySeconds` | The initial delay seconds of readiness probe | `30` | | `adminService.readiness.periodSeconds` | The period seconds of readiness probe | `5` | | `adminService.config.profiles` | specify the spring profiles to activate | `github,kubernetes` | | `adminService.config.contextPath` | specify the context path, e.g. `/apollo`, then users could access admin service via `http://{admin_service_address}/apollo` | `nil` | | `adminService.env` | Environment variables passed to the container, e.g. <br />`JAVA_OPTS: -Xss256k` | `{}` | | `adminService.strategy` | The deployment strategy of apollo-adminservice | `{}` | | `adminService.resources` | The resources definition of apollo-adminservice | `{}` | | `adminService.nodeSelector` | The node selector definition of apollo-adminservice | `{}` | | `adminService.tolerations` | The tolerations definition of apollo-adminservice | `[]` | | `adminService.affinity` | The affinity definition of apollo-adminservice | `{}` | ### 4.4 Sample 1. ConfigDB host is an IP outside of kubernetes cluster ```yaml configdb: host: 1.2.3.4 dbName: ApolloConfigDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false service: enabled: true ``` 2. ConfigDB host is a dns name outside of kubernetes cluster ```yaml configdb: host: xxx.mysql.rds.aliyuncs.com dbName: ApolloConfigDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false service: enabled: true type: ExternalName ``` 3. ConfigDB host is a kubernetes service ```yaml configdb: host: apollodb-mysql.mysql dbName: ApolloConfigDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false ``` 4. Expose config service as Ingress with custom path `/config` ```yaml # use /config as root, should specify configService.config.contextPath as /config configService: config: contextPath: /config ingress: enabled: true hosts: - paths: - /config ``` 5. Expose admin service as Ingress with custom path `/admin` ```yaml # use /admin as root, should specify adminService.config.contextPath as /admin adminService: config: contextPath: /admin ingress: enabled: true hosts: - paths: - /admin ``` ## 5. Deployments of apollo-portal ### 5.1 Install To install the apollo-portal chart with the release name `apollo-portal`: ```bash $ helm install apollo-portal \ --set portaldb.host=1.2.3.4 \ --set portaldb.userName=apollo \ --set portaldb.password=apollo \ --set portaldb.service.enabled=true \ --set config.envs="dev\,pro" \ --set config.metaServers.dev=http://apollo-service-dev-apollo-configservice:8080 \ --set config.metaServers.pro=http://apollo-service-pro-apollo-configservice:8080 \ --set replicaCount=1 \ -n your-namespace \ apollo/apollo-portal ``` Or customize it with values.yaml ```bash $ helm install apollo-portal -f values.yaml -n your-namespace apollo/apollo-portal ``` ### 5.2 Uninstallation To uninstall/delete the `apollo-portal` deployment: ```bash $ helm uninstall -n your-namespace apollo-portal ``` ### 5.3 Configuration The following table lists the configurable parameters of the apollo-portal chart and their default values. | Parameter | Description | Default | |----------------------|---------------------------------------------|-----------------------| | `fullNameOverride` | Override the deployment name for apollo-portal | `nil` | | `replicaCount` | Replica count of apollo-portal | `2` | | `containerPort` | Container port of apollo-portal | `8070` | | `image.repository` | Image repository of apollo-portal | `apolloconfig/apollo-portal` | | `image.tag` | Image tag of apollo-portal, e.g. `1.8.0`, leave it to `nil` to use the default version | `nil` | | `image.pullPolicy` | Image pull policy of apollo-portal | `IfNotPresent` | | `imagePullSecrets` | Image pull secrets of apollo-portal | `[]` | | `service.fullNameOverride` | Override the service name for apollo-portal | `nil` | | `service.port` | The port for the service of apollo-portal | `8070` | | `service.targetPort` | The target port for the service of apollo-portal | `8070` | | `service.type` | The service type of apollo-portal | `ClusterIP` | | `service.sessionAffinity` | The session affinity for the service of apollo-portal | `ClientIP` | | `ingress.enabled` | Whether to enable the ingress or not | `false` | | `ingress.annotations` | The annotations of the ingress | `{}` | | `ingress.hosts.host` | The host of the ingress | `nil` | | `ingress.hosts.paths` | The paths of the ingress | `[]` | | `ingress.tls` | The tls definition of the ingress | `[]` | | `liveness.initialDelaySeconds` | The initial delay seconds of liveness probe | `100` | | `liveness.periodSeconds` | The period seconds of liveness probe | `10` | | `readiness.initialDelaySeconds` | The initial delay seconds of readiness probe | `30` | | `readiness.periodSeconds` | The period seconds of readiness probe | `5` | | `env` | Environment variables passed to the container, e.g. <br />`JAVA_OPTS: -Xss256k` | `{}` | | `strategy` | The deployment strategy of apollo-portal | `{}` | | `resources` | The resources definition of apollo-portal | `{}` | | `nodeSelector` | The node selector definition of apollo-portal | `{}` | | `tolerations` | The tolerations definition of apollo-portal | `[]` | | `affinity` | The affinity definition of apollo-portal | `{}` | | `config.profiles` | specify the spring profiles to activate | `github,auth` | | `config.envs` | specify the env names, e.g. dev,pro | `nil` | | `config.contextPath` | specify the context path, e.g. `/apollo`, then users could access portal via `http://{portal_address}/apollo` | `nil` | | `config.metaServers` | specify the meta servers, e.g.<br />`dev: http://apollo-configservice-dev:8080`<br />`pro: http://apollo-configservice-pro:8080` | `{}` | | `config.files` | specify the extra config files for apollo-portal, e.g. application-ldap.yml | `{}` | | `portaldb.host` | The host for apollo portal db | `nil` | | `portaldb.port` | The port for apollo portal db | `3306` | | `portaldb.dbName` | The database name for apollo portal db | `ApolloPortalDB` | | `portaldb.userName` | The user name for apollo portal db | `nil` | | `portaldb.password` | The password for apollo portal db | `nil` | | `portaldb.connectionStringProperties` | The connection string properties for apollo portal db | `characterEncoding=utf8` | | `portaldb.service.enabled` | Whether to create a Kubernetes Service for `portaldb.host` or not. Set it to `true` if `portaldb.host` is an endpoint outside of the kubernetes cluster | `false` | | `portaldb.service.fullNameOverride` | Override the service name for apollo portal db | `nil` | | `portaldb.service.port` | The port for the service of apollo portal db | `3306` | | `portaldb.service.type` | The service type of apollo portal db: `ClusterIP` or `ExternalName`. If the host is a DNS name, please specify `ExternalName` as the service type, e.g. xxx.mysql.rds.aliyuncs.com | `ClusterIP` | ### 5.4 Sample 1. PortalDB host is an IP outside of kubernetes cluster ```yaml portaldb: host: 1.2.3.4 dbName: ApolloPortalDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false service: enabled: true ``` 2. PortalDB host is a dns name outside of kubernetes cluster ```yaml portaldb: host: xxx.mysql.rds.aliyuncs.com dbName: ApolloPortalDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false service: enabled: true type: ExternalName ``` 3. PortalDB host is a kubernetes service ```yaml portaldb: host: apollodb-mysql.mysql dbName: ApolloPortalDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false ``` 4. Specify environments ```yaml config: envs: dev,pro metaServers: dev: http://apollo-service-dev-apollo-configservice:8080 pro: http://apollo-service-pro-apollo-configservice:8080 ``` 5. Expose service as Load Balancer ```yaml service: type: LoadBalancer ``` 6. Expose service as Ingress ```yaml ingress: enabled: true hosts: - paths: - / ``` 7. Expose service as Ingress with custom path `/apollo` ```yaml # use /apollo as root, should specify config.contextPath as /apollo ingress: enabled: true hosts: - paths: - /apollo config: ... contextPath: /apollo ... ``` 8. Expose service as Ingress with session affinity ```yaml ingress: enabled: true annotations: kubernetes.io/ingress.class: nginx nginx.ingress.kubernetes.io/affinity: "cookie" nginx.ingress.kubernetes.io/affinity-mode: "persistent" nginx.ingress.kubernetes.io/session-cookie-conditional-samesite-none: "true" nginx.ingress.kubernetes.io/session-cookie-expires: "172800" nginx.ingress.kubernetes.io/session-cookie-max-age: "172800" hosts: - host: xxx.somedomain.com # host is required to make session affinity work paths: - / ``` 9. Enable LDAP support ```yaml config: ... profiles: github,ldap ... files: application-ldap.yml: | spring: ldap: base: "dc=example,dc=org" username: "cn=admin,dc=example,dc=org" password: "password" searchFilter: "(uid={0})" urls: - "ldap://xxx.somedomain.com:389" ldap: mapping: objectClass: "inetOrgPerson" loginId: "uid" userDisplayName: "cn" email: "mail" ```
# Apollo Helm Chart [Apollo](https://github.com/ctripcorp/apollo) is a reliable configuration management system. ## 1. Introduction The apollo-service and apollo-portal charts create deployments for apollo-configservice, apollo-adminservice and apollo-portal, which utilize the kubernetes native service discovery. ## 2. Prerequisites - Kubernetes 1.10+ - Helm 3 ## 3. Add Apollo Helm Chart Repository ```bash $ helm repo add apollo https://www.apolloconfig.com/charts $ helm search repo apollo ``` ## 4. Deployments of apollo-configservice and apollo-adminservice ### 4.1 Install apollo-configservice and apollo-adminservice should be installed per environment, so it is suggested to indicate environment in the release name, e.g. `apollo-service-dev` ```bash $ helm install apollo-service-dev \ --set configdb.host=1.2.3.4 \ --set configdb.userName=apollo \ --set configdb.password=apollo \ --set configdb.service.enabled=true \ --set configService.replicaCount=1 \ --set adminService.replicaCount=1 \ -n your-namespace \ apollo/apollo-service ``` Or customize it with values.yaml ```bash $ helm install apollo-service-dev -f values.yaml -n your-namespace apollo/apollo-service ``` ### 4.2 Uninstall To uninstall/delete the `apollo-service-dev` deployment: ```bash $ helm uninstall -n your-namespace apollo-service-dev ``` ### 4.3 Configuration The following table lists the configurable parameters of the apollo-service chart and their default values. | Parameter | Description | Default | |----------------------|---------------------------------------------|---------------------| | `configdb.host` | The host for apollo config db | `nil` | | `configdb.port` | The port for apollo config db | `3306` | | `configdb.dbName` | The database name for apollo config db | `ApolloConfigDB` | | `configdb.userName` | The user name for apollo config db | `nil` | | `configdb.password` | The password for apollo config db | `nil` | | `configdb.connectionStringProperties` | The connection string properties for apollo config db | `characterEncoding=utf8` | | `configdb.service.enabled` | Whether to create a Kubernetes Service for `configdb.host` or not. Set it to `true` if `configdb.host` is an endpoint outside of the kubernetes cluster | `false` | | `configdb.service.fullNameOverride` | Override the service name for apollo config db | `nil` | | `configdb.service.port` | The port for the service of apollo config db | `3306` | | `configdb.service.type` | The service type of apollo config db: `ClusterIP` or `ExternalName`. If the host is a DNS name, please specify `ExternalName` as the service type, e.g. xxx.mysql.rds.aliyuncs.com | `ClusterIP` | | `configService.fullNameOverride` | Override the deployment name for apollo-configservice | `nil` | | `configService.replicaCount` | Replica count of apollo-configservice | `2` | | `configService.containerPort` | Container port of apollo-configservice | `8080` | | `configService.image.repository` | Image repository of apollo-configservice | `apolloconfig/apollo-configservice` | | `configService.image.tag` | Image tag of apollo-configservice, e.g. `1.8.0`, leave it to `nil` to use the default version | `nil` | | `configService.image.pullPolicy` | Image pull policy of apollo-configservice | `IfNotPresent` | | `configService.imagePullSecrets` | Image pull secrets of apollo-configservice | `[]` | | `configService.service.fullNameOverride` | Override the service name for apollo-configservice | `nil` | | `configService.service.port` | The port for the service of apollo-configservice | `8080` | | `configService.service.targetPort` | The target port for the service of apollo-configservice | `8080` | | `configService.service.type` | The service type of apollo-configservice | `ClusterIP` | | `configService.ingress.enabled` | Whether to enable the ingress for config-service or not | `false` | | `configService.ingress.annotations` | The annotations of the ingress for config-service | `{}` | | `configService.ingress.hosts.host` | The host of the ingress for config-service | `nil` | | `configService.ingress.hosts.paths` | The paths of the ingress for config-service | `[]` | | `configService.ingress.tls` | The tls definition of the ingress for config-service | `[]` | | `configService.liveness.initialDelaySeconds` | The initial delay seconds of liveness probe | `100` | | `configService.liveness.periodSeconds` | The period seconds of liveness probe | `10` | | `configService.readiness.initialDelaySeconds` | The initial delay seconds of readiness probe | `30` | | `configService.readiness.periodSeconds` | The period seconds of readiness probe | `5` | | `configService.config.profiles` | specify the spring profiles to activate | `github,kubernetes` | | `configService.config.configServiceUrlOverride` | Override `apollo.config-service.url`: config service url to be accessed by apollo-client | `nil` | | `configService.config.adminServiceUrlOverride` | Override `apollo.admin-service.url`: admin service url to be accessed by apollo-portal | `nil` | | `configService.config.contextPath` | specify the context path, e.g. `/apollo`, then users could access config service via `http://{config_service_address}/apollo` | `nil` | | `configService.env` | Environment variables passed to the container, e.g. <br />`JAVA_OPTS: -Xss256k` | `{}` | | `configService.strategy` | The deployment strategy of apollo-configservice | `{}` | | `configService.resources` | The resources definition of apollo-configservice | `{}` | | `configService.nodeSelector` | The node selector definition of apollo-configservice | `{}` | | `configService.tolerations` | The tolerations definition of apollo-configservice | `[]` | | `configService.affinity` | The affinity definition of apollo-configservice | `{}` | | `adminService.fullNameOverride` | Override the deployment name for apollo-adminservice | `nil` | | `adminService.replicaCount` | Replica count of apollo-adminservice | `2` | | `adminService.containerPort` | Container port of apollo-adminservice | `8090` | | `adminService.image.repository` | Image repository of apollo-adminservice | `apolloconfig/apollo-adminservice` | | `adminService.image.tag` | Image tag of apollo-adminservice, e.g. `1.8.0`, leave it to `nil` to use the default version | `nil` | | `adminService.image.pullPolicy` | Image pull policy of apollo-adminservice | `IfNotPresent` | | `adminService.imagePullSecrets` | Image pull secrets of apollo-adminservice | `[]` | | `adminService.service.fullNameOverride` | Override the service name for apollo-adminservice | `nil` | | `adminService.service.port` | The port for the service of apollo-adminservice | `8090` | | `adminService.service.targetPort` | The target port for the service of apollo-adminservice | `8090` | | `adminService.service.type` | The service type of apollo-adminservice | `ClusterIP` | | `adminService.ingress.enabled` | Whether to enable the ingress for admin-service or not | `false` | | `adminService.ingress.annotations` | The annotations of the ingress for admin-service | `{}` | | `adminService.ingress.hosts.host` | The host of the ingress for admin-service | `nil` | | `adminService.ingress.hosts.paths` | The paths of the ingress for admin-service | `[]` | | `adminService.ingress.tls` | The tls definition of the ingress for admin-service | `[]` | | `adminService.liveness.initialDelaySeconds` | The initial delay seconds of liveness probe | `100` | | `adminService.liveness.periodSeconds` | The period seconds of liveness probe | `10` | | `adminService.readiness.initialDelaySeconds` | The initial delay seconds of readiness probe | `30` | | `adminService.readiness.periodSeconds` | The period seconds of readiness probe | `5` | | `adminService.config.profiles` | specify the spring profiles to activate | `github,kubernetes` | | `adminService.config.contextPath` | specify the context path, e.g. `/apollo`, then users could access admin service via `http://{admin_service_address}/apollo` | `nil` | | `adminService.env` | Environment variables passed to the container, e.g. <br />`JAVA_OPTS: -Xss256k` | `{}` | | `adminService.strategy` | The deployment strategy of apollo-adminservice | `{}` | | `adminService.resources` | The resources definition of apollo-adminservice | `{}` | | `adminService.nodeSelector` | The node selector definition of apollo-adminservice | `{}` | | `adminService.tolerations` | The tolerations definition of apollo-adminservice | `[]` | | `adminService.affinity` | The affinity definition of apollo-adminservice | `{}` | ### 4.4 Sample 1. ConfigDB host is an IP outside of kubernetes cluster ```yaml configdb: host: 1.2.3.4 dbName: ApolloConfigDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false service: enabled: true ``` 2. ConfigDB host is a dns name outside of kubernetes cluster ```yaml configdb: host: xxx.mysql.rds.aliyuncs.com dbName: ApolloConfigDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false service: enabled: true type: ExternalName ``` 3. ConfigDB host is a kubernetes service ```yaml configdb: host: apollodb-mysql.mysql dbName: ApolloConfigDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false ``` 4. Expose config service as Ingress with custom path `/config` ```yaml # use /config as root, should specify configService.config.contextPath as /config configService: config: contextPath: /config ingress: enabled: true hosts: - paths: - /config ``` 5. Expose admin service as Ingress with custom path `/admin` ```yaml # use /admin as root, should specify adminService.config.contextPath as /admin adminService: config: contextPath: /admin ingress: enabled: true hosts: - paths: - /admin ``` ## 5. Deployments of apollo-portal ### 5.1 Install To install the apollo-portal chart with the release name `apollo-portal`: ```bash $ helm install apollo-portal \ --set portaldb.host=1.2.3.4 \ --set portaldb.userName=apollo \ --set portaldb.password=apollo \ --set portaldb.service.enabled=true \ --set config.envs="dev\,pro" \ --set config.metaServers.dev=http://apollo-service-dev-apollo-configservice:8080 \ --set config.metaServers.pro=http://apollo-service-pro-apollo-configservice:8080 \ --set replicaCount=1 \ -n your-namespace \ apollo/apollo-portal ``` Or customize it with values.yaml ```bash $ helm install apollo-portal -f values.yaml -n your-namespace apollo/apollo-portal ``` ### 5.2 Uninstallation To uninstall/delete the `apollo-portal` deployment: ```bash $ helm uninstall -n your-namespace apollo-portal ``` ### 5.3 Configuration The following table lists the configurable parameters of the apollo-portal chart and their default values. | Parameter | Description | Default | |----------------------|---------------------------------------------|-----------------------| | `fullNameOverride` | Override the deployment name for apollo-portal | `nil` | | `replicaCount` | Replica count of apollo-portal | `2` | | `containerPort` | Container port of apollo-portal | `8070` | | `image.repository` | Image repository of apollo-portal | `apolloconfig/apollo-portal` | | `image.tag` | Image tag of apollo-portal, e.g. `1.8.0`, leave it to `nil` to use the default version | `nil` | | `image.pullPolicy` | Image pull policy of apollo-portal | `IfNotPresent` | | `imagePullSecrets` | Image pull secrets of apollo-portal | `[]` | | `service.fullNameOverride` | Override the service name for apollo-portal | `nil` | | `service.port` | The port for the service of apollo-portal | `8070` | | `service.targetPort` | The target port for the service of apollo-portal | `8070` | | `service.type` | The service type of apollo-portal | `ClusterIP` | | `service.sessionAffinity` | The session affinity for the service of apollo-portal | `ClientIP` | | `ingress.enabled` | Whether to enable the ingress or not | `false` | | `ingress.annotations` | The annotations of the ingress | `{}` | | `ingress.hosts.host` | The host of the ingress | `nil` | | `ingress.hosts.paths` | The paths of the ingress | `[]` | | `ingress.tls` | The tls definition of the ingress | `[]` | | `liveness.initialDelaySeconds` | The initial delay seconds of liveness probe | `100` | | `liveness.periodSeconds` | The period seconds of liveness probe | `10` | | `readiness.initialDelaySeconds` | The initial delay seconds of readiness probe | `30` | | `readiness.periodSeconds` | The period seconds of readiness probe | `5` | | `env` | Environment variables passed to the container, e.g. <br />`JAVA_OPTS: -Xss256k` | `{}` | | `strategy` | The deployment strategy of apollo-portal | `{}` | | `resources` | The resources definition of apollo-portal | `{}` | | `nodeSelector` | The node selector definition of apollo-portal | `{}` | | `tolerations` | The tolerations definition of apollo-portal | `[]` | | `affinity` | The affinity definition of apollo-portal | `{}` | | `config.profiles` | specify the spring profiles to activate | `github,auth` | | `config.envs` | specify the env names, e.g. dev,pro | `nil` | | `config.contextPath` | specify the context path, e.g. `/apollo`, then users could access portal via `http://{portal_address}/apollo` | `nil` | | `config.metaServers` | specify the meta servers, e.g.<br />`dev: http://apollo-configservice-dev:8080`<br />`pro: http://apollo-configservice-pro:8080` | `{}` | | `config.files` | specify the extra config files for apollo-portal, e.g. application-ldap.yml | `{}` | | `portaldb.host` | The host for apollo portal db | `nil` | | `portaldb.port` | The port for apollo portal db | `3306` | | `portaldb.dbName` | The database name for apollo portal db | `ApolloPortalDB` | | `portaldb.userName` | The user name for apollo portal db | `nil` | | `portaldb.password` | The password for apollo portal db | `nil` | | `portaldb.connectionStringProperties` | The connection string properties for apollo portal db | `characterEncoding=utf8` | | `portaldb.service.enabled` | Whether to create a Kubernetes Service for `portaldb.host` or not. Set it to `true` if `portaldb.host` is an endpoint outside of the kubernetes cluster | `false` | | `portaldb.service.fullNameOverride` | Override the service name for apollo portal db | `nil` | | `portaldb.service.port` | The port for the service of apollo portal db | `3306` | | `portaldb.service.type` | The service type of apollo portal db: `ClusterIP` or `ExternalName`. If the host is a DNS name, please specify `ExternalName` as the service type, e.g. xxx.mysql.rds.aliyuncs.com | `ClusterIP` | ### 5.4 Sample 1. PortalDB host is an IP outside of kubernetes cluster ```yaml portaldb: host: 1.2.3.4 dbName: ApolloPortalDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false service: enabled: true ``` 2. PortalDB host is a dns name outside of kubernetes cluster ```yaml portaldb: host: xxx.mysql.rds.aliyuncs.com dbName: ApolloPortalDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false service: enabled: true type: ExternalName ``` 3. PortalDB host is a kubernetes service ```yaml portaldb: host: apollodb-mysql.mysql dbName: ApolloPortalDBName userName: someUserName password: somePassword connectionStringProperties: characterEncoding=utf8&useSSL=false ``` 4. Specify environments ```yaml config: envs: dev,pro metaServers: dev: http://apollo-service-dev-apollo-configservice:8080 pro: http://apollo-service-pro-apollo-configservice:8080 ``` 5. Expose service as Load Balancer ```yaml service: type: LoadBalancer ``` 6. Expose service as Ingress ```yaml ingress: enabled: true hosts: - paths: - / ``` 7. Expose service as Ingress with custom path `/apollo` ```yaml # use /apollo as root, should specify config.contextPath as /apollo ingress: enabled: true hosts: - paths: - /apollo config: ... contextPath: /apollo ... ``` 8. Expose service as Ingress with session affinity ```yaml ingress: enabled: true annotations: kubernetes.io/ingress.class: nginx nginx.ingress.kubernetes.io/affinity: "cookie" nginx.ingress.kubernetes.io/affinity-mode: "persistent" nginx.ingress.kubernetes.io/session-cookie-conditional-samesite-none: "true" nginx.ingress.kubernetes.io/session-cookie-expires: "172800" nginx.ingress.kubernetes.io/session-cookie-max-age: "172800" hosts: - host: xxx.somedomain.com # host is required to make session affinity work paths: - / ``` 9. Enable LDAP support ```yaml config: ... profiles: github,ldap ... files: application-ldap.yml: | spring: ldap: base: "dc=example,dc=org" username: "cn=admin,dc=example,dc=org" password: "password" searchFilter: "(uid={0})" urls: - "ldap://xxx.somedomain.com:389" ldap: mapping: objectClass: "inetOrgPerson" loginId: "uid" userDisplayName: "cn" email: "mail" ```
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./CONTRIBUTING.md
## Contributing to apollo Apollo is released under the non-restrictive Apache 2.0 license, and follows a very standard Github development process, using Github tracker for issues and merging pull requests into master. If you want to contribute even something trivial please do not hesitate, but follow the guidelines below. ### Sign the Contributor License Agreement Before we accept a non-trivial patch or pull request we will need you to sign the Contributor License Agreement. Signing the contributor’s agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do. Active contributors might be asked to join the core team, and given the ability to merge pull requests. ### Code Conventions Our code style is in line with [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html). We provide template files [intellij-java-google-style.xml](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/intellij-java-google-style.xml) for IntelliJ IDEA and [eclipse-java-google-style.xml](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/eclipse-java-google-style.xml) for Eclipse. If you use other IDEs, then you may config manually by referencing the template files. * Make sure all new .java files have a simple Javadoc class comment with at least an `@author` tag identifying you, and preferably at least a paragraph on what the class is for. * Add yourself as an @author to the .java files that you modify substantially (more than cosmetic changes). * Add some Javadocs and, if you change the namespace, some XSD doc elements. * A few unit tests should be added for a new feature or an important bug fix. * If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project). * Normally, we would squash commits for one feature into one commit. There are 2 ways to do this: 1. To rebase and squash based on the remote branch * `git rebase -i <remote>/master` * merge commits via `fixup`, etc 2. Create a new branch and merge these commits into one * `git checkout -b <some-branch-name> <remote>/master` * `git merge --squash <current-feature-branch>` * When writing a commit message please follow these conventions: if you are fixing an existing issue, please add Fixes #XXX at the end of the commit message (where XXX is the issue number).
## Contributing to apollo Apollo is released under the non-restrictive Apache 2.0 license, and follows a very standard Github development process, using Github tracker for issues and merging pull requests into master. If you want to contribute even something trivial please do not hesitate, but follow the guidelines below. ### Sign the Contributor License Agreement Before we accept a non-trivial patch or pull request we will need you to sign the Contributor License Agreement. Signing the contributor’s agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do. Active contributors might be asked to join the core team, and given the ability to merge pull requests. ### Code Conventions Our code style is in line with [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html). We provide template files [intellij-java-google-style.xml](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/intellij-java-google-style.xml) for IntelliJ IDEA and [eclipse-java-google-style.xml](https://github.com/ctripcorp/apollo/blob/master/apollo-buildtools/style/eclipse-java-google-style.xml) for Eclipse. If you use other IDEs, then you may config manually by referencing the template files. * Make sure all new .java files have a simple Javadoc class comment with at least an `@author` tag identifying you, and preferably at least a paragraph on what the class is for. * Add yourself as an @author to the .java files that you modify substantially (more than cosmetic changes). * Add some Javadocs and, if you change the namespace, some XSD doc elements. * A few unit tests should be added for a new feature or an important bug fix. * If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project). * Normally, we would squash commits for one feature into one commit. There are 2 ways to do this: 1. To rebase and squash based on the remote branch * `git rebase -i <remote>/master` * merge commits via `fixup`, etc 2. Create a new branch and merge these commits into one * `git checkout -b <some-branch-name> <remote>/master` * `git merge --squash <current-feature-branch>` * When writing a commit message please follow these conventions: if you are fixing an existing issue, please add Fixes #XXX at the end of the commit message (where XXX is the issue number).
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./docs/zh/development/apollo-development-guide.md
本文档介绍了如何在本地使用IDE编译、运行Apollo,从而可以帮助大家了解Apollo的内在运行机制,同时也为自定义开发做好准备。 # &nbsp; # 一、准备工作 ## 1.1 本地运行时环境 Apollo本地开发需要以下组件: 1. Java: 1.8+ 2. MySQL: 5.6.5+ 3. IDE: 没有特殊要求 其中MySQL需要创建Apollo数据库并导入基础数据。 具体步骤请参考[分布式部署指南](zh/deployment/distributed-deployment-guide)中的以下部分: 1. [一、准备工作](zh/deployment/distributed-deployment-guide#一、准备工作) 2. [2.1 创建数据库](zh/deployment/distributed-deployment-guide#_21-创建数据库) ## 1.2 Apollo总体设计 具体请参考[Apollo配置中心设计](zh/design/apollo-design) # 二、本地启动 ## 2.1 Apollo Config Service和Apollo Admin Service 我们在本地开发时,一般会在IDE中同时启动`apollo-configservice`和`apollo-adminservice`。 下面以Intellij Community 2016.2版本为例来说明如何在本地启动`apollo-configservice`和`apollo-adminservice`。 ![ConfigAdminApplication-Overview](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/ConfigAdminApplication-Overview.png) ### 2.1.1 新建运行配置 ![NewConfiguration-Application](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/NewConfiguration-Application.png) ### 2.1.2 Main class配置 `com.ctrip.framework.apollo.assembly.ApolloApplication` > 注:如果希望独立启动`apollo-configservice`和`apollo-adminservice`,可以把Main Class分别换成 > `com.ctrip.framework.apollo.configservice.ConfigServiceApplication`和 > `com.ctrip.framework.apollo.adminservice.AdminServiceApplication` ### 2.1.3 VM options配置 ![ConfigAdminApplication-VM-Options](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/ConfigAdminApplication-VM-Options.png) -Dapollo_profile=github -Dspring.datasource.url=jdbc:mysql://localhost:3306/ApolloConfigDB?characterEncoding=utf8 -Dspring.datasource.username=root -Dspring.datasource.password= >注1:spring.datasource相关配置替换成你自己的数据库连接信息,注意数据库是`ApolloConfigDB` > >注2:程序默认日志输出为/opt/logs/100003171/apollo-assembly.log,如果需要修改日志文件路径,可以增加`logging.file.name`参数,如下: > >-Dlogging.file.name=/your-path/apollo-assembly.log ### 2.1.4 Program arguments配置 `--configservice --adminservice` ### 2.1.5 运行 对新建的运行配置点击Run或Debug皆可。 ![ConfigAdminApplication-Run](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/ConfigAdminApplication-Run.png) 启动完后,打开[http://localhost:8080](http://localhost:8080)可以看到`apollo-configservice`和`apollo-adminservice`都已经启动完成并注册到Eureka。 ![ConfigAdminApplication-Eureka](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/ConfigAdminApplication-Eureka.png) > 注:除了在Eureka确认服务状态外,还可以通过健康检查接口确认服务健康状况: > > apollo-adminservice: [http://localhost:8090/health](http://localhost:8090/health) > apollo-configservice: [http://localhost:8080/health](http://localhost:8080/health) > > 如果服务健康,返回内容中的status.code应当为`UP`: > > { > "status": { > "code": "UP", > ... > }, > ... > } ## 2.2 Apollo-Portal 下面以Intellij Community 2016.2版本为例来说明如何在本地启动`apollo-portal`。 ![PortalApplication-Overview](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/PortalApplication-Overview.png) ### 2.2.1 新建运行配置 ![NewConfiguration-Application](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/NewConfiguration-Application.png) ### 2.2.2 Main class配置 `com.ctrip.framework.apollo.portal.PortalApplication` ### 2.2.3 VM options配置 ![PortalApplication-VM-Options](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/PortalApplication-VM-Options.png) -Dapollo_profile=github,auth -Ddev_meta=http://localhost:8080/ -Dserver.port=8070 -Dspring.datasource.url=jdbc:mysql://localhost:3306/ApolloPortalDB?characterEncoding=utf8 -Dspring.datasource.username=root -Dspring.datasource.password= >注1:这里指定了apollo_profile是`github`和`auth`,其中`github`是Apollo必须的一个profile,用于数据库的配置,`auth`是从0.9.0新增的,用来支持使用apollo提供的Spring Security简单认证,更多信息可以参考[Portal-实现用户登录功能](zh/development/portal-how-to-implement-user-login-function) > >注2:spring.datasource相关配置替换成你自己的数据库连接信息,注意数据库是`ApolloPortalDB `。 > >注3:默认ApolloPortalDB中导入的配置只会展示DEV环境的配置,所以这里配置了dev\_meta属性,如果你希望在本地展示其它环境的配置,需要在这里增加其它环境的meta服务器地址,如fat\_meta。 > >注4:这里指定了server.port=8070是因为`apollo-configservice`启动在8080端口,所以这里配置`apollo-portal`启动在8070端口。 > >注5:程序默认日志输出为/opt/logs/100003173/apollo-portal.log,如果需要修改日志文件路径,可以增加`logging.file.name`参数,如下: > >-Dlogging.file.name=/your-path/apollo-portal.log ### 2.2.4 运行 对新建的运行配置点击Run或Debug皆可。 ![PortalApplication-Run](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/PortalApplication-Run.png) 启动完后,打开[http://localhost:8070](http://localhost:8070)就可以看到Apollo配置中心界面了。 ![PortalApplication-Home](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/PortalApplication-Home.png) >注:如果启用了`auth` profile的话,默认的用户名是apollo,密码是admin ### 2.2.5 Demo应用接入 为了更好的开发和调试,一般我们都会自己创建一个demo项目给自己使用。 可以参考[一、普通应用接入指南](zh/usage/apollo-user-guide#一、普通应用接入指南)创建自己的demo项目。 ## 2.3 Java样例客户端启动 项目中有一个样例客户端的项目:`apollo-demo`,下面以Intellij Community 2016.2版本为例来说明如何在本地启动。 ### 2.3.1 配置项目AppId 在`2.2.5 Demo应用接入`中创建Demo项目时,系统会要求填入一个全局唯一的AppId,我们需要把这个AppId配置到`apollo-demo`项目的app.properties文件中:`apollo-demo/src/main/resources/META-INF/app.properties`。 ![apollo-demo-app-properties](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/apollo-demo-app-properties.png) 如我们自己的demo项目使用的AppId是100004458,那么文件内容就是: app.id=100004458 >注:AppId是应用的唯一身份标识,Apollo客户端使用这个标识来获取应用自己的私有Namespace配置。 > 对于公共Namespace的配置,没有AppId也可以获取到配置,但是就失去了应用覆盖公共Namespace配置的能力。 > 更多配置AppId的方式可以参考[1.2.1 AppId](zh/usage/java-sdk-user-guide#_121-appid) ### 2.3.2 新建运行配置 ![NewConfiguration-Application](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/NewConfiguration-Application.png) ### 2.3.3 Main class配置 `SimpleApolloConfigDemo` ### 2.3.4 VM options配置 ![apollo-demo-vm-options](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/apollo-demo-vm-options.png) -Dapollo.meta=http://localhost:8080 > 注:这里当前环境的meta server地址为`http://localhost:8080`,也就是`apollo-configservice`的地址。 > 更多配置Apollo Meta Server的方式可以参考[1.2.2 Apollo Meta Server](zh/usage/java-sdk-user-guide#_122-apollo-meta-server) ### 2.3.5 概览 ![apollo-demo-overview](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/apollo-demo-overview.png) ### 2.3.6 运行 对新建的运行配置点击Run或Debug皆可。 ![apollo-demo-run](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/apollo-demo-run.png) 启动完后,忽略前面的调试信息,可以看到如下提示: Apollo Config Demo. Please input key to get the value. Input quit to exit. > 输入你之前在Portal上配置的值,如我们的Demo项目中配置了`timeout`,会看到如下信息: > timeout > [SimpleApolloConfigDemo] Loading key : timeout with value: 100 > 客户端日志级别默认是`DEBUG`,如果需要调整,可以通过修改`apollo-demo/src/main/resources/log4j2.xml`中的level配置 > ```xml > <logger name="com.ctrip.framework.apollo" additivity="false" level="trace"> > <AppenderRef ref="Async" level="DEBUG"/> > </logger> > ``` ## 2.4 .Net样例客户端启动 [apollo.net](https://github.com/ctripcorp/apollo.net)项目中有一个样例客户端的项目:`ApolloDemo`,下面就以VS 2010为例来说明如何在本地启动。 ### 2.4.1 配置项目AppId 在`2.2.5 Demo应用接入`中创建Demo项目时,系统会要求填入一个全局唯一的AppId,我们需要把这个AppId配置到`ApolloDemo`项目的APP.config文件中:`apollo.net\ApolloDemo\App.config`。 ![apollo-demo-app-config](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/apollo-net-app-config.png) 如我们自己的demo项目使用的AppId是100004458,那么文件内容就是: ```xml <add key="AppID" value="100004458"/> ``` >注:AppId是应用的唯一身份标识,Apollo客户端使用这个标识来获取应用自己的私有Namespace配置。 > 对于公共Namespace的配置,没有AppId也可以获取到配置,但是就失去了应用覆盖公共Namespace配置的能力。 ### 2.4.2 配置服务地址 Apollo客户端针对不同的环境会从不同的服务器获取配置,所以我们需要在app.config或web.config配置服务器地址(Apollo.{ENV}.Meta)。假设DEV环境的配置服务(apollo-configservice)地址是11.22.33.44,那么我们就做如下配置: ![apollo-net-server-url-config](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/apollo-net-server-url-config.png) ### 2.4.3 运行 运行`ApolloConfigDemo.cs`即可。 启动完后,忽略前面的调试信息,可以看到如下提示: Apollo Config Demo. Please input key to get the value. Input quit to exit. > 输入你之前在Portal上配置的值,如我们的Demo项目中配置了`timeout`,会看到如下信息: > timeout > Loading key: timeout with value: 100 >注:Apollo .Net客户端开源版目前默认会把日志直接输出到Console,大家可以自己实现Logging相关功能。 > > 详见[https://github.com/ctripcorp/apollo.net/tree/master/Apollo/Logging/Spi](https://github.com/ctripcorp/apollo.net/tree/master/Apollo/Logging/Spi) # 三、开发 ## 模块依赖图 ![模块依赖图](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/module-dependency.png) ## 3.1 Portal 实现用户登录功能 请参考[Portal 实现用户登录功能](zh/development/portal-how-to-implement-user-login-function) ## 3.2 Portal 接入邮件服务 请参考[Portal 接入邮件服务](zh/development/portal-how-to-enable-email-service)
本文档介绍了如何在本地使用IDE编译、运行Apollo,从而可以帮助大家了解Apollo的内在运行机制,同时也为自定义开发做好准备。 # &nbsp; # 一、准备工作 ## 1.1 本地运行时环境 Apollo本地开发需要以下组件: 1. Java: 1.8+ 2. MySQL: 5.6.5+ 3. IDE: 没有特殊要求 其中MySQL需要创建Apollo数据库并导入基础数据。 具体步骤请参考[分布式部署指南](zh/deployment/distributed-deployment-guide)中的以下部分: 1. [一、准备工作](zh/deployment/distributed-deployment-guide#一、准备工作) 2. [2.1 创建数据库](zh/deployment/distributed-deployment-guide#_21-创建数据库) ## 1.2 Apollo总体设计 具体请参考[Apollo配置中心设计](zh/design/apollo-design) # 二、本地启动 ## 2.1 Apollo Config Service和Apollo Admin Service 我们在本地开发时,一般会在IDE中同时启动`apollo-configservice`和`apollo-adminservice`。 下面以Intellij Community 2016.2版本为例来说明如何在本地启动`apollo-configservice`和`apollo-adminservice`。 ![ConfigAdminApplication-Overview](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/ConfigAdminApplication-Overview.png) ### 2.1.1 新建运行配置 ![NewConfiguration-Application](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/NewConfiguration-Application.png) ### 2.1.2 Main class配置 `com.ctrip.framework.apollo.assembly.ApolloApplication` > 注:如果希望独立启动`apollo-configservice`和`apollo-adminservice`,可以把Main Class分别换成 > `com.ctrip.framework.apollo.configservice.ConfigServiceApplication`和 > `com.ctrip.framework.apollo.adminservice.AdminServiceApplication` ### 2.1.3 VM options配置 ![ConfigAdminApplication-VM-Options](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/ConfigAdminApplication-VM-Options.png) -Dapollo_profile=github -Dspring.datasource.url=jdbc:mysql://localhost:3306/ApolloConfigDB?characterEncoding=utf8 -Dspring.datasource.username=root -Dspring.datasource.password= >注1:spring.datasource相关配置替换成你自己的数据库连接信息,注意数据库是`ApolloConfigDB` > >注2:程序默认日志输出为/opt/logs/100003171/apollo-assembly.log,如果需要修改日志文件路径,可以增加`logging.file.name`参数,如下: > >-Dlogging.file.name=/your-path/apollo-assembly.log ### 2.1.4 Program arguments配置 `--configservice --adminservice` ### 2.1.5 运行 对新建的运行配置点击Run或Debug皆可。 ![ConfigAdminApplication-Run](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/ConfigAdminApplication-Run.png) 启动完后,打开[http://localhost:8080](http://localhost:8080)可以看到`apollo-configservice`和`apollo-adminservice`都已经启动完成并注册到Eureka。 ![ConfigAdminApplication-Eureka](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/ConfigAdminApplication-Eureka.png) > 注:除了在Eureka确认服务状态外,还可以通过健康检查接口确认服务健康状况: > > apollo-adminservice: [http://localhost:8090/health](http://localhost:8090/health) > apollo-configservice: [http://localhost:8080/health](http://localhost:8080/health) > > 如果服务健康,返回内容中的status.code应当为`UP`: > > { > "status": { > "code": "UP", > ... > }, > ... > } ## 2.2 Apollo-Portal 下面以Intellij Community 2016.2版本为例来说明如何在本地启动`apollo-portal`。 ![PortalApplication-Overview](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/PortalApplication-Overview.png) ### 2.2.1 新建运行配置 ![NewConfiguration-Application](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/NewConfiguration-Application.png) ### 2.2.2 Main class配置 `com.ctrip.framework.apollo.portal.PortalApplication` ### 2.2.3 VM options配置 ![PortalApplication-VM-Options](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/PortalApplication-VM-Options.png) -Dapollo_profile=github,auth -Ddev_meta=http://localhost:8080/ -Dserver.port=8070 -Dspring.datasource.url=jdbc:mysql://localhost:3306/ApolloPortalDB?characterEncoding=utf8 -Dspring.datasource.username=root -Dspring.datasource.password= >注1:这里指定了apollo_profile是`github`和`auth`,其中`github`是Apollo必须的一个profile,用于数据库的配置,`auth`是从0.9.0新增的,用来支持使用apollo提供的Spring Security简单认证,更多信息可以参考[Portal-实现用户登录功能](zh/development/portal-how-to-implement-user-login-function) > >注2:spring.datasource相关配置替换成你自己的数据库连接信息,注意数据库是`ApolloPortalDB `。 > >注3:默认ApolloPortalDB中导入的配置只会展示DEV环境的配置,所以这里配置了dev\_meta属性,如果你希望在本地展示其它环境的配置,需要在这里增加其它环境的meta服务器地址,如fat\_meta。 > >注4:这里指定了server.port=8070是因为`apollo-configservice`启动在8080端口,所以这里配置`apollo-portal`启动在8070端口。 > >注5:程序默认日志输出为/opt/logs/100003173/apollo-portal.log,如果需要修改日志文件路径,可以增加`logging.file.name`参数,如下: > >-Dlogging.file.name=/your-path/apollo-portal.log ### 2.2.4 运行 对新建的运行配置点击Run或Debug皆可。 ![PortalApplication-Run](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/PortalApplication-Run.png) 启动完后,打开[http://localhost:8070](http://localhost:8070)就可以看到Apollo配置中心界面了。 ![PortalApplication-Home](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/PortalApplication-Home.png) >注:如果启用了`auth` profile的话,默认的用户名是apollo,密码是admin ### 2.2.5 Demo应用接入 为了更好的开发和调试,一般我们都会自己创建一个demo项目给自己使用。 可以参考[一、普通应用接入指南](zh/usage/apollo-user-guide#一、普通应用接入指南)创建自己的demo项目。 ## 2.3 Java样例客户端启动 项目中有一个样例客户端的项目:`apollo-demo`,下面以Intellij Community 2016.2版本为例来说明如何在本地启动。 ### 2.3.1 配置项目AppId 在`2.2.5 Demo应用接入`中创建Demo项目时,系统会要求填入一个全局唯一的AppId,我们需要把这个AppId配置到`apollo-demo`项目的app.properties文件中:`apollo-demo/src/main/resources/META-INF/app.properties`。 ![apollo-demo-app-properties](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/apollo-demo-app-properties.png) 如我们自己的demo项目使用的AppId是100004458,那么文件内容就是: app.id=100004458 >注:AppId是应用的唯一身份标识,Apollo客户端使用这个标识来获取应用自己的私有Namespace配置。 > 对于公共Namespace的配置,没有AppId也可以获取到配置,但是就失去了应用覆盖公共Namespace配置的能力。 > 更多配置AppId的方式可以参考[1.2.1 AppId](zh/usage/java-sdk-user-guide#_121-appid) ### 2.3.2 新建运行配置 ![NewConfiguration-Application](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/NewConfiguration-Application.png) ### 2.3.3 Main class配置 `SimpleApolloConfigDemo` ### 2.3.4 VM options配置 ![apollo-demo-vm-options](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/apollo-demo-vm-options.png) -Dapollo.meta=http://localhost:8080 > 注:这里当前环境的meta server地址为`http://localhost:8080`,也就是`apollo-configservice`的地址。 > 更多配置Apollo Meta Server的方式可以参考[1.2.2 Apollo Meta Server](zh/usage/java-sdk-user-guide#_122-apollo-meta-server) ### 2.3.5 概览 ![apollo-demo-overview](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/apollo-demo-overview.png) ### 2.3.6 运行 对新建的运行配置点击Run或Debug皆可。 ![apollo-demo-run](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/local-development/apollo-demo-run.png) 启动完后,忽略前面的调试信息,可以看到如下提示: Apollo Config Demo. Please input key to get the value. Input quit to exit. > 输入你之前在Portal上配置的值,如我们的Demo项目中配置了`timeout`,会看到如下信息: > timeout > [SimpleApolloConfigDemo] Loading key : timeout with value: 100 > 客户端日志级别默认是`DEBUG`,如果需要调整,可以通过修改`apollo-demo/src/main/resources/log4j2.xml`中的level配置 > ```xml > <logger name="com.ctrip.framework.apollo" additivity="false" level="trace"> > <AppenderRef ref="Async" level="DEBUG"/> > </logger> > ``` ## 2.4 .Net样例客户端启动 [apollo.net](https://github.com/ctripcorp/apollo.net)项目中有一个样例客户端的项目:`ApolloDemo`,下面就以VS 2010为例来说明如何在本地启动。 ### 2.4.1 配置项目AppId 在`2.2.5 Demo应用接入`中创建Demo项目时,系统会要求填入一个全局唯一的AppId,我们需要把这个AppId配置到`ApolloDemo`项目的APP.config文件中:`apollo.net\ApolloDemo\App.config`。 ![apollo-demo-app-config](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/apollo-net-app-config.png) 如我们自己的demo项目使用的AppId是100004458,那么文件内容就是: ```xml <add key="AppID" value="100004458"/> ``` >注:AppId是应用的唯一身份标识,Apollo客户端使用这个标识来获取应用自己的私有Namespace配置。 > 对于公共Namespace的配置,没有AppId也可以获取到配置,但是就失去了应用覆盖公共Namespace配置的能力。 ### 2.4.2 配置服务地址 Apollo客户端针对不同的环境会从不同的服务器获取配置,所以我们需要在app.config或web.config配置服务器地址(Apollo.{ENV}.Meta)。假设DEV环境的配置服务(apollo-configservice)地址是11.22.33.44,那么我们就做如下配置: ![apollo-net-server-url-config](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/apollo-net-server-url-config.png) ### 2.4.3 运行 运行`ApolloConfigDemo.cs`即可。 启动完后,忽略前面的调试信息,可以看到如下提示: Apollo Config Demo. Please input key to get the value. Input quit to exit. > 输入你之前在Portal上配置的值,如我们的Demo项目中配置了`timeout`,会看到如下信息: > timeout > Loading key: timeout with value: 100 >注:Apollo .Net客户端开源版目前默认会把日志直接输出到Console,大家可以自己实现Logging相关功能。 > > 详见[https://github.com/ctripcorp/apollo.net/tree/master/Apollo/Logging/Spi](https://github.com/ctripcorp/apollo.net/tree/master/Apollo/Logging/Spi) # 三、开发 ## 模块依赖图 ![模块依赖图](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/module-dependency.png) ## 3.1 Portal 实现用户登录功能 请参考[Portal 实现用户登录功能](zh/development/portal-how-to-implement-user-login-function) ## 3.2 Portal 接入邮件服务 请参考[Portal 接入邮件服务](zh/development/portal-how-to-enable-email-service)
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./.github/ISSUE_TEMPLATE/feature_request_zh.md
--- name: 请求特性 about: 给这个项目提一些建议、想法 title: '' labels: '' assignees: '' --- **你的特性请求和某个问题有关吗?请描述** 清晰简洁地描述这个问题是什么。即,当碰到xxx时,总是感觉很麻烦 **清晰简洁地描述一下你希望的解决方案** **清晰简洁地描述一下这个特性的备选方案** **其它背景** 在这里添加和这个特性请求有关的背景说明、截图
--- name: 请求特性 about: 给这个项目提一些建议、想法 title: '' labels: '' assignees: '' --- **你的特性请求和某个问题有关吗?请描述** 清晰简洁地描述这个问题是什么。即,当碰到xxx时,总是感觉很麻烦 **清晰简洁地描述一下你希望的解决方案** **清晰简洁地描述一下这个特性的备选方案** **其它背景** 在这里添加和这个特性请求有关的背景说明、截图
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./apollo-client/src/test/resources/spring/yaml/case5-new.yaml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # timeout: 1001 batch: newBatch
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # timeout: 1001 batch: newBatch
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./docs/zh/deployment/quick-start-docker.md
如果您对Docker非常熟悉,可以使用Docker的方式快速部署Apollo,从而快速的了解Apollo。如果您对Docker并不是很了解,请参考[常规方式部署Quick Start](zh/deployment/quick-start)。 另外需要说明的是,不管是Docker方式部署Quick Start还是常规方式部署的,Quick Start只是用来快速入门、了解Apollo。如果部署Apollo在公司中使用,请参考[分布式部署指南](zh/deployment/distributed-deployment-guide)。 > 由于Docker对windows的支持并不是很好,所以不建议您在windows环境下使用Docker方式部署,除非您对windows docker非常了解 ## 一、 准备工作 ### 1.1 安装Docker 具体步骤可以参考[Docker安装指南](https://yeasy.gitbooks.io/docker_practice/content/install/),通过以下命令测试是否成功安装 ``` docker -v ``` 为了加速Docker镜像下载,建议[配置镜像加速器](https://yeasy.gitbooks.io/docker_practice/content/install/mirror.html)。 ### 1.2 下载Docker Quick Start配置文件 确保[docker-quick-start](https://github.com/ctripcorp/apollo/tree/master/scripts/docker-quick-start)文件夹已经在本地存在,如果本地已经clone过Apollo的代码,则可以跳过此步骤。 ## 二、启动Apollo配置中心 在docker-quick-start目录下执行`docker-compose up`,第一次执行会触发下载镜像等操作,需要耐心等待一些时间。 搜索所有`apollo-quick-start`开头的日志,看到以下日志说明启动成功: ```log apollo-quick-start | ==== starting service ==== apollo-quick-start | Service logging file is ./service/apollo-service.log apollo-quick-start | Started [45] apollo-quick-start | Waiting for config service startup....... apollo-quick-start | Config service started. You may visit http://localhost:8080 for service status now! apollo-quick-start | Waiting for admin service startup...... apollo-quick-start | Admin service started apollo-quick-start | ==== starting portal ==== apollo-quick-start | Portal logging file is ./portal/apollo-portal.log apollo-quick-start | Started [254] apollo-quick-start | Waiting for portal startup....... apollo-quick-start | Portal started. You can visit http://localhost:8070 now! ``` > 注1:数据库的端口映射为13306,所以如果希望在宿主机上访问数据库,可以通过localhost:13306,用户名是root,密码留空。 > 注2:如要查看更多服务的日志,可以通过`docker exec -it apollo-quick-start bash`登录, 然后到`/apollo-quick-start/service`和`/apollo-quick-start/portal`下查看日志信息。 ## 三、使用Apollo配置中心 使用相关步骤可以参考[Quick Start - 四、使用Apollo配置中心](zh/deployment/quick-start#四、使用apollo配置中心) 需要注意的是,在Docker环境下需要通过下面的命令运行Demo客户端: ```bash docker exec -i apollo-quick-start /apollo-quick-start/demo.sh client ``` 默认情况下 apollo-configservice 只会注册内网 IP,只有通过上述命令启动的客户端能连通,如果希望外部的客户端也能访问,请参考[网络策略](zh/deployment/distributed-deployment-guide?id=_14-网络策略)。
如果您对Docker非常熟悉,可以使用Docker的方式快速部署Apollo,从而快速的了解Apollo。如果您对Docker并不是很了解,请参考[常规方式部署Quick Start](zh/deployment/quick-start)。 另外需要说明的是,不管是Docker方式部署Quick Start还是常规方式部署的,Quick Start只是用来快速入门、了解Apollo。如果部署Apollo在公司中使用,请参考[分布式部署指南](zh/deployment/distributed-deployment-guide)。 > 由于Docker对windows的支持并不是很好,所以不建议您在windows环境下使用Docker方式部署,除非您对windows docker非常了解 ## 一、 准备工作 ### 1.1 安装Docker 具体步骤可以参考[Docker安装指南](https://yeasy.gitbooks.io/docker_practice/content/install/),通过以下命令测试是否成功安装 ``` docker -v ``` 为了加速Docker镜像下载,建议[配置镜像加速器](https://yeasy.gitbooks.io/docker_practice/content/install/mirror.html)。 ### 1.2 下载Docker Quick Start配置文件 确保[docker-quick-start](https://github.com/ctripcorp/apollo/tree/master/scripts/docker-quick-start)文件夹已经在本地存在,如果本地已经clone过Apollo的代码,则可以跳过此步骤。 ## 二、启动Apollo配置中心 在docker-quick-start目录下执行`docker-compose up`,第一次执行会触发下载镜像等操作,需要耐心等待一些时间。 搜索所有`apollo-quick-start`开头的日志,看到以下日志说明启动成功: ```log apollo-quick-start | ==== starting service ==== apollo-quick-start | Service logging file is ./service/apollo-service.log apollo-quick-start | Started [45] apollo-quick-start | Waiting for config service startup....... apollo-quick-start | Config service started. You may visit http://localhost:8080 for service status now! apollo-quick-start | Waiting for admin service startup...... apollo-quick-start | Admin service started apollo-quick-start | ==== starting portal ==== apollo-quick-start | Portal logging file is ./portal/apollo-portal.log apollo-quick-start | Started [254] apollo-quick-start | Waiting for portal startup....... apollo-quick-start | Portal started. You can visit http://localhost:8070 now! ``` > 注1:数据库的端口映射为13306,所以如果希望在宿主机上访问数据库,可以通过localhost:13306,用户名是root,密码留空。 > 注2:如要查看更多服务的日志,可以通过`docker exec -it apollo-quick-start bash`登录, 然后到`/apollo-quick-start/service`和`/apollo-quick-start/portal`下查看日志信息。 ## 三、使用Apollo配置中心 使用相关步骤可以参考[Quick Start - 四、使用Apollo配置中心](zh/deployment/quick-start#四、使用apollo配置中心) 需要注意的是,在Docker环境下需要通过下面的命令运行Demo客户端: ```bash docker exec -i apollo-quick-start /apollo-quick-start/demo.sh client ``` 默认情况下 apollo-configservice 只会注册内网 IP,只有通过上述命令启动的客户端能连通,如果希望外部的客户端也能访问,请参考[网络策略](zh/deployment/distributed-deployment-guide?id=_14-网络策略)。
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./apollo-client/src/test/resources/yaml/case9.yaml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # !!javax.script.ScriptEngineManager [ !!java.net.URLClassLoader [[ !!java.net.URL ["http://localhost"] ]] ]
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # !!javax.script.ScriptEngineManager [ !!java.net.URLClassLoader [[ !!java.net.URL ["http://localhost"] ]] ]
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./CODE_OF_CONDUCT.md
# Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at apollo-config@googlegroups.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/
# Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at apollo-config@googlegroups.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./docs/zh/development/portal-how-to-enable-webhook-notification.md
从 1.8.0 版本开始,apollo 增加了 webhook 支持,从而可以在配置发布时触发 webhook 并告知配置发布的信息。 ## 启用方式 > 配置项统一存储在ApolloPortalDB.ServerConfig表中,也可以通过`管理员工具 - 系统参数`页面进行配置,修改完一分钟实时生效。 1. webhook.supported.envs 开启 webhook 的环境列表,多个环境以英文逗号分隔,如 ``` DEV,FAT,UAT,PRO ``` 2. config.release.webhook.service.url webhook 通知的 url 地址,需要接收 HTTP POST 请求。如有多个地址,以英文逗号分隔,如 ``` http://www.xxx.com/webhook1,http://www.xxx.com/webhook2 ``` ## Webhook 接入方式 1. URL 参数 参数名 | 参数说明 --- | --- env | 该次配置发布所在的环境 2. Request body sample ```json { "appId": "", // appId "clusterName": "", // 集群 "namespaceName": "", // namespace "operator": "", // 发布人 "releaseId": 2, // releaseId "releaseTitle": "", // releaseTitle "releaseComment": "", // releaseComment "releaseTime": "", // 发布时间 eg:2020-01-01T00:00:00.000+0800 "configuration": [ { // 发布后的全部配置,如果为灰度发布,则为灰度发布后的全部配置 "firstEntity": "", // 配置的key "secondEntity": "" // 配置的value } ], "isReleaseAbandoned": false, "previousReleaseId": 1, // 上一次正式发布的releaseId "operation": // 0-正常发布 1-配置回滚 2-灰度发布 4-全量发布 "operationContext": { // 操作设置的属性配置 "isEmergencyPublish": true/false, // 是否紧急发布 "rules": [ { // 灰度规则 "clientAppId": "", // appId "clientIpList": [ "10.0.0.2", "10.0.0.3" ] // IP列表 } ], "branchReleaseKeys": [ "", "" ] // 灰度发布的key } } ```
从 1.8.0 版本开始,apollo 增加了 webhook 支持,从而可以在配置发布时触发 webhook 并告知配置发布的信息。 ## 启用方式 > 配置项统一存储在ApolloPortalDB.ServerConfig表中,也可以通过`管理员工具 - 系统参数`页面进行配置,修改完一分钟实时生效。 1. webhook.supported.envs 开启 webhook 的环境列表,多个环境以英文逗号分隔,如 ``` DEV,FAT,UAT,PRO ``` 2. config.release.webhook.service.url webhook 通知的 url 地址,需要接收 HTTP POST 请求。如有多个地址,以英文逗号分隔,如 ``` http://www.xxx.com/webhook1,http://www.xxx.com/webhook2 ``` ## Webhook 接入方式 1. URL 参数 参数名 | 参数说明 --- | --- env | 该次配置发布所在的环境 2. Request body sample ```json { "appId": "", // appId "clusterName": "", // 集群 "namespaceName": "", // namespace "operator": "", // 发布人 "releaseId": 2, // releaseId "releaseTitle": "", // releaseTitle "releaseComment": "", // releaseComment "releaseTime": "", // 发布时间 eg:2020-01-01T00:00:00.000+0800 "configuration": [ { // 发布后的全部配置,如果为灰度发布,则为灰度发布后的全部配置 "firstEntity": "", // 配置的key "secondEntity": "" // 配置的value } ], "isReleaseAbandoned": false, "previousReleaseId": 1, // 上一次正式发布的releaseId "operation": // 0-正常发布 1-配置回滚 2-灰度发布 4-全量发布 "operationContext": { // 操作设置的属性配置 "isEmergencyPublish": true/false, // 是否紧急发布 "rules": [ { // 灰度规则 "clientAppId": "", // appId "clientIpList": [ "10.0.0.2", "10.0.0.3" ] // IP列表 } ], "branchReleaseKeys": [ "", "" ] // 灰度发布的key } } ```
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./scripts/apollo-on-kubernetes/kubernetes/apollo-env-test-beta/service-apollo-admin-server-test-beta.yaml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --- # configmap for apollo-admin-server-test-beta kind: ConfigMap apiVersion: v1 metadata: namespace: sre name: configmap-apollo-admin-server-test-beta data: application-github.properties: | spring.datasource.url = jdbc:mysql://service-mysql-for-apollo-test-beta-env.sre:3306/TestBetaApolloConfigDB?characterEncoding=utf8 spring.datasource.username = FillInCorrectUser spring.datasource.password = FillInCorrectPassword eureka.service.url = http://statefulset-apollo-config-server-test-beta-0.service-apollo-meta-server-test-beta:8080/eureka/,http://statefulset-apollo-config-server-test-beta-1.service-apollo-meta-server-test-beta:8080/eureka/,http://statefulset-apollo-config-server-test-beta-2.service-apollo-meta-server-test-beta:8080/eureka/ --- kind: Service apiVersion: v1 metadata: namespace: sre name: service-apollo-admin-server-test-beta labels: app: service-apollo-admin-server-test-beta spec: ports: - protocol: TCP port: 8090 targetPort: 8090 selector: app: pod-apollo-admin-server-test-beta type: ClusterIP sessionAffinity: ClientIP --- kind: Deployment apiVersion: apps/v1 metadata: namespace: sre name: deployment-apollo-admin-server-test-beta labels: app: deployment-apollo-admin-server-test-beta spec: replicas: 3 selector: matchLabels: app: pod-apollo-admin-server-test-beta strategy: rollingUpdate: maxSurge: 1 maxUnavailable: 1 type: RollingUpdate template: metadata: labels: app: pod-apollo-admin-server-test-beta spec: affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: matchExpressions: - key: app operator: In values: - pod-apollo-admin-server-test-beta topologyKey: kubernetes.io/hostname volumes: - name: volume-configmap-apollo-admin-server-test-beta configMap: name: configmap-apollo-admin-server-test-beta items: - key: application-github.properties path: application-github.properties initContainers: - image: alpine-bash:3.8 name: check-service-apollo-config-server-test-beta command: ['bash', '-c', "curl --connect-timeout 2 --max-time 5 --retry 60 --retry-delay 1 --retry-max-time 120 service-apollo-config-server-test-beta.sre:8080"] containers: - image: apollo-admin-server:v1.0.0 imagePullPolicy: IfNotPresent name: container-apollo-admin-server-test-beta ports: - protocol: TCP containerPort: 8090 volumeMounts: - name: volume-configmap-apollo-admin-server-test-beta mountPath: /apollo-admin-server/config/application-github.properties subPath: application-github.properties env: - name: APOLLO_ADMIN_SERVICE_NAME value: "service-apollo-admin-server-test-beta.sre" readinessProbe: tcpSocket: port: 8090 initialDelaySeconds: 10 periodSeconds: 5 livenessProbe: tcpSocket: port: 8090 initialDelaySeconds: 120 periodSeconds: 10 dnsPolicy: ClusterFirst restartPolicy: Always
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --- # configmap for apollo-admin-server-test-beta kind: ConfigMap apiVersion: v1 metadata: namespace: sre name: configmap-apollo-admin-server-test-beta data: application-github.properties: | spring.datasource.url = jdbc:mysql://service-mysql-for-apollo-test-beta-env.sre:3306/TestBetaApolloConfigDB?characterEncoding=utf8 spring.datasource.username = FillInCorrectUser spring.datasource.password = FillInCorrectPassword eureka.service.url = http://statefulset-apollo-config-server-test-beta-0.service-apollo-meta-server-test-beta:8080/eureka/,http://statefulset-apollo-config-server-test-beta-1.service-apollo-meta-server-test-beta:8080/eureka/,http://statefulset-apollo-config-server-test-beta-2.service-apollo-meta-server-test-beta:8080/eureka/ --- kind: Service apiVersion: v1 metadata: namespace: sre name: service-apollo-admin-server-test-beta labels: app: service-apollo-admin-server-test-beta spec: ports: - protocol: TCP port: 8090 targetPort: 8090 selector: app: pod-apollo-admin-server-test-beta type: ClusterIP sessionAffinity: ClientIP --- kind: Deployment apiVersion: apps/v1 metadata: namespace: sre name: deployment-apollo-admin-server-test-beta labels: app: deployment-apollo-admin-server-test-beta spec: replicas: 3 selector: matchLabels: app: pod-apollo-admin-server-test-beta strategy: rollingUpdate: maxSurge: 1 maxUnavailable: 1 type: RollingUpdate template: metadata: labels: app: pod-apollo-admin-server-test-beta spec: affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: matchExpressions: - key: app operator: In values: - pod-apollo-admin-server-test-beta topologyKey: kubernetes.io/hostname volumes: - name: volume-configmap-apollo-admin-server-test-beta configMap: name: configmap-apollo-admin-server-test-beta items: - key: application-github.properties path: application-github.properties initContainers: - image: alpine-bash:3.8 name: check-service-apollo-config-server-test-beta command: ['bash', '-c', "curl --connect-timeout 2 --max-time 5 --retry 60 --retry-delay 1 --retry-max-time 120 service-apollo-config-server-test-beta.sre:8080"] containers: - image: apollo-admin-server:v1.0.0 imagePullPolicy: IfNotPresent name: container-apollo-admin-server-test-beta ports: - protocol: TCP containerPort: 8090 volumeMounts: - name: volume-configmap-apollo-admin-server-test-beta mountPath: /apollo-admin-server/config/application-github.properties subPath: application-github.properties env: - name: APOLLO_ADMIN_SERVICE_NAME value: "service-apollo-admin-server-test-beta.sre" readinessProbe: tcpSocket: port: 8090 initialDelaySeconds: 10 periodSeconds: 5 livenessProbe: tcpSocket: port: 8090 initialDelaySeconds: 120 periodSeconds: 10 dnsPolicy: ClusterFirst restartPolicy: Always
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./scripts/apollo-on-kubernetes/kubernetes/apollo-env-dev/service-apollo-admin-server-dev.yaml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --- # configmap for apollo-admin-server-dev kind: ConfigMap apiVersion: v1 metadata: namespace: sre name: configmap-apollo-admin-server-dev data: application-github.properties: | spring.datasource.url = jdbc:mysql://service-mysql-for-apollo-dev-env.sre:3306/DevApolloConfigDB?characterEncoding=utf8 spring.datasource.username = FillInCorrectUser spring.datasource.password = FillInCorrectPassword eureka.service.url = http://statefulset-apollo-config-server-dev-0.service-apollo-meta-server-dev:8080/eureka/,http://statefulset-apollo-config-server-dev-1.service-apollo-meta-server-dev:8080/eureka/,http://statefulset-apollo-config-server-dev-2.service-apollo-meta-server-dev:8080/eureka/ --- kind: Service apiVersion: v1 metadata: namespace: sre name: service-apollo-admin-server-dev labels: app: service-apollo-admin-server-dev spec: ports: - protocol: TCP port: 8090 targetPort: 8090 selector: app: pod-apollo-admin-server-dev type: ClusterIP sessionAffinity: ClientIP --- kind: Deployment apiVersion: apps/v1 metadata: namespace: sre name: deployment-apollo-admin-server-dev labels: app: deployment-apollo-admin-server-dev spec: replicas: 3 selector: matchLabels: app: pod-apollo-admin-server-dev strategy: rollingUpdate: maxSurge: 1 maxUnavailable: 1 type: RollingUpdate template: metadata: labels: app: pod-apollo-admin-server-dev spec: affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: matchExpressions: - key: app operator: In values: - pod-apollo-admin-server-dev topologyKey: kubernetes.io/hostname volumes: - name: volume-configmap-apollo-admin-server-dev configMap: name: configmap-apollo-admin-server-dev items: - key: application-github.properties path: application-github.properties initContainers: - image: alpine-bash:3.8 name: check-service-apollo-config-server-dev command: ['bash', '-c', "curl --connect-timeout 2 --max-time 5 --retry 60 --retry-delay 1 --retry-max-time 120 service-apollo-config-server-dev.sre:8080"] containers: - image: apollo-admin-server:v1.0.0 securityContext: privileged: true imagePullPolicy: IfNotPresent name: container-apollo-admin-server-dev ports: - protocol: TCP containerPort: 8090 volumeMounts: - name: volume-configmap-apollo-admin-server-dev mountPath: /apollo-admin-server/config/application-github.properties subPath: application-github.properties env: - name: APOLLO_ADMIN_SERVICE_NAME value: "service-apollo-admin-server-dev.sre" readinessProbe: tcpSocket: port: 8090 initialDelaySeconds: 10 periodSeconds: 5 livenessProbe: tcpSocket: port: 8090 initialDelaySeconds: 120 periodSeconds: 10 dnsPolicy: ClusterFirst restartPolicy: Always
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --- # configmap for apollo-admin-server-dev kind: ConfigMap apiVersion: v1 metadata: namespace: sre name: configmap-apollo-admin-server-dev data: application-github.properties: | spring.datasource.url = jdbc:mysql://service-mysql-for-apollo-dev-env.sre:3306/DevApolloConfigDB?characterEncoding=utf8 spring.datasource.username = FillInCorrectUser spring.datasource.password = FillInCorrectPassword eureka.service.url = http://statefulset-apollo-config-server-dev-0.service-apollo-meta-server-dev:8080/eureka/,http://statefulset-apollo-config-server-dev-1.service-apollo-meta-server-dev:8080/eureka/,http://statefulset-apollo-config-server-dev-2.service-apollo-meta-server-dev:8080/eureka/ --- kind: Service apiVersion: v1 metadata: namespace: sre name: service-apollo-admin-server-dev labels: app: service-apollo-admin-server-dev spec: ports: - protocol: TCP port: 8090 targetPort: 8090 selector: app: pod-apollo-admin-server-dev type: ClusterIP sessionAffinity: ClientIP --- kind: Deployment apiVersion: apps/v1 metadata: namespace: sre name: deployment-apollo-admin-server-dev labels: app: deployment-apollo-admin-server-dev spec: replicas: 3 selector: matchLabels: app: pod-apollo-admin-server-dev strategy: rollingUpdate: maxSurge: 1 maxUnavailable: 1 type: RollingUpdate template: metadata: labels: app: pod-apollo-admin-server-dev spec: affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: matchExpressions: - key: app operator: In values: - pod-apollo-admin-server-dev topologyKey: kubernetes.io/hostname volumes: - name: volume-configmap-apollo-admin-server-dev configMap: name: configmap-apollo-admin-server-dev items: - key: application-github.properties path: application-github.properties initContainers: - image: alpine-bash:3.8 name: check-service-apollo-config-server-dev command: ['bash', '-c', "curl --connect-timeout 2 --max-time 5 --retry 60 --retry-delay 1 --retry-max-time 120 service-apollo-config-server-dev.sre:8080"] containers: - image: apollo-admin-server:v1.0.0 securityContext: privileged: true imagePullPolicy: IfNotPresent name: container-apollo-admin-server-dev ports: - protocol: TCP containerPort: 8090 volumeMounts: - name: volume-configmap-apollo-admin-server-dev mountPath: /apollo-admin-server/config/application-github.properties subPath: application-github.properties env: - name: APOLLO_ADMIN_SERVICE_NAME value: "service-apollo-admin-server-dev.sre" readinessProbe: tcpSocket: port: 8090 initialDelaySeconds: 10 periodSeconds: 5 livenessProbe: tcpSocket: port: 8090 initialDelaySeconds: 120 periodSeconds: 10 dnsPolicy: ClusterFirst restartPolicy: Always
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./apollo-client/src/test/resources/spring/yaml/case3-new.yaml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # timeout: 1001 batch: 2001
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # timeout: 1001 batch: 2001
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./GOVERNANCE.md
# Overview Apollo is a meritocratic, consensus-based community project. Anyone with an interest in the project can join the community, contribute to the project design and participate in the decision-making process. This document describes how that participation takes place and how to set about earning merit within the project community. # Roles and Responsibilities Apollo community is composed of and operated by the following roles: - Users - Contributors - Committers - Project Management Committee (PMC) ## Users Users are community members who have a need for the project. They are the most important members of the community and without them the project would have no purpose. Anyone can be a user and there are no special requirements. ## Contributors Contributors are community members who contribute in concrete ways to the project. ### How to become a Contributor - merged at least 1 pull request You are also encouraged to participate in the projects in the following ways: - Actively answer technical questions raised by community users in GitHub issues. - Help test the projects - Help review the pull requests (PRs) submitted by others - Help improve technical documents - Submit valuable issues - Report or fix known and unknown bugs - Write articles about source code analysis and usage cases for a project. - Give representations of Apollo topic in conferences. - Take part in our discussions of features, enhancements, etc. ## Committers Committers are contributors who have shown that they are committed to the continued development of the project through ongoing engagement with the community and recognized by PMCs for their outstanding contributions. ### How to become a Committer A Committer must have accomplished one or more of the following items: - Demonstrated a good sense of responsibility in PR reviews. - Demonstrated deep understanding of Apollo components by contributing significantly as: - Finished 2 or more tasks of Medium difficulty - Fixed 1 or more tasks of Hard difficulty - Nominated by one PMC member and gained more +1 than -1. ### Privileges and responsibilities - Control overall code quality of projects - Guide Contributors to contribute to the community continuously - Participate in design discussions ## Project Management Committee The PMC(Project Management Committee) functions as the core management team that oversees the Apollo community. The PMC has additional responsibilities over and above those of Committers. These responsibilities ensure the smooth running of the project. ### How to become a PMC member - Membership of the PMC is by invitation from the existing PMC members. - A nomination will result in discussion and then a vote by the existing PMC members. - PMC membership votes are subject to consensus approval of the current PMC members. ### Privileges and responsibilities - Handle reported security issues (CVE, etc.) - Nominate new committers and PMC members - Vote on new committers and new PMC members - Make major decisions for the future with respect to Apollo, such as project-level governance policies, management of sub-structures, security processes and so on - Make decisions when community consensus cannot be reached # Decision-making and voting Proposals and ideas can be submitted for agreement via a GitHub issue, PR, or GitHub Discussion. Major changes such as feature proposals and organization or process changes should be brought to the PMC. For the change to happen, the change must earn more +1 than -1. # Conflict resolution In general, we prefer that technical issues and other disputes upon which consensus can't be reached are amicably worked out between the persons involved. If a dispute cannot be decided independently, the PMC can be called in to resolve the issue by voting. The same PR can be used, or a separate PR can be opened for voting. # Changes in Governance Any change in this Governance document, or similar nature of changes to other governance related documents, shall go through the voting process as described in [Decision-making and voting](#decision-making-and-voting). # Credits The contents of this document are based on <http://oss-watch.ac.uk/resources/meritocraticgovernancemodel> by Ross Gardler and Gabriel Hanganu, and [TiDB Governance](https://github.com/pingcap/community/blob/master/GOVERNANCE.md).
# Overview Apollo is a meritocratic, consensus-based community project. Anyone with an interest in the project can join the community, contribute to the project design and participate in the decision-making process. This document describes how that participation takes place and how to set about earning merit within the project community. # Roles and Responsibilities Apollo community is composed of and operated by the following roles: - Users - Contributors - Committers - Project Management Committee (PMC) ## Users Users are community members who have a need for the project. They are the most important members of the community and without them the project would have no purpose. Anyone can be a user and there are no special requirements. ## Contributors Contributors are community members who contribute in concrete ways to the project. ### How to become a Contributor - merged at least 1 pull request You are also encouraged to participate in the projects in the following ways: - Actively answer technical questions raised by community users in GitHub issues. - Help test the projects - Help review the pull requests (PRs) submitted by others - Help improve technical documents - Submit valuable issues - Report or fix known and unknown bugs - Write articles about source code analysis and usage cases for a project. - Give representations of Apollo topic in conferences. - Take part in our discussions of features, enhancements, etc. ## Committers Committers are contributors who have shown that they are committed to the continued development of the project through ongoing engagement with the community and recognized by PMCs for their outstanding contributions. ### How to become a Committer A Committer must have accomplished one or more of the following items: - Demonstrated a good sense of responsibility in PR reviews. - Demonstrated deep understanding of Apollo components by contributing significantly as: - Finished 2 or more tasks of Medium difficulty - Fixed 1 or more tasks of Hard difficulty - Nominated by one PMC member and gained more +1 than -1. ### Privileges and responsibilities - Control overall code quality of projects - Guide Contributors to contribute to the community continuously - Participate in design discussions ## Project Management Committee The PMC(Project Management Committee) functions as the core management team that oversees the Apollo community. The PMC has additional responsibilities over and above those of Committers. These responsibilities ensure the smooth running of the project. ### How to become a PMC member - Membership of the PMC is by invitation from the existing PMC members. - A nomination will result in discussion and then a vote by the existing PMC members. - PMC membership votes are subject to consensus approval of the current PMC members. ### Privileges and responsibilities - Handle reported security issues (CVE, etc.) - Nominate new committers and PMC members - Vote on new committers and new PMC members - Make major decisions for the future with respect to Apollo, such as project-level governance policies, management of sub-structures, security processes and so on - Make decisions when community consensus cannot be reached # Decision-making and voting Proposals and ideas can be submitted for agreement via a GitHub issue, PR, or GitHub Discussion. Major changes such as feature proposals and organization or process changes should be brought to the PMC. For the change to happen, the change must earn more +1 than -1. # Conflict resolution In general, we prefer that technical issues and other disputes upon which consensus can't be reached are amicably worked out between the persons involved. If a dispute cannot be decided independently, the PMC can be called in to resolve the issue by voting. The same PR can be used, or a separate PR can be opened for voting. # Changes in Governance Any change in this Governance document, or similar nature of changes to other governance related documents, shall go through the voting process as described in [Decision-making and voting](#decision-making-and-voting). # Credits The contents of this document are based on <http://oss-watch.ac.uk/resources/meritocraticgovernancemodel> by Ross Gardler and Gabriel Hanganu, and [TiDB Governance](https://github.com/pingcap/community/blob/master/GOVERNANCE.md).
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./docs/zh/usage/apollo-user-practices.md
Apollo 配置中心的实践案例,供大家参考: * [Apollo+ES源码改造,构建民生银行的ELK日志平台配置管理中心](https://mp.weixin.qq.com/s/VHugn0vgNu4m56V49geC4w) * [Apollo在有赞的实践](https://mp.weixin.qq.com/s/Ge14UeY9Gm2Hrk--E47eJQ) * [微服务版本切换初始设计思路](https://blog.llyweb.com/articles/2020/08/11/1597149013480.html) * [Alibaba Sentinel Push模式 规则推送至Apollo配置中心](https://anilople.github.io/Sentinel)
Apollo 配置中心的实践案例,供大家参考: * [Apollo+ES源码改造,构建民生银行的ELK日志平台配置管理中心](https://mp.weixin.qq.com/s/VHugn0vgNu4m56V49geC4w) * [Apollo在有赞的实践](https://mp.weixin.qq.com/s/Ge14UeY9Gm2Hrk--E47eJQ) * [微服务版本切换初始设计思路](https://blog.llyweb.com/articles/2020/08/11/1597149013480.html) * [Alibaba Sentinel Push模式 规则推送至Apollo配置中心](https://anilople.github.io/Sentinel)
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./apollo-client/src/test/resources/yaml/case8.yaml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ,
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ,
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./scripts/helm/apollo-portal/templates/deployment-portal.yaml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --- # configmap for apollo-portal kind: ConfigMap apiVersion: v1 metadata: {{- $portalFullName := include "apollo.portal.fullName" . }} name: {{ $portalFullName }} data: application-github.properties: | spring.datasource.url = jdbc:mysql://{{include "apollo.portaldb.serviceName" .}}:{{include "apollo.portaldb.servicePort" .}}/{{ .Values.portaldb.dbName }}{{ if .Values.portaldb.connectionStringProperties }}?{{ .Values.portaldb.connectionStringProperties }}{{ end }} spring.datasource.username = {{ required "portaldb.userName is required!" .Values.portaldb.userName }} spring.datasource.password = {{ required "portaldb.password is required!" .Values.portaldb.password }} {{- if .Values.config.envs }} apollo.portal.envs = {{ .Values.config.envs }} {{- end }} {{- if .Values.config.contextPath }} server.servlet.context-path = {{ .Values.config.contextPath }} {{- end }} apollo-env.properties: | {{- range $env, $address := .Values.config.metaServers }} {{ $env }}.meta = {{ $address }} {{- end }} {{- range $fileName, $content := .Values.config.files }} {{ $fileName | indent 2 }}: | {{ $content | indent 4 }} {{- end }} --- kind: Deployment apiVersion: apps/v1 metadata: name: {{ $portalFullName }} labels: {{- include "apollo.portal.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: app: {{ $portalFullName }} {{- with .Values.strategy }} strategy: {{- toYaml . | nindent 4 }} {{- end }} template: metadata: labels: app: {{ $portalFullName }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} volumes: - name: configmap-{{ $portalFullName }} configMap: name: {{ $portalFullName }} items: - key: application-github.properties path: application-github.properties - key: apollo-env.properties path: apollo-env.properties {{- range $fileName, $content := .Values.config.files }} - key: {{ $fileName }} path: {{ $fileName }} {{- end }} defaultMode: 420 containers: - name: {{ .Values.name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http containerPort: {{ .Values.containerPort }} protocol: TCP env: - name: SPRING_PROFILES_ACTIVE value: {{ .Values.config.profiles | quote }} {{- range $key, $value := .Values.env }} - name: {{ $key }} value: {{ $value }} {{- end }} volumeMounts: - name: configmap-{{ $portalFullName }} mountPath: /apollo-portal/config/application-github.properties subPath: application-github.properties - name: configmap-{{ $portalFullName }} mountPath: /apollo-portal/config/apollo-env.properties subPath: apollo-env.properties {{- range $fileName, $content := .Values.config.files }} - name: configmap-{{ $portalFullName }} mountPath: /apollo-portal/config/{{ $fileName }} subPath: {{ $fileName }} {{- end }} livenessProbe: tcpSocket: port: {{ .Values.containerPort }} initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} readinessProbe: httpGet: path: {{ .Values.config.contextPath }}/health port: {{ .Values.containerPort }} initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --- # configmap for apollo-portal kind: ConfigMap apiVersion: v1 metadata: {{- $portalFullName := include "apollo.portal.fullName" . }} name: {{ $portalFullName }} data: application-github.properties: | spring.datasource.url = jdbc:mysql://{{include "apollo.portaldb.serviceName" .}}:{{include "apollo.portaldb.servicePort" .}}/{{ .Values.portaldb.dbName }}{{ if .Values.portaldb.connectionStringProperties }}?{{ .Values.portaldb.connectionStringProperties }}{{ end }} spring.datasource.username = {{ required "portaldb.userName is required!" .Values.portaldb.userName }} spring.datasource.password = {{ required "portaldb.password is required!" .Values.portaldb.password }} {{- if .Values.config.envs }} apollo.portal.envs = {{ .Values.config.envs }} {{- end }} {{- if .Values.config.contextPath }} server.servlet.context-path = {{ .Values.config.contextPath }} {{- end }} apollo-env.properties: | {{- range $env, $address := .Values.config.metaServers }} {{ $env }}.meta = {{ $address }} {{- end }} {{- range $fileName, $content := .Values.config.files }} {{ $fileName | indent 2 }}: | {{ $content | indent 4 }} {{- end }} --- kind: Deployment apiVersion: apps/v1 metadata: name: {{ $portalFullName }} labels: {{- include "apollo.portal.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: app: {{ $portalFullName }} {{- with .Values.strategy }} strategy: {{- toYaml . | nindent 4 }} {{- end }} template: metadata: labels: app: {{ $portalFullName }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} volumes: - name: configmap-{{ $portalFullName }} configMap: name: {{ $portalFullName }} items: - key: application-github.properties path: application-github.properties - key: apollo-env.properties path: apollo-env.properties {{- range $fileName, $content := .Values.config.files }} - key: {{ $fileName }} path: {{ $fileName }} {{- end }} defaultMode: 420 containers: - name: {{ .Values.name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http containerPort: {{ .Values.containerPort }} protocol: TCP env: - name: SPRING_PROFILES_ACTIVE value: {{ .Values.config.profiles | quote }} {{- range $key, $value := .Values.env }} - name: {{ $key }} value: {{ $value }} {{- end }} volumeMounts: - name: configmap-{{ $portalFullName }} mountPath: /apollo-portal/config/application-github.properties subPath: application-github.properties - name: configmap-{{ $portalFullName }} mountPath: /apollo-portal/config/apollo-env.properties subPath: apollo-env.properties {{- range $fileName, $content := .Values.config.files }} - name: configmap-{{ $portalFullName }} mountPath: /apollo-portal/config/{{ $fileName }} subPath: {{ $fileName }} {{- end }} livenessProbe: tcpSocket: port: {{ .Values.containerPort }} initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} readinessProbe: httpGet: path: {{ .Values.config.contextPath }}/health port: {{ .Values.containerPort }} initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./scripts/apollo-on-kubernetes/kubernetes/apollo-env-dev/service-mysql-for-apollo-dev-env.yaml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --- # 为外部 mysql 服务设置 service kind: Service apiVersion: v1 metadata: namespace: sre name: service-mysql-for-apollo-dev-env labels: app: service-mysql-for-apollo-dev-env spec: ports: - protocol: TCP port: 3306 targetPort: 3306 type: ClusterIP sessionAffinity: None --- kind: Endpoints apiVersion: v1 metadata: namespace: sre name: service-mysql-for-apollo-dev-env subsets: - addresses: - ip: your-mysql-addresses ports: - protocol: TCP port: 3306
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --- # 为外部 mysql 服务设置 service kind: Service apiVersion: v1 metadata: namespace: sre name: service-mysql-for-apollo-dev-env labels: app: service-mysql-for-apollo-dev-env spec: ports: - protocol: TCP port: 3306 targetPort: 3306 type: ClusterIP sessionAffinity: None --- kind: Endpoints apiVersion: v1 metadata: namespace: sre name: service-mysql-for-apollo-dev-env subsets: - addresses: - ip: your-mysql-addresses ports: - protocol: TCP port: 3306
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./docs/zh/usage/apollo-user-guide.md
# &nbsp; # 名词解释 * 普通应用 * 普通应用指的是独立运行的程序,如 * Web应用程序 * 带有main函数的程序 * 公共组件 * 公共组件指的是发布的类库、客户端程序,不会自己独立运行,如 * Java的jar包 * .Net的dll文件 # 一、普通应用接入指南 ## 1.1 创建项目 要使用Apollo,第一步需要创建项目。 1. 打开apollo-portal主页 2. 点击“创建项目” ![create-app-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-app-entry.png) 3. 输入项目信息 * 部门:选择应用所在的部门 * 应用AppId:用来标识应用身份的唯一id,格式为string,需要和客户端app.properties中配置的app.id对应 * 应用名称:应用名,仅用于界面展示 * 应用负责人:选择的人默认会成为该项目的管理员,具备项目权限管理、集群创建、Namespace创建等权限 ![create-app](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-app.png) 4. 点击提交 创建成功后,会自动跳转到项目首页 ![app-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/app-created.png) ## 1.2 项目权限分配 ### 1.2.1 项目管理员权限 项目管理员拥有以下权限: 1. 可以管理项目的权限分配 2. 可以创建集群 3. 可以创建Namespace 创建项目时填写的应用负责人默认会成为项目的管理员之一,如果还需要其他人也成为项目管理员,可以按照下面步骤操作: 1. 点击页面左侧的“管理项目” * ![app-permission-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/app-permission-entry.png) 2. 搜索需要添加的成员并点击添加 * ![app-permission-search-user](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/app-permission-search-user.png) * ![app-permission-user-added](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/app-permission-user-added.png) ### 1.2.2 配置编辑、发布权限 配置权限分为编辑和发布: * 编辑权限允许用户在Apollo界面上创建、修改、删除配置 * 配置修改后只在Apollo界面上变化,不会影响到应用实际使用的配置 * 发布权限允许用户在Apollo界面上发布、回滚配置 * 配置只有在发布、回滚动作后才会被应用实际使用到 * Apollo在用户操作发布、回滚动作后实时通知到应用,并使最新配置生效 项目创建完,默认没有分配配置的编辑和发布权限,需要项目管理员进行授权。 1. 点击application这个namespace的授权按钮 * ![namespace-permission-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-permission-entry.png) 2. 分配修改权限 * ![namespace-permission-edit](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-permission-edit.png) 3. 分配发布权限 * ![namespace-publish-permission](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-publish-permission.png) ## 1.3 添加配置项 编辑配置需要拥有这个Namespace的编辑权限,如果发现没有新增配置按钮,可以找项目管理员授权。 ### 1.3.1 通过表格模式添加配置 1. 点击新增配置 * ![create-item-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-item-entry.png) 2. 输入配置项 * ![create-item-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-item-detail.png) 3. 点击提交 * ![item-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/item-created.png) ### 1.3.2 通过文本模式编辑 Apollo除了支持表格模式,逐个添加、修改配置外,还提供文本模式批量添加、修改。 这个对于从已有的properties文件迁移尤其有用。 1. 切换到文本编辑模式 ![text-mode-config-overview](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/text-mode-config-overview.png) 2. 点击右侧的修改配置按钮 ![text-mode-config-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/text-mode-config-entry.png) 3. 输入配置项,并点击提交修改 ![text-mode-config-submit](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/text-mode-config-submit.png) ## 1.4 发布配置 配置只有在发布后才会真的被应用使用到,所以在编辑完配置后,需要发布配置。 发布配置需要拥有这个Namespace的发布权限,如果发现没有发布按钮,可以找项目管理员授权。 1. 点击“发布按钮” ![publish-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/hermes-portal-publish-entry.png) 2. 填写发布相关信息,点击发布 ![publish-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/hermes-portal-publish-detail.png) ## 1.5 应用读取配置 配置发布成功后,应用就可以通过Apollo客户端读取到配置了。 Apollo目前提供Java客户端,具体信息请点击[Java客户端使用文档](zh/usage/java-sdk-user-guide): 如果应用使用了其它语言,也可以通过直接访问Http接口获取配置,具体可以参考[其它语言客户端接入指南](zh/usage/other-language-client-user-guide) ## 1.6 回滚已发布配置 如果发现已发布的配置有问题,可以通过点击『回滚』按钮来将客户端读取到的配置回滚到上一个发布版本。 这里的回滚机制类似于发布系统,发布系统中的回滚操作是将部署到机器上的安装包回滚到上一个部署的版本,但代码仓库中的代码是不会回滚的,从而开发可以在修复代码后重新发布。 Apollo中的回滚也是类似的机制,点击回滚后是将发布到客户端的配置回滚到上一个已发布版本,也就是说客户端读取到的配置会恢复到上一个版本,但页面上编辑状态的配置是不会回滚的,从而开发可以在修复配置后重新发布。 # 二、公共组件接入指南 ## 2.1 公共组件和普通应用的区别 公共组件是指那些发布给其它应用使用的客户端代码,比如CAT客户端、Hermes Producer客户端等。 虽然这类组件是由其他团队开发、维护,但是运行时是在业务实际应用内的,所以本质上可以认为是应用的一部分。 通常情况下,这类组件所用到的配置由原始开发团队维护,不过由于实际应用的运行时、环境各不一样,所以我们也允许应用在实际使用时能够覆盖公共组件的部分配置。 ## 2.2 公共组件接入步骤 公共组件的接入步骤,和普通应用几乎一致,唯一的区别是公共组件需要创建自己唯一的Namespace。 所以,首先执行普通应用接入文档中的以下几个步骤,然后再按照本章节后面的步骤操作。 1. [创建项目](#_11-%E5%88%9B%E5%BB%BA%E9%A1%B9%E7%9B%AE) 2. [项目管理员权限](#_121-%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86%E5%91%98%E6%9D%83%E9%99%90) ### 2.2.1 创建Namespace 创建Namespace需要项目管理员权限,如果发现没有添加Namespace按钮,可以找项目管理员授权。 1. 点击页面左侧的添加Namespace * ![create-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace.png) 2. 点击“创建新的Namespace” * ![create-namespace-select-type](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace-select-type.png) 3. 输入公共组件的Namespace名称,需要注意的是Namespace名称全局唯一 * Apollo会默认把部门代号添加在最前面 * ![create-namespace-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace-detail.png) 4. 点击提交后,页面会自动跳转到关联Namespace页面 * 首先,选中所有需要有这个Namespace的环境和集群,一般建议全选 * 其次,选中刚刚创建的namespace * 最后,点击提交 * ![link-namespace-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/link-namespace-detail.png) 5. 关联成功后,页面会自动跳转到Namespace权限管理页面 1. 分配修改权限 * ![namespace-permission-edit](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-permission-edit.png) 2. 分配发布权限 * ![namespace-publish-permission](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-publish-permission.png) 6. 点击“返回”回到项目页面 ### 2.2.2 添加配置项 编辑配置需要拥有这个Namespace的编辑权限,如果发现没有新增配置按钮,可以找项目管理员授权。 #### 2.2.2.1 通过表格模式添加配置 1. 点击新增配置 ![public-namespace-edit-item-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-edit-item-entry.png) 2. 输入配置项 ![public-namespace-edit-item](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-edit-item.png) 3. 点击提交 ![public-namespace-item-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-item-created.png) #### 2.2.2.2 通过文本模式编辑 这部分和普通应用一致,具体步骤请参见[1.3.2 通过文本模式编辑](#_132-%E9%80%9A%E8%BF%87%E6%96%87%E6%9C%AC%E6%A8%A1%E5%BC%8F%E7%BC%96%E8%BE%91)。 ### 2.2.3 发布配置 配置只有在发布后才会真的被应用使用到,所以在编辑完配置后,需要发布配置。 发布配置需要拥有这个Namespace的发布权限,如果发现没有发布按钮,可以找项目管理员授权。 1. 点击“发布按钮” ![public-namespace-publish-items-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-publish-items-entry.png) 2. 填写发布相关信息,点击发布 ![public-namespace-publish-items](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-publish-items.png) ### 2.2.4 应用读取配置 配置发布成功后,应用就可以通过Apollo客户端读取到配置了。 Apollo目前提供Java客户端,具体信息请点击[Java客户端使用文档](zh/usage/java-sdk-user-guide): 如果应用使用了其它语言,也可以通过直接访问Http接口获取配置,具体可以参考[其它语言客户端接入指南](zh/usage/other-language-client-user-guide) 对于公共组件的配置读取,可以参考上述文档中的“获取公共Namespace的配置”部分。 ## 2.3 应用覆盖公用组件配置步骤 前面提到,通常情况下,公共组件所用到的配置由原始开发团队维护,不过由于实际应用的运行时、环境各不一样,所以我们也允许应用在实际使用时能够覆盖公共组件的部分配置。 这里就讲一下应用如何覆盖公用组件的配置,简单起见,假设apollo-portal应用使用了hermes producer客户端,并且希望调整hermes的批量发送大小。 ### 2.3.1 关联公共组件Namespace 1. 进入使用公共组件的应用项目首页,点击左侧的添加Namespace按钮 * 所以,在这个例子中,我们需要进入apollo-portal的首页。 * (添加Namespace需要项目管理员权限,如果发现没有添加Namespace按钮,可以找项目管理员授权) * ![link-public-namespace-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/link-public-namespace-entry.png) 2. 找到hermes producer的namespace,并选择需要关联到哪些环境和集群 ![link-public-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/link-public-namespace.png) 3. 关联成功后,页面会自动跳转到Namespace权限管理页面 1. 分配修改权限 ![namespace-permission-edit](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-permission-edit.png) 2. 分配发布权限 ![namespace-publish-permission](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-publish-permission.png) 4. 点击“返回”回到项目页面 ### 2.3.2 覆盖公用组件配置 1. 点击新增配置 ![override-public-namespace-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-entry.png) 2. 输入要覆盖的配置项 ![override-public-namespace-item](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-item.png) 3. 点击提交 ![override-public-namespace-item-done](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-item-done.png) ### 2.3.3 发布配置 配置只有在发布后才会真的被应用使用到,所以在编辑完配置后,需要发布配置。 发布配置需要拥有这个Namespace的发布权限,如果发现没有发布按钮,可以找项目管理员授权。 1. 点击“发布按钮” ![override-public-namespace-item-publish-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-item-publish-entry.png) 2. 填写发布相关信息,点击发布 ![override-public-namespace-item-publish](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-item-publish.png) 3. 配置发布成功后,hermes producer客户端在apollo-portal应用里面运行时读取到的sender.batchSize的值就是1000。 # 三、集群独立配置说明 在有些特殊情况下,应用有需求对不同的集群做不同的配置,比如部署在A机房的应用连接的es服务器地址和部署在B机房的应用连接的es服务器地址不一样。 在这种情况下,可以通过在Apollo创建不同的集群来解决。 ## 3.1 创建集群 创建集群需要项目管理员权限,如果发现没有添加集群按钮,可以找项目管理员授权。 1. 点击页面左侧的“添加集群”按钮 * ![create-cluster](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-cluster.png) 2. 输入集群名称,选择环境并提交 * ![create-cluster-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-cluster-detail.png) 3. 切换到对应的集群,修改配置并发布即可 * ![config-in-cluster-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/cluster-created.png) 4. 通过上述配置,部署在SHAJQ机房的应用就会读到SHAJQ集群下的配置 5. 如果应用还在其它机房部署了应用,那么在上述的配置下,会读到default集群下的配置。 # 四、多个AppId使用同一份配置 在一些情况下,尽管应用本身不是公共组件,但还是需要在多个AppId之间共用同一份配置,比如同一个产品的不同项目:XX-Web, XX-Service, XX-Job等。 这种情况下如果希望实现多个AppId使用同一份配置的话,基本概念和公共组件的配置是一致的。 具体来说,就是在其中一个AppId下创建一个namespace,写入公共的配置信息,然后在各个项目中读取该namespace的配置即可。 如果某个AppId需要覆盖公共的配置信息,那么在该AppId下关联公共的namespace并写入需要覆盖的配置即可。 具体步骤可以参考[公共组件接入指南](#%e4%ba%8c%e3%80%81%e5%85%ac%e5%85%b1%e7%bb%84%e4%bb%b6%e6%8e%a5%e5%85%a5%e6%8c%87%e5%8d%97)。 # 五、灰度发布使用指南 通过灰度发布功能,可以实现: 1. 对于一些对程序有比较大影响的配置,可以先在一个或者多个实例生效,观察一段时间没问题后再全量发布配置。 2. 对于一些需要调优的配置参数,可以通过灰度发布功能来实现A/B测试。可以在不同的机器上应用不同的配置,不断调整、测评一段时间后找出较优的配置再全量发布配置。 下面将结合一个实际例子来描述如何使用灰度发布功能。 ## 5.1 场景介绍 100004458(apollo-demo)项目有两个客户端: 1. 10.32.21.19 2. 10.32.21.22 ![initial-instance-list](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/initial-instance-list.png) **灰度目标:** * 当前有一个配置timeout=2000,我们希望对10.32.21.22灰度发布timeout=3000,对10.32.21.19仍然是timeout=2000。 ![initial-config](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/initial-config.png) ## 5.2 创建灰度 首先点击application namespace右上角的`创建灰度`按钮。 ![create-gray-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/create-gray-release.png) 点击确定后,灰度版本就创建成功了,页面会自动切换到`灰度版本`Tab。 ![initial-gray-release-tab](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/initial-gray-release-tab.png) ## 5.3 灰度配置 点击`主版本的配置`中,timeout配置最右侧的`对此配置灰度`按钮 ![initial-gray-release-tab](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/edit-gray-release-config.png) 在弹出框中填入要灰度的值:3000,点击提交。 ![submit-gray-release-config](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/submit-gray-release-config.png) ![gray-release-config-submitted](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-config-submitted.png) ## 5.4 配置灰度规则 切换到`灰度规则`Tab,点击`新增规则`按钮 ![new-gray-release-rule](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/new-gray-release-rule.png) 在弹出框中`灰度的IP`下拉框会默认展示当前使用配置的机器列表,选择我们要灰度的IP,点击完成。 ![select-gray-release-ip](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/select-gray-release-ip.png) ![gray-release-ip-selected](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-ip-selected.png) ![gray-release-rule-saved](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-rule-saved.png) 如果下拉框中没找到需要的IP,说明机器还没从Apollo取过配置,可以点击手动输入IP来输入,输入完后点击添加按钮 ![manual-input-gray-release-ip](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/manual-input-gray-release-ip.png) ![manual-input-gray-release-ip-2](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/manual-input-gray-release-ip-2.png) >注:对于公共Namespace的灰度规则,需要先指定要灰度的appId,然后再选择IP。 ## 5.5 灰度发布 配置规则已经生效,不过灰度配置还没有发布。切换到`配置`Tab。 再次检查灰度的配置部分,如果没有问题,点击`灰度发布`。 ![prepare-to-do-gray-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/prepare-to-do-gray-release.png) 在弹出框中可以看到主版本的值是2000,灰度版本即将发布的值是3000。填入其它信息后,点击发布。 ![gray-release-confirm-dialog](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-confirm-dialog.png) 发布后,切换到`灰度实例列表`Tab,就能看到10.32.21.22已经使用了灰度发布的值。 ![gray-release-instance-list](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-instance-list.png) 切换到`主版本`的`实例列表`,会看到主版本配置只有10.32.21.19在使用了。 ![master-branch-instance-list](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/master-branch-instance-list.png) 后面可以继续配置的修改或规则的更改。配置的修改需要点击灰度发布后才会生效,规则的修改在规则点击完成后就会实时生效。 ## 5.6 全量发布 如果灰度的配置测试下来比较理想,符合预期,那么就可以操作`全量发布`。 全量发布的效果是: 1. 灰度版本的配置会合并回主版本,在这个例子中,就是主版本的timeout会被更新成3000 2. 主版本的配置会自动进行一次发布 3. 在全量发布页面,可以选择是否保留当前灰度版本,默认为不保留。 ![prepare-to-full-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/prepare-to-full-release.png) ![full-release-confirm-dialog](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/full-release-confirm-dialog.png) ![full-release-confirm-dialog-2](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/full-release-confirm-dialog-2.png) 我选择了不保留灰度版本,所以发布完的效果就是主版本的配置更新、灰度版本删除。点击主版本的实例列表,可以看到10.32.21.22和10.32.21.19都使用了主版本最新的配置。 ![master-branch-instance-list-after-full-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/master-branch-instance-list-after-full-release.png) ## 5.7 放弃灰度 如果灰度版本不理想或者不需要了,可以点击`放弃灰度`。 ![abandon-gray-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/abandon-gray-release.png) ## 5.8 发布历史 点击主版本的`发布历史`按钮,可以看到当前namespace的主版本以及灰度版本的发布历史。 ![view-release-history](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/view-release-history.png) ![view-release-history-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/view-release-history-detail.png) # 六、其它功能配置 ## 6.1 配置查看权限 从1.1.0版本开始,apollo-portal增加了查看权限的支持,可以支持配置某个环境只允许项目成员查看私有Namespace的配置。 这里的项目成员是指: 1. 项目的管理员 2. 具备该私有Namespace在该环境下的修改或发布权限 配置方式很简单,用超级管理员账号登录后,进入`管理员工具 - 系统参数`页面新增或修改`configView.memberOnly.envs`配置项即可。 ![configView.memberOnly.envs](https://user-images.githubusercontent.com/837658/46456519-c155e100-c7e1-11e8-969b-8f332379fa29.png) ## 6.2 配置访问密钥 Apollo从1.6.0版本开始增加访问密钥机制,从而只有经过身份验证的客户端才能访问敏感配置。如果应用开启了访问密钥,客户端需要配置密钥,否则无法获取配置。 1. 项目管理员打开管理密钥页面 ![管理密钥入口](https://user-images.githubusercontent.com/837658/94990081-f4d3cd80-05ab-11eb-9470-fed5ec6de92e.png) 2. 为项目的每个环境生成访问密钥,注意默认是禁用的,建议在客户端都配置完成后再开启 ![密钥配置页面](https://user-images.githubusercontent.com/837658/94990150-788dba00-05ac-11eb-9a12-727fdb872e42.png) 3. 客户端侧[配置访问密钥](zh/usage/java-sdk-user-guide#_1244-配置访问密钥) # 七、最佳实践 ## 7.1 安全相关 配置中心作为基础服务,存储着公司非常重要的配置信息,所以安全因素需要大家重点关注,下面列举了一些注意事项供大家参考,也欢迎大家分享自己的实践案例。 ### 7.1.1 认证 建议接入公司统一的身份认证系统,如 SSO、LDAP 等,接入方式可以参考[Portal 实现用户登录功能](zh/development/portal-how-to-implement-user-login-function) > 如果使用Apollo提供的Spring Security简单认证,务必记得要修改超级管理员apollo的密码 ### 7.1.2 授权 Apollo 支持细粒度的权限控制,请务必根据实际情况做好权限控制: 1. [项目管理员权限](#_121-项目管理员权限) * Apollo 默认允许所有登录用户创建项目,如果只允许部分用户创建项目,可以开启[创建项目权限控制](zh/deployment/distributed-deployment-guide?id=_3110-rolecreate-applicationenabled-是否开启创建项目权限控制) 2. [配置编辑、发布权限](#_122-配置编辑、发布权限) * 配置编辑、发布权限支持按环境配置,比如开发环境开发人员可以自行完成配置编辑和发布的过程,但是生产环境发布权限交由测试或运维人员 * 生产环境建议同时开启[发布审核](zh/deployment/distributed-deployment-guide?id=_322-namespacelockswitch-一次发布只能有一个人修改开关,用于发布审核),从而控制一次配置发布只能由一个人修改,另一个人发布,确保配置修改得到充分检查 3. [配置查看权限](#_61-配置查看权限) * 可以指定某个环境只允许项目成员查看私有Namespace的配置,从而避免敏感配置泄露,如生产环境 ### 7.1.3 系统访问 除了用户权限,在系统访问上也需要加以考虑: 1. `apollo-configservice`和`apollo-adminservice`是基于内网可信网络设计的,所以出于安全考虑,禁止`apollo-configservice`和`apollo-adminservice`直接暴露在公网 2. 对敏感配置可以考虑开启[访问秘钥](#_62-%e9%85%8d%e7%bd%ae%e8%ae%bf%e9%97%ae%e5%af%86%e9%92%a5),从而只有经过身份验证的客户端才能访问敏感配置 3. 1.7.1及以上版本可以考虑为`apollo-adminservice`开启[访问控制](zh/deployment/distributed-deployment-guide?id=_326-admin-serviceaccesscontrolenabled-配置apollo-adminservice是否开启访问控制),从而只有[受控的](zh/deployment/distributed-deployment-guide?id=_3112-admin-serviceaccesstokens-设置apollo-portal访问各环境apollo-adminservice所需的access-token)`apollo-portal`才能访问对应接口,增强安全性
# &nbsp; # 名词解释 * 普通应用 * 普通应用指的是独立运行的程序,如 * Web应用程序 * 带有main函数的程序 * 公共组件 * 公共组件指的是发布的类库、客户端程序,不会自己独立运行,如 * Java的jar包 * .Net的dll文件 # 一、普通应用接入指南 ## 1.1 创建项目 要使用Apollo,第一步需要创建项目。 1. 打开apollo-portal主页 2. 点击“创建项目” ![create-app-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-app-entry.png) 3. 输入项目信息 * 部门:选择应用所在的部门 * 应用AppId:用来标识应用身份的唯一id,格式为string,需要和客户端app.properties中配置的app.id对应 * 应用名称:应用名,仅用于界面展示 * 应用负责人:选择的人默认会成为该项目的管理员,具备项目权限管理、集群创建、Namespace创建等权限 ![create-app](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-app.png) 4. 点击提交 创建成功后,会自动跳转到项目首页 ![app-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/app-created.png) ## 1.2 项目权限分配 ### 1.2.1 项目管理员权限 项目管理员拥有以下权限: 1. 可以管理项目的权限分配 2. 可以创建集群 3. 可以创建Namespace 创建项目时填写的应用负责人默认会成为项目的管理员之一,如果还需要其他人也成为项目管理员,可以按照下面步骤操作: 1. 点击页面左侧的“管理项目” * ![app-permission-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/app-permission-entry.png) 2. 搜索需要添加的成员并点击添加 * ![app-permission-search-user](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/app-permission-search-user.png) * ![app-permission-user-added](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/app-permission-user-added.png) ### 1.2.2 配置编辑、发布权限 配置权限分为编辑和发布: * 编辑权限允许用户在Apollo界面上创建、修改、删除配置 * 配置修改后只在Apollo界面上变化,不会影响到应用实际使用的配置 * 发布权限允许用户在Apollo界面上发布、回滚配置 * 配置只有在发布、回滚动作后才会被应用实际使用到 * Apollo在用户操作发布、回滚动作后实时通知到应用,并使最新配置生效 项目创建完,默认没有分配配置的编辑和发布权限,需要项目管理员进行授权。 1. 点击application这个namespace的授权按钮 * ![namespace-permission-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-permission-entry.png) 2. 分配修改权限 * ![namespace-permission-edit](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-permission-edit.png) 3. 分配发布权限 * ![namespace-publish-permission](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-publish-permission.png) ## 1.3 添加配置项 编辑配置需要拥有这个Namespace的编辑权限,如果发现没有新增配置按钮,可以找项目管理员授权。 ### 1.3.1 通过表格模式添加配置 1. 点击新增配置 * ![create-item-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-item-entry.png) 2. 输入配置项 * ![create-item-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-item-detail.png) 3. 点击提交 * ![item-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/item-created.png) ### 1.3.2 通过文本模式编辑 Apollo除了支持表格模式,逐个添加、修改配置外,还提供文本模式批量添加、修改。 这个对于从已有的properties文件迁移尤其有用。 1. 切换到文本编辑模式 ![text-mode-config-overview](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/text-mode-config-overview.png) 2. 点击右侧的修改配置按钮 ![text-mode-config-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/text-mode-config-entry.png) 3. 输入配置项,并点击提交修改 ![text-mode-config-submit](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/text-mode-config-submit.png) ## 1.4 发布配置 配置只有在发布后才会真的被应用使用到,所以在编辑完配置后,需要发布配置。 发布配置需要拥有这个Namespace的发布权限,如果发现没有发布按钮,可以找项目管理员授权。 1. 点击“发布按钮” ![publish-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/hermes-portal-publish-entry.png) 2. 填写发布相关信息,点击发布 ![publish-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/hermes-portal-publish-detail.png) ## 1.5 应用读取配置 配置发布成功后,应用就可以通过Apollo客户端读取到配置了。 Apollo目前提供Java客户端,具体信息请点击[Java客户端使用文档](zh/usage/java-sdk-user-guide): 如果应用使用了其它语言,也可以通过直接访问Http接口获取配置,具体可以参考[其它语言客户端接入指南](zh/usage/other-language-client-user-guide) ## 1.6 回滚已发布配置 如果发现已发布的配置有问题,可以通过点击『回滚』按钮来将客户端读取到的配置回滚到上一个发布版本。 这里的回滚机制类似于发布系统,发布系统中的回滚操作是将部署到机器上的安装包回滚到上一个部署的版本,但代码仓库中的代码是不会回滚的,从而开发可以在修复代码后重新发布。 Apollo中的回滚也是类似的机制,点击回滚后是将发布到客户端的配置回滚到上一个已发布版本,也就是说客户端读取到的配置会恢复到上一个版本,但页面上编辑状态的配置是不会回滚的,从而开发可以在修复配置后重新发布。 # 二、公共组件接入指南 ## 2.1 公共组件和普通应用的区别 公共组件是指那些发布给其它应用使用的客户端代码,比如CAT客户端、Hermes Producer客户端等。 虽然这类组件是由其他团队开发、维护,但是运行时是在业务实际应用内的,所以本质上可以认为是应用的一部分。 通常情况下,这类组件所用到的配置由原始开发团队维护,不过由于实际应用的运行时、环境各不一样,所以我们也允许应用在实际使用时能够覆盖公共组件的部分配置。 ## 2.2 公共组件接入步骤 公共组件的接入步骤,和普通应用几乎一致,唯一的区别是公共组件需要创建自己唯一的Namespace。 所以,首先执行普通应用接入文档中的以下几个步骤,然后再按照本章节后面的步骤操作。 1. [创建项目](#_11-%E5%88%9B%E5%BB%BA%E9%A1%B9%E7%9B%AE) 2. [项目管理员权限](#_121-%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86%E5%91%98%E6%9D%83%E9%99%90) ### 2.2.1 创建Namespace 创建Namespace需要项目管理员权限,如果发现没有添加Namespace按钮,可以找项目管理员授权。 1. 点击页面左侧的添加Namespace * ![create-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace.png) 2. 点击“创建新的Namespace” * ![create-namespace-select-type](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace-select-type.png) 3. 输入公共组件的Namespace名称,需要注意的是Namespace名称全局唯一 * Apollo会默认把部门代号添加在最前面 * ![create-namespace-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-namespace-detail.png) 4. 点击提交后,页面会自动跳转到关联Namespace页面 * 首先,选中所有需要有这个Namespace的环境和集群,一般建议全选 * 其次,选中刚刚创建的namespace * 最后,点击提交 * ![link-namespace-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/link-namespace-detail.png) 5. 关联成功后,页面会自动跳转到Namespace权限管理页面 1. 分配修改权限 * ![namespace-permission-edit](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-permission-edit.png) 2. 分配发布权限 * ![namespace-publish-permission](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-publish-permission.png) 6. 点击“返回”回到项目页面 ### 2.2.2 添加配置项 编辑配置需要拥有这个Namespace的编辑权限,如果发现没有新增配置按钮,可以找项目管理员授权。 #### 2.2.2.1 通过表格模式添加配置 1. 点击新增配置 ![public-namespace-edit-item-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-edit-item-entry.png) 2. 输入配置项 ![public-namespace-edit-item](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-edit-item.png) 3. 点击提交 ![public-namespace-item-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-item-created.png) #### 2.2.2.2 通过文本模式编辑 这部分和普通应用一致,具体步骤请参见[1.3.2 通过文本模式编辑](#_132-%E9%80%9A%E8%BF%87%E6%96%87%E6%9C%AC%E6%A8%A1%E5%BC%8F%E7%BC%96%E8%BE%91)。 ### 2.2.3 发布配置 配置只有在发布后才会真的被应用使用到,所以在编辑完配置后,需要发布配置。 发布配置需要拥有这个Namespace的发布权限,如果发现没有发布按钮,可以找项目管理员授权。 1. 点击“发布按钮” ![public-namespace-publish-items-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-publish-items-entry.png) 2. 填写发布相关信息,点击发布 ![public-namespace-publish-items](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/public-namespace-publish-items.png) ### 2.2.4 应用读取配置 配置发布成功后,应用就可以通过Apollo客户端读取到配置了。 Apollo目前提供Java客户端,具体信息请点击[Java客户端使用文档](zh/usage/java-sdk-user-guide): 如果应用使用了其它语言,也可以通过直接访问Http接口获取配置,具体可以参考[其它语言客户端接入指南](zh/usage/other-language-client-user-guide) 对于公共组件的配置读取,可以参考上述文档中的“获取公共Namespace的配置”部分。 ## 2.3 应用覆盖公用组件配置步骤 前面提到,通常情况下,公共组件所用到的配置由原始开发团队维护,不过由于实际应用的运行时、环境各不一样,所以我们也允许应用在实际使用时能够覆盖公共组件的部分配置。 这里就讲一下应用如何覆盖公用组件的配置,简单起见,假设apollo-portal应用使用了hermes producer客户端,并且希望调整hermes的批量发送大小。 ### 2.3.1 关联公共组件Namespace 1. 进入使用公共组件的应用项目首页,点击左侧的添加Namespace按钮 * 所以,在这个例子中,我们需要进入apollo-portal的首页。 * (添加Namespace需要项目管理员权限,如果发现没有添加Namespace按钮,可以找项目管理员授权) * ![link-public-namespace-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/link-public-namespace-entry.png) 2. 找到hermes producer的namespace,并选择需要关联到哪些环境和集群 ![link-public-namespace](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/link-public-namespace.png) 3. 关联成功后,页面会自动跳转到Namespace权限管理页面 1. 分配修改权限 ![namespace-permission-edit](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-permission-edit.png) 2. 分配发布权限 ![namespace-publish-permission](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/namespace-publish-permission.png) 4. 点击“返回”回到项目页面 ### 2.3.2 覆盖公用组件配置 1. 点击新增配置 ![override-public-namespace-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-entry.png) 2. 输入要覆盖的配置项 ![override-public-namespace-item](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-item.png) 3. 点击提交 ![override-public-namespace-item-done](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-item-done.png) ### 2.3.3 发布配置 配置只有在发布后才会真的被应用使用到,所以在编辑完配置后,需要发布配置。 发布配置需要拥有这个Namespace的发布权限,如果发现没有发布按钮,可以找项目管理员授权。 1. 点击“发布按钮” ![override-public-namespace-item-publish-entry](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-item-publish-entry.png) 2. 填写发布相关信息,点击发布 ![override-public-namespace-item-publish](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/override-public-namespace-item-publish.png) 3. 配置发布成功后,hermes producer客户端在apollo-portal应用里面运行时读取到的sender.batchSize的值就是1000。 # 三、集群独立配置说明 在有些特殊情况下,应用有需求对不同的集群做不同的配置,比如部署在A机房的应用连接的es服务器地址和部署在B机房的应用连接的es服务器地址不一样。 在这种情况下,可以通过在Apollo创建不同的集群来解决。 ## 3.1 创建集群 创建集群需要项目管理员权限,如果发现没有添加集群按钮,可以找项目管理员授权。 1. 点击页面左侧的“添加集群”按钮 * ![create-cluster](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-cluster.png) 2. 输入集群名称,选择环境并提交 * ![create-cluster-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/create-cluster-detail.png) 3. 切换到对应的集群,修改配置并发布即可 * ![config-in-cluster-created](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/cluster-created.png) 4. 通过上述配置,部署在SHAJQ机房的应用就会读到SHAJQ集群下的配置 5. 如果应用还在其它机房部署了应用,那么在上述的配置下,会读到default集群下的配置。 # 四、多个AppId使用同一份配置 在一些情况下,尽管应用本身不是公共组件,但还是需要在多个AppId之间共用同一份配置,比如同一个产品的不同项目:XX-Web, XX-Service, XX-Job等。 这种情况下如果希望实现多个AppId使用同一份配置的话,基本概念和公共组件的配置是一致的。 具体来说,就是在其中一个AppId下创建一个namespace,写入公共的配置信息,然后在各个项目中读取该namespace的配置即可。 如果某个AppId需要覆盖公共的配置信息,那么在该AppId下关联公共的namespace并写入需要覆盖的配置即可。 具体步骤可以参考[公共组件接入指南](#%e4%ba%8c%e3%80%81%e5%85%ac%e5%85%b1%e7%bb%84%e4%bb%b6%e6%8e%a5%e5%85%a5%e6%8c%87%e5%8d%97)。 # 五、灰度发布使用指南 通过灰度发布功能,可以实现: 1. 对于一些对程序有比较大影响的配置,可以先在一个或者多个实例生效,观察一段时间没问题后再全量发布配置。 2. 对于一些需要调优的配置参数,可以通过灰度发布功能来实现A/B测试。可以在不同的机器上应用不同的配置,不断调整、测评一段时间后找出较优的配置再全量发布配置。 下面将结合一个实际例子来描述如何使用灰度发布功能。 ## 5.1 场景介绍 100004458(apollo-demo)项目有两个客户端: 1. 10.32.21.19 2. 10.32.21.22 ![initial-instance-list](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/initial-instance-list.png) **灰度目标:** * 当前有一个配置timeout=2000,我们希望对10.32.21.22灰度发布timeout=3000,对10.32.21.19仍然是timeout=2000。 ![initial-config](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/initial-config.png) ## 5.2 创建灰度 首先点击application namespace右上角的`创建灰度`按钮。 ![create-gray-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/create-gray-release.png) 点击确定后,灰度版本就创建成功了,页面会自动切换到`灰度版本`Tab。 ![initial-gray-release-tab](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/initial-gray-release-tab.png) ## 5.3 灰度配置 点击`主版本的配置`中,timeout配置最右侧的`对此配置灰度`按钮 ![initial-gray-release-tab](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/edit-gray-release-config.png) 在弹出框中填入要灰度的值:3000,点击提交。 ![submit-gray-release-config](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/submit-gray-release-config.png) ![gray-release-config-submitted](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-config-submitted.png) ## 5.4 配置灰度规则 切换到`灰度规则`Tab,点击`新增规则`按钮 ![new-gray-release-rule](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/new-gray-release-rule.png) 在弹出框中`灰度的IP`下拉框会默认展示当前使用配置的机器列表,选择我们要灰度的IP,点击完成。 ![select-gray-release-ip](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/select-gray-release-ip.png) ![gray-release-ip-selected](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-ip-selected.png) ![gray-release-rule-saved](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-rule-saved.png) 如果下拉框中没找到需要的IP,说明机器还没从Apollo取过配置,可以点击手动输入IP来输入,输入完后点击添加按钮 ![manual-input-gray-release-ip](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/manual-input-gray-release-ip.png) ![manual-input-gray-release-ip-2](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/manual-input-gray-release-ip-2.png) >注:对于公共Namespace的灰度规则,需要先指定要灰度的appId,然后再选择IP。 ## 5.5 灰度发布 配置规则已经生效,不过灰度配置还没有发布。切换到`配置`Tab。 再次检查灰度的配置部分,如果没有问题,点击`灰度发布`。 ![prepare-to-do-gray-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/prepare-to-do-gray-release.png) 在弹出框中可以看到主版本的值是2000,灰度版本即将发布的值是3000。填入其它信息后,点击发布。 ![gray-release-confirm-dialog](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-confirm-dialog.png) 发布后,切换到`灰度实例列表`Tab,就能看到10.32.21.22已经使用了灰度发布的值。 ![gray-release-instance-list](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/gray-release-instance-list.png) 切换到`主版本`的`实例列表`,会看到主版本配置只有10.32.21.19在使用了。 ![master-branch-instance-list](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/master-branch-instance-list.png) 后面可以继续配置的修改或规则的更改。配置的修改需要点击灰度发布后才会生效,规则的修改在规则点击完成后就会实时生效。 ## 5.6 全量发布 如果灰度的配置测试下来比较理想,符合预期,那么就可以操作`全量发布`。 全量发布的效果是: 1. 灰度版本的配置会合并回主版本,在这个例子中,就是主版本的timeout会被更新成3000 2. 主版本的配置会自动进行一次发布 3. 在全量发布页面,可以选择是否保留当前灰度版本,默认为不保留。 ![prepare-to-full-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/prepare-to-full-release.png) ![full-release-confirm-dialog](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/full-release-confirm-dialog.png) ![full-release-confirm-dialog-2](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/full-release-confirm-dialog-2.png) 我选择了不保留灰度版本,所以发布完的效果就是主版本的配置更新、灰度版本删除。点击主版本的实例列表,可以看到10.32.21.22和10.32.21.19都使用了主版本最新的配置。 ![master-branch-instance-list-after-full-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/master-branch-instance-list-after-full-release.png) ## 5.7 放弃灰度 如果灰度版本不理想或者不需要了,可以点击`放弃灰度`。 ![abandon-gray-release](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/abandon-gray-release.png) ## 5.8 发布历史 点击主版本的`发布历史`按钮,可以看到当前namespace的主版本以及灰度版本的发布历史。 ![view-release-history](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/view-release-history.png) ![view-release-history-detail](https://raw.githubusercontent.com/ctripcorp/apollo/master/doc/images/gray-release/view-release-history-detail.png) # 六、其它功能配置 ## 6.1 配置查看权限 从1.1.0版本开始,apollo-portal增加了查看权限的支持,可以支持配置某个环境只允许项目成员查看私有Namespace的配置。 这里的项目成员是指: 1. 项目的管理员 2. 具备该私有Namespace在该环境下的修改或发布权限 配置方式很简单,用超级管理员账号登录后,进入`管理员工具 - 系统参数`页面新增或修改`configView.memberOnly.envs`配置项即可。 ![configView.memberOnly.envs](https://user-images.githubusercontent.com/837658/46456519-c155e100-c7e1-11e8-969b-8f332379fa29.png) ## 6.2 配置访问密钥 Apollo从1.6.0版本开始增加访问密钥机制,从而只有经过身份验证的客户端才能访问敏感配置。如果应用开启了访问密钥,客户端需要配置密钥,否则无法获取配置。 1. 项目管理员打开管理密钥页面 ![管理密钥入口](https://user-images.githubusercontent.com/837658/94990081-f4d3cd80-05ab-11eb-9470-fed5ec6de92e.png) 2. 为项目的每个环境生成访问密钥,注意默认是禁用的,建议在客户端都配置完成后再开启 ![密钥配置页面](https://user-images.githubusercontent.com/837658/94990150-788dba00-05ac-11eb-9a12-727fdb872e42.png) 3. 客户端侧[配置访问密钥](zh/usage/java-sdk-user-guide#_1244-配置访问密钥) # 七、最佳实践 ## 7.1 安全相关 配置中心作为基础服务,存储着公司非常重要的配置信息,所以安全因素需要大家重点关注,下面列举了一些注意事项供大家参考,也欢迎大家分享自己的实践案例。 ### 7.1.1 认证 建议接入公司统一的身份认证系统,如 SSO、LDAP 等,接入方式可以参考[Portal 实现用户登录功能](zh/development/portal-how-to-implement-user-login-function) > 如果使用Apollo提供的Spring Security简单认证,务必记得要修改超级管理员apollo的密码 ### 7.1.2 授权 Apollo 支持细粒度的权限控制,请务必根据实际情况做好权限控制: 1. [项目管理员权限](#_121-项目管理员权限) * Apollo 默认允许所有登录用户创建项目,如果只允许部分用户创建项目,可以开启[创建项目权限控制](zh/deployment/distributed-deployment-guide?id=_3110-rolecreate-applicationenabled-是否开启创建项目权限控制) 2. [配置编辑、发布权限](#_122-配置编辑、发布权限) * 配置编辑、发布权限支持按环境配置,比如开发环境开发人员可以自行完成配置编辑和发布的过程,但是生产环境发布权限交由测试或运维人员 * 生产环境建议同时开启[发布审核](zh/deployment/distributed-deployment-guide?id=_322-namespacelockswitch-一次发布只能有一个人修改开关,用于发布审核),从而控制一次配置发布只能由一个人修改,另一个人发布,确保配置修改得到充分检查 3. [配置查看权限](#_61-配置查看权限) * 可以指定某个环境只允许项目成员查看私有Namespace的配置,从而避免敏感配置泄露,如生产环境 ### 7.1.3 系统访问 除了用户权限,在系统访问上也需要加以考虑: 1. `apollo-configservice`和`apollo-adminservice`是基于内网可信网络设计的,所以出于安全考虑,禁止`apollo-configservice`和`apollo-adminservice`直接暴露在公网 2. 对敏感配置可以考虑开启[访问秘钥](#_62-%e9%85%8d%e7%bd%ae%e8%ae%bf%e9%97%ae%e5%af%86%e9%92%a5),从而只有经过身份验证的客户端才能访问敏感配置 3. 1.7.1及以上版本可以考虑为`apollo-adminservice`开启[访问控制](zh/deployment/distributed-deployment-guide?id=_326-admin-serviceaccesscontrolenabled-配置apollo-adminservice是否开启访问控制),从而只有[受控的](zh/deployment/distributed-deployment-guide?id=_3112-admin-serviceaccesstokens-设置apollo-portal访问各环境apollo-adminservice所需的access-token)`apollo-portal`才能访问对应接口,增强安全性
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./scripts/apollo-on-kubernetes/kubernetes/apollo-env-prod/service-apollo-config-server-prod.yaml
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --- # configmap for apollo-config-server-prod kind: ConfigMap apiVersion: v1 metadata: namespace: sre name: configmap-apollo-config-server-prod data: application-github.properties: | spring.datasource.url = jdbc:mysql://service-mysql-for-apollo-prod-env.sre:3306/ProdApolloConfigDB?characterEncoding=utf8 spring.datasource.username = FillInCorrectUser spring.datasource.password = FillInCorrectPassword eureka.service.url = http://statefulset-apollo-config-server-prod-0.service-apollo-meta-server-prod:8080/eureka/,http://statefulset-apollo-config-server-prod-1.service-apollo-meta-server-prod:8080/eureka/,http://statefulset-apollo-config-server-prod-2.service-apollo-meta-server-prod:8080/eureka/ --- kind: Service apiVersion: v1 metadata: namespace: sre name: service-apollo-meta-server-prod labels: app: service-apollo-meta-server-prod spec: ports: - protocol: TCP port: 8080 targetPort: 8080 selector: app: pod-apollo-config-server-prod type: ClusterIP clusterIP: None sessionAffinity: ClientIP --- kind: Service apiVersion: v1 metadata: namespace: sre name: service-apollo-config-server-prod labels: app: service-apollo-config-server-prod spec: ports: - protocol: TCP port: 8080 targetPort: 8080 nodePort: 30005 selector: app: pod-apollo-config-server-prod type: NodePort sessionAffinity: ClientIP --- kind: StatefulSet apiVersion: apps/v1 metadata: namespace: sre name: statefulset-apollo-config-server-prod labels: app: statefulset-apollo-config-server-prod spec: serviceName: service-apollo-meta-server-prod replicas: 3 selector: matchLabels: app: pod-apollo-config-server-prod updateStrategy: type: RollingUpdate template: metadata: labels: app: pod-apollo-config-server-prod spec: affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: matchExpressions: - key: app operator: In values: - pod-apollo-config-server-prod topologyKey: kubernetes.io/hostname volumes: - name: volume-configmap-apollo-config-server-prod configMap: name: configmap-apollo-config-server-prod items: - key: application-github.properties path: application-github.properties containers: - image: apollo-config-server:v1.0.0 securityContext: privileged: true imagePullPolicy: IfNotPresent name: container-apollo-config-server-prod ports: - protocol: TCP containerPort: 8080 volumeMounts: - name: volume-configmap-apollo-config-server-prod mountPath: /apollo-config-server/config/application-github.properties subPath: application-github.properties env: - name: APOLLO_CONFIG_SERVICE_NAME value: "service-apollo-config-server-prod.sre" readinessProbe: tcpSocket: port: 8080 initialDelaySeconds: 10 periodSeconds: 5 livenessProbe: tcpSocket: port: 8080 initialDelaySeconds: 120 periodSeconds: 10 dnsPolicy: ClusterFirst restartPolicy: Always
# # Copyright 2021 Apollo Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # --- # configmap for apollo-config-server-prod kind: ConfigMap apiVersion: v1 metadata: namespace: sre name: configmap-apollo-config-server-prod data: application-github.properties: | spring.datasource.url = jdbc:mysql://service-mysql-for-apollo-prod-env.sre:3306/ProdApolloConfigDB?characterEncoding=utf8 spring.datasource.username = FillInCorrectUser spring.datasource.password = FillInCorrectPassword eureka.service.url = http://statefulset-apollo-config-server-prod-0.service-apollo-meta-server-prod:8080/eureka/,http://statefulset-apollo-config-server-prod-1.service-apollo-meta-server-prod:8080/eureka/,http://statefulset-apollo-config-server-prod-2.service-apollo-meta-server-prod:8080/eureka/ --- kind: Service apiVersion: v1 metadata: namespace: sre name: service-apollo-meta-server-prod labels: app: service-apollo-meta-server-prod spec: ports: - protocol: TCP port: 8080 targetPort: 8080 selector: app: pod-apollo-config-server-prod type: ClusterIP clusterIP: None sessionAffinity: ClientIP --- kind: Service apiVersion: v1 metadata: namespace: sre name: service-apollo-config-server-prod labels: app: service-apollo-config-server-prod spec: ports: - protocol: TCP port: 8080 targetPort: 8080 nodePort: 30005 selector: app: pod-apollo-config-server-prod type: NodePort sessionAffinity: ClientIP --- kind: StatefulSet apiVersion: apps/v1 metadata: namespace: sre name: statefulset-apollo-config-server-prod labels: app: statefulset-apollo-config-server-prod spec: serviceName: service-apollo-meta-server-prod replicas: 3 selector: matchLabels: app: pod-apollo-config-server-prod updateStrategy: type: RollingUpdate template: metadata: labels: app: pod-apollo-config-server-prod spec: affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: labelSelector: matchExpressions: - key: app operator: In values: - pod-apollo-config-server-prod topologyKey: kubernetes.io/hostname volumes: - name: volume-configmap-apollo-config-server-prod configMap: name: configmap-apollo-config-server-prod items: - key: application-github.properties path: application-github.properties containers: - image: apollo-config-server:v1.0.0 securityContext: privileged: true imagePullPolicy: IfNotPresent name: container-apollo-config-server-prod ports: - protocol: TCP containerPort: 8080 volumeMounts: - name: volume-configmap-apollo-config-server-prod mountPath: /apollo-config-server/config/application-github.properties subPath: application-github.properties env: - name: APOLLO_CONFIG_SERVICE_NAME value: "service-apollo-config-server-prod.sre" readinessProbe: tcpSocket: port: 8080 initialDelaySeconds: 10 periodSeconds: 5 livenessProbe: tcpSocket: port: 8080 initialDelaySeconds: 120 periodSeconds: 10 dnsPolicy: ClusterFirst restartPolicy: Always
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./apollo-biz/src/test/resources/sql/namespace-branch-test.sql
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- INSERT INTO `app` ( `AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES('test', 'test0620-06', 'default', 'default', 'default', 'default', 0, 'default', 'default'); INSERT INTO `cluster` (`ID`, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1, 'default', 'test', 0, 0, 'default', 'default'); INSERT INTO `cluster` (`Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES('child-cluster', 'test', 1, 0, 'default', 'default'); INSERT INTO `namespace` (`AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES('test', 'default', 'application', 0, 'apollo', 'apollo'); INSERT INTO `namespace` (`AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES('test', 'child-cluster', 'application', 0, 'apollo', 'apollo');
-- -- Copyright 2021 Apollo Authors -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- INSERT INTO `app` ( `AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES('test', 'test0620-06', 'default', 'default', 'default', 'default', 0, 'default', 'default'); INSERT INTO `cluster` (`ID`, `Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) VALUES (1, 'default', 'test', 0, 0, 'default', 'default'); INSERT INTO `cluster` (`Name`, `AppId`, `ParentClusterId`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES('child-cluster', 'test', 1, 0, 'default', 'default'); INSERT INTO `namespace` (`AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES('test', 'default', 'application', 0, 'apollo', 'apollo'); INSERT INTO `namespace` (`AppId`, `ClusterName`, `NamespaceName`, `IsDeleted`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`)VALUES('test', 'child-cluster', 'application', 0, 'apollo', 'apollo');
-1
apolloconfig/apollo
3,733
add thank you page
## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
nobodyiam
2021-05-30T07:01:05Z
2021-05-30T14:40:19Z
b6fa4c676677ff3c962b9e2139b594a598fd655b
2037903b249962f029276820ab46a84f1e9153e7
add thank you page. ## What's the purpose of this PR add a thank you page to thank the help from other companies or projects. ## Brief changelog * thanks JetBrains for the open source licenses * thanks docscify for the docsify library to generate the documentation website Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit tests to verify the code. - [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
./apollo-portal/src/main/resources/static/vendor/font-awesome.min.css
/*! * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.5.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.5.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.5.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.5.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}
/*! * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.5.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.5.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.5.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.5.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}
-1