From 3753d4cdc7c08ad51b87f58fc3d57732adaf95ec Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Mon, 31 Aug 2020 12:05:19 +0200 Subject: [PATCH 1/2] First doc on ACI volume support Signed-off-by: Guillaume Tardif --- engine/context/aci-integration.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/engine/context/aci-integration.md b/engine/context/aci-integration.md index 1af60da4f9..1008f2b247 100644 --- a/engine/context/aci-integration.md +++ b/engine/context/aci-integration.md @@ -137,6 +137,34 @@ You can also deploy and manage multi-container applications defined in Compose f > > The current Docker Azure integration does not allow fetching a combined log stream from all the containers that make up the Compose application. +## Using Azure file share as volumes in ACI containers + +You can deploy containers or compose applications that use persistent data stored in volumes. Azure File Share can be used to support volumes for ACI containers. + +With an existing Azure File Share, with storage account name `mystorageaccount` and file share name `myfileshare`, you can specify a volume in your deployment `run` command like this: + +`docker run -v storageaccount@fileshare:/target/path myimage` and the runtime container will see the file share content in `/target/path`. + +In a compose application, the volume specification must use the following syntax in the compose file: + +``` +myservice: + image: nginx + volumes: + - mydata:/mount/testvolumes + +volumes: + mydata: + driver: azure_file + driver_opts: + share_name: myfileshare + storage_account_name: mystorageaccount +``` + +For Now, you need to create an Azure storage account and File Share using the Azure portal, or the `az` [command line](https://docs.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-cli) + +The key to the azure storage account will be automatically fetched from your Azure login, when you deploy a single container or a compose application. + ## Using ACI resource groups as namespaces You can create several Docker contexts associated with ACI. Each context must be associated with a unique Azure resource group. This allows you to use Docker contexts as namespaces. You can switch between namespaces using `docker context use `. From ec916a6b1cc223d879c71f1fcc2f6c3d49d4dff9 Mon Sep 17 00:00:00 2001 From: Usha Mandya <47779042+usha-mandya@users.noreply.github.com> Date: Thu, 3 Sep 2020 09:22:45 +0100 Subject: [PATCH 2/2] Minor style updates --- engine/context/aci-integration.md | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/engine/context/aci-integration.md b/engine/context/aci-integration.md index 1008f2b247..7107cc19e9 100644 --- a/engine/context/aci-integration.md +++ b/engine/context/aci-integration.md @@ -139,15 +139,21 @@ You can also deploy and manage multi-container applications defined in Compose f ## Using Azure file share as volumes in ACI containers -You can deploy containers or compose applications that use persistent data stored in volumes. Azure File Share can be used to support volumes for ACI containers. +You can deploy containers or Compose applications that use persistent data +stored in volumes. Azure File Share can be used to support volumes for ACI +containers. -With an existing Azure File Share, with storage account name `mystorageaccount` and file share name `myfileshare`, you can specify a volume in your deployment `run` command like this: +With an existing Azure File Share, with storage account name `mystorageaccount` +and file share name `myfileshare`, you can specify a volume in your deployment `run` +command as follows: -`docker run -v storageaccount@fileshare:/target/path myimage` and the runtime container will see the file share content in `/target/path`. +`docker run -v storageaccount@fileshare:/target/path myimage` and the runtime +container will see the file share content in `/target/path`. -In a compose application, the volume specification must use the following syntax in the compose file: +In a Compose application, the volume specification must use the following syntax +in the Compose file: -``` +```yaml myservice: image: nginx volumes: @@ -161,9 +167,11 @@ volumes: storage_account_name: mystorageaccount ``` -For Now, you need to create an Azure storage account and File Share using the Azure portal, or the `az` [command line](https://docs.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-cli) +Now, you need to create an Azure storage account and File Share using the Azure +portal, or the `az` [command line](https://docs.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-cli). -The key to the azure storage account will be automatically fetched from your Azure login, when you deploy a single container or a compose application. +When you deploy a single container or a Compose application, your +Azure login will automatically fetch the key to the Azure storage account. ## Using ACI resource groups as namespaces