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
@@ -4,20 +4,60 @@ description: Describes how to deploy a service catalog's managed application for
4
4
author: davidsmatlak
5
5
ms.author: davidsmatlak
6
6
ms.topic: quickstart
7
-
ms.date: 03/01/2023
7
+
ms.date: 03/14/2023
8
8
---
9
9
10
10
# Quickstart: Deploy a service catalog managed application
11
11
12
-
In this quickstart, you use the definition you created in the quickstarts to [publish an application definition](publish-service-catalog-app.md) or [publish a definition with bring your own storage](publish-service-catalog-bring-your-own-storage.md) to deploy a service catalog managed application. The deployment creates two resource groups. One resource group contains the managed application and the other is a managed resource group for the deployed resource. The managed application definition deploys an App Service plan, App Service, and storage account.
12
+
In this quickstart, you use the managed application definition that you created using one of the quickstart articles. The deployment creates two resource groups. One resource group contains the managed application and the other is a managed resource group for the deployed resources. The managed application definition deploys an App Service plan, App Service, and storage account.
13
13
14
14
## Prerequisites
15
15
16
-
To complete this quickstart, you need an Azure account with an active subscription. If you completed a quickstart to publish a definition, you should already have an account. Otherwise, [create a free account](https://azure.microsoft.com/free/) before you begin.
16
+
- A managed application definition created with [publish an application definition](publish-service-catalog-app.md) or [publish a definition with bring your own storage](publish-service-catalog-bring-your-own-storage.md).
17
+
- An Azure account with an active subscription. If you don't have an account, [create a free account](https://azure.microsoft.com/free/) before you begin.
18
+
-[Visual Studio Code](https://code.visualstudio.com/).
19
+
- Install the latest version of [Azure PowerShell](/powershell/azure/install-az-ps) or [Azure CLI](/cli/azure/install-azure-cli).
17
20
18
21
## Create service catalog managed application
19
22
20
-
In the Azure portal, use the following steps:
23
+
The examples use the resource groups names created in the _quickstart to publish an application definition_. If you used the quickstart to _publish a definition with bring your own storage_, use those resource group names.
24
+
25
+
-**Publish application definition**: _packageStorageGroup_ and _appDefinitionGroup_.
26
+
-**Publish definition with bring your own storage**: _packageStorageGroup_, _byosDefinitionStorageGroup_, and _byosAppDefinitionGroup_.
27
+
28
+
### Get managed application definition
29
+
30
+
# [PowerShell](#tab/azure-powershell)
31
+
32
+
To get the managed application's definition with Azure PowerShell, run the following commands.
33
+
34
+
In Visual Studio Code, open a new PowerShell terminal and sign in to your Azure subscription.
35
+
36
+
```azurepowershell
37
+
Connect-AzAccount
38
+
```
39
+
40
+
The command opens your default browser and prompts you to sign in to Azure. For more information, go to [Sign in with Azure PowerShell](/powershell/azure/authenticate-azureps).
41
+
42
+
From Azure PowerShell, get your managed application's definition. In this example, use the resource group name _appDefinitionGroup_ that was created when you deployed the managed application definition.
You use the `$definitionid` variable's value when you deploy the managed application.
57
+
58
+
# [Portal](#tab/azure-portal)
59
+
60
+
To get the managed application's definition from the Azure portal, use the following steps.
21
61
22
62
1. Sign in to the [Azure portal](https://portal.azure.com).
23
63
1. Select **Create a resource**.
@@ -36,14 +76,65 @@ In the Azure portal, use the following steps:
36
76
37
77
:::image type="content" source="./media/deploy-service-catalog-quickstart/select-service-catalog-managed-application.png" alt-text="Screenshot that shows managed application definitions that you can deploy.":::
38
78
79
+
---
80
+
81
+
### Create resource group and parameters
82
+
83
+
# [PowerShell](#tab/azure-powershell)
84
+
85
+
Create a resource group for the managed application that's used during the deployment.
You also need to create a name for the managed application resource group. The resource group is created when you deploy the managed application.
92
+
93
+
Run the following commands to create the managed resource group's name.
94
+
95
+
```azurepowershell
96
+
$mrgprefix = 'rg-sampleManagedApplication-'
97
+
$mrgtimestamp = Get-Date -UFormat "%Y%m%d%H%M%S"
98
+
$mrgname = $mrgprefix + $mrgtimestamp
99
+
$mrgname
100
+
```
101
+
102
+
The `$mrgprefix` and `$mrgtimestamp` variables are concatenated to create a resource group name like _rg-sampleManagedApplication-20230310100148_ that's stored in the `$mrgname` variable. You use the `$mrgname` variable's value when you deploy the managed application.
103
+
104
+
You need to provide several parameters to the deployment command for the managed application. You can use a JSON formatted string or create a JSON file. In this example, we use a JSON formatted string. The PowerShell escape character for the quote marks is the backtick (`` ` ``) character. The backtick is also used for line continuation so that commands can use multiple lines.
For readability, the completed JSON string uses the backtick for line continuation. The values are stored in the `$params` variable that's used in the deployment command. The parameters in the JSON string are required to deploy the managed resources.
-`appServicePlanName`: Create a plan name. Maximum of 40 alphanumeric characters and hyphens. For example, _demoAppServicePlan_. App Service plan names must be unique within a resource group in your subscription.
124
+
-`appServiceNamePrefix`: Create a prefix for the plan name. Maximum of 47 alphanumeric characters or hyphens. For example, _demoApp_. During deployment, the prefix is concatenated with a unique string to create a name that's globally unique across Azure.
125
+
-`storageAccountNamePrefix`: Use only lowercase letters and numbers and a maximum of 11 characters. For example, _demostg1234_. During deployment, the prefix is concatenated with a unique string to create a name globally unique across Azure. Although you're creating a prefix, the control checks for existing names in Azure and might post a validation message that the name already exists. If so, choose a different prefix.
126
+
-`storageAccountType`: The default is Standard_LRS. The other options are Premium_LRS, Standard_LRS, and Standard_GRS.
127
+
128
+
# [Portal](#tab/azure-portal)
129
+
39
130
1. Provide values for the **Basics** tab and select **Next: Web App settings**.
40
131
41
132
:::image type="content" source="./media/deploy-service-catalog-quickstart/basics-info.png" alt-text="Screenshot that highlights the required information on the basics tab.":::
42
133
43
134
-**Subscription**: Select the subscription where you want to deploy the managed application.
44
135
-**Resource group**: Select the resource group. For this example, create a resource group named _applicationGroup_.
45
136
-**Region**: Select the location where you want to deploy the resource.
46
-
-**Application Name**: Enter a name for your application. For this example, use _demoManagedApplication_.
137
+
-**Application Name**: Enter a name for your managed application. For this example, use _demoManagedApplication_.
47
138
-**Application resources Resource group name**: The name of the managed resource group that contains the resources that are deployed for the managed application. The default name is in the format `rg-{definitionName}-{dateTime}` but you can change the name.
48
139
49
140
1. Provide values for the **Web App settings** tab and select **Next: Storage settings**.
@@ -58,31 +149,114 @@ In the Azure portal, use the following steps:
58
149
:::image type="content" source="./media/deploy-service-catalog-quickstart/storage-settings.png" alt-text="Screenshot that shows the information needed to create a storage account.":::
59
150
60
151
-**Storage account name prefix**: Use only lowercase letters and numbers and a maximum of 11 characters. For example, _demostg1234_. During deployment, the prefix is concatenated with a unique string to create a name globally unique across Azure. Although you're creating a prefix, the control checks for existing names in Azure and might post a validation message that the name already exists. If so, choose a different prefix.
61
-
-**Storage account type**: Select **Change type** to choose a storage account type. The default is Standard LRS.
152
+
-**Storage account type**: Select **Change type** to choose a storage account type. The default is Standard LRS. The other options are Premium_LRS, Standard_LRS, and Standard_GRS.
153
+
154
+
---
62
155
63
-
1. Review the summary of the values you selected and verify **Validation Passed** is displayed. Select **Create** to deploy the managed application.
156
+
### Deploy the managed application
157
+
158
+
# [PowerShell](#tab/azure-powershell)
159
+
160
+
Run the following command to deploy the managed application from your Azure PowerShell session.
161
+
162
+
```azurepowershell
163
+
New-AzManagedApplication `
164
+
-Name "demoManagedApplication" `
165
+
-ResourceGroupName applicationGroup `
166
+
-Location westus3 `
167
+
-ManagedResourceGroupName $mrgname `
168
+
-ManagedApplicationDefinitionId $definitionid `
169
+
-Kind ServiceCatalog `
170
+
-Parameter $params
171
+
```
172
+
173
+
The parameters used in the deployment command:
174
+
175
+
-`Name`: Specify a name for the managed application. For this example, use _demoManagedApplication_.
176
+
-`ResourceGroupName`: Name of the resource group you created for the managed application.
177
+
-`Location`: Specify the region to deploy the resources. For this example, use _westus3_.
178
+
-`ManagedResourceGroupName`: Uses the `$mrgname` parameters value. The managed resource group is created when the managed application is deployed.
179
+
-`ManagedApplicationDefinitionId`: Uses the `$definitionid` variable's value for the managed application definition's resource ID.
180
+
-`Kind`: Specifies that type of managed application. This example uses _ServiceCatalog_.
181
+
-`Parameter`: Uses the `$parms` variable's value in the JSON formatted string.
182
+
183
+
# [Portal](#tab/azure-portal)
184
+
185
+
Review the summary of the values you selected and verify **Validation Passed** is displayed. Select **Create** to deploy the managed application.
64
186
65
187
:::image type="content" source="./media/deploy-service-catalog-quickstart/summary-validation.png" alt-text="Screenshot that summarizes the values you selected and shows the status of validation passed.":::
66
188
189
+
---
190
+
67
191
## View results
68
192
69
193
After the service catalog managed application is deployed, you have two new resource groups. One resource group contains the managed application. The other resource group contains the managed resources that were deployed. In this example, an App Service, App Service plan, and storage account.
70
194
71
195
### Managed application
72
196
197
+
After the deployment is finished, you can check your managed application's status.
198
+
199
+
# [PowerShell](#tab/azure-powershell)
200
+
201
+
Run the following commands to check the managed application's status.
Go to the resource group named **applicationGroup** and select **Overview**. The resource group contains your managed application named _demoManagedApplication_.
74
216
75
-
:::image type="content" source="./media/deploy-service-catalog-quickstart/view-application-group.png" alt-text="Screenshot that shows the resource group that contains the managed application.":::
217
+
:::image type="content" source="./media/deploy-service-catalog-quickstart/view-application-group.png" alt-text="Screenshot that shows the resource group that contains the managed application.":::
76
218
77
219
Select the managed application's name to get more information like the link to the managed resource group.
78
220
79
-
:::image type="content" source="./media/deploy-service-catalog-quickstart/view-managed-application.png" alt-text="Screenshot that shows the managed application's details and highlights the link to the managed resource group.":::
221
+
:::image type="content" source="./media/deploy-service-catalog-quickstart/view-managed-application.png" alt-text="Screenshot that shows the managed application's details and highlights the link to the managed resource group.":::
222
+
223
+
---
80
224
81
225
### Managed resources
82
226
227
+
You can view the resources deployed to the managed resource group.
228
+
229
+
# [PowerShell](#tab/azure-powershell)
230
+
231
+
To display the managed resource group's resources, run the following command. You created the `$mrgname` variable when you created the parameters.
232
+
233
+
```azurepowershell
234
+
Get-AzResource -ResourceGroupName $mrgname
235
+
```
236
+
237
+
To display all the role assignments for the managed resource group.
238
+
239
+
```azurepowershell
240
+
Get-AzRoleAssignment -ResourceGroupName $mrgname
241
+
```
242
+
243
+
The managed application definition you created in the quickstart articles used a group with the Owner role assignment. You can view the group with the following command.
You can also list the deny assignments for the managed resource group.
250
+
251
+
```azurepowershell
252
+
Get-AzDenyAssignment -ResourceGroupName $mrgname
253
+
```
254
+
255
+
# [Portal](#tab/azure-portal)
256
+
83
257
Go to the managed resource group with the name prefix **rg-sampleManagedApplication** and select **Overview** to display the resources that were deployed. The resource group contains an App Service, App Service plan, and storage account.
84
258
85
-
:::image type="content" source="./media/deploy-service-catalog-quickstart/view-managed-resource-group.png" alt-text="Screenshot that shows the managed resource group that contains the resources deployed by the managed application definition.":::
259
+
:::image type="content" source="./media/deploy-service-catalog-quickstart/view-managed-resource-group.png" alt-text="Screenshot that shows the managed resource group that contains the resources deployed by the managed application definition.":::
86
260
87
261
The managed resource group and each resource created by the managed application has a role assignment. When you used a quickstart article to create the definition, you created an Azure Active Directory group. That group was used in the managed application definition. When you deployed the managed application, a role assignment for that group was added to the managed resources.
88
262
@@ -95,16 +269,28 @@ To see the role assignment from the Azure portal:
95
269
96
270
The role assignment gives the application's publisher access to manage the storage account. In this example, the publisher might be your IT department. The _Deny assignments_ prevents customers from making changes to a managed resource's configuration. Managed apps are designed so that customers don't need to maintain the resources. The _Deny assignment_ excludes the Azure Active Directory group that was assigned in **Role assignments**.
97
271
272
+
---
273
+
98
274
## Clean up resources
99
275
100
-
When your finished with the managed application, you can delete the resource groups and that removes all the resources you created. For example, in this quickstart you created the resource groups _applicationGroup_ and a managed resource group with the prefix _rg-sampleManagedApplication_.
276
+
When you're finished with the managed application, you can delete the resource groups and that removes all the resources you created. For example, in this quickstart you created the resource groups _applicationGroup_ and a managed resource group with the prefix _rg-sampleManagedApplication_.
277
+
278
+
# [PowerShell](#tab/azure-powershell)
279
+
280
+
The command prompts you to confirm that you want to remove the resource group.
281
+
282
+
```azurepowershell
283
+
Remove-AzResourceGroup -Name applicationGroup
284
+
```
285
+
286
+
# [Portal](#tab/azure-portal)
101
287
102
288
1. From Azure portal **Home**, in the search field, enter _resource groups_.
103
289
1. Select **Resource groups**.
104
290
1. Select **applicationGroup** and **Delete resource group**.
105
291
1. To confirm the deletion, enter the resource group name and select **Delete**.
106
292
107
-
When the resource group that contains the managed application is deleted, the managed resource group is also deleted. In this example, when _applicationGroup_ is deleted the _rg-sampleManagedApplication_ resource group is also deleted.
293
+
---
108
294
109
295
If you want to delete the managed application definition, delete the resource groups you created in the quickstart articles.
0 commit comments