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
1. Update the current app by running `az spring app deploy`, or create a new deployment for this change by running `az spring app deployment create`.
74
74
75
75
## Bind your app to the Azure Cosmos DB
76
76
77
-
#### [Service Binding](#tab/Service-Binding)
77
+
### [Service Connector](#tab/Service-Connector)
78
+
79
+
1. Use the Azure CLI to configure your Spring app to connect to a Cosmos SQL Database with a system-assigned managed identity by using the `az spring connection create` command, as shown in the following example.
80
+
81
+
> [!NOTE]
82
+
> Updating Azure Cosmos DB database settings can take a few minutes to complete.
> If you're using [Service Connector](../service-connector/overview.md) for the first time, start by running the command `az provider register --namespace Microsoft.ServiceLinker` to register the Service Connector resource provider.
98
+
>
99
+
> If you're using Cosmos Cassandra, use a `--key_space` instead of `--database`.
100
+
101
+
> [!TIP]
102
+
> Run the command `az spring connection list-support-types --output table` to get a list of supported target services and authentication methods for Azure Spring Apps. If the `az spring` command isn't recognized by the system, check that you have installed the required extension by running `az extension add --name spring`.
103
+
104
+
1. Alternately, you can use the Azure portal to configure this connection by completing the following steps. The Azure portal provides the same capabilities as the Azure CLI and provides an interactive experience.
105
+
106
+
1. Select your Azure Spring Apps instance in the Azure portal and select **Apps** from the navigation menu. Choose the app you want to connect and select **Service Connector** on the navigation menu.
107
+
108
+
1. Select **Create**.
109
+
110
+
1. On the **Basics** tab, for service type, select Cosmos DB, then choose a subscription. For API type, select Core (SQL), choose a Cosmos DB account, and a database. For client type, select Java, then select **Next: Authentication**. If you haven't created your database yet, see [Quickstart: Create an Azure Cosmos DB account, database, container, and items from the Azure portal](../cosmos-db/nosql/quickstart-portal.md).
111
+
112
+
1. On the **Authentication** tab, choose **Connection string**. Service Connector automatically retrieves the access key from your Cosmos DB account. Select **Next: Networking**.
113
+
114
+
1. On the **Networking** tab, select **Configure firewall rules to enable access to target service**, then select **Next: Review + Create**.
115
+
116
+
1. On the **Review + Create** tab, wait for the validation to pass and then select **Create**. The creation can take a few minutes to complete.
117
+
118
+
1. Once the connection between your Spring apps and your Cosmos DB database has been generated, you can see it in the Service Connector page and select the unfold button to view the configured connection variables.
119
+
120
+
### [Service Binding](#tab/Service-Binding)
121
+
122
+
> [!NOTE]
123
+
> We recommend using Service Connector instead of Service Binding to connect your app to your database. Service Binding is going to be deprecated in favor of Service Connector. For instructions, see the Service Connector tab.
78
124
79
125
Azure Cosmos DB has five different API types that support binding. The following procedure shows how to use them:
80
126
@@ -85,25 +131,26 @@ Azure Cosmos DB has five different API types that support binding. The following
85
131
1. Go to your Azure Spring Apps service page in the Azure portal. Go to **Application Dashboard** and select the application to bind to Azure Cosmos DB. This application is the same one you updated or deployed in the previous step.
86
132
87
133
1. Select **Service binding**, and select **Create service binding**. To fill out the form, select:
134
+
88
135
* The **Binding type** value **Azure Cosmos DB**.
89
136
* The API type.
90
137
* Your database name.
91
138
* The Azure Cosmos DB account.
92
139
93
-
> [!NOTE]
94
-
> If you are using Cassandra, use a key space for the database name.
140
+
> [!NOTE]
141
+
> If you are using Cassandra, use a key space for the database name.
95
142
96
143
1. Restart the application by selecting **Restart** on the application page.
97
144
98
145
1. To ensure the service is bound correctly, select the binding name and verify its details. The `property` field should be similar to this example:
@@ -47,7 +47,26 @@ With Azure Spring Apps, you can bind select Azure services to your applications
47
47
48
48
## Bind your app to the Azure Database for MySQL instance
49
49
50
-
#### [Service Binding](#tab/Service-Binding)
50
+
### [Service Connector](#tab/Service-Connector)
51
+
52
+
To configure your Spring app to connect to an Azure Database for MySQL Flexible Server with a system-assigned managed identity, use the `az spring connection create` command, as shown in the following example.
> We recommend using Service Connector instead of Service Binding to connect your app to your database. Service Binding is going to be deprecated in favor of Service Connector. For instructions, see the Service Connector tab.
51
70
52
71
1. Note the admin username and password of your Azure Database for MySQL account.
53
72
@@ -70,23 +89,7 @@ With Azure Spring Apps, you can bind select Azure services to your applications
#### [Passwordless connection using a managed identity](#tab/Passwordless)
74
-
75
-
Configure your Spring app to connect to a MySQL Database Flexible Server with a system-assigned managed identity by using the `az spring connection create` command, as shown in the following example.
1. Remove any `spring.redis.*` properties from the `application.properties` file
42
+
1. Remove any `spring.redis.*` properties from the *application.properties* file
43
43
44
44
1. Update the current deployment using `az spring app update` or create a new deployment using `az spring app deployment create`.
45
45
46
46
## Bind your app to the Azure Cache for Redis
47
47
48
-
#### [Service Binding](#tab/Service-Binding)
48
+
### [Service Connector](#tab/Service-Connector)
49
+
50
+
1. Use the Azure CLI to configure your Spring app to connect to a Redis database with an access key using the `az spring connection create` command, as shown in the following example.
> If you're using [Service Connector](../service-connector/overview.md) for the first time, start by running the command `az provider register --namespace Microsoft.ServiceLinker` to register the Service Connector resource provider.
66
+
>
67
+
> If you're using Redis Enterprise, use the `az spring connection create redis-enterprise` command instead.
68
+
69
+
> [!TIP]
70
+
> Run the command `az spring connection list-support-types --output table` to get a list of supported target services and authentication methods for Azure Spring Apps. If the `az spring` command isn't recognized by the system, check that you have installed the required extension by running `az extension add --name spring`.
71
+
72
+
1. Alternately, you can use the Azure portal to configure this connection by completing the following steps. The Azure portal provides the same capabilities as the Azure CLI and provides an interactive experience.
73
+
74
+
1. Select your Azure Spring Apps instance in the Azure portal and then select **Apps** from the navigation menu. Choose the app you want to connect and then select **Service Connector** on the navigation menu.
75
+
76
+
1. Select **Create**.
77
+
78
+
1. On the **Basics** tab, for service type, select Cache for Redis. Choose a subscription and a Redis cache server. Fill in the Redis database name ("0" in this example) and under client type, select Java. Select **Next: Authentication**.
79
+
80
+
1. On the **Authentication** tab, choose **Connection string**. Service Connector will automatically retrieve the access key from your Redis database account. Select **Next: Networking**.
81
+
82
+
1. On the **Networking** tab, select **Configure firewall rules to enable access to target service**, then select **Review + Create**.
83
+
84
+
1. On the **Review + Create** tab, wait for the validation to pass and then select **Create**. The creation can take a few minutes to complete.
85
+
86
+
1. Once the connection between your Spring app your Redis database has been generated, you can see it in the Service Connector page and select the unfold button to view the configured connection variables.
87
+
88
+
### [Service Binding](#tab/Service-Binding)
89
+
90
+
> [!NOTE]
91
+
> We recommend using Service Connector instead of Service Binding to connect your app to your database. Service Binding is going to be deprecated in favor of Service Connector. For instructions, see the Service Connector tab.
49
92
50
93
1. Go to your Azure Spring Apps service page in the Azure portal. Go to **Application Dashboard** and select the application to bind to Azure Cache for Redis. This application is the same one you updated or deployed in the previous step.
51
94
@@ -55,14 +98,14 @@ If you don't have a deployed Azure Spring Apps instance, follow the steps in the
55
98
56
99
1. To ensure the service binding is correct, select the binding name and verify its details. The `property` field should look like this:
0 commit comments