You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/spring-cloud/spring-cloud-tutorial-config-server.md
+49-12Lines changed: 49 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ ms.topic: tutorial
7
7
ms.reviewer: jeconnoc
8
8
ms.author: v-vasuke
9
9
author: v-vasuke
10
-
ms.date: 08/08/2019
10
+
ms.date: 10/18/2019
11
11
---
12
12
13
13
# Tutorial: Set up a Spring Cloud Config Server for your service
@@ -47,7 +47,7 @@ When using a public repository, your configurable properties will be more limite
47
47
All configurable properties used to set up the public `Git` repository are listed below.
48
48
49
49
> [!NOTE]
50
-
> Using a hyphen ("-") to separate words is the only naming convention that is currently supported. For example, use `default-label` not `defaultLabel`.
50
+
> Using a hyphen ("-") to separate words is the only naming convention that is currently supported. For example, you can use `default-label`, but not `defaultLabel`.
@@ -62,7 +62,7 @@ All configurable properties used to set up the public `Git` repository are liste
62
62
All configurable properties used to set up private `Git` repository with `Ssh` are listed below.
63
63
64
64
> [!NOTE]
65
-
> Using a hyphen ("-") to separate words is the only naming convention that is currently supported. For example, use `default-label` not `defaultLabel`.
65
+
> Using a hyphen ("-") to separate words is the only naming convention that is currently supported. For example, you can use `default-label`, but not `defaultLabel`.
@@ -116,10 +116,6 @@ All configurable properties used to set up Git repositories with pattern are lis
116
116
|`repos."host-key-algorithm"`|`no`| The host key algorithm, should be `ssh-dss`, `ssh-rsa`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, or `ecdsa-sha2-nistp521`. Only __required__ if `host-key` exists. |
117
117
|`repos."strict-host-key-checking"`|`no`| Indicates whether the config server will fail to start when leveraging the private `host-key`. Should be `true` (default value) or `false`. |
118
118
119
-
### Import `application.yml` file from Spring Cloud Config
120
-
121
-
You can import some default config server settings directly from the [Spring Cloud Config](https://spring.io/projects/spring-cloud-config) website. You can do this directly from the Azure portal, so you don't need to take any steps now to prepare your config server files or repository.
122
-
123
119
## Attaching your Config Server repository to Azure Spring Cloud
124
120
125
121
Now that you have your configuration files saved in a repository, you need to connect Azure Spring Cloud to it.
@@ -130,20 +126,61 @@ Now that you have your configuration files saved in a repository, you need to co
130
126
131
127
1. Go to the **Config Server** tab under the **Settings** heading in the menu on the left side.
### Input repository information directly to the Azure portal
132
+
133
+
#### Default repository
134
+
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.
136
+
137
+
* Private repository: Azure Spring Cloud supports basic password/token based authentication and SSH.
138
+
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.
> 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.]
145
+
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.
134
147
135
-
If your repository is public, simply click the **Public** button and paste the URL.
Azure Spring Cloud supports SSH authentication. Follow the instructions on the Azure portal for adding the public key to your repository. Then, be sure to include your private key in the configuration file.
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.
153
+
154
+
### Enter repository information into a YAML file
155
+
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:
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.
You should see the information from your YAML file displayed in the Azure portal. Click **Apply** to finish.
140
176
141
-
Click **Apply** to finish setting up your Config Server.
142
177
143
178
## Delete your app configuration
144
179
145
180
Once you've saved a configuration file, the **Delete app configuration** button will appear in the **Configuration** tab. This will erase your existing settings completely. You should do this if you wish to connect your config server to another source, such as moving from GitHub to Azure DevOps.
146
181
182
+
183
+
147
184
## Next steps
148
185
149
186
In this tutorial, you learned how to enable and configure the Config Server. To learn more about managing your application, continue to the tutorial for manually scaling your app.
0 commit comments