Skip to content

Commit c7b3fb1

Browse files
author
hxpdong
committed
Issuse #4629 resolved
1 parent 821c855 commit c7b3fb1

10 files changed

+92
-92
lines changed

docs/en/deployment/deployment-architecture.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ flowchart LR
901901
902902
idc2-JVM8070 --> idc2-c1-jvm-8090
903903
idc2-JVM8070 --> idc2-c2-jvm-8090
904-
````
904+
```
905905

906906
Each server room has its own set of Portal, Config Service, Admin Service
907907

docs/en/deployment/distributed-deployment-guide.md

+37-37
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ Remember to set a JVM memory according to the actual environment in scripts/star
509509

510510
```bash
511511
export JAVA_OPTS="-server -Xms6144m -Xmx6144m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=4096m -XX:MaxNewSize=4096m -XX:SurvivorRatio=18"
512-
````
512+
```
513513

514514
> Note 1: If you need to modify the JVM parameters, you can modify the `JAVA_OPTS` section of scripts/startup.sh.
515515
@@ -529,7 +529,7 @@ Remember to set a JVM memory according to the actual environment in scripts/star
529529

530530
```bash
531531
export JAVA_OPTS="-server -Xms2560m -Xmx2560m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1024m -XX:MaxNewSize=1024m -XX:SurvivorRatio=22"
532-
````
532+
```
533533

534534
> Note 1: If you need to modify the JVM parameters, you can modify the `JAVA_OPTS` section of scripts/startup.sh.
535535
@@ -545,7 +545,7 @@ Remember to set a JVM memory according to the actual environment in startup.sh.
545545

546546
```bash
547547
export JAVA_OPTS="-server -Xms4096m -Xmx4096m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1536m -XX:MaxNewSize=1536m -XX:SurvivorRatio=22"
548-
````
548+
```
549549

550550
> Note 1: If you need to modify the JVM parameters, you can modify the `JAVA_OPTS` section of scripts/startup.sh.
551551
@@ -1000,7 +1000,7 @@ The following table lists the configurable parameters of the apollo-service-char
10001000

10011001
###### 2.4.1.3.4.1 The host of ConfigDB is the IP outside the k8s cluster
10021002

1003-
````yaml
1003+
```yaml
10041004
configdb:
10051005
host: 1.2.3.4
10061006
dbName: ApolloConfigDBName
@@ -1009,11 +1009,11 @@ configdb:
10091009
connectionStringProperties: characterEncoding=utf8&useSSL=false
10101010
service:
10111011
enabled: true
1012-
````
1012+
```
10131013
10141014
###### 2.4.1.3.4.2 The host of ConfigDB is the domain name outside the k8s cluster
10151015
1016-
````yaml
1016+
```yaml
10171017
configdb:
10181018
host: xxx.mysql.rds.aliyuncs.com
10191019
dbName: ApolloConfigDBName
@@ -1023,42 +1023,42 @@ configdb:
10231023
service:
10241024
enabled: true
10251025
type: ExternalName
1026-
````
1026+
```
10271027
10281028
###### 2.4.1.3.4.3 The host of ConfigDB is a service in the k8s cluster
10291029
1030-
````yaml
1030+
```yaml
10311031
configdb:
10321032
host: apollodb-mysql.mysql
10331033
dbName: ApolloConfigDBName
10341034
userName: someUserName
10351035
password: somePassword
10361036
connectionStringProperties: characterEncoding=utf8&useSSL=false
1037-
````
1037+
```
10381038
10391039
###### 2.4.1.3.4.4 Specify the apollo-configservice address returned by Meta Server
10401040
10411041
If apollo-client cannot directly access the service of apollo-configservice (for example, it is not in the same k8s cluster), you can refer to the following example to specify the address returned by Meta Server to apollo-client (for example, it can be accessed through nodeport)
10421042
1043-
````yaml
1043+
```yaml
10441044
configService:
10451045
config:
10461046
configServiceUrlOverride: http://1.2.3.4:12345
1047-
````
1047+
```
10481048
10491049
###### 2.4.1.3.4.5 Specify the apollo-adminservice address returned by Meta Server
10501050
10511051
If apollo-portal cannot directly access the service of apollo-adminservice (for example, it is not in the same k8s cluster), you can refer to the following example to specify the address returned by Meta Server to apollo-portal (for example, it can be accessed through nodeport)
10521052
1053-
````yaml
1053+
```yaml
10541054
configService:
10551055
config:
10561056
adminServiceUrlOverride: http://1.2.3.4:23456
1057-
````
1057+
```
10581058
10591059
###### 2.4.1.3.4.6 Expose apollo-configservice service in the form of Ingress configuration custom path `/config`
10601060

1061-
````yaml
1061+
```yaml
10621062
# use /config as root, should specify configService.config.contextPath as /config
10631063
configService:
10641064
config:
@@ -1068,11 +1068,11 @@ configService:
10681068
hosts:
10691069
- paths:
10701070
- /config
1071-
````
1071+
```
10721072

10731073
###### 2.4.1.3.4.7 Expose apollo-adminservice service in the form of Ingress configuration custom path `/admin`
10741074

1075-
````yaml
1075+
```yaml
10761076
# use /admin as root, should specify adminService.config.contextPath as /admin
10771077
adminService:
10781078
config:
@@ -1082,7 +1082,7 @@ adminService:
10821082
hosts:
10831083
- paths:
10841084
- /admin
1085-
````
1085+
```
10861086

10871087
#### 2.4.1.4 Deploy apollo-portal
10881088

@@ -1102,13 +1102,13 @@ $ helm install apollo-portal \
11021102
--set replicaCount=1 \
11031103
-n your-namespace \
11041104
apollo/apollo-portal
1105-
````
1105+
```
11061106

11071107
General deployment recommendations are configured through values.yaml:
11081108

11091109
```bash
11101110
$ helm install apollo-portal -f values.yaml -n your-namespace apollo/apollo-portal
1111-
````
1111+
```
11121112

11131113
> For more configuration item descriptions, please refer to [2.4.1.4.3 Configuration item description](
11141114

@@ -1173,7 +1173,7 @@ The following table lists the configurable parameters of the apollo-portal chart
11731173

11741174
###### 2.4.1.4.4.1 The host of PortalDB is the IP outside the k8s cluster
11751175

1176-
````yaml
1176+
```yaml
11771177
portaldb:
11781178
host: 1.2.3.4
11791179
dbName: ApolloPortalDBName
@@ -1182,11 +1182,11 @@ portaldb:
11821182
connectionStringProperties: characterEncoding=utf8&useSSL=false
11831183
service:
11841184
enabled: true
1185-
````
1185+
```
11861186

11871187
###### 2.4.1.4.4.2 The host of PortalDB is the domain name outside the k8s cluster
11881188

1189-
````yaml
1189+
```yaml
11901190
portaldb:
11911191
host: xxx.mysql.rds.aliyuncs.com
11921192
dbName: ApolloPortalDBName
@@ -1196,49 +1196,49 @@ portaldb:
11961196
service:
11971197
enabled: true
11981198
type: ExternalName
1199-
````
1199+
```
12001200

12011201
###### 2.4.1.4.4.3 The host of PortalDB is a service in the k8s cluster
12021202

1203-
````yaml
1203+
```yaml
12041204
portaldb:
12051205
host: apollodb-mysql.mysql
12061206
dbName: ApolloPortalDBName
12071207
userName: someUserName
12081208
password: somePassword
12091209
connectionStringProperties: characterEncoding=utf8&useSSL=false
1210-
````
1210+
```
12111211

12121212
###### 2.4.1.4.4.4 Configure environment information
12131213

1214-
````yaml
1214+
```yaml
12151215
config:
12161216
envs: dev, pro
12171217
metaServers:
12181218
dev: http://apollo-service-dev-apollo-configservice:8080
12191219
pro: http://apollo-service-pro-apollo-configservice:8080
1220-
````
1220+
```
12211221

12221222
###### 2.4.1.4.4.5 Expose services as Load Balancer
12231223

1224-
````yaml
1224+
```yaml
12251225
service:
12261226
type: LoadBalancer
1227-
````
1227+
```
12281228

12291229
###### 2.4.1.4.4.6 Expose services as Ingress
12301230

1231-
````yaml
1231+
```yaml
12321232
ingress:
12331233
enabled: true
12341234
hosts:
12351235
- paths:
12361236
- /
1237-
````
1237+
```
12381238

12391239
###### 2.4.1.4.4.7 Expose services in the form of Ingress configuration custom path `/apollo`
12401240

1241-
````yaml
1241+
```yaml
12421242
# use /apollo as root, should specify config.contextPath as /apollo
12431243
ingress:
12441244
enabled: true
@@ -1250,11 +1250,11 @@ config:
12501250
...
12511251
contextPath: /apollo
12521252
...
1253-
````
1253+
```
12541254

12551255
###### 2.4.1.4.4.8 Expose services in the form of Ingress configuration session affinity
12561256

1257-
````yaml
1257+
```yaml
12581258
ingress:
12591259
enabled: true
12601260
annotations:
@@ -1268,11 +1268,11 @@ ingress:
12681268
- host: xxx.somedomain.com # host is required to make session affinity work
12691269
paths:
12701270
- /
1271-
````
1271+
```
12721272

12731273
###### 2.4.1.4.4.9 Enable LDAP support
12741274

1275-
````yaml
1275+
```yaml
12761276
config:
12771277
...
12781278
profiles: github,ldap
@@ -1293,7 +1293,7 @@ config:
12931293
loginId: "uid"
12941294
userDisplayName: "cn"
12951295
email: "mail"
1296-
````
1296+
```
12971297

12981298
#### 2.4.1.5 Building a Docker image from source
12991299

docs/en/deployment/quick-start.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Sample output.
2424
java version "1.8.0_74"
2525
Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
2626
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)
27-
````
27+
```
2828

2929
Windows users please make sure that JAVA_HOME environment variable is set.
3030

docs/en/design/apollo-core-concept-namespace.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -173,33 +173,33 @@ As you can see in the above code example, the Client Namespace is mapped to a Co
173173

174174
So the Namespace code that monitors the application in application A is as follows:
175175

176-
````java
176+
```java
177177
Config appConfig = ConfigService.getAppConfig();
178178
appConfig.addChangeListener(new ConfigChangeListener() {
179179
public void onChange(ConfigChangeEvent changeEvent) {
180180
//do something
181181
}
182182
})
183-
````
183+
```
184184

185185
The Namespace code for monitoring NS-Private in application A is as follows:
186186

187-
````java
187+
```java
188188
Config privateConfig = ConfigService.getConfig("NS-Private");
189189
privateConfig.addChangeListener(new ConfigChangeListener() {
190190
public void onChange(ConfigChangeEvent changeEvent) {
191191
//do something
192192
}
193193
})
194-
````
194+
```
195195

196196
The Namespace code for monitoring NS-Public in application A, application B, and application C is as follows:
197197

198-
````java
198+
```java
199199
Config publicConfig = ConfigService.getConfig("NS-Public");
200200
publicConfig.addChangeListener(new ConfigChangeListener() {
201201
public void onChange(ConfigChangeEvent changeEvent) {
202202
//do something
203203
}
204204
})
205-
````
205+
```

docs/en/design/apollo-introduction.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -138,19 +138,19 @@ Fill in the release information:
138138

139139
After the configuration is released, it can be obtained on the client side. Taking Java as an example, the sample code for obtaining the configuration is as follows. Apollo client also supports integration with Spring. For more client usage instructions, please refer to [Java Client Usage Guide](en/usage/java-sdk-user-guide) and [.Net Client Usage Guide](en/usage/dotnet-sdk-user-guide).
140140

141-
````java
141+
```java
142142
Config config = ConfigService.getAppConfig();
143143
Integer defaultRequestTimeout = 200;
144144
Integer requestTimeout = config.getIntProperty("requestTimeout", defaultRequestTimeout);
145-
````
145+
```
146146

147147
## 3.6 Client monitoring configuration changes
148148

149149
By obtaining the configuration code above, the application can obtain the latest configuration in real time.
150150

151151
However, in some scenarios, the application also needs to be notified when the configuration changes, such as the switching of database connections, so Apollo also provides the function of monitoring configuration changes. The Java example is as follows:
152152

153-
````java
153+
```java
154154
Config config = ConfigService.getAppConfig();
155155
config.addChangeListener(new ConfigChangeListener() {
156156
@Override
@@ -164,26 +164,26 @@ config.addChangeListener(new ConfigChangeListener() {
164164
}
165165
}
166166
});
167-
````
167+
```
168168

169169
## 3.7 Spring integration example
170170

171171
Apollo and Spring can also be easily integrated. You only need to mark `@EnableApolloConfig` to get configuration information through `@Value`:
172172

173-
````java
173+
```java
174174
@Configuration
175175
@EnableApolloConfig
176176
public class AppConfig {}
177-
````
177+
```
178178

179-
````java
179+
```java
180180
@Component
181181
public class SomeBean {
182182
//The value of timeout will be updated automatically
183183
@Value("${request.timeout:200}")
184184
private int timeout;
185185
}
186-
````
186+
```
187187

188188
# 4. Apollo in depth
189189

docs/en/development/portal-how-to-enable-email-service.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The following are the template content styles for publishing emails and rolling
6161

6262
```html
6363
<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>Post basic information</h3><table class="table table-bordered"><tr><td width="10%"><b>AppId</b></td ><td width="15%">#{appId}</td><td width="10%"><b>Environment</b></td><td width="15%">#{ env}</td><td width="10%"><b>cluster</b></td><td width="15%">#{clusterName}</td><td width="10 %"><b>Namespace</b></td><td width="15%">#{namespaceName}</td></tr><tr><td><b>Publisher</b ></td><td>#{operator}</td><td><b>release time</b></td><td>#{releaseTime}</td><td><b>release Title</b></td><td>#{releaseTitle}</td><td><b>Comment</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}">Click to view detailed release information</a><br><br>If you have any questions about using Apollo, please check <a href="http://conf.ctripcorp.com/display/FRAM/Apollo"> document</a>, or reply directly to this email inquiry. </body></html>
64-
````
64+
```
6565

6666
> Note: To use this template, you need to configure apollo.portal.address in the system parameters of the portal to point to the address of the apollo portal
6767

0 commit comments

Comments
 (0)