Skip to content

Commit 812a053

Browse files
author
RoseHJM
committed
Test build 01
1 parent 388f235 commit 812a053

File tree

3 files changed

+51
-40
lines changed

3 files changed

+51
-40
lines changed

articles/deployment-environments/concept-extensibility-model.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ For instructions, see: [Create a custom container image manually](https://aka.ms
4848

4949
### Terraform
5050

51+
**Create a custom image using a script**
52+
53+
To make the process of building a custom image and pushing it to a container registry easier, Microsoft provides a script that builds and pushes the image to a registry that you specify.
54+
55+
For instructions, see: [Create a custom container image by using a script](https://aka.ms/ade/arm-bicep-custom-script).
56+
57+
**Create a custom image using a GitHub workflow**
58+
59+
To make the process of building a custom image and pushing it to a container registry easier, Microsoft provides a script that builds and pushes the image to a registry that you specify.
60+
61+
For instructions, see: [Create a custom container image by using a script](https://aka.ms/ade/arm-bicep-custom-script).
62+
5163
**Create a Terraform specific container image manually**
5264

5365
You can use a GitHub workflow to create a custom Terraform image that includes the software, settings, and other customizations you need for your Terraform specific image. You can then upload the new image to a container registry and use it by referencing it in the environment.yaml file.

articles/deployment-environments/how-to-configure-extensibility-model-custom-image.md

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,19 @@ For more information about how to create environment definitions that use the AD
6969
### [Create a custom image by using a script](#tab/custom-script/)
7070
### Create a custom container image by using a script
7171
72-
Creating a custom container image allows you to customize your deployments to fit your requirements. You can build an image based on the ADE standard image and push it to your container registry by using a quick start script provided by Microsoft. You can find the script in the [Deployment Environments repo](https://aka.ms/ade/arm-bicep-repo-script). To use the quick start script, fork the repo and then run the script locally.
72+
Creating a custom container image allows you to customize your deployments to fit your requirements. You can create and build an image based on the ADE standard image and push it to your container registry by using a quick start script provided by Microsoft. You can find the script in the [Deployment Environments repo](https://aka.ms/ade/arm-bicep-repo-script). To use the quick start script, fork the repo and then run the script locally.
7373
74-
The script builds an image and pushes it to the specified Azure Container Registry (ACR) under the repository 'ade' and the tag 'latest'. This script requires your registry name and directory for your custom image, have the Azure CLI and Docker Desktop installed and in your PATH variables, and requires that you have permissions to push to the specified registry. You can call the script using the following command in PowerShell:
74+
The script builds an image and pushes it to the specified Azure Container Registry (ACR) under the repository 'ade' and the tag 'latest'. This script requires your registry name and directory for your custom image, have the Azure CLI and Docker Desktop installed and in your PATH variables, and requires that you have permissions to push to the specified registry.
75+
76+
To use the script, you must:
77+
78+
1. Create a Dockerfile and scripts folder to support the ADE extensibility model.
79+
1. Supply a registry name and directory for your custom image.
80+
1. Have the Azure CLI and Docker Desktop installed and in your PATH variables.
81+
1. Have Docker Desktop running.
82+
1. Have permissions to push to the specified registry.
83+
84+
You can call the script using the following command in PowerShell:
7585
7686
```azurepowershell
7787
.\quickstart-image-build.ps1 -Registry '{YOUR_REGISTRY}' -Directory '{DIRECTORY_TO_YOUR_IMAGE}'
@@ -85,12 +95,6 @@ Additionally, if you would like to push to a specific repository and tag name, y
8595

8696
To use the image in your environment deployments, you need to add the location of the image to your manifest file [Connect the image to your environment definition](#connect-the-image-to-your-environment-definition) and you might need to configure permissions for the ACR to [make the custom image available to ADE](#make-the-custom-image-available-to-ade).
8797

88-
### Build a container image with a script
89-
90-
Rather than building your custom image and pushing it to a container registry yourself, you can use a script to build and push it to a specified container registry.
91-
92-
[!INCLUDE [custom-image-script](includes/custom-image-script-build.md)]
93-
9498
### [Create a custom image manually](#tab/custom-manual/)
9599
### Create a custom container image manually
96100

@@ -115,17 +119,24 @@ After you complete the image customization, you can build the image and push it
115119
## Use container images with ADE
116120

117121
You can take one of the following approaches to use container images with ADE:
118-
- **Create a container image leveraging a GitHub workflow:** To start with, you can use the published GitHub workflow from the Leveraging ADE's Extensibility Model With Terraform repository.
119-
- **Create a custom container image:** You can create a workflow that creates a Terraform specific image customized with all the software, settings, and configuration that you need.
122+
- **Create a custom container image by using a script:** Use the published script to create a Terraform specific image.
123+
- **Create a container image leveraging a GitHub workflow:** Use the published GitHub workflow from the Leveraging ADE's Extensibility Model With Terraform repository.
124+
- **Create a custom container image manually:** Create a customized Terraform specific image manually
120125

121126
## Create a custom container image
122127

123-
### [Create a container image using a GitHub workflow](#tab/github-workflow/)
128+
### [Create a container image using a script](#tab/terraform-script/)
124129

125-
### Create a container image using a GitHub workflow
130+
### Create a container image using a script
126131

127132
Creating a custom container image allows you to customize your deployments to fit your requirements. You can build an image based on the ADE standard image and push it to your container registry by using a quick start script provided by Microsoft. You can find the script in the [Deployment Environments with Terraform repo](https://aka.ms/ade/terraform-repo-script). To use the quick start script, fork the repo and then run the script locally.
128133

134+
To use the quickstart script to quickly build and push this sample image to an Azure Container Registry, you will need to:
135+
136+
- Fork this repository into your personal account.
137+
- Ensure the Azure CLI and the Docker Desktop application are installed on your computer and within your PATH variables.
138+
- Ensure you have permissions to push images to your selected Azure Container Registry.
139+
129140
The script builds an image and pushes it to the specified Azure Container Registry (ACR) under the repository 'ade' and the tag 'latest'. This script requires your registry name and directory for your custom image, have the Azure CLI and Docker Desktop installed and in your PATH variables, and requires that you have permissions to push to the specified registry. You can call the script using the following command in PowerShell:
130141

131142
```azurepowershell
@@ -140,6 +151,22 @@ Additionally, if you would like to push to a specific repository and tag name, y
140151

141152
To use the image in your environment deployments, you need to add the location of the image to your manifest file [Connect the image to your environment definition](#connect-the-image-to-your-environment-definition) and you might need to configure permissions for the ACR to [make the custom image available to ADE](#make-the-custom-image-available-to-ade).
142153

154+
### [Create a container image using a GitHub workflow](#tab/github-workflow/)
155+
156+
## Create a container image by by using a GitHub workflow
157+
158+
To start with, you can use the published GitHub workflow from the Leveraging ADE's Extensibility Model With Terraform repository.
159+
160+
In order to use the workflow, you will need to:
161+
162+
- Fork this repository into your personal account
163+
- Allow GitHub Actions to connect to Azure via an Microsoft Entra ID application's federated credentials through OIDC. You can find more documentation about this process here
164+
- Set up Repository Secrets for your repository containing your Microsoft Entra ID application's application ID set as AZURE_CLIENT_ID, the subscription ID set as AZURE_SUBSCRIPTION_ID, and the tenant ID set as AZURE_TENANT_ID
165+
- Set up Repository Variables for your repository containing your personal Azure Container Registry (ACR) name as REGISTRY_NAME, your preferred repository name as REPOSITORY_NAME, and your preferred tag as TAG for the created image. You can modify your variables between workflow runs to push the generated image to different registries, repositories and tags.
166+
167+
Run the workflow by navigating to the Actions tab in your forked repository and selecting the workflow you would like to run. You can then select the Run workflow button to start the workflow.
168+
169+
To use the image in your environment deployments, you need to add the location of the image to your manifest file [Connect the image to your environment definition](#connect-the-image-to-your-environment-definition) and you might need to configure permissions for the ACR to [make the custom image available to ADE](#make-the-custom-image-available-to-ade).
143170

144171
### Create a container image manually
145172

articles/deployment-environments/includes/custom-image-script-build.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)