From 916e285ffb4256b385ac04c2ee1a7b73ebdc73f6 Mon Sep 17 00:00:00 2001 From: Stephanie Locke Date: Wed, 22 Jun 2016 16:22:31 +0100 Subject: [PATCH 1/9] Padding out with more detail Making this more n00b (or Steph) friendly! Only got as far as systemd stuff since I'm encountering issues at that point and have raised a bug https://github.com/Azure/azure-docker-extension/issues/94 --- contrib/init/systemd/README.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/contrib/init/systemd/README.md b/contrib/init/systemd/README.md index f5ba08b..ca07bd1 100644 --- a/contrib/init/systemd/README.md +++ b/contrib/init/systemd/README.md @@ -3,14 +3,31 @@ > NOTE: These instructions are valid for Ubuntu versions using `systemd` init > system. -Run the following commands: +## TL;DR +1. Get the latest [release](https://github.com/Azure/azurefile-dockervolumedriver/releases) +2. Put the files into `/usr/bin/azurefile-dockervolumedriver` +3. Configure plugin with a `/etc/default/azurefile-dockervolumedriver` file +4. + +## In-depth walkthrough +To ssh onto machines created with the `docker-machine` commands, you'll probably need to ssh via `docker-machine ssh` to perform the following. 0. `sudo -s` -0. Download the binary from “Releases” tab of the repo to `/opt/bin/`: `wget -qO/usr/bin/azurefile-dockervolumedriver [url]` +0. Download the tar.gz from "Releases" tab of the repo: `wget [url]` + + Currently this would be `wget https://github.com/Azure/azurefile-dockervolumedriver/archive/0.2.1.tar.gz` +0. Extract and copy the extracted files to `/usr/bin/azurefile-dockervolumedriver`: + + Decompress the archive: `tar -xvf 0.2.1.tar.gz` + + Make destination directory: `mkdir /usr/bin/azurefile-dockervolumedriver` + + Copy the files across: `cp azurefile-dockervolumedriver-0.2.1/* /usr/bin/azurefile-dockervolumedriver -R` 0. Make it executable: `chmod +x /usr/bin/azurefile-dockervolumedriver` 0. Save the `.default` file to `/etc/default/azurefile-dockervolumedriver` + + Copy the file: `cp azurefile-dockervolumedriver-0.2.1/contrib/init/systemd/azurefile-dockervolumedriver.default /etc/default/azurefile-dockervolumedriver` 0. Edit `/etc/default/azurefile-dockervolumedriver` with your Azure Storage Account credentials. + + Edit in vi: `vi /etc/default/azurefile-dockervolumedriver` + + Use ESC, :, x, ENTER to save an exit 0. Save the `.service` file to `/etc/systemd/system/azurefile-dockervolumedriver.service` + + Make the requisite directories if they don't exist: `mkdir /etc/systemd && mkdir /etc/systemd/system` + + Copy the relevant file: `cp azurefile-dockervolumedriver-0.2.1/contrib/init/systemd/azurefile-dockervolumedriver.service /etc/systemd/system/` 0. Run `systemctl daemon-reload` 0. Run `systemctl enable azurefile-dockervolumedriver` 0. Run `systemctl start azurefile-dockervolumedriver` From 9bd0e2c6c7ec7c5c085c9678056e02ddbf9446ef Mon Sep 17 00:00:00 2001 From: Stephanie Locke Date: Thu, 23 Jun 2016 16:08:25 +0100 Subject: [PATCH 2/9] Correcting some mistakes --- contrib/init/systemd/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/init/systemd/README.md b/contrib/init/systemd/README.md index ca07bd1..5a0f4ee 100644 --- a/contrib/init/systemd/README.md +++ b/contrib/init/systemd/README.md @@ -13,13 +13,13 @@ To ssh onto machines created with the `docker-machine` commands, you'll probably need to ssh via `docker-machine ssh` to perform the following. 0. `sudo -s` -0. Download the tar.gz from "Releases" tab of the repo: `wget [url]` +0. Download the tar.gz from "Releases" tab of the repo + Currently this would be `wget https://github.com/Azure/azurefile-dockervolumedriver/archive/0.2.1.tar.gz` 0. Extract and copy the extracted files to `/usr/bin/azurefile-dockervolumedriver`: + Decompress the archive: `tar -xvf 0.2.1.tar.gz` - + Make destination directory: `mkdir /usr/bin/azurefile-dockervolumedriver` - + Copy the files across: `cp azurefile-dockervolumedriver-0.2.1/* /usr/bin/azurefile-dockervolumedriver -R` -0. Make it executable: `chmod +x /usr/bin/azurefile-dockervolumedriver` +0. Download the binary from the "Releases" tab of the repo to `/usr/bin/azurefile-dockervolumedriver` + + Use wget: `wget -qO/usr/bin/azurefile-dockervolumedriver https://github.com/Azure/azurefile-dockervolumedriver/releases/download/0.2.1/azurefile-dockervolumedriver` + + Make it executable `chmod +x /opt/bin/azurefile-dockervolumedriver` 0. Save the `.default` file to `/etc/default/azurefile-dockervolumedriver` + Copy the file: `cp azurefile-dockervolumedriver-0.2.1/contrib/init/systemd/azurefile-dockervolumedriver.default /etc/default/azurefile-dockervolumedriver` 0. Edit `/etc/default/azurefile-dockervolumedriver` with your Azure Storage Account credentials. From cfdfa4eec1f4086fb6803a809a187ceab23e998a Mon Sep 17 00:00:00 2001 From: Stephanie Locke Date: Thu, 23 Jun 2016 18:11:51 +0100 Subject: [PATCH 3/9] More revisions to tidy up --- contrib/init/systemd/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/contrib/init/systemd/README.md b/contrib/init/systemd/README.md index 5a0f4ee..fb27021 100644 --- a/contrib/init/systemd/README.md +++ b/contrib/init/systemd/README.md @@ -5,12 +5,12 @@ ## TL;DR 1. Get the latest [release](https://github.com/Azure/azurefile-dockervolumedriver/releases) -2. Put the files into `/usr/bin/azurefile-dockervolumedriver` -3. Configure plugin with a `/etc/default/azurefile-dockervolumedriver` file -4. +2. Put the binary into `/usr/bin/azurefile-dockervolumedriver` +3. Get the .default and .service files from the .tar.gz file and deploy them +4. Reload systemd ## In-depth walkthrough -To ssh onto machines created with the `docker-machine` commands, you'll probably need to ssh via `docker-machine ssh` to perform the following. +To ssh onto machines created with the `docker-machine` commands, you'll probably need to ssh via `docker-machine ssh [machinename]` to perform the following. 0. `sudo -s` 0. Download the tar.gz from "Releases" tab of the repo @@ -23,8 +23,8 @@ To ssh onto machines created with the `docker-machine` commands, you'll probably 0. Save the `.default` file to `/etc/default/azurefile-dockervolumedriver` + Copy the file: `cp azurefile-dockervolumedriver-0.2.1/contrib/init/systemd/azurefile-dockervolumedriver.default /etc/default/azurefile-dockervolumedriver` 0. Edit `/etc/default/azurefile-dockervolumedriver` with your Azure Storage Account credentials. - + Edit in vi: `vi /etc/default/azurefile-dockervolumedriver` - + Use ESC, :, x, ENTER to save an exit + + Edit in vi (or another editor): `vi /etc/default/azurefile-dockervolumedriver` + + Use ESC, :, x, ENTER to save an exit if you use vi 0. Save the `.service` file to `/etc/systemd/system/azurefile-dockervolumedriver.service` + Make the requisite directories if they don't exist: `mkdir /etc/systemd && mkdir /etc/systemd/system` + Copy the relevant file: `cp azurefile-dockervolumedriver-0.2.1/contrib/init/systemd/azurefile-dockervolumedriver.service /etc/systemd/system/` @@ -33,7 +33,7 @@ To ssh onto machines created with the `docker-machine` commands, you'll probably 0. Run `systemctl start azurefile-dockervolumedriver` 0. Check status via `systemctl status azurefile-dockervolumedriver` -Try by creating a volume and running a container with it: +To test, from your base machine i.e. not inside your docker-machine, try by creating a volume and running a container with it: docker volume create -d azurefile --name myvol -o share=myvol docker run -i -t -v myvol:/data busybox From e4dcae721eb962a4554c12c43bb1c98f27512f2b Mon Sep 17 00:00:00 2001 From: Stephanie Locke Date: Thu, 23 Jun 2016 19:30:08 +0100 Subject: [PATCH 4/9] Removed remnant wording re: binary --- contrib/init/systemd/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/init/systemd/README.md b/contrib/init/systemd/README.md index fb27021..4ff9698 100644 --- a/contrib/init/systemd/README.md +++ b/contrib/init/systemd/README.md @@ -13,9 +13,8 @@ To ssh onto machines created with the `docker-machine` commands, you'll probably need to ssh via `docker-machine ssh [machinename]` to perform the following. 0. `sudo -s` -0. Download the tar.gz from "Releases" tab of the repo +0. Download the tar.gz from "Releases" tab of the repo for copies of config files + Currently this would be `wget https://github.com/Azure/azurefile-dockervolumedriver/archive/0.2.1.tar.gz` -0. Extract and copy the extracted files to `/usr/bin/azurefile-dockervolumedriver`: + Decompress the archive: `tar -xvf 0.2.1.tar.gz` 0. Download the binary from the "Releases" tab of the repo to `/usr/bin/azurefile-dockervolumedriver` + Use wget: `wget -qO/usr/bin/azurefile-dockervolumedriver https://github.com/Azure/azurefile-dockervolumedriver/releases/download/0.2.1/azurefile-dockervolumedriver` From 7810179037e3af3939cccdd37c733cfc0349f947 Mon Sep 17 00:00:00 2001 From: Stephanie Locke Date: Thu, 23 Jun 2016 19:32:37 +0100 Subject: [PATCH 5/9] Agreed deletions Per discussions --- contrib/init/systemd/README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/contrib/init/systemd/README.md b/contrib/init/systemd/README.md index 4ff9698..2a24a47 100644 --- a/contrib/init/systemd/README.md +++ b/contrib/init/systemd/README.md @@ -10,7 +10,6 @@ 4. Reload systemd ## In-depth walkthrough -To ssh onto machines created with the `docker-machine` commands, you'll probably need to ssh via `docker-machine ssh [machinename]` to perform the following. 0. `sudo -s` 0. Download the tar.gz from "Releases" tab of the repo for copies of config files @@ -22,8 +21,6 @@ To ssh onto machines created with the `docker-machine` commands, you'll probably 0. Save the `.default` file to `/etc/default/azurefile-dockervolumedriver` + Copy the file: `cp azurefile-dockervolumedriver-0.2.1/contrib/init/systemd/azurefile-dockervolumedriver.default /etc/default/azurefile-dockervolumedriver` 0. Edit `/etc/default/azurefile-dockervolumedriver` with your Azure Storage Account credentials. - + Edit in vi (or another editor): `vi /etc/default/azurefile-dockervolumedriver` - + Use ESC, :, x, ENTER to save an exit if you use vi 0. Save the `.service` file to `/etc/systemd/system/azurefile-dockervolumedriver.service` + Make the requisite directories if they don't exist: `mkdir /etc/systemd && mkdir /etc/systemd/system` + Copy the relevant file: `cp azurefile-dockervolumedriver-0.2.1/contrib/init/systemd/azurefile-dockervolumedriver.service /etc/systemd/system/` @@ -32,7 +29,7 @@ To ssh onto machines created with the `docker-machine` commands, you'll probably 0. Run `systemctl start azurefile-dockervolumedriver` 0. Check status via `systemctl status azurefile-dockervolumedriver` -To test, from your base machine i.e. not inside your docker-machine, try by creating a volume and running a container with it: +To test, try to create a volume and running a container with it: docker volume create -d azurefile --name myvol -o share=myvol docker run -i -t -v myvol:/data busybox From 129e7c50a0517576ff76528b0687f89ddeb55261 Mon Sep 17 00:00:00 2001 From: Stephanie Locke Date: Thu, 23 Jun 2016 19:37:48 +0100 Subject: [PATCH 6/9] Removed references to release directories - Directed people to wget direct from github for the default and services files - Removed references to current release number --- contrib/init/systemd/README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/contrib/init/systemd/README.md b/contrib/init/systemd/README.md index 2a24a47..5caddde 100644 --- a/contrib/init/systemd/README.md +++ b/contrib/init/systemd/README.md @@ -6,24 +6,22 @@ ## TL;DR 1. Get the latest [release](https://github.com/Azure/azurefile-dockervolumedriver/releases) 2. Put the binary into `/usr/bin/azurefile-dockervolumedriver` -3. Get the .default and .service files from the .tar.gz file and deploy them +3. Get the .default and .service files and deploy them 4. Reload systemd ## In-depth walkthrough 0. `sudo -s` -0. Download the tar.gz from "Releases" tab of the repo for copies of config files - + Currently this would be `wget https://github.com/Azure/azurefile-dockervolumedriver/archive/0.2.1.tar.gz` - + Decompress the archive: `tar -xvf 0.2.1.tar.gz` +0. Use wget to get the `azurefile-dockervolumedriver.default` and `azurefile-dockervolumedriver.service` files from GitHub. These are in the `../contrib/init/systemd` directory. 0. Download the binary from the "Releases" tab of the repo to `/usr/bin/azurefile-dockervolumedriver` - + Use wget: `wget -qO/usr/bin/azurefile-dockervolumedriver https://github.com/Azure/azurefile-dockervolumedriver/releases/download/0.2.1/azurefile-dockervolumedriver` + + Use wget to download to dir: `wget -qO/usr/bin/azurefile-dockervolumedriver https://github.com/Azure/azurefile-dockervolumedriver/releases/download/[CURRENT RELEASE NUMBER]/azurefile-dockervolumedriver` + Make it executable `chmod +x /opt/bin/azurefile-dockervolumedriver` 0. Save the `.default` file to `/etc/default/azurefile-dockervolumedriver` - + Copy the file: `cp azurefile-dockervolumedriver-0.2.1/contrib/init/systemd/azurefile-dockervolumedriver.default /etc/default/azurefile-dockervolumedriver` + + Copy the file: `cp azurefile-dockervolumedriver.default /etc/default/azurefile-dockervolumedriver` 0. Edit `/etc/default/azurefile-dockervolumedriver` with your Azure Storage Account credentials. 0. Save the `.service` file to `/etc/systemd/system/azurefile-dockervolumedriver.service` + Make the requisite directories if they don't exist: `mkdir /etc/systemd && mkdir /etc/systemd/system` - + Copy the relevant file: `cp azurefile-dockervolumedriver-0.2.1/contrib/init/systemd/azurefile-dockervolumedriver.service /etc/systemd/system/` + + Copy the relevant file: `cp azurefile-dockervolumedriver.service /etc/systemd/system/` 0. Run `systemctl daemon-reload` 0. Run `systemctl enable azurefile-dockervolumedriver` 0. Run `systemctl start azurefile-dockervolumedriver` From 1a612719fff5038b92f2a57f01c64c12808d3a0b Mon Sep 17 00:00:00 2001 From: Stephanie Locke Date: Thu, 23 Jun 2016 19:39:21 +0100 Subject: [PATCH 7/9] Making ubuntu version specific Default image for azure docker-machine extension is 15.04 so this line is needed for that set up method but isn't needed for other ubuntu versions --- contrib/init/systemd/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/init/systemd/README.md b/contrib/init/systemd/README.md index 5caddde..28c4a81 100644 --- a/contrib/init/systemd/README.md +++ b/contrib/init/systemd/README.md @@ -20,7 +20,7 @@ + Copy the file: `cp azurefile-dockervolumedriver.default /etc/default/azurefile-dockervolumedriver` 0. Edit `/etc/default/azurefile-dockervolumedriver` with your Azure Storage Account credentials. 0. Save the `.service` file to `/etc/systemd/system/azurefile-dockervolumedriver.service` - + Make the requisite directories if they don't exist: `mkdir /etc/systemd && mkdir /etc/systemd/system` + + [Ubuntu 15.x only] Make the requisite directories if they don't exist: `mkdir /etc/systemd && mkdir /etc/systemd/system` + Copy the relevant file: `cp azurefile-dockervolumedriver.service /etc/systemd/system/` 0. Run `systemctl daemon-reload` 0. Run `systemctl enable azurefile-dockervolumedriver` From 39d1d306328d06169fadc9e5311d18029d03f3a3 Mon Sep 17 00:00:00 2001 From: Stephanie Locke Date: Thu, 23 Jun 2016 19:40:32 +0100 Subject: [PATCH 8/9] Improved wording --- contrib/init/systemd/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/init/systemd/README.md b/contrib/init/systemd/README.md index 28c4a81..ffd1bc0 100644 --- a/contrib/init/systemd/README.md +++ b/contrib/init/systemd/README.md @@ -14,7 +14,7 @@ 0. `sudo -s` 0. Use wget to get the `azurefile-dockervolumedriver.default` and `azurefile-dockervolumedriver.service` files from GitHub. These are in the `../contrib/init/systemd` directory. 0. Download the binary from the "Releases" tab of the repo to `/usr/bin/azurefile-dockervolumedriver` - + Use wget to download to dir: `wget -qO/usr/bin/azurefile-dockervolumedriver https://github.com/Azure/azurefile-dockervolumedriver/releases/download/[CURRENT RELEASE NUMBER]/azurefile-dockervolumedriver` + + Use wget to download to dir: `wget -qO/usr/bin/azurefile-dockervolumedriver https://github.com/Azure/azurefile-dockervolumedriver/releases/download/[VERSION]/azurefile-dockervolumedriver` + Make it executable `chmod +x /opt/bin/azurefile-dockervolumedriver` 0. Save the `.default` file to `/etc/default/azurefile-dockervolumedriver` + Copy the file: `cp azurefile-dockervolumedriver.default /etc/default/azurefile-dockervolumedriver` From bf1ba714a85e1390d1bf461d60f40005d4055da6 Mon Sep 17 00:00:00 2001 From: Stephanie Locke Date: Thu, 23 Jun 2016 19:49:46 +0100 Subject: [PATCH 9/9] Shorter mkdir cmd --- contrib/init/systemd/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/init/systemd/README.md b/contrib/init/systemd/README.md index ffd1bc0..0c242e9 100644 --- a/contrib/init/systemd/README.md +++ b/contrib/init/systemd/README.md @@ -20,7 +20,7 @@ + Copy the file: `cp azurefile-dockervolumedriver.default /etc/default/azurefile-dockervolumedriver` 0. Edit `/etc/default/azurefile-dockervolumedriver` with your Azure Storage Account credentials. 0. Save the `.service` file to `/etc/systemd/system/azurefile-dockervolumedriver.service` - + [Ubuntu 15.x only] Make the requisite directories if they don't exist: `mkdir /etc/systemd && mkdir /etc/systemd/system` + + [Ubuntu 15.x only] Make the requisite directories if they don't exist: `mkdir -p /etc/systemd/system` + Copy the relevant file: `cp azurefile-dockervolumedriver.service /etc/systemd/system/` 0. Run `systemctl daemon-reload` 0. Run `systemctl enable azurefile-dockervolumedriver`