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/azure-resource-manager/managed-applications/publish-service-catalog-app.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,8 @@ To publish a managed application to your service catalog, do the following tasks
16
16
17
17
- Create an Azure Resource Manager template (ARM template) that defines the resources to deploy with the managed application.
18
18
- Define the user interface elements for the portal when deploying the managed application.
19
-
- Create a _.zip_ package that contains the required template files. The _.zip_ package file has a 120-MB limit for a service catalog's managed application definition.
20
-
- Decide which user, group, or application needs access to the resource group in the user's subscription.
21
-
- Create the managed application definition that points to the _.zip_ package and requests access for the identity.
19
+
-Create a _.zip_ package that contains the required JSON files. The _.zip_ package file has a 120-MB limit for a service catalog's managed application definition.
20
+
- Deploy the managed application definition so it's available in your service catalog.
22
21
23
22
If your managed application definition is more than 120 MB or if you want to use your own storage account for your organization's compliance reasons, go to [Quickstart: Bring your own storage to create and publish an Azure Managed Application definition](publish-service-catalog-bring-your-own-storage.md).
24
23
@@ -32,7 +31,7 @@ If your managed application definition is more than 120 MB or if you want to use
32
31
To complete this quickstart, you need the following items:
33
32
34
33
- An Azure account with an active subscription and permissions to Azure Active Directory resources like users, groups, or service principals. If you don't have an account, [create a free account](https://azure.microsoft.com/free/) before you begin.
35
-
-[Visual Studio Code](https://code.visualstudio.com/) with the latest [Azure Resource Manager Tools extension](https://marketplace.visualstudio.com/items?itemName=msazurermtools.azurerm-vscode-tools). If you're using Bicep, install the [Bicep extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-bicep).
34
+
-[Visual Studio Code](https://code.visualstudio.com/) with the latest [Azure Resource Manager Tools extension](https://marketplace.visualstudio.com/items?itemName=msazurermtools.azurerm-vscode-tools). For Bicep files, install the [Bicep extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-bicep).
36
35
- Install the latest version of [Azure PowerShell](/powershell/azure/install-az-ps) or [Azure CLI](/cli/azure/install-azure-cli).
37
36
38
37
## Create the ARM template
@@ -394,12 +393,12 @@ The `blob` command that's run from Azure PowerShell or Azure CLI creates a varia
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/managed-applications/publish-service-catalog-bring-your-own-storage.md
+45-29Lines changed: 45 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,9 @@ To publish a managed application definition to your service catalog, do the foll
16
16
17
17
- Create an Azure Resource Manager template (ARM template) that defines the Azure resources deployed by the managed application.
18
18
- Define the user interface elements for the portal when deploying the managed application.
19
-
- Create a _.zip_ package that contains the required ARM template JSON files.
19
+
- Create a _.zip_ package that contains the required JSON files.
20
20
- Create a storage account where you store the managed application definition.
21
-
- Deploy the managed application definition to your own storage account.
21
+
- Deploy the managed application definition to your own storage account so it's available in your service catalog.
22
22
23
23
If you're managed application definition is less than 120 MB and you don't want to use your own storage account, go to [Quickstart: Create and publish an Azure Managed Application definition](publish-service-catalog-app.md).
24
24
@@ -41,7 +41,7 @@ Every managed application definition includes a file named _mainTemplate.json_.
41
41
42
42
Open Visual Studio Code, create a file with the case-sensitive name _mainTemplate.json_ and save it.
43
43
44
-
Add the following JSON and save the file. It defines the resources to deploy an App Service, App Service plan, and a storage account for the managed application. This storage account isn't for the managed application definition.
44
+
Add the following JSON and save the file. It defines the managed application's resources to deploy an App Service, App Service plan, and a storage account.
45
45
46
46
```json
47
47
{
@@ -288,6 +288,12 @@ Set-AzStorageBlobContent `
288
288
-Context $ctx
289
289
```
290
290
291
+
Use the following commands to store the package file's URI in a variable named `packageuri`. You use the variable's value when you deploy the managed application definition.
For more information about storage authentication, see [Choose how to authorize access to blob data with Azure CLI](../../storage/blobs/authorize-data-operations-cli.md).
324
330
331
+
Use the following command to store the package file's URI in a variable named `packageuri`. You use the variable's value when you deploy the managed application definition.
332
+
333
+
```azurecli
334
+
packageuri=$(az storage blob url \
335
+
--account-name demostorageaccount \
336
+
--container-name appcontainer \
337
+
--auth-mode login \
338
+
--name app.zip --output tsv)
339
+
```
340
+
325
341
---
326
342
327
343
## Bring your own storage for the managed application definition
@@ -350,15 +366,15 @@ New-AzStorageAccount `
350
366
-Kind StorageV2
351
367
```
352
368
353
-
Use the following command to store the storage account's resource ID in a variable named `storageId`. You use this variable's value when you deploy the managed application definition.
369
+
Use the following command to store the storage account's resource ID in a variable named `storageid`. You use the variable's value when you deploy the managed application definition.
az group create --name byosDefinitionStorageGroup --location westus3
363
379
364
380
az storage account create \
@@ -369,10 +385,10 @@ az storage account create \
369
385
--kind StorageV2
370
386
```
371
387
372
-
Use the following command to store the storage account's resource ID in a variable named `storageId`. You use this variable's value when you deploy the managed application definition.
388
+
Use the following command to store the storage account's resource ID in a variable named `storageid`. You use the variable's value to set up the storage account's role assignment and when you deploy the managed application definition.
373
389
374
390
```azurecli
375
-
storageId=$(az storage account show --resource-group byosDefinitionStorageGroup --name definitionstorage --query id)
391
+
storageid=$(az storage account show --resource-group byosDefinitionStorageGroup --name definitionstorage --query id --output tsv)
376
392
```
377
393
378
394
---
@@ -383,27 +399,26 @@ Before you deploy your managed application definition to your storage account, a
383
399
384
400
# [PowerShell](#tab/azure-powershell)
385
401
386
-
In PowerShell, you can use variables for the role assignment. This example uses the `$storageId`you created in a previous step and creates the `$arpId` variable.
402
+
You can use variables to set up the role assignment. This example uses the `$storageid` variable you created in the previous step and creates the `$arpid` variable.
In Azure CLI, you need to use the string values to create the role assignment. This example gets string values from the `storageId` variable you created in a previous step and gets the object ID value for the Appliance Resource Provider. The command has placeholders for those values `arpId` and `storageId`. Replace the placeholders with the string values and use the quotes as shown.
414
+
You can use variables to set up the role assignment. This example uses the `$storageid` variable you created in the previous step and creates the `$arpid` variable.
399
415
400
416
```azurecli
401
-
echo $storageId
402
-
arpId=$(az ad sp list --display-name "Appliance Resource Provider" --query [].id --output tsv)
417
+
arpid=$(az ad sp list --display-name "Appliance Resource Provider" --query [].id --output tsv)
403
418
404
-
az role assignment create --assignee "arpId" \
419
+
az role assignment create --assignee $arpid \
405
420
--role "Contributor" \
406
-
--scope "storageId"
421
+
--scope $storageid
407
422
```
408
423
409
424
If you're running CLI commands with Git Bash for Windows, you might get an `InvalidSchema` error because of the `scope` parameter's string. To fix the error, run `export MSYS_NO_PATHCONV=1` and then rerun your command to create the role assignment.
@@ -416,7 +431,7 @@ The _Appliance Resource Provider_ is a service principal in your Azure Active Di
416
431
417
432
The next step is to select a user, security group, or application for managing the resources for the customer. This identity has permissions on the managed resource group according to the assigned role. The role can be any Azure built-in role like Owner or Contributor.
418
433
419
-
This example uses a security group, and your Azure Active Directory account should be a member of the group. To get the group's object ID, replace the placeholder `managedAppDemo` with your group's name. You'll use this variable's value when you deploy the managed application definition.
434
+
This example uses a security group, and your Azure Active Directory account should be a member of the group. To get the group's object ID, replace the placeholder `managedAppDemo` with your group's name. You use the variable's value when you deploy the managed application definition.
420
435
421
436
To create a new Azure Active Directory group, go to [Manage Azure Active Directory groups and group membership](../../active-directory/fundamentals/how-to-manage-groups.md).
422
437
@@ -434,7 +449,7 @@ principalid=$(az ad group show --group managedAppDemo --query id --output tsv)
434
449
435
450
---
436
451
437
-
Next, get the role definition ID of the Azure built-in role you want to grant access to the user, group, or application. You'll use this variable's value when you deploy the managed application definition.
452
+
Next, get the role definition ID of the Azure built-in role you want to grant access to the user, group, or application. You use the variable's value when you deploy the managed application definition.
438
453
439
454
# [PowerShell](#tab/azure-powershell)
440
455
@@ -477,8 +492,8 @@ param principalId string
477
492
param roleId string
478
493
479
494
var definitionLockLevel = 'ReadOnly'
480
-
var definitionDescription = 'Sample BYOS Managed application definition'
481
-
var definitionDisplayName = 'Sample BYOS Managed application definition'
495
+
var definitionDisplayName = 'Sample BYOS managed application'
496
+
var definitionDescription = 'Sample BYOS managed application that deploys web resources'
For more information about the template's properties, see [Microsoft.Solutions/applicationDefinitions](/azure/templates/microsoft.solutions/applicationdefinitions).
@@ -540,12 +554,14 @@ The following table describes the parameter values for the managed application d
540
554
541
555
| Parameter | Value |
542
556
| ---- | ---- |
543
-
|`managedApplicationDefinitionName`| Name of the managed application definition. For this example, use _sampleByosManagedAppDefinition_.|
544
-
|`definitionStorageResourceID`| Resource ID for the storage account where the definition is stored. Use the `storageId` variable's value. |
545
-
|`packageFileUri`| Enter the URI for your _.zip_ package file. Use the URI for the _.zip_[package file](#package-the-files) you created in an earlier step. The format is `https://yourStorageAccountName.blob.core.windows.net/appcontainer/app.zip`. |
557
+
|`managedApplicationDefinitionName`| Name of the managed application definition. For this example, use _sampleByosManagedApplication_.|
558
+
|`definitionStorageResourceID`| Resource ID for the storage account where the definition is stored. Use your `storageid` variable's value. |
559
+
|`packageFileUri`| Enter the URI for your _.zip_ package file. Use your `packageuri` variable's value. The format is `https://yourStorageAccountName.blob.core.windows.net/appcontainer/app.zip`. |
546
560
|`principalId`| The publishers Principal ID that needs permissions to manage resources in the managed resource group. Use your `principalid` variable's value. |
547
561
|`roleId`| Role ID for permissions to the managed resource group. For example Owner, Contributor, Reader. Use your `roleid` variable's value. |
548
562
563
+
To get your variable values in Azure PowerShell, from the command prompt type `$variableName` like `$storageid` to display the value in your console. In Azure CLI, type `echo $variableName` like `echo $storageid` to display the value.
564
+
549
565
## Deploy the definition
550
566
551
567
When you deploy the managed application's definition, it becomes available in your service catalog. This process doesn't deploy the managed application's resources.
@@ -584,10 +600,10 @@ You can use the following commands to verify that the managed application defini
When you run the Azure CLI command, you might see a warning message similar to the CLI command in [package the files](#package-the-files).
618
+
When you run the Azure CLI command, you might see a credentials warning message similar to the CLI command in [package the files](#package-the-files). To clear the warning message, you can assign yourself _Storage Blob Data Contributor_ or _Storage Blob Data Reader_ to the storage account's scope, and then include the `--auth-mode login` parameter in the command.
0 commit comments