|
| 1 | +--- |
| 2 | +title: "Artifact streaming in Azure Container Registry (Preview)" |
| 3 | +description: "Artifact streaming is a feature in Azure Container Registry to enhance and supercharge managing, scaling, and deploying artifacts through containerized platforms." |
| 4 | +author: tejaswikolli-web |
| 5 | +ms.author: tejaswikolli |
| 6 | +ms.service: container-registry |
| 7 | +ms.topic: conceptual #Don't change |
| 8 | +ms.date: 12/14/2023 |
| 9 | + |
| 10 | +#customer intent: As a developer, I want artifact streaming capabilities so that I can efficiently deliver and serve containerized applications to end-users in real-time. |
| 11 | +--- |
| 12 | + |
| 13 | +# Artifact streaming in Azure Container Registry (Preview) |
| 14 | + |
| 15 | +Artifact streaming is a feature in Azure Container Registry that allows you to store container images within a single registry, manage, and stream the container images to Azure Kubernetes Service (AKS) clusters in multiple regions. This feature is designed to accelerate containerized workloads for Azure customers using AKS. With artifact streaming, you can easily scale workloads without having to wait for slow pull times for your node. |
| 16 | + |
| 17 | +## Use cases |
| 18 | + |
| 19 | +Here are few scenarios to use artifact streaming: |
| 20 | + |
| 21 | +**Deploying containerized applications to multiple regions**: With artifact streaming, you can store container images within a single registry and manage and stream container images to AKS clusters in multiple regions. artifact streaming deploys container applications to multiple regions without consuming time and resources. |
| 22 | + |
| 23 | +**Reducing image pull latency**: Artifact streaming can reduce time to pod readiness by over 15%, depending on the size of the image, and it works best for images < 30GB. This feature reduces image pull latency and fast container startup, which is beneficial for software developers and system architects. |
| 24 | + |
| 25 | +**Effective scaling of containerized applications**: Artifact streaming provides the opportunity to design, build, and deploy containerized applications at a high scale. |
| 26 | + |
| 27 | +## Artifact streaming aspects |
| 28 | + |
| 29 | +Here are some brief aspects of artifact streaming: |
| 30 | + |
| 31 | +* Customers with new and existing registries can start artifact streaming for specific repositories or tags. |
| 32 | + |
| 33 | +* Once artifact streaming is started, the original and the streaming artifact will be stored in the customer’s ACR. |
| 34 | + |
| 35 | +* If the user decides to turn off artifact streaming for repositories or artifacts, the streaming and the original artifact will still be present. |
| 36 | + |
| 37 | +* If a customer deletes a repository or artifact with artifact streaming and Soft Delete enabled, then both the original and artifact streaming versions will be deleted. However, only the original version will be available on the soft delete blade. |
| 38 | + |
| 39 | +## Availability and pricing information |
| 40 | + |
| 41 | +Artifact streaming is only available in the **Premium** SKU [service tiers](container-registry-skus.md). Please note that artifact streaming may increase the overall registry storage consumption and customers may be subjected to additional storage charges as outlined in our [pricing](https://azure.microsoft.com/pricing/details/container-registry/) if the consumption exceeds the included 500 GiB Premium SKU threshold. |
| 42 | + |
| 43 | +## Preview limitations |
| 44 | + |
| 45 | +Artifact streaming is currently in preview. The following limitations apply: |
| 46 | + |
| 47 | +* Only images with Linux AMD64 architecture are supported in the preview release. |
| 48 | +* The preview release doesn't support Windows-based container images, and ARM64 images. |
| 49 | +* The preview release partially support multi-architecture images, only the AMD64 architecture is supported. |
| 50 | +* For creating Ubuntu based node pool in AKS, choose Ubuntu version 20.04 or higher. |
| 51 | +* For Kubernetes, use Kubernetes version 1.26 or higher or Kubernetes version > 1.25. |
| 52 | +* Only premium SKU registries support generating streaming artifacts in the preview release. The non-premium SKU registries do not offer this functionality during the preview. |
| 53 | +* The CMK (Customer-Managed Keys) registries are NOT supported in the preview release. |
| 54 | +* Kubernetes regcred is currently NOT supported. |
| 55 | + |
| 56 | +## Prerequisites |
| 57 | + |
| 58 | +* You can use the [Azure Cloud Shell][Azure Cloud Shell] or a local installation of the Azure CLI to run the command examples in this article. If you'd like to use it locally, version 2.54.0 or later is required. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][Install Azure CLI]. |
| 59 | + |
| 60 | +* Sign in to the [Azure portal](https://ms.portal.azure.com/). |
| 61 | + |
| 62 | +## Start artifact streaming |
| 63 | + |
| 64 | +Start artifact streaming with a series with Azure CLI commands and Azure portal for pushing, importing, and generating streaming artifacts for container images in an Azure Container Registry (ACR). These instructions outline the process for creating a *Premium* [SKU](container-registry-skus.md) ACR, importing an image, generating a streaming artifact, and managing the artifact streaming operation. Make sure to replace the placeholders with your actual values where necessary. |
| 65 | + |
| 66 | +### Push/Import the image and generate the streaming artifact - Azure CLI |
| 67 | + |
| 68 | +Artifact streaming is available in the **Premium** container registry service tier. To start Artifact streaming, update a registry using the Azure CLI (version 2.54.0 or above). To install or upgrade, see [Install Azure CLI](/cli/azure/install-azure-cli). |
| 69 | + |
| 70 | +Start artifact streaming, by following these general steps: |
| 71 | + |
| 72 | +>[!NOTE] |
| 73 | +> If you already have a premium container registry, you can skip this step. If the user is on Basic of Standard SKUs, the following commands will fail. |
| 74 | +> The code is written in Azure CLI and can be executed in an interactive mode. |
| 75 | +> Please note that the placeholders should be replaced with actual values before executing the command. |
| 76 | +
|
| 77 | +1. Create a new Azure Container Registry (ACR) using the premium SKU through: |
| 78 | + |
| 79 | + For example, run the [az group create][az-group-create] command to create an Azure Resource Group with name `my-streaming-test` in the West US region and then run the [az acr create][az-acr-create] command to create a premium Azure Container Registry with name `mystreamingtest` in that resource group. |
| 80 | + |
| 81 | + ```azurecli-interactive |
| 82 | + az group create -n my-streaming-test -l westus |
| 83 | + az acr create -n mystreamingtest -g my-streaming-test -l westus --sku premium |
| 84 | + ``` |
| 85 | +
|
| 86 | +2. Push or import an image to the registry through: |
| 87 | +
|
| 88 | + For example, run the [az configure] command to configure the default ACR and [az acr import][az-acr-import] command to import a Jupyter Notebook image from Docker Hub into the `mystreamingtest` ACR. |
| 89 | +
|
| 90 | + ```azurecli-interactive |
| 91 | + az configure --defaults acr="mystreamingtest" |
| 92 | + az acr import -source docker.io/jupyter/all-spark-notebook:latest -t jupyter/all-spark-notebook:latest |
| 93 | + ``` |
| 94 | +
|
| 95 | +3. Create an artifact streaming from the Image |
| 96 | + |
| 97 | + Initiates the creation of a streaming artifact from the specified image. |
| 98 | + |
| 99 | + For example, run the [az acr artifact-streaming create][az-acr-artifact-streaming-create] commands to create a streaming artifact from the `jupyter/all-spark-notebook:latest` image in the `mystreamingtest` ACR. |
| 100 | +
|
| 101 | + ```azurecli-interactive |
| 102 | + az acr artifact-streaming create --image jupyter/all-spark-notebook:latest |
| 103 | + ``` |
| 104 | +
|
| 105 | +>[!NOTE] |
| 106 | +> An operation ID is generated during the process for future reference to verify the status of the operation. |
| 107 | +
|
| 108 | +4. Verify the generated artifact streaming in the Azure CLI. |
| 109 | +
|
| 110 | + For example, run the [az acr manifest list-referrers][az-acr-manifest-list-referrers] command to list the streaming artifacts for the `jupyter/all-spark-notebook:latest` image in the `mystreamingtest` ACR. |
| 111 | + |
| 112 | + ```azurecli-interactive |
| 113 | + az acr manifest list-referrers -n jupyter/all-spark-notebook:latest |
| 114 | + ``` |
| 115 | +
|
| 116 | +5. Cancel the artifact streaming creation (if needed) |
| 117 | +
|
| 118 | + Cancel the streaming artifact creation if the conversion is not finished yet. It will stop the operation. |
| 119 | + |
| 120 | + For example, run the [az acr artifact-streaming operation cancel][az-acr-artifact-streaming-operation-cancel] command to cancel the conversion operation for the `jupyter/all-spark-notebook:latest` image in the `mystreamingtest` ACR. |
| 121 | +
|
| 122 | + ```azurecli-interactive |
| 123 | + az acr artifact-streaming operation cancel --repository jupyter/all-spark-notebook --id c015067a-7463-4a5a-9168-3b17dbe42ca3 |
| 124 | + ``` |
| 125 | +
|
| 126 | +6. Start auto-conversion on the repository |
| 127 | +
|
| 128 | + Start auto-conversion in the repository for newly pushed or imported images. When started, new images pushed into that repository will trigger the generation of streaming artifacts. |
| 129 | +
|
| 130 | + >[!NOTE] |
| 131 | + > Auto-conversion does not apply to existing images. Existing images can be manually converted. |
| 132 | + |
| 133 | + For example, run the [az acr artifact-streaming update][az-acr-artifact-streaming-update] command to start auto-conversion for the `jupyter/all-spark-notebook` repository in the `mystreamingtest` ACR. |
| 134 | +
|
| 135 | + ```azurecli-interactive |
| 136 | + az acr artifact-streaming update --repository jupyter/all-spark-notebook --enable-streaming true |
| 137 | + ``` |
| 138 | +
|
| 139 | +7. Verify the streaming conversion progress, after pushing a new image `jupyter/all-spark-notebook:newtag` to the above repository. |
| 140 | +
|
| 141 | + For example, run the [az acr artifact-streaming operation show][az-acr-artifact-streaming-operation-show] command to check the status of the conversion operation for the `jupyter/all-spark-notebook:newtag` image in the `mystreamingtest` ACR. |
| 142 | +
|
| 143 | + ```azurecli-interactive |
| 144 | + az acr artifact-streaming operation show --image jupyter/all-spark-notebook:newtag |
| 145 | + ``` |
| 146 | +
|
| 147 | +>[!NOTE] |
| 148 | +> Artifact streaming can work across regions, regardless of whether geo-replication is started or not. |
| 149 | +> Artifact streaming can work through a private endpoint and attach to it. |
| 150 | +
|
| 151 | +### Push/Import the image and generate the streaming artifact - Azure portal |
| 152 | +
|
| 153 | +Artifact streaming is available in the *premium* [SKU](container-registry-skus.md) Azure Container Registry. To start artifact streaming, update a registry using the Azure portal. |
| 154 | +
|
| 155 | +Follow the steps to create artifact streaming in the [Azure portal](https://portal.azure.com). |
| 156 | +
|
| 157 | +1. Navigate to your Azure Container Registry. |
| 158 | +
|
| 159 | +2. In the side **Menu**, under the **Services**, select **Repositories**. |
| 160 | +
|
| 161 | +3. Select the latest imported image. |
| 162 | +
|
| 163 | +4. Convert the image and create artifact streaming in Azure portal. |
| 164 | +
|
| 165 | + > [!div class="mx-imgBorder"] |
| 166 | + > [](./media/container-registry-artifact-streaming/01-create-artifact-streaming-expanded.png#lightbox) |
| 167 | +
|
| 168 | +
|
| 169 | +5. Check the streaming artifact generated from the image in Referrers tab. |
| 170 | + |
| 171 | + > [!div class="mx-imgBorder"] |
| 172 | + > [](./media/container-registry-artifact-streaming/02-artifact-streaming-generated-expanded.png#lightbox) |
| 173 | +
|
| 174 | +6. You can also delete the artifact streaming from the repository blade. |
| 175 | +
|
| 176 | + > [!div class="mx-imgBorder"] |
| 177 | + > [](./media/container-registry-artifact-streaming/04-delete-artifact-streaming-expanded.png#lightbox) |
| 178 | +
|
| 179 | +7. You can also enable auto-conversion on the repository blade. Active means auto-conversion is enabled on the repository. Inactive means auto-conversion is disabled on the repository. |
| 180 | + |
| 181 | + > [!div class="mx-imgBorder"] |
| 182 | + > [](./media/container-registry-artifact-streaming/03-start-artifact-streaming-expanded.png#lightbox) |
| 183 | +
|
| 184 | +> [!NOTE] |
| 185 | +> The state of artifact streaming in a repository (inactive or active) determines whether newly pushed compatible images will be automatically converted. By default, all repositories are in an inactive state for artifact streaming. This means that when new compatible images are pushed to the repository, artifact streaming will not be triggered, and the images will not be automatically converted. If you want to start automatic conversion of newly pushed images, you need to set the repository's artifact streaming to the active state. Once the repository is in the active state, any new compatible container images that are pushed to the repository will trigger artifact streaming. This will start the automatic conversion of those images. |
| 186 | +
|
| 187 | +## Next steps |
| 188 | +
|
| 189 | +> [!div class="nextstepaction"] |
| 190 | +> [Troubleshoot artifact streaming](troubleshoot-artifact-streaming.md) |
| 191 | +
|
| 192 | +<!-- LINKS - External --> |
| 193 | +[Install Azure CLI]: /cli/azure/install-azure-cli |
| 194 | +[Azure Cloud Shell]: /azure/cloud-shell/quickstart |
| 195 | +[az-group-create]: /cli/azure/group#az-group-create |
| 196 | +[az-acr-import]: /cli/azure/acr#az-acr-import |
| 197 | +[az-acr-artifact-streaming-create]: /cli/azure/acr/artifact-streaming#az-acr-artifact-streaming-create |
| 198 | +[az-acr-manifest-list-referrers]: /cli/azure/acr/manifest#az-acr-manifest-list-referrers |
| 199 | +[az-acr-create]: /cli/azure/acr#az-acr-create |
| 200 | +[az-acr-artifact-streaming-operation-cancel]: /cli/azure/acr/artifact-streaming/operation#az-acr-artifact-streaming-operation-cancel |
| 201 | +[az-acr-artifact-streaming-operation-show]: /cli/azure/acr/artifact-streaming/operation#az-acr-artifact-streaming-operation-show |
| 202 | +[az-acr-artifact-streaming-update]: /cli/azure/acr/artifact-streaming#az-acr-artifact-streaming-update |
| 203 | +
|
0 commit comments