Packet bare metal cloud driver for Docker Machine
Switch branches/tags
Nothing to show
Clone or download
mmlb Merge pull request #28 from benjamb/api-flavors
Query API for valid OS flavours
Latest commit 6aa7d85 Aug 7, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin add license May 14, 2018
.gitignore fix checksum target Nov 7, 2017
CHANGELOG.md add CHANGELOG.md Nov 7, 2017
Dockerfile bump container image Jul 21, 2017
LICENSE add license May 14, 2018
Makefile make: add a checktoken target Nov 7, 2017
README.md Fix README source code path Jul 5, 2017
driver.go Add support for OpenSUSE Aug 7, 2018

README.md

docker-machine-driver-packet

Packet bare-metal cloud driver for Docker Machine called

Driver name: packet

Usage

You can provision bare-metal hosts once you have built and installed the docker-machine driver. The binary will be placed in your $PATH directory.

Test that the installation worked by typing in:

$ docker-machine create --driver packet

Example usage:

This creates the following:

$ docker-machine create sloth \
  --driver packet --packet-api-key=$API_KEY --packet-os=ubuntu_16_04 --packet-project-id=$PROJECT --packet-facility-code "ewr1" --packet-plan "baremetal_0"
  
Creating CA: /home/alex/.docker/machine/certs/ca.pem
Creating client certificate: /home/alex/.docker/machine/certs/cert.pem
Running pre-create checks...
Creating machine...
(sloth) Creating SSH key...
(sloth) Provisioning Packet server...
(sloth) Created device ID $PROJECT, IP address 147.x.x.x
(sloth) Waiting for Provisioning...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env sloth

Provision time can take several minutes

At this point you can now docker-machine env sloth and then start using your Docker bare-metal host!

Building

Pre-reqs: docker-machine and make

  • Install the Golang SDK https://golang.org/dl/

  • Download the source-code with go get -u github.com/packethost/docker-machine-driver-packet

  • Build and install the driver:

$ cd $GOPATH/src/github.com/packethost/docker-machine-driver-packet
$ make 
$ sudo make install

Now you will now be able to specify a -driver of packet to docker-machine commands.