Skip to content

Commit 561c63a

Browse files
committed
incorporated comments
1 parent 2b0260a commit 561c63a

File tree

1 file changed

+32
-15
lines changed

1 file changed

+32
-15
lines changed

articles/spring-cloud/spring-cloud-tutorial-config-server.md

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -128,35 +128,52 @@ Now that you have your configuration files saved in a repository, you need to co
128128

129129
![window screenshot](media/spring-cloud-tutorial-config-server/portal-config-server.png)
130130

131+
### Input repository information directly to the Azure portal
131132

132-
### Import `application.yml` file from your local machine
133+
#### Default repository
133134

134-
You can import your `application.yml` file directly from your local machine to Azure Spring Cloud. Click the **Import settings** button, then select the `.yml` file from your project directory. Click **Import**, then an `async` operation from your **Notifications** will pop up. After 1-2 minutes, it should report sucesss.
135+
* Public repository: In the **Default repository** section, paste the repository URI in the **Uri** section and ensure the **Authentication** setting is **Public**. Then click **Apply** to finish.
135136

136-
![window screenshot](media/spring-cloud-tutorial-config-server/local-yml-success.png)
137+
* Private repository: Azure Spring Cloud supports basic password/token based authentication and SSH.
137138

138-
### Public repository
139+
* Basic Authentication: In the **Default repository** section, paste the repository's URI in the **Uri** section, then click the **Authentication**. Select **Basic** as your **Authentication type** and enter your username and password/token to grant access to Azure Spring Cloud. Click **OK** and **Apply** to finish setting up your Config Server.
139140

140-
If your repository is public: In the **Default repository** section, paste the repository URI in the **Uri** section and ensure the **Authentication** setting is **Public**. Then click **Apply** to finish.
141+
![window screenshot](media/spring-cloud-tutorial-config-server/basic-auth.png)
142+
143+
> [!CAUTION]
144+
> Some Git repository servers like GitHub use a `personal-token` or a `access-token` like a password for **Basic Authentication**. You can use that kind of token as password in Azure Spring Cloud, as it will never expire. But for other Git repository servers such as BitBucket and Azure DevOps, the `access-token` will expire in one or two hours. This means that option not viable when using those repository servers with Azure Spring Cloud.]
141145
142-
### Private repository
146+
* SSH: In the **Default repository** section, paste the repository's URI in the **Uri** section, then click the **Authentication**. Select **SSH** as your **Authentication type** and enter your **Private key**. You can optionally specify your **Host key** and **Host key algorithm**. Be sure to include your public key in your config server repository. Click **OK** and **Apply** to finish setting up your Config Server.
143147

144-
Azure Spring Cloud supports basic password/token based authentication and SSH.
148+
![window screenshot](media/spring-cloud-tutorial-config-server/ssh-auth.png)
145149

146-
#### Basic Authentication
150+
#### Pattern repository
147151

148-
In the **Default repository** section, paste the repository's URI in the **Uri** section, then click the **Authentication**. Select **Basic** as your **Authentication type** and enter your username and password/token to grant access to Azure Spring Cloud. Click **OK** and **Apply** to finish setting up your Config Server.
152+
If you want to use an optional **Pattern repository** to configure your service, specify the **URI** and **Authentication** the same way as the **Default repository**. Be sure to include a **Name** for your pattern, then click **Apply** to attach it to your instance.
149153

150-
![window screenshot](media/spring-cloud-tutorial-config-server/basic-auth.png)
154+
### Enter repository information into a YAML file
151155

152-
> [!CAUTION]
153-
> Some Git repository servers like GitHub use a `personal-token` or a `access-token` like a password for **Basic Authentication**. You can use that kind of token as password in Azure Spring Cloud, as it will never expire. But for other Git repository servers such as BitBucket and Azure DevOps, the `access-token` will expire in one or two hours. This means that option not viable when using those repository servers with Azure Spring Cloud.
156+
If you have written a YAML file with your repository settings, you can import your YAML file directly from your local machine to Azure Spring Cloud. A simple YAML file for a private repository with basic authentication would look like this:
157+
158+
```yml
159+
spring:
160+
cloud:
161+
config:
162+
server:
163+
git:
164+
uri: https://github.com/azure-spring-cloud-samples/config-server-repository.git
165+
username: username
166+
password: password/token
167+
168+
```
169+
170+
Click the **Import settings** button, then select the `.yml` file from your project directory. Click **Import**, then an `async` operation from your **Notifications** will pop up. After 1-2 minutes, it should report success.
171+
172+
![window screenshot](media/spring-cloud-tutorial-config-server/local-yml-success.png)
154173

155-
#### SSH
156174

157-
In the **Default repository** section, paste the repository's URI in the **Uri** section, then click the **Authentication**. Select **SSH** as your **Authentication type** and enter your **Private key**. You can optionally specify your **Host key** and **Host key algorithm**. Be sure to include your public key in your config server repository. Click **OK** and **Apply** to finish setting up your Config Server.
175+
You should see the information from your YAML file displayed in the Azure portal. Click **Apply** to finish.
158176

159-
![window screenshot](media/spring-cloud-tutorial-config-server/ssh-auth.png)
160177

161178
## Delete your app configuration
162179

0 commit comments

Comments
 (0)