|
@@ -499,7 +499,67 @@ Note that since ApolloConfigDB is deployed in each environment, the admin-servic
|
|
|
|
|
|
`apollo-portal-x.x.x-github.zip` located in the `apollo-portal/target/` directory
|
|
|
|
|
|
-##### 2.2.1.2.7 Enable external nacos service registry to replace built-in eureka
|
|
|
+### 2.2.2 Deploy Apollo server
|
|
|
+
|
|
|
+#### 2.2.2.1 Deploy apollo-configservice
|
|
|
+
|
|
|
+Upload the `apollo-configservice-x.x.x-github.zip` of the corresponding environment to the server, decompress it and execute scripts/startup.sh. To stop the service, execute scripts/shutdown.sh.
|
|
|
+
|
|
|
+Remember to set a JVM memory according to the actual environment in scripts/startup.sh. The following are our default settings for reference:
|
|
|
+
|
|
|
+```bash
|
|
|
+export JAVA_OPTS="-server -Xms6144m -Xmx6144m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=4096m -XX:MaxNewSize=4096m -XX:SurvivorRatio=18"
|
|
|
+````
|
|
|
+
|
|
|
+> Note 1: If you need to modify the JVM parameters, you can modify the `JAVA_OPTS` section of scripts/startup.sh.
|
|
|
+
|
|
|
+> Note 2: To adjust the log output path of the service, you can modify `LOG_DIR` in scripts/startup.sh and apollo-configservice.conf.
|
|
|
+
|
|
|
+> Note 3: To adjust the listening port of the service, you can modify the `SERVER_PORT` in scripts/startup.sh. In addition, apollo-configservice also assumes the responsibility of meta server. If you want to modify the port, pay attention to the `eureka.service.url` configuration item in the ApolloConfigDB.ServerConfig table and the meta server information used in apollo-portal and apollo-client. For details, see: [2.2.1.1.2.4 Configuring the meta service information of apollo-portal](en/deployment/distributed-deployment-guide?id=_221124-configuring-apollo-portal39s-meta-service-information) and [1.2.2 Apollo Meta Server](en/usage/java-sdk-user-guide?id=_122-apollo-meta-server).
|
|
|
+
|
|
|
+> Note 4: If the eureka.service.url of ApolloConfigDB.ServerConfig is only configured with the currently starting machine, the eureka registration failure information will be output in the log during the process of starting apollo-configservice, such as `com.sun.jersey .api.client.ClientHandlerException: java.net.ConnectException: Connection refused`. It should be noted that this is the expected situation, because apollo-configservice needs to register the service with the Meta Server (itself), but because it has not yet woken up during the startup process, it will report this error. The retry action will be performed later, so the registration will be normal after the service is up.
|
|
|
+
|
|
|
+> Note 5: If you read this, I believe that you must be someone who reads the documentation carefully, and you are a little bit closer to success. Keep going, you should be able to complete the distributed deployment of Apollo soon! But do you feel that Apollo's distributed deployment steps are a bit cumbersome? Do you have any advice you would like to share with the author? If the answer is yes, please move to [#1424](https://github.com/apolloconfig/apollo/issues/1424) and look forward to your suggestions!
|
|
|
+
|
|
|
+#### 2.2.2.2 Deploy apollo-adminservice
|
|
|
+
|
|
|
+Upload the `apollo-adminservice-x.x.x-github.zip` of the corresponding environment to the server, decompress it and execute scripts/startup.sh. To stop the service, execute scripts/shutdown.sh.
|
|
|
+
|
|
|
+Remember to set a JVM memory according to the actual environment in scripts/startup.sh. The following are our default settings for reference:
|
|
|
+
|
|
|
+```bash
|
|
|
+export JAVA_OPTS="-server -Xms2560m -Xmx2560m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1024m -XX:MaxNewSize=1024m -XX:SurvivorRatio=22"
|
|
|
+````
|
|
|
+
|
|
|
+> Note 1: If you need to modify the JVM parameters, you can modify the `JAVA_OPTS` section of scripts/startup.sh.
|
|
|
+
|
|
|
+> Note 2: To adjust the log output path of the service, you can modify `LOG_DIR` in scripts/startup.sh and apollo-adminservice.conf.
|
|
|
+
|
|
|
+> Note 3: To adjust the listening port of the service, you can modify the `SERVER_PORT` in scripts/startup.sh.
|
|
|
+
|
|
|
+#### 2.2.2.3 Deploy apollo-portal
|
|
|
+
|
|
|
+Upload `apollo-portal-x.x.x-github.zip` to the server, unzip it and execute scripts/startup.sh. To stop the service, execute scripts/shutdown.sh.
|
|
|
+
|
|
|
+Remember to set a JVM memory according to the actual environment in startup.sh. The following are our default settings for reference:
|
|
|
+
|
|
|
+```bash
|
|
|
+export JAVA_OPTS="-server -Xms4096m -Xmx4096m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1536m -XX:MaxNewSize=1536m -XX:SurvivorRatio=22"
|
|
|
+````
|
|
|
+
|
|
|
+> Note 1: If you need to modify the JVM parameters, you can modify the `JAVA_OPTS` section of scripts/startup.sh.
|
|
|
+
|
|
|
+> Note 2: To adjust the log output path of the service, you can modify `LOG_DIR` in scripts/startup.sh and apollo-portal.conf.
|
|
|
+
|
|
|
+> Note 3: To adjust the listening port of the service, you can modify the `SERVER_PORT` in scripts/startup.sh.
|
|
|
+
|
|
|
+### 2.2.3 Replace built-in eureka with another service registry
|
|
|
+
|
|
|
+#### 2.2.3.1 nacos-discovery
|
|
|
+
|
|
|
+Enable external nacos service registry to replace built-in eureka
|
|
|
+
|
|
|
+> Note: need repackage
|
|
|
|
|
|
1. Modify build.sh/build.bat to change the maven build command for config-service and admin-service to
|
|
|
|
|
@@ -520,7 +580,31 @@ nacos.discovery.namespace=
|
|
|
nacos.discovery.context-path=
|
|
|
```
|
|
|
|
|
|
-##### 2.2.1.2.8 Enable external Consul service registry to replace built-in eureka
|
|
|
+#### 2.2.3.2 consul-discovery
|
|
|
+
|
|
|
+Enable external Consul service registry to replace built-in eureka
|
|
|
+
|
|
|
+##### 2.2.3.2.1 For version 2.1.0 and above
|
|
|
+
|
|
|
+1. Modify `config/application.properties` after decompression of `apollo-configservice-x.x.x-github.zip` and `apollo-adminservice-x.x.x-github.zip`, uncomment
|
|
|
+ ```properties
|
|
|
+ #spring.profiles.active=github,consul-discovery
|
|
|
+ ```
|
|
|
+
|
|
|
+ to
|
|
|
+
|
|
|
+ ```properties
|
|
|
+ spring.profiles.active=github,consul-discovery
|
|
|
+ ```
|
|
|
+
|
|
|
+2. Modify the application-github.properties in the config directory of the apollo-configservice and apollo-adminservice installation packages, respectively, to configure the consul server address
|
|
|
+
|
|
|
+```properties
|
|
|
+spring.cloud.consul.host=127.0.0.1
|
|
|
+spring.cloud.consul.port=8500
|
|
|
+```
|
|
|
+
|
|
|
+##### 2.2.3.2.2 For version 2.1.0 below
|
|
|
|
|
|
1. Modify build.sh/build.bat to change the maven build command for config-service and admin-service to
|
|
|
|
|
@@ -535,13 +619,22 @@ spring.cloud.consul.host=127.0.0.1
|
|
|
spring.cloud.consul.port=8500
|
|
|
```
|
|
|
|
|
|
-##### 2.2.1.2.9 Enable external Zookeeper service registry to replace built-in eureka
|
|
|
+#### 2.2.3.3 zookeeper-discovery
|
|
|
|
|
|
-1. Modify build.sh/build.bat to change the maven build command for ``config-service`` and ``admin-service`` to
|
|
|
+Enable external Zookeeper service registry to replace built-in eureka
|
|
|
|
|
|
-```shell
|
|
|
-mvn clean package -Pgithub -DskipTests -pl apollo-configservice,apollo-adminservice -am -Dapollo_profile=github,zookeeper-discovery - Dspring_datasource_url=$apollo_config_db_url -Dspring_datasource_username=$apollo_config_db_username -Dspring_datasource_password=$apollo_config_db_password
|
|
|
-```
|
|
|
+##### 2.2.3.3.1 For version 2.1.0 and above
|
|
|
+
|
|
|
+1. Modify `config/application.properties` after decompression of `apollo-configservice-x.x.x-github.zip` and `apollo-adminservice-x.x.x-github.zip`, uncomment
|
|
|
+ ```properties
|
|
|
+ #spring.profiles.active=github,zookeeper-discovery
|
|
|
+ ```
|
|
|
+
|
|
|
+ to
|
|
|
+
|
|
|
+ ```properties
|
|
|
+ spring.profiles.active=github,zookeeper-discovery
|
|
|
+ ```
|
|
|
|
|
|
2. Modify the application-github.properties in the config directory of the apollo-config service and apollo-adminservice installation packages, respectively, to configure the zookeeper server address
|
|
|
|
|
@@ -561,99 +654,109 @@ admin.enableServer
|
|
|
admin.serverPort
|
|
|
```
|
|
|
|
|
|
-##### 2.2.1.2.10 Enable custom-defined-discovery to replace built-in eureka
|
|
|
+##### 2.2.3.3.2 For version 2.1.0 below
|
|
|
|
|
|
-1. Modify build.sh/build.bat and change the maven compilation commands of `config-service` and `admin-service` to
|
|
|
+1. Modify build.sh/build.bat to change the maven build command for ``config-service`` and ``admin-service`` to
|
|
|
|
|
|
```shell
|
|
|
-mvn clean package -Pgithub -DskipTests -pl apollo-configservice,apollo-adminservice -am -Dapollo_profile=github,custom-defined-discovery -Dspring_datasource_url=$apollo_config_db_url -Dspring_datasource_username=$apollo_config_db_username -Dspring_datasource_password=$apollo_config_db_password
|
|
|
-````
|
|
|
-
|
|
|
-2. There are two ways to configure the access addresses of the custom config-service and admin-service: one is to write two pieces of data in the mysql database ApolloConfigDB and the table ServerConfig.
|
|
|
-
|
|
|
-```sql
|
|
|
-INSERT INTO `ApolloConfigDB`.`ServerConfig` (`Key`, `Value`, `Comment`) VALUES ('apollo.config-service.url', 'http://apollo-config-service', 'ConfigService access address ');
|
|
|
-INSERT INTO `ApolloConfigDB`.`ServerConfig` (`Key`, `Value`, `Comment`) VALUES ('apollo.admin-service.url', 'http://apollo-admin-service', 'AdminService access address ');
|
|
|
-````
|
|
|
+mvn clean package -Pgithub -DskipTests -pl apollo-configservice,apollo-adminservice -am -Dapollo_profile=github,zookeeper-discovery - Dspring_datasource_url=$apollo_config_db_url -Dspring_datasource_username=$apollo_config_db_username -Dspring_datasource_password=$apollo_config_db_password
|
|
|
+```
|
|
|
|
|
|
-Another way to modify application-github.properties in the config directory of the apollo-configservice installation package
|
|
|
+2. Modify the application-github.properties in the config directory of the apollo-config service and apollo-adminservice installation packages, respectively, to configure the zookeeper server address
|
|
|
|
|
|
-````properties
|
|
|
-apollo.config-service.url=http://apollo-config-service
|
|
|
-apollo.admin-service.url=http://apollo-admin-service
|
|
|
-````
|
|
|
+```properties
|
|
|
+spring.cloud.zookeeper.connect-string=127.0.0.1:2181
|
|
|
+```
|
|
|
|
|
|
-##### 2.2.1.2.11 Enable database-discovery to replace built-in eureka
|
|
|
+3. Zookeeper version description
|
|
|
|
|
|
-> For version 2.1.0 and above
|
|
|
->
|
|
|
-> Apollo supports the use of internal database table as registry, without relying on third-party registry.
|
|
|
+* Support Zookeeper 3.5.x or higher;
|
|
|
+* If apollo-configservice application starts reporting port occupation, please check the following configuration of Zookeeper;
|
|
|
|
|
|
-1. Modify build.sh/build.bat and change the maven compilation commands of `config-service` and `admin-service` to
|
|
|
-```shell
|
|
|
-mvn clean package -Pgithub -DskipTests -pl apollo-configservice,apollo-adminservice -am -Dapollo_profile=github,database-discovery -Dspring_datasource_url=$apollo_config_db_url -Dspring_datasource_username=$apollo_config_db_username -Dspring_datasource_password=$apollo_config_db_password
|
|
|
-```
|
|
|
+> Note: Zookeeper 3.5.0 added a built-in [AdminServer](https://zookeeper.apache.org/doc/r3.5.0-alpha/zookeeperAdmin.html#sc_adminserver_config)
|
|
|
|
|
|
-2. In multi-cluster deployments, if you want apollo client only read Config Service in the same cluster,
|
|
|
-you can add a property in `config/application-github.properties` of the Config Service and Admin Service installation package
|
|
|
```properties
|
|
|
-apollo.service.registry.cluster=same name with apollo Cluster
|
|
|
+admin.enableServer
|
|
|
+admin.serverPort
|
|
|
```
|
|
|
|
|
|
+#### 2.2.3.4 custom-defined-discovery
|
|
|
|
|
|
-### 2.2.2 Deploy Apollo server
|
|
|
+Enable custom-defined-discovery to replace built-in eureka
|
|
|
|
|
|
-#### 2.2.2.1 Deploy apollo-configservice
|
|
|
+##### 2.2.3.4.1 For version 2.1.0 and above
|
|
|
|
|
|
-Upload the `apollo-configservice-x.x.x-github.zip` of the corresponding environment to the server, decompress it and execute scripts/startup.sh. To stop the service, execute scripts/shutdown.sh.
|
|
|
+1. Modify `config/application.properties` after decompression of `apollo-configservice-x.x.x-github.zip` and `apollo-adminservice-x.x.x-github.zip`, uncomment
|
|
|
+ ```properties
|
|
|
+ #spring.profiles.active=github,custom-defined-discovery
|
|
|
+ ```
|
|
|
|
|
|
-Remember to set a JVM memory according to the actual environment in scripts/startup.sh. The following are our default settings for reference:
|
|
|
+ to
|
|
|
|
|
|
-```bash
|
|
|
-export JAVA_OPTS="-server -Xms6144m -Xmx6144m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=4096m -XX:MaxNewSize=4096m -XX:SurvivorRatio=18"
|
|
|
-````
|
|
|
+ ```properties
|
|
|
+ spring.profiles.active=github,custom-defined-discovery
|
|
|
+ ```
|
|
|
|
|
|
-> Note 1: If you need to modify the JVM parameters, you can modify the `JAVA_OPTS` section of scripts/startup.sh.
|
|
|
+2. There are two ways to configure the access addresses of the custom config-service and admin-service: one is to write two pieces of data in the mysql database ApolloConfigDB and the table ServerConfig.
|
|
|
|
|
|
-> Note 2: To adjust the log output path of the service, you can modify `LOG_DIR` in scripts/startup.sh and apollo-configservice.conf.
|
|
|
+```sql
|
|
|
+INSERT INTO `ApolloConfigDB`.`ServerConfig` (`Key`, `Value`, `Comment`) VALUES ('apollo.config-service.url', 'http://apollo-config-service', 'ConfigService access address ');
|
|
|
+INSERT INTO `ApolloConfigDB`.`ServerConfig` (`Key`, `Value`, `Comment`) VALUES ('apollo.admin-service.url', 'http://apollo-admin-service', 'AdminService access address ');
|
|
|
+```
|
|
|
|
|
|
-> Note 3: To adjust the listening port of the service, you can modify the `SERVER_PORT` in scripts/startup.sh. In addition, apollo-configservice also assumes the responsibility of meta server. If you want to modify the port, pay attention to the `eureka.service.url` configuration item in the ApolloConfigDB.ServerConfig table and the meta server information used in apollo-portal and apollo-client. For details, see: [2.2.1.1.2.4 Configuring the meta service information of apollo-portal](en/deployment/distributed-deployment-guide?id=_221124-configuring-apollo-portal39s-meta-service-information) and [1.2.2 Apollo Meta Server](en/usage/java-sdk-user-guide?id=_122-apollo-meta-server).
|
|
|
+Another way to modify application-github.properties in the config directory of the apollo-configservice installation package
|
|
|
|
|
|
-> Note 4: If the eureka.service.url of ApolloConfigDB.ServerConfig is only configured with the currently starting machine, the eureka registration failure information will be output in the log during the process of starting apollo-configservice, such as `com.sun.jersey .api.client.ClientHandlerException: java.net.ConnectException: Connection refused`. It should be noted that this is the expected situation, because apollo-configservice needs to register the service with the Meta Server (itself), but because it has not yet woken up during the startup process, it will report this error. The retry action will be performed later, so the registration will be normal after the service is up.
|
|
|
+```properties
|
|
|
+apollo.config-service.url=http://apollo-config-service
|
|
|
+apollo.admin-service.url=http://apollo-admin-service
|
|
|
+```
|
|
|
|
|
|
-> Note 5: If you read this, I believe that you must be someone who reads the documentation carefully, and you are a little bit closer to success. Keep going, you should be able to complete the distributed deployment of Apollo soon! But do you feel that Apollo's distributed deployment steps are a bit cumbersome? Do you have any advice you would like to share with the author? If the answer is yes, please move to [#1424](https://github.com/apolloconfig/apollo/issues/1424) and look forward to your suggestions!
|
|
|
+##### 2.2.3.4.2 For version 2.1.0 below
|
|
|
|
|
|
-#### 2.2.2.2 Deploy apollo-adminservice
|
|
|
+1. Modify build.sh/build.bat and change the maven compilation commands of `config-service` and `admin-service` to
|
|
|
|
|
|
-Upload the `apollo-adminservice-x.x.x-github.zip` of the corresponding environment to the server, decompress it and execute scripts/startup.sh. To stop the service, execute scripts/shutdown.sh.
|
|
|
+```shell
|
|
|
+mvn clean package -Pgithub -DskipTests -pl apollo-configservice,apollo-adminservice -am -Dapollo_profile=github,custom-defined-discovery -Dspring_datasource_url=$apollo_config_db_url -Dspring_datasource_username=$apollo_config_db_username -Dspring_datasource_password=$apollo_config_db_password
|
|
|
+```
|
|
|
|
|
|
-Remember to set a JVM memory according to the actual environment in scripts/startup.sh. The following are our default settings for reference:
|
|
|
+2. There are two ways to configure the access addresses of the custom config-service and admin-service: one is to write two pieces of data in the mysql database ApolloConfigDB and the table ServerConfig.
|
|
|
|
|
|
-```bash
|
|
|
-export JAVA_OPTS="-server -Xms2560m -Xmx2560m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1024m -XX:MaxNewSize=1024m -XX:SurvivorRatio=22"
|
|
|
-````
|
|
|
+```sql
|
|
|
+INSERT INTO `ApolloConfigDB`.`ServerConfig` (`Key`, `Value`, `Comment`) VALUES ('apollo.config-service.url', 'http://apollo-config-service', 'ConfigService access address ');
|
|
|
+INSERT INTO `ApolloConfigDB`.`ServerConfig` (`Key`, `Value`, `Comment`) VALUES ('apollo.admin-service.url', 'http://apollo-admin-service', 'AdminService access address ');
|
|
|
+```
|
|
|
|
|
|
-> Note 1: If you need to modify the JVM parameters, you can modify the `JAVA_OPTS` section of scripts/startup.sh.
|
|
|
+Another way to modify application-github.properties in the config directory of the apollo-configservice installation package
|
|
|
|
|
|
-> Note 2: To adjust the log output path of the service, you can modify `LOG_DIR` in scripts/startup.sh and apollo-adminservice.conf.
|
|
|
+```properties
|
|
|
+apollo.config-service.url=http://apollo-config-service
|
|
|
+apollo.admin-service.url=http://apollo-admin-service
|
|
|
+```
|
|
|
|
|
|
-> Note 3: To adjust the listening port of the service, you can modify the `SERVER_PORT` in scripts/startup.sh.
|
|
|
+#### 2.2.3.5 database-discovery
|
|
|
|
|
|
-#### 2.2.2.3 Deploy apollo-portal
|
|
|
+> For version 2.1.0 and above
|
|
|
|
|
|
-Upload `apollo-portal-x.x.x-github.zip` to the server, unzip it and execute scripts/startup.sh. To stop the service, execute scripts/shutdown.sh.
|
|
|
+Enable database-discovery to replace built-in eureka
|
|
|
|
|
|
-Remember to set a JVM memory according to the actual environment in startup.sh. The following are our default settings for reference:
|
|
|
+Apollo supports the use of internal database table as registry, without relying on third-party registry.
|
|
|
|
|
|
-```bash
|
|
|
-export JAVA_OPTS="-server -Xms4096m -Xmx4096m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1536m -XX:MaxNewSize=1536m -XX:SurvivorRatio=22"
|
|
|
-````
|
|
|
+1. Modify `config/application.properties` after decompression of `apollo-configservice-x.x.x-github.zip` and `apollo-adminservice-x.x.x-github.zip`, uncomment
|
|
|
+ ```properties
|
|
|
+ #spring.profiles.active=github,database-discovery
|
|
|
+ ```
|
|
|
|
|
|
-> Note 1: If you need to modify the JVM parameters, you can modify the `JAVA_OPTS` section of scripts/startup.sh.
|
|
|
+ to
|
|
|
|
|
|
-> Note 2: To adjust the log output path of the service, you can modify `LOG_DIR` in scripts/startup.sh and apollo-portal.conf.
|
|
|
+ ```properties
|
|
|
+ spring.profiles.active=github,database-discovery
|
|
|
+ ```
|
|
|
|
|
|
-> Note 3: To adjust the listening port of the service, you can modify the `SERVER_PORT` in scripts/startup.sh.
|
|
|
+2. In multi-cluster deployments, if you want apollo client only read Config Service in the same cluster,
|
|
|
+you can add a property in `config/application-github.properties` of the Config Service and Admin Service installation package
|
|
|
+```properties
|
|
|
+apollo.service.registry.cluster=same name with apollo Cluster
|
|
|
+```
|
|
|
|
|
|
## 2.3 Docker Deployment
|
|
|
|