Skip to content

Commit 5c1a7c5

Browse files
author
Larry Franks
committed
adding missing steps
1 parent baeaddc commit 5c1a7c5

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

articles/machine-learning/how-to-deploy-functions.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,7 @@ When `show_output=True`, the output of the Docker build process is shown. Once t
153153
> [!IMPORTANT]
154154
> Images created by Azure Machine Learning use Linux, so you must use the `--is-linux` parameter.
155155
156-
1. To create the function app, use the following command. Replace `<app-name>` with the name you want to use. Replace `<acrinstance>` and `<imagename>` with the values from returned `package.location` earlier:
157-
158-
```azurecli-interactive
159-
az storage account create --name
160-
az functionapp create --resource-group myresourcegroup --plan myplanname --name <app-name> --deployment-container-image-name <acrinstance>.azurecr.io/package:<imagename>
161-
```
162-
163-
> [!IMPORTANT]
164-
> At this point, the function app has been created. However, since you haven't provided the connection string for the blob trigger or credentials to the Azure Container Registry that contains the image, the function app is not active. In the next steps, you provide the connection string and the authentication information for the container registry.
165-
166-
1. Create the storage account to use as the trigger and get it's connection string.
156+
1. Create the storage account to use as the trigger and get it's connection string. Replace `<triggerStorage>` with the name you want to use.
167157
168158
```azurecli-interactive
169159
az storage account create --name triggerStorage --location westeurope --resource-group myresourcegroup --sku Standard_LRS
@@ -173,7 +163,16 @@ When `show_output=True`, the output of the Docker build process is shown. Once t
173163
```
174164
Record this connection string to provide to the function app. We will use it later when we ask for `<triggerConnectionString>`
175165
176-
1. Create the containers for the input and output in the storage account.
166+
1. To create the function app, use the following command. Replace `<app-name>` with the name you want to use. Replace `<acrinstance>` and `<imagename>` with the values from returned `package.location` earlier. Replace Replace `<triggerStorage>` with the name of the storage account:
167+
168+
```azurecli-interactive
169+
az functionapp create --resource-group myresourcegroup --plan myplanname --name <app-name> --deployment-container-image-name <acrinstance>.azurecr.io/package:<imagename> --storage-account triggerStorage
170+
```
171+
172+
> [!IMPORTANT]
173+
> At this point, the function app has been created. However, since you haven't provided the connection string for the blob trigger or credentials to the Azure Container Registry that contains the image, the function app is not active. In the next steps, you provide the connection string and the authentication information for the container registry.
174+
175+
1. Create the containers for the input and output in the storage account. Replace `<triggerConnectionString>` with the connection string returned earlier:
177176
178177
```azurecli-interactive
179178
az storage container create -n input --connection-string <triggerConnectionString>
@@ -182,12 +181,17 @@ When `show_output=True`, the output of the Docker build process is shown. Once t
182181
az storage container create -n output --connection-string <triggerConnectionString>
183182
```
184183
185-
1. You will need to retrieve the tag associated with the created container using the following command:
184+
1. To associate the trigger connection string with the function app, use the following command. Replace `<app-name>` with the name of the function app. Replace `<triggerConnectionString>` with the connection string returned earlier:
185+
186+
```azurecli-interactive
187+
az functionapp config appsettings set --name <app-name> --resource-group myresourcegroup --settings "TriggerConnectionString=<triggerConnectionString>"
188+
```
189+
1. You will need to retrieve the tag associated with the created container using the following command. Replace `<username>` with the username returned earlier from the container registry:
186190
187191
```azurecli-interactive
188192
az acr repository show-tags --repository package --name <username> --output tsv
189193
```
190-
The most recent tag shown will be `imagetag` below.
194+
Save the value returned, it will be used as the `imagetag` in the next step.
191195
192196
1. To provide the function app with the credentials needed to access the container registry, use the following command. Replace `<app-name>` with the name you want to use. Replace `<acrinstance>` and `<imagetag>` with the values from the AZ CLI call in the previous step. Replace `<username>` and `<password>` with the ACR login information retrieved earlier:
193197

0 commit comments

Comments
 (0)