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
This quickstart provides an introduction to working with [Azure Managed Applications](overview.md). You can create and publish a managed application that is intended for members of your organization.
13
13
14
-
You can create and publish Azure [managed applications](overview.md) that are intended for members of your organization. For example, an IT department can publish managed applications that fulfill organizational standards. These managed applications are available through the service catalog, not the Azure marketplace.
15
-
16
-
To publish a managed application to your Azure Service Catalog, you must:
14
+
To publish a managed application to your service catalog, you must:
17
15
18
16
* Create a template that defines the resources to deploy with the managed application.
19
17
* Define the user interface elements for the portal when deploying the managed application.
20
18
* Create a .zip package that contains the required template files.
21
19
* Decide which user, group, or application needs access to the resource group in the user's subscription.
22
20
* Create the managed application definition that points to the .zip package and requests access for the identity.
23
21
24
-
For this article, your managed application has only a storage account. It's intended to illustrate the steps of publishing a managed application. For complete examples, see [Sample projects for Azure managed applications](sample-projects.md).
25
-
26
-
The PowerShell examples in this article require Azure PowerShell 6.2 or later. If needed, [update your version](/powershell/azure/install-Az-ps).
Every managed application definition includes a file named **mainTemplate.json**. In it, you define the Azure resources to deploy. The template is no different than a regular Resource Manager template.
26
+
Every managed application definition includes a file named **mainTemplate.json**. In it, you define the Azure resources to deploy. The template is no different than a regular Azure Resource Manager (ARM) template.
31
27
32
28
Create a file named **mainTemplate.json**. The name is case-sensitive.
33
29
@@ -55,30 +51,30 @@ Add the following JSON to your file. It defines the parameters for creating a st
## Defining your create experience using CreateUiDefinition.json
75
+
## Define your create experience
80
76
81
-
As a publisher, you define your create experience using the **createUiDefinition.json** file which generates the interface for users creating managed applications. You define how users provide input for each parameter using [control elements](create-uidefinition-elements.md) including drop-downs, text boxes, and password boxes.
77
+
As a publisher, you define the portal experience for creating the managed application. The **createUiDefinition.json** file generates the portal interface. You define how users provide input for each parameter using [control elements](create-uidefinition-elements.md) including drop-downs, text boxes, and password boxes.
82
78
83
79
Create a file named **createUiDefinition.json** (This name is case-sensitive)
84
80
@@ -137,58 +133,116 @@ To learn more, see [Get started with CreateUiDefinition](create-uidefinition-ove
137
133
138
134
## Package the files
139
135
140
-
Add the two files to a .zip file named app.zip. The two files must be at the root level of the .zip file. If you put them in a folder, you receive an error when creating the managed application definition that states the required files aren't present.
136
+
Add the two files to a .zip file named app.zip. The two files must be at the root level of the .zip file. If you put them in a folder, you receive an error when creating the managed application definition that states the required files aren't present.
141
137
142
-
Upload the package to an accessible location from where it can be consumed.
138
+
Upload the package to an accessible location from where it can be consumed. You'll need to provide a unique name for the storage account.
az group create --name storageGroup --location eastus
167
+
168
+
az storage account create \
169
+
--name mystorageaccount \
170
+
--resource-group storageGroup \
171
+
--location eastus \
172
+
--sku Standard_LRS \
173
+
--kind StorageV2
174
+
175
+
az storage container create \
176
+
--account-name mystorageaccount \
177
+
--name appcontainer \
178
+
--public-access blob
179
+
180
+
az storage blob upload \
181
+
--account-name mystorageaccount \
182
+
--container-name appcontainer \
183
+
--name "app.zip" \
184
+
--file "D:\myapplications\app.zip"
185
+
186
+
```
187
+
188
+
---
189
+
162
190
## Create the managed application definition
163
191
164
192
### Create an Azure Active Directory user group or application
165
193
166
-
The next step is to select a user groupor application for managing the resources on behalf of the customer. This user group or application has permissions on the managed resource group according to the role that is assigned. The role can be any built-in Role-Based Access Control (RBAC) role like Owner or Contributor. You also can give an individual user permission to manage the resources, but typically you assign this permission to a user group. To create a new Active Directory user group, see [Create a group and add members in Azure Active Directory](../../active-directory/fundamentals/active-directory-groups-create-azure-portal.md).
194
+
The next step is to select a user group, user, or application for managing the resources on behalf of the customer. This identity has permissions on the managed resource group according to the role that is assigned. The role can be any built-in Role-Based Access Control (RBAC) role like Owner or Contributor. To create a new Active Directory user group, see [Create a group and add members in Azure Active Directory](../../active-directory/fundamentals/active-directory-groups-create-azure-portal.md).
167
195
168
196
You need the object ID of the user group to use for managing the resources.
169
197
198
+
# [PowerShell](#tab/azure-powershell)
199
+
170
200
```powershell
171
201
$groupID=(Get-AzADGroup -DisplayName mygroup).Id
172
202
```
173
203
204
+
# [Azure CLI](#tab/azure-cli)
205
+
206
+
```azurecli-interactive
207
+
groupid=$(az ad group show --group mygroup --query objectId --output tsv)
208
+
```
209
+
174
210
### Get the role definition ID
175
211
176
212
Next, you need the role definition ID of the RBAC built-in role you want to grant access to the user, user group, or application. Typically, you use the Owner or Contributor or Reader role. The following command shows how to get the role definition ID for the Owner role:
177
213
214
+
# [PowerShell](#tab/azure-powershell)
215
+
178
216
```powershell
179
217
$ownerID=(Get-AzRoleDefinition -Name Owner).Id
180
218
```
181
219
220
+
# [Azure CLI](#tab/azure-cli)
221
+
222
+
```azurecli-interactive
223
+
ownerid=$(az role definition list --name Owner --query [].name --output tsv)
224
+
```
225
+
182
226
### Create the managed application definition
183
227
184
228
If you don't already have a resource group for storing your managed application definition, create one now:
When the command completes, you have a managed application definition in your resource group.
275
+
276
+
Some of the parameters used in the preceding example are:
277
+
278
+
***resource group**: The name of the resource group where the managed application definition is created.
279
+
***lock level**: The type of lock placed on the managed resource group. It prevents the customer from performing undesirable operations on this resource group. Currently, ReadOnly is the only supported lock level. When ReadOnly is specified, the customer can only read the resources present in the managed resource group. The publisher identities that are granted access to the managed resource group are exempt from the lock.
280
+
***authorizations**: Describes the principal ID and the role definition ID that are used to grant permission to the managed resource group. It's specified in the format of `<principalId>:<roleDefinitionId>`. If more than one value is needed, specify them in the form `<principalId1>:<roleDefinitionId1> <principalId2>:<roleDefinitionId2>`. The values are separated by a space.
281
+
***package file URI**: The location of a .zip package that contains the required files.
282
+
206
283
## Bring your own storage for the managed application definition
284
+
207
285
You can choose to store your managed application definition within a storage account provided by you during creation so that it's location and access can be fully managed by you for your regulatory needs.
208
286
209
287
> [!NOTE]
210
288
> Bring your own storage is only supported with ARM Template or REST API deployments of the managed application definition.
211
289
212
290
### Select your storage account
291
+
213
292
You must [create a storage account](../../storage/common/storage-account-create.md) to contain your managed application definition for use with Service Catalog.
214
293
215
294
Copy the storage account's resource ID. It will be used later when deploying the definition.
216
295
217
296
### Set the role assignment for "Appliance Resource Provider" in your storage account
297
+
218
298
Before your managed application definition can be deployed to your storage account, you must give contributor permissions to the **Appliance Resource Provider** role so that it can write the definition files to your storage account's container.
219
299
220
300
1. In the [Azure portal](https://portal.azure.com), navigate to your storage account.
@@ -305,11 +385,13 @@ You can verify that the application definition files are saved in your provided
305
385
> [!NOTE]
306
386
> For added security, you can create a managed applications definition store it in an [Azure storage account blob where encryption is enabled](../../storage/common/storage-service-encryption.md). The definition contents are encrypted through the storage account's encryption options. Only users with permissions to the file can see the definition in Service Catalog.
307
387
308
-
###Make sure users can see your definition
388
+
## Make sure users can see your definition
309
389
310
390
You have access to the managed application definition, but you want to make sure other users in your organization can access it. Grant them at least the Reader role on the definition. They may have inherited this level of access from the subscription or resource group. To check who has access to the definition and add users or groups, see [Use Role-Based Access Control to manage access to your Azure subscription resources](../../role-based-access-control/role-assignments-portal.md).
311
391
312
392
## Next steps
313
393
314
-
* To publish your managed application to the Azure Marketplace, see [Azure managed applications in the Marketplace](publish-marketplace-app.md).
315
-
* To deploy a managed application instance, see [Deploy service catalog app through Azure portal](deploy-service-catalog-quickstart.md).
394
+
You've published the managed application definition. Now, learn how to deploy an instance of that definition.
395
+
396
+
> [!div class="nextstepaction"]
397
+
> [Quickstart: Deploy service catalog app](deploy-service-catalog-quickstart.md)
0 commit comments