Skip to content

CenturyLinkCloud/docker-machine-driver-clc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Machine driver for CenturyLinkCloud

creates docker instances on CLC.

docker-machine create -d clc machine0

Installation

The easiest way to install the clc docker-machine driver is to:

go install github.com/CenturyLinkCloud/docker-machine-driver-clc

`which docker-machine-driver-clc`

binaries also available under releases tab

Example Usage

Sign up at https://www.ctl.io and export your credentials into your shell environment or pass as cmdline flags

export CLC_USERNAME='<username>'
export CLC_PASSWORD='<password>'
export CLC_ALIAS='<alias>'

token=$(docker run swarm create)
docker-machine create -d clc --clc-server-group "dockerswarm" --swarm --swarm-discovery --swarm-token token://$token master
docker $(docker-machine config --swarm master) info

To create a baremetal server:

export CLC_USERNAME='<username>'
export CLC_PASSWORD='<password>'
export CLC_ALIAS='<alias>'

docker-machine create -d clc --clc-server-group "test" --clc-server-type bareMetal --clc-server-location "GB3" --clc-bm-sku-id "529e2592a3e640a7c2617b5e8bc8feaed94eac22"  TEST

Options

docker-machine create -d clc --help
Option Name Description Default Value required
--clc-account-username or $CLC_USERNAME CLC account user none yes
--clc-account-password or $CLC_PASSWORD CLC account password none yes
--clc-account-alias or $CLC_ALIAS CLC account alias none yes
--clc-server-private or CLC_SERVER_PRIVATE allocates public ip (if disabled, VPN required) false no
--clc-server-group or $CLC_SERVER_GROUP server group (name or id) to spawn into Default Group no
--clc-server-location or CLC_SERVER_LOCATION datacenter WA1 no
--clc-server-cpu or CLC_SERVER_CPU cpu cores 2 no
--clc-server-mem or CLC_SERVER_MEM memory GB 2 no
--clc-server-template or CLC_SERVER_TEMPLATE OS image ubuntu-14-64-template no
--clc-ssh-user or CLC_SSH_USER ssh user (specific to OS image) root no
--clc-ssh-password or CLC_SSH_PASSWORD ssh password no
--clc-server-type or CLC_SERVER_TYPE Server type (standard,hyperscale, bareMetal) standard no
--clc-aa-policy or CLC_AA_POLICY Anti affinity policy name none no (unless server type = hyperscale)
--clc-bm-sku-id or CLC_BM_SKU_ID ID of the baremetal SKU none no (unless server type = bareMetal)
--clc-bm-os-type or CLC_BM_OS_TYPE Type of OS to install onto the baremetal server ubuntu14_64Bit no (unless server type = bareMetal)

Each environment variable may be overloaded by its option equivalent at runtime.

Kernels

The default ubuntu image runs kernel 3.13.xx but advanced swarm/networking features require a newer kernel.

Optionally, docker-machine ssh in and apt-get install -qy linux-image-generic-lts-wily && reboot

Hacking

Get the sources

go get github.com/CenturyLinkCloud/docker-machine-driver-clc
cd $GOPATH/src/github.com/CenturyLinkCloud/docker-machine-driver-clc

Test the driver

To test the driver make sure your current build directory has the highest priority in your $PATH so that docker-machine can find it.

export PATH=$GOPATH/src/github.com/CenturyLinkCloud/docker-machine-driver-clc:$PATH

Related links

License

Apache 2.0