From 2386b54ecd28ab9db19e73b49b99586e63ebe51e Mon Sep 17 00:00:00 2001 From: Robert Breker Date: Tue, 22 Dec 2015 14:53:57 +0000 Subject: [PATCH] Modify repository structure to allow use of go install Signed-off-by: Robert Breker --- README.md | 21 ++++++++++++------- bin/Makefile | 4 ---- ...n.go => docker-machine-driver-xenserver.go | 2 +- xenapiclient.go => xenserver/xenapiclient.go | 0 xenserver.go => xenserver/xenserver.go | 0 5 files changed, 15 insertions(+), 12 deletions(-) delete mode 100644 bin/Makefile rename bin/main.go => docker-machine-driver-xenserver.go (68%) rename xenapiclient.go => xenserver/xenapiclient.go (100%) rename xenserver.go => xenserver/xenserver.go (100%) diff --git a/README.md b/README.md index 74469eb..c5fede4 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,24 @@ [![Build Status](https://travis-ci.org/xenserver/docker-machine-driver-xenserver.svg?branch=master)](https://travis-ci.org/xenserver/docker-machine-driver-xenserver) # docker-machine-driver-xenserver -This is the XenServer driver plugin for Docker Machine. It allows the orchestration of machines on Citrix XenServer. +This is the XenServer driver plugin for Docker Machine. It allows the +orchestration of machines on Citrix XenServer. -# Installation -Following the installation of Docker Machine, you can install the docker-machine-xenserver-driver: +# Installation from source +Following the installation of Golang and Docker Machine, you can install the +docker-machine-xenserver-driver: ```bash -got get github.com/xenserver/docker-machine-driver-xenserver -cd $GOPATH/src/github.com/xenserver/docker-machine-driver-xenserver/bin -make -mv docker-machine-driver-xenserver $GOPATH/bin/ +go install github.com/xenserver/docker-machine-driver-xenserver ``` +# Usage +The usual Docker Machine commands apply: +```bash +docker-machine create -d xenserver --xenserver-server myip --xenserver-username myusername --xenserver-password mypassword mynewmmachine +docker-machine env mynewmmachine +``` + + # CLI Options: - `--xenserver-vcpu-count`: vCPU number for docker VM. diff --git a/bin/Makefile b/bin/Makefile deleted file mode 100644 index 65abdf6..0000000 --- a/bin/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -default: build - -build: - GOGC=off go build -i -o docker-machine-driver-xenserver diff --git a/bin/main.go b/docker-machine-driver-xenserver.go similarity index 68% rename from bin/main.go rename to docker-machine-driver-xenserver.go index 1a522b2..2b6eaf0 100644 --- a/bin/main.go +++ b/docker-machine-driver-xenserver.go @@ -2,7 +2,7 @@ package main import ( "github.com/docker/machine/libmachine/drivers/plugin" - "github.com/xenserver/docker-machine-driver-xenserver" + "github.com/xenserver/docker-machine-driver-xenserver/xenserver" ) func main() { diff --git a/xenapiclient.go b/xenserver/xenapiclient.go similarity index 100% rename from xenapiclient.go rename to xenserver/xenapiclient.go diff --git a/xenserver.go b/xenserver/xenserver.go similarity index 100% rename from xenserver.go rename to xenserver/xenserver.go