Skip to content
This repository has been archived by the owner on Jan 17, 2018. It is now read-only.

Improved documentation for Ubuntu15+ installations #39

Merged
merged 9 commits into from
Jun 23, 2016
Merged
19 changes: 15 additions & 4 deletions contrib/init/systemd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +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 binary into `/usr/bin/azurefile-dockervolumedriver`
3. Get the .default and .service files and deploy them
4. Reload systemd

## In-depth walkthrough

0. `sudo -s`
0. Download the binary from “Releases” tab of the repo to `/opt/bin/`: `wget -qO/usr/bin/azurefile-dockervolumedriver [url]`
0. Make it executable: `chmod +x /usr/bin/azurefile-dockervolumedriver`
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`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[CURRENT RELEASE NUMBER] --> [VERSION]

+ 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`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, they don't have it on their disk at this point. so maybe we should point them to the file with something like:

- download [azurefile-dockervolumedriver.default](../path/to/azurefile-dockervolumedriver.default) file first

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 link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will be there on ubuntu 16.x (this doc is designed for that version at least)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default image used by docker-machine for azure is 15.04 o_O It's also the one MSFT sign off the ODBC 13 driver against. I think that's a nuts decision, but I'm not gonna argue with them all who made those decisions! It was just another hiccup needing to be taken into account through the "common" path if one used Docker docs to get started, as opposed to the Docker image in Azure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stephlocke default image of docker-machine is 15.04 everywhere. you can override it with --azure-image argument. I agree that it's not a wise choice in docker-machine side. I just opened an issue here: docker/machine#3536

ODBC driver has nothing to do this project unfortunately.

I suggest you just create a VM with 16.04 and find your way from there.

Copy link
Contributor

@ahmetb ahmetb Jun 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these can be briefly done as 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`
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, 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
Expand Down