Fábio Kaiser Rauber
5 years ago
7 changed files with 208 additions and 190 deletions
@ -1,56 +1,69 @@ |
|||
[![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-xcp |
|||
This is the XCP-ng driver plugin for Docker Machine. It allows the |
|||
orchestration of machines on XCP-ng (all versions) and probably compatible with Citrix XenServer 6.5SP1 or later. |
|||
|
|||
# docker-machine-driver-xenserver |
|||
This is the XenServer driver plugin for Docker Machine. It allows the |
|||
orchestration of machines on Citrix XenServer 6.5SP1 and later. |
|||
This work is derived from https://github.com/xenserver/docker-machine-driver-xenserver. |
|||
|
|||
# Installation from binary |
|||
Please refer to the |
|||
[documentation for a release](https://github.com/xenserver/docker-machine-driver-xenserver/releases). |
|||
|
|||
The installation steps are: |
|||
|
|||
1. If not done already - download the Docker Machine binary for your OS and architecture |
|||
2. If not done already - move the binary to your PATH. |
|||
3. Download the driver archive for your OS and architecture. |
|||
4. Extract the archive |
|||
5. Move the driver binary to your PATH, so it can be found by docker-machine. |
|||
|
|||
|
|||
# Installation from source |
|||
Following the installation of Golang and Docker Machine, you can install the |
|||
docker-machine-xenserver-driver: |
|||
docker-machine-xcp-driver: |
|||
```bash |
|||
go get github.com/xenserver/docker-machine-driver-xenserver |
|||
go get github.com/interlegis/docker-machine-driver-xcp |
|||
``` |
|||
|
|||
# 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 create -d xcp --xcp-server myip --xcp-username myusername --xcp-password mypassword mynewmmachine |
|||
docker-machine env mynewmmachine |
|||
``` |
|||
|
|||
|
|||
# CLI Options: |
|||
|
|||
- `--xenserver-vcpu-count`: vCPU number for docker VM. |
|||
- `--xenserver-memory-size`: Size of memory for Docker VM (in MB). |
|||
- `--xenserver-boot2docker-url`: URL for boot2docker ISO image. |
|||
- `--xenserver-server`: **required for create** XenServer hostname/IP for docker VM. |
|||
- `--xenserver-disk-size`: Size of disk for Docker VM (in MB). |
|||
- `--xenserver-username`: **required** XenServer Username. |
|||
- `--xenserver-password`: **required** XenServer Password. |
|||
- `--xenserver-network-label`: Network label where the docker VM will be attached |
|||
- `--xenserver-sr-label`: SR label where the docker VM will be attached. |
|||
- `--xenserver-host-label`: Host label where the docker VM will be run. |
|||
- `--xenserver-upload-timeout`: Timeout uploading VDI. |
|||
- `--xenserver-wait-timeout`: Timeout wating for VM start. |
|||
- `--xcp-vcpu-count`: vCPU number for docker VM. |
|||
- `--xcp-memory-size`: Size of memory for Docker VM (in MB). |
|||
- `--xcp-boot2docker-url`: URL for boot2docker ISO image. |
|||
- `--xcp-server`: **required for create** XenServer hostname/IP for docker VM. |
|||
- `--xcp-disk-size`: Size of disk for Docker VM (in MB). |
|||
- `--xcp-username`: **required** XenServer Username. |
|||
- `--xcp-password`: **required** XenServer Password. |
|||
- `--xcp-network-label`: Network label where the docker VM will be attached |
|||
- `--xcp-sr-label`: SR label where the docker VM will be attached. |
|||
- `--xcp-host-label`: Host label where the docker VM will be run. |
|||
- `--xcp-upload-timeout`: Timeout uploading VDI. |
|||
- `--xcp-wait-timeout`: Timeout wating for VM start. |
|||
- `--xcp-os-template`: XCP template name for the new VM. |
|||
- `--xcp-os-username`: Username used by docker-machine to SSH to the new VM. |
|||
- `--xcp-coreos-configdrive`: Whether to use a CoreOS ConfigDrive or (default) a generic one. |
|||
|
|||
# Environment variables and default values: |
|||
|
|||
| CLI option | Environment variable | Default | |
|||
|-----------------------------------|-----------------------------|------------------------------| |
|||
| `--xenserver-vcpu-count` | `XENSERVER_VCPU_COUNT` | `1` | |
|||
| `--xenserver-memory-size` | `XENSERVER_MEMORY_SIZE` | `2048` | |
|||
| `--xenserver-disk-size` | `XENSERVER_DISK_SIZE` | `5120` | |
|||
| `--xenserver-boot2docker-url` | `XENSERVER_BOOT2DOCKER_URL` | *boot2docker URL* | |
|||
| `--xenserver-server` | `XENSERVER_SERVER` | - | |
|||
| `--xenserver-host-label` | `XENSERVER_HOST_LABEL` | - | |
|||
| **`--xenserver-username`** | `XENSERVER_USERNAME` | - | |
|||
| **`--xenserver-password`** | `XENSERVER_PASSWORD` | - | |
|||
| `--xenserver-network-label` | `XENSERVER_NETWORK_LABEL` | - | |
|||
| `--xenserver-sr-label` | `XENSERVER_SR_LABEL` | - | |
|||
| `--xenserver-upload-timeout` | `XENSERVER_UPLOAD_TIMEOUT` | `300` | |
|||
| `--xenserver-wait-timeout` | `XENSERVER_WAIT_TIMEOUT` | `1800` | |
|||
|-----------------------------|--------------------------|------------------------------| |
|||
| `--xcp-vcpu-count` | `XCP_VCPU_COUNT` | `1` | |
|||
| `--xcp-memory-size` | `XCP_MEMORY_SIZE` | `2048` | |
|||
| `--xcp-disk-size` | `XCP_DISK_SIZE` | `5120` | |
|||
| `--xcp-boot2docker-url` | `XCP_BOOT2DOCKER_URL` | *boot2docker URL* | |
|||
| `--xcp-server` | `XCP_SERVER` | - | |
|||
| `--xcp-host-label` | `XCP_HOST_LABEL` | - | |
|||
| **`--xcp-username`** | `XCP_USERNAME` | - | |
|||
| **`--xcp-password`** | `XCP_PASSWORD` | - | |
|||
| `--xcp-network-label` | `XCP_NETWORK_LABEL` | - | |
|||
| `--xcp-sr-label` | `XCP_SR_LABEL` | - | |
|||
| `--xcp-upload-timeout` | `XCP_UPLOAD_TIMEOUT` | `300` | |
|||
| `--xcp-wait-timeout` | `XCP_WAIT_TIMEOUT` | `1800` | |
|||
| `--xcp-os-template` | `XCP_OS_TEMPLATE` | `Other install media` | |
|||
| `--xcp-os-username` | `XCP_OS_USERNAME` | `docker` | |
|||
| `--xcp-coreos-configdrive` | `XCP_COREOS_CONFIGDRIVE` | `false` | |
|||
|
@ -0,0 +1,12 @@ |
|||
//This file was modified from the original work, https://github.com/xenserver/docker-machine-driver-xenserver
|
|||
|
|||
package main |
|||
|
|||
import ( |
|||
"github.com/docker/machine/libmachine/drivers/plugin" |
|||
"github.com/interlegis/docker-machine-driver-xcp/xcp" |
|||
) |
|||
|
|||
func main() { |
|||
plugin.RegisterDriver(xcp.NewDriver()) |
|||
} |
@ -1,10 +0,0 @@ |
|||
package main |
|||
|
|||
import ( |
|||
"github.com/docker/machine/libmachine/drivers/plugin" |
|||
"github.com/interlegis/docker-machine-driver-xenserver/xenserver" |
|||
) |
|||
|
|||
func main() { |
|||
plugin.RegisterDriver(xenserver.NewDriver()) |
|||
} |
@ -1,4 +1,5 @@ |
|||
package xenserver |
|||
//This file was modified from the original work, https://github.com/xenserver/docker-machine-driver-xenserver
|
|||
package xcp |
|||
|
|||
import ( |
|||
"crypto/tls" |
Loading…
Reference in new issue