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
The extensibility model enables platform engineers to define the app infrastructure using their preferred IaC framework including Azure Resource Manager (ARM), Bicep, Terraform, and Pulumi. Platform engineers create and customize container images for different scenarios. They push these images to a container registry and reference them in the environment definition’s metadata file. This ensures that whenever a deployment is made, the deployment execution happens based on how the container image is configured. The following diagram shows the relationship between the custom images stored in a container registry, and the environment definition within the catalog.
21
+
The extensibility model enables platform engineers to define the app infrastructure using their preferred IaC framework including Azure Resource Manager (ARM), Bicep, Terraform, and Pulumi. Platform engineers create and customize container images for different scenarios. They push these images to a container registry and reference them in the environment definition's metadata file. This ensures that whenever a deployment is made, the deployment execution happens based on how the container image is configured. The following diagram shows the relationship between the custom images stored in a container registry, and the environment definition within the catalog.
@@ -48,11 +48,23 @@ For instructions, see: [Create a custom container image manually](https://aka.ms
48
48
49
49
### Terraform
50
50
51
+
**Create a custom image using a script**
52
+
53
+
To make the process of building a Terraform specific 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/terraform-custom-script).
56
+
57
+
**Create a custom image using a GitHub workflow**
58
+
59
+
To make the process of building a Terraform specific image and pushing it to a container registry easier, you can use a published workflow 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 GitHub workflow](https://aka.ms/ade/terraform-workflow).
62
+
51
63
**Create a Terraform specific container image manually**
52
64
53
-
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.
65
+
You can use a GitHub workflow to create a Terraform specific 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.
54
66
55
-
For instructions, see: [Create a container image using a GitHub workflow](https://aka.ms/ade/terraform-workflow-custom-manual).
67
+
For instructions, see: [Create a custom container image manually](https://aka.ms/ade/terraform-workflow-custom-manual).
@@ -69,17 +69,31 @@ For more information about how to create environment definitions that use the AD
69
69
### [Create a custom image by using a script](#tab/custom-script/)
70
70
### Create a custom container image by using a script
71
71
72
-
Creating a custom container image allows you to customize your deployments to fit your requirements. You can create custom images based on the ADE standard images.
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.
73
+
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.
73
75
74
-
After you complete the image customization, you can build the image and push it to your container registry by using a script provided by Microsoft to automate the process.
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.
77
83
78
-
### Build a container image with a script
84
+
You can call the script using the following command in PowerShell:
79
85
80
-
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.
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).
83
97
84
98
### [Create a custom image manually](#tab/custom-manual/)
85
99
### Create a custom container image manually
@@ -105,11 +119,59 @@ After you complete the image customization, you can build the image and push it
105
119
## Use container images with ADE
106
120
107
121
You can take one of the following approaches to use container images with ADE:
108
-
- **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.
109
-
- **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 custom 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
125
+
126
+
## Create a custom container image
127
+
128
+
### [Create an image using a script](#tab/terraform-script/)
129
+
130
+
## Create a custom container image by using a script
131
+
132
+
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.
133
+
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
+
140
+
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:
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).
153
+
154
+
### [Create an image using a GitHub workflow](#tab/github-workflow/)
155
+
156
+
## Create a custom container image 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.
110
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).
170
+
171
+
### [Create an image manually](#tab/terraform-manual/)
172
+
173
+
## Create a custom container image manually
111
174
112
-
## Create a container image using a GitHub workflow
113
175
Creating a custom container image allows you to customize your deployments to fit your requirements. You can create custom images based on the ADE standard images.
114
176
115
177
After you complete the image customization, you must build the image and push it to your container registry.
0 commit comments