A docker-machine
driver for UpCloud
Updated and maintained by Montel Intergalactic
Originally developed by Hanzo Studio
Download the latest
binary from the
releases page,
place it somewhere in your path, like /usr/local/bin/
and make sure the binary is executable.
You must first have a working go development environment to get it this way.
- Download the code
$ git clone git@github.com:montel-ig/docker-machine-driver-upcloud
- Make sure the dependencies are installed and everything is in order
$ dep ensure
- Compile the code
$ make build
This will compile the file at ./bin/docker-machine-driver-upcloud
and create a symlink at /usr/local/bin/
so the driver can be used. You can change that path to any directory which is available via $PATH
on the Makefile
.
An UpCloud account with api access is needed to use this driver
Options:
$ docker-machine create --driver upcloud
Flag | Parameters | Description |
---|---|---|
--upcloud-user | "username" | upcloud api access user [$UPCLOUD_USER] |
--upcloud-passwd | "password | upcloud api access password [$UPCLOUD_PASSWD] |
--upcloud-plan | "1xCPU-1GB" | upcloud plan [$UPCLOUD_PLAN] |
--upcloud-core-number | 1 | specify the number of cores [$UPCLOUD_CORE_NUMBER] |
--upcloud-memory-amount | 4 | specify the amount (GB) of RAM to be assigned [$UPCLOUD_MEMORY_AMOUNT] |
--upcloud-storage | 25 | the storage available for the server [$UPCLOUD_STORAGE] |
--upcloud-ssh-user | "root" | username [$UPCLOUD_SSH_USER] |
--upcloud-template | "01000000-0000-4000-8000-000030080200" | template [$UPCLOUD_TEMPLATE] |
--upcloud-use-private-network | to use private networking [$UPCLOUD_USE_PRIVATE_NETWORK] | |
--upcloud-use-private-network-only | this flag to only use private networking [$UPCLOUD_USE_PRIVATE_NETWORK_ONLY] | |
--upcloud-userdata | "~/meerkat/cloud-init.sh" | path to file with cloud-init user-data [$UPCLOUD_USERDATA] |
--upcloud-zone | "de-fra1" | zone [$UPCLOUD_ZONE] |
Example run:
$ docker-machine create \
--driver upcloud \
--upcloud-user "user" \
--upcloud-passwd "password"
machine_name
The repository includes a Makefile
with the commands required to develop the project.
To test the driver locally, run
$ make install
This will compile the driver and copy it to your $GOPATH/bin
directory, so it's accessible to Docker via $PATH
.
After this, you can run it normally with docker-machine
$ docker-machine create --driver upcloud #...
If you want to remove the installed driver, run
$ make uninstall
This will remove the compiled driver from $GOPATH/bin
.
A command for building different versions is also included to simplify the distribution of the driver to different platforms.
To build the driver for release, run
$ make build-all
This will compile the driver for MacOS, Linux, and Windows, for the 368
and amd64
architectures. If you need to compile to a different target, you can modify the TARGET_OS
or TARGET_ARCH
variables on the Makefile
.
To make the distribution easier, the build will also create a directory with the compressed driver for each platform. You can find those under dist/compressed
.
Issues, contributions, and comments are always welcome. Feel free to submit an issue or pull request with your contributions.
Made with ❤️ from 🇫🇮