Skip to content

Commit

Permalink
docs: fix markdown code blocks by change 4 back quote to 3 back quote (
Browse files Browse the repository at this point in the history
  • Loading branch information
hxpdong committed Nov 8, 2022
1 parent 821c855 commit b435050
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 92 deletions.
2 changes: 1 addition & 1 deletion docs/en/deployment/deployment-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ flowchart LR
idc2-JVM8070 --> idc2-c1-jvm-8090
idc2-JVM8070 --> idc2-c2-jvm-8090
````
```

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

Expand Down
74 changes: 37 additions & 37 deletions docs/en/deployment/distributed-deployment-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ Remember to set a JVM memory according to the actual environment in scripts/star

```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.
Expand All @@ -529,7 +529,7 @@ Remember to set a JVM memory according to the actual environment in scripts/star

```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.
Expand All @@ -545,7 +545,7 @@ Remember to set a JVM memory according to the actual environment in startup.sh.

```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.
Expand Down Expand Up @@ -1000,7 +1000,7 @@ The following table lists the configurable parameters of the apollo-service-char

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

````yaml
```yaml
configdb:
host: 1.2.3.4
dbName: ApolloConfigDBName
Expand All @@ -1009,11 +1009,11 @@ configdb:
connectionStringProperties: characterEncoding=utf8&useSSL=false
service:
enabled: true
````
```

###### 2.4.1.3.4.2 The host of ConfigDB is the domain name outside the k8s cluster

````yaml
```yaml
configdb:
host: xxx.mysql.rds.aliyuncs.com
dbName: ApolloConfigDBName
Expand All @@ -1023,42 +1023,42 @@ configdb:
service:
enabled: true
type: ExternalName
````
```

###### 2.4.1.3.4.3 The host of ConfigDB is a service in the k8s cluster

````yaml
```yaml
configdb:
host: apollodb-mysql.mysql
dbName: ApolloConfigDBName
userName: someUserName
password: somePassword
connectionStringProperties: characterEncoding=utf8&useSSL=false
````
```

###### 2.4.1.3.4.4 Specify the apollo-configservice address returned by Meta Server

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)

````yaml
```yaml
configService:
config:
configServiceUrlOverride: http://1.2.3.4:12345
````
```

###### 2.4.1.3.4.5 Specify the apollo-adminservice address returned by Meta Server

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)

````yaml
```yaml
configService:
config:
adminServiceUrlOverride: http://1.2.3.4:23456
````
```

###### 2.4.1.3.4.6 Expose apollo-configservice service in the form of Ingress configuration custom path `/config`

````yaml
```yaml
# use /config as root, should specify configService.config.contextPath as /config
configService:
config:
Expand All @@ -1068,11 +1068,11 @@ configService:
hosts:
- paths:
- /config
````
```

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

````yaml
```yaml
# use /admin as root, should specify adminService.config.contextPath as /admin
adminService:
config:
Expand All @@ -1082,7 +1082,7 @@ adminService:
hosts:
- paths:
- /admin
````
```

#### 2.4.1.4 Deploy apollo-portal

Expand All @@ -1102,13 +1102,13 @@ $ helm install apollo-portal \
--set replicaCount=1 \
-n your-namespace \
apollo/apollo-portal
````
```

General deployment recommendations are configured through values.yaml:

```bash
$ helm install apollo-portal -f values.yaml -n your-namespace apollo/apollo-portal
````
```

> For more configuration item descriptions, please refer to [2.4.1.4.3 Configuration item description](
Expand Down Expand Up @@ -1173,7 +1173,7 @@ The following table lists the configurable parameters of the apollo-portal chart

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

````yaml
```yaml
portaldb:
host: 1.2.3.4
dbName: ApolloPortalDBName
Expand All @@ -1182,11 +1182,11 @@ portaldb:
connectionStringProperties: characterEncoding=utf8&useSSL=false
service:
enabled: true
````
```

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

````yaml
```yaml
portaldb:
host: xxx.mysql.rds.aliyuncs.com
dbName: ApolloPortalDBName
Expand All @@ -1196,49 +1196,49 @@ portaldb:
service:
enabled: true
type: ExternalName
````
```

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

````yaml
```yaml
portaldb:
host: apollodb-mysql.mysql
dbName: ApolloPortalDBName
userName: someUserName
password: somePassword
connectionStringProperties: characterEncoding=utf8&useSSL=false
````
```

###### 2.4.1.4.4.4 Configure environment information

````yaml
```yaml
config:
envs: dev, pro
metaServers:
dev: http://apollo-service-dev-apollo-configservice:8080
pro: http://apollo-service-pro-apollo-configservice:8080
````
```

###### 2.4.1.4.4.5 Expose services as Load Balancer

````yaml
```yaml
service:
type: LoadBalancer
````
```

###### 2.4.1.4.4.6 Expose services as Ingress

````yaml
```yaml
ingress:
enabled: true
hosts:
- paths:
- /
````
```

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

````yaml
```yaml
# use /apollo as root, should specify config.contextPath as /apollo
ingress:
enabled: true
Expand All @@ -1250,11 +1250,11 @@ config:
...
contextPath: /apollo
...
````
```

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

````yaml
```yaml
ingress:
enabled: true
annotations:
Expand All @@ -1268,11 +1268,11 @@ ingress:
- host: xxx.somedomain.com # host is required to make session affinity work
paths:
- /
````
```

###### 2.4.1.4.4.9 Enable LDAP support

````yaml
```yaml
config:
...
profiles: github,ldap
Expand All @@ -1293,7 +1293,7 @@ config:
loginId: "uid"
userDisplayName: "cn"
email: "mail"
````
```

#### 2.4.1.5 Building a Docker image from source

Expand Down
2 changes: 1 addition & 1 deletion docs/en/deployment/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Sample output.
java version "1.8.0_74"
Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)
````
```

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

Expand Down
12 changes: 6 additions & 6 deletions docs/en/design/apollo-core-concept-namespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,33 +173,33 @@ As you can see in the above code example, the Client Namespace is mapped to a Co

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

````java
```java
Config appConfig = ConfigService.getAppConfig();
appConfig.addChangeListener(new ConfigChangeListener() {
public void onChange(ConfigChangeEvent changeEvent) {
//do something
}
})
````
```

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

````java
```java
Config privateConfig = ConfigService.getConfig("NS-Private");
privateConfig.addChangeListener(new ConfigChangeListener() {
public void onChange(ConfigChangeEvent changeEvent) {
//do something
}
})
````
```

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

````java
```java
Config publicConfig = ConfigService.getConfig("NS-Public");
publicConfig.addChangeListener(new ConfigChangeListener() {
public void onChange(ConfigChangeEvent changeEvent) {
//do something
}
})
````
```
16 changes: 8 additions & 8 deletions docs/en/design/apollo-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,19 @@ Fill in the release information:

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).

````java
```java
Config config = ConfigService.getAppConfig();
Integer defaultRequestTimeout = 200;
Integer requestTimeout = config.getIntProperty("requestTimeout", defaultRequestTimeout);
````
```

## 3.6 Client monitoring configuration changes

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

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:

````java
```java
Config config = ConfigService.getAppConfig();
config.addChangeListener(new ConfigChangeListener() {
@Override
Expand All @@ -164,26 +164,26 @@ config.addChangeListener(new ConfigChangeListener() {
}
}
});
````
```

## 3.7 Spring integration example

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

````java
```java
@Configuration
@EnableApolloConfig
public class AppConfig {}
````
```

````java
```java
@Component
public class SomeBean {
//The value of timeout will be updated automatically
@Value("${request.timeout:200}")
private int timeout;
}
````
```

# 4. Apollo in depth

Expand Down
2 changes: 1 addition & 1 deletion docs/en/development/portal-how-to-enable-email-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The following are the template content styles for publishing emails and rolling

```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>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>
````
```

> 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
Expand Down

0 comments on commit b435050

Please sign in to comment.