Skip to content

Commit 231b914

Browse files
committed
updates content
1 parent 01499fc commit 231b914

File tree

2 files changed

+54
-39
lines changed

2 files changed

+54
-39
lines changed

articles/azure-resource-manager/managed-applications/publish-service-catalog-app.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ To publish a managed application to your service catalog, do the following tasks
1616

1717
- Create an Azure Resource Manager template (ARM template) that defines the resources to deploy with the managed application.
1818
- 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.
2221

2322
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).
2423

@@ -32,7 +31,7 @@ If your managed application definition is more than 120 MB or if you want to use
3231
To complete this quickstart, you need the following items:
3332

3433
- 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).
3635
- Install the latest version of [Azure PowerShell](/powershell/azure/install-az-ps) or [Azure CLI](/cli/azure/install-azure-cli).
3736

3837
## Create the ARM template
@@ -394,12 +393,12 @@ The `blob` command that's run from Azure PowerShell or Azure CLI creates a varia
394393
$blob = Get-AzStorageBlob -Container appcontainer -Blob app.zip -Context $ctx
395394
396395
New-AzManagedApplicationDefinition `
397-
-Name "sampleManagedAppDefinition" `
396+
-Name "sampleManagedApplication" `
398397
-Location "westus3" `
399398
-ResourceGroupName appDefinitionGroup `
400399
-LockLevel ReadOnly `
401-
-DisplayName "Sample Managed application definition" `
402-
-Description "Sample Managed application definition" `
400+
-DisplayName "Sample managed application" `
401+
-Description "Sample managed application that deploys web resources" `
403402
-Authorization "${principalid}:$roleid" `
404403
-PackageFileUri $blob.ICloudBlob.StorageUri.PrimaryUri.AbsoluteUri
405404
```
@@ -416,12 +415,12 @@ blob=$(az storage blob url \
416415
--name app.zip --output tsv)
417416
418417
az managedapp definition create \
419-
--name "sampleManagedAppDefinition" \
418+
--name "sampleManagedApplication" \
420419
--location "westus3" \
421420
--resource-group appDefinitionGroup \
422421
--lock-level ReadOnly \
423-
--display-name "Sample Managed application definition" \
424-
--description "Sample Managed application definition" \
422+
--display-name "Sample managed application" \
423+
--description "Sample managed application that deploys web resources" \
425424
--authorizations "$principalid:$roleid" \
426425
--package-file-uri "$blob"
427426
```

articles/azure-resource-manager/managed-applications/publish-service-catalog-bring-your-own-storage.md

Lines changed: 45 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ To publish a managed application definition to your service catalog, do the foll
1616

1717
- Create an Azure Resource Manager template (ARM template) that defines the Azure resources deployed by the managed application.
1818
- 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.
2020
- 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.
2222

2323
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).
2424

@@ -41,7 +41,7 @@ Every managed application definition includes a file named _mainTemplate.json_.
4141

4242
Open Visual Studio Code, create a file with the case-sensitive name _mainTemplate.json_ and save it.
4343

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.
4545

4646
```json
4747
{
@@ -288,6 +288,12 @@ Set-AzStorageBlobContent `
288288
-Context $ctx
289289
```
290290

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.
292+
293+
```azurepowershell
294+
$packageuri=(Get-AzStorageBlob -Container appcontainer -Blob app.zip -Context $ctx).ICloudBlob.StorageUri.PrimaryUri.AbsoluteUri
295+
```
296+
291297
# [Azure CLI](#tab/azure-cli)
292298

293299
```azurecli
@@ -322,6 +328,16 @@ az storage blob upload \
322328

323329
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).
324330

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+
325341
---
326342

327343
## Bring your own storage for the managed application definition
@@ -350,15 +366,15 @@ New-AzStorageAccount `
350366
-Kind StorageV2
351367
```
352368

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.
354370

355371
```azurepowershell
356-
$storageId = (Get-AzStorageAccount -ResourceGroupName byosDefinitionStorageGroup -Name definitionstorage).Id
372+
$storageid = (Get-AzStorageAccount -ResourceGroupName byosDefinitionStorageGroup -Name definitionstorage).Id
357373
```
358374

359375
# [Azure CLI](#tab/azure-cli)
360376

361-
```azurecli-interactive
377+
```azurecli
362378
az group create --name byosDefinitionStorageGroup --location westus3
363379
364380
az storage account create \
@@ -369,10 +385,10 @@ az storage account create \
369385
--kind StorageV2
370386
```
371387

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.
373389

374390
```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)
376392
```
377393

378394
---
@@ -383,27 +399,26 @@ Before you deploy your managed application definition to your storage account, a
383399

384400
# [PowerShell](#tab/azure-powershell)
385401

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.
387403

388404
```azurepowershell
389-
$arpId = (Get-AzADServicePrincipal -SearchString "Appliance Resource Provider").Id
405+
$arpid = (Get-AzADServicePrincipal -SearchString "Appliance Resource Provider").Id
390406
391-
New-AzRoleAssignment -ObjectId $arpId `
407+
New-AzRoleAssignment -ObjectId $arpid `
392408
-RoleDefinitionName Contributor `
393-
-Scope $storageId
409+
-Scope $storageid
394410
```
395411

396412
# [Azure CLI](#tab/azure-cli)
397413

398-
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.
399415

400416
```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)
403418
404-
az role assignment create --assignee "arpId" \
419+
az role assignment create --assignee $arpid \
405420
--role "Contributor" \
406-
--scope "storageId"
421+
--scope $storageid
407422
```
408423

409424
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
416431

417432
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.
418433

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.
420435

421436
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).
422437

@@ -434,7 +449,7 @@ principalid=$(az ad group show --group managedAppDemo --query id --output tsv)
434449

435450
---
436451

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.
438453

439454
# [PowerShell](#tab/azure-powershell)
440455

@@ -477,8 +492,8 @@ param principalId string
477492
param roleId string
478493
479494
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'
482497
483498
resource managedApplicationDefinition 'Microsoft.Solutions/applicationDefinitions@2021-07-01' = {
484499
name: managedApplicationDefinitionName
@@ -497,7 +512,6 @@ resource managedApplicationDefinition 'Microsoft.Solutions/applicationDefinition
497512
]
498513
}
499514
}
500-
501515
```
502516

503517
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
540554

541555
| Parameter | Value |
542556
| ---- | ---- |
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`. |
546560
| `principalId` | The publishers Principal ID that needs permissions to manage resources in the managed resource group. Use your `principalid` variable's value. |
547561
| `roleId` | Role ID for permissions to the managed resource group. For example Owner, Contributor, Reader. Use your `roleid` variable's value. |
548562

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+
549565
## Deploy the definition
550566

551567
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
584600

585601
# [PowerShell](#tab/azure-powershell)
586602

587-
```azurepowershell-interactive
603+
```azurepowershell
588604
Get-AzStorageAccount -ResourceGroupName byosDefinitionStorageGroup -Name definitionstorage |
589605
Get-AzStorageContainer -Name applicationdefinitions |
590-
Get-AzStorageBlob | Select-Object -Property *
606+
Get-AzStorageBlob | Select-Object -Property Name | Format-List
591607
```
592608

593609
# [Azure CLI](#tab/azure-cli)
@@ -596,10 +612,10 @@ Get-AzStorageBlob | Select-Object -Property *
596612
az storage blob list \
597613
--container-name applicationdefinitions \
598614
--account-name definitionstorage \
599-
--query "[].{container:container, name:name}"
615+
--query "[].{Name:name}"
600616
```
601617

602-
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.
603619

604620
---
605621

0 commit comments

Comments
 (0)