Skip to content

Commit

Permalink
Document new options, namely opennebula-image-*
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaime Melis committed Feb 19, 2016
1 parent 5d3b8a7 commit 86b73ac
Showing 1 changed file with 27 additions and 31 deletions.
58 changes: 27 additions & 31 deletions README.md
Expand Up @@ -2,12 +2,18 @@

This is a plugin for [Docker Machine](https://docs.docker.com/machine/) allowing to create docker hosts on [OpenNebula](http://www.opennebula.org)

## Authors

* Marco Mancini (@km4rcus)
* Jaime Melis (@jmelis)

## Requirements

* [Docker Machine](https://docs.docker.com/machine/) 0.5+
* [OpenNebula](http://www.opennebula.org) 4.x+

### Installation
Make sure [Go](http://www.golang.org) and [Godep](https://github.com/tools/godep) are properly installed, including setting up a [GOPATH](http://golang.org/doc/code.html#GOPATH).
### Installation
Make sure [Go](http://www.golang.org) and [Godep](https://github.com/tools/godep) are properly installed, including setting up a [GOPATH](http://golang.org/doc/code.html#GOPATH).

To build the plugin binary:

Expand All @@ -16,6 +22,7 @@ $ go get github.com/km4rcus/docker-machine-opennebula
$ cd $GOPATH/src/github.com/km4rcus/docker-machine-opennebula
$ make build
```

After the build is complete, `bin/docker-machine-driver-opennebula` binary will be created and it must included in `$PATH` variable. If you want to copy it to the `${GOPATH}/bin/`, run `make install`.

## Usage
Expand All @@ -24,38 +31,27 @@ Official documentation for Docker Machine [is available here](https://docs.docke
Set up `ONE_AUTH` and `ONE_XMLRPC` to point to the OpenNebula cloud; then to create a docker machine with OpenNebula plugin you can run this command (assuming an existent virtual network named 'private'):

```
$ docker-machine create --driver opennebula --opennebula-network private one-boot2d
$ docker-machine create --driver opennebula --opennebula-network private one-boot2d
```

## Available Driver Options

It is required to specify the network the machine will be connected to with `--opennebula-network-name` or `--opennebula-network-id`; in case `--opennebula-network-name` is used then the owner of the network can be passed with `--opennebula-network-owner` if it is different from the user in the file `ONE_AUTH`.

- `--opennebula-network-name` or `--opennebula-network-id`: Identify the network the machine will be connected to
- `--opennebula-network-owner`: Owner of the network the machine will be connected to
- `--opennebula-boot2docker-url`: The url of boot2docker image with [Docker](http://www.docker.com) 1.9 installed and OpenNebula context packages
- `--opennebula-disk-size`: Size of disk for host in MB
- `--opennebula-memory`: Size of memory for VM in MB.
- `--opennebula-cpu`: CPU value for the VM
- `--opennebula-vcpu`: VCPUs for the VM
- `--opennebula-datastore-id`: Datastore ID for saving Boot2Docker image
- `--opennebula-ssh-user`: Set the name of the SSH user


Environment variables and default values:

| CLI option | Environment variable | Default value | Required |
|--------------------------------|-----------------------|-----------------------------------------|----------------|
| `--opennebula-network-name` | `ONE_NETWORK_NAME` | No | Yes |
| `--opennebula-network-owner` | `ONE_NETWORK_OWNER` | No | No |
| `--opennebula-network-id` | `ONE_NETWORK_ID` | No | Yes |
| `--opennebula-boot2docker-url` | `ONE_BOOT2DOCKER_URL` | https://s3.eu-central-1.amazonaws.com/one-boot2d/boot2docker-v1.9.1.iso | No |
| `--opennebula-cpu` | `ONE_CPU` | `1` | No |
| `--opennebula-vcpu` | `ONE_VCPU` | `1` | No |
| `--opennebula-disk-size` | `ONE_DISK_SIZE` | `20000 MB` | No |
| `--opennebula-datastore-id` | `ONE_DATASTORE_ID` | `1` | No |
| `--opennebula-memory` | `ONE_MEMORY` | `1024 MB` | No |
| `--opennebula-ssh-user` | `ONE_SSH_USER` | `docker` | No |



It is also necessary to specify the image to use by specifying `--opennebula-image-id` or `--opennebula-image-name` (and optionally `opennebula-image-owner`).


| CLI Option | Description | Default Value | Environment Variable |
|----------------------------|------------------------------------------------------------|---------------|------------------------|
| --opennebula-cpu | CPU value for the VM | `1` | `ONE_CPU` |
| --opennebula-dev-prefix | Dev prefix to use for the images: 'vd', 'sd', 'hd', etc... | | `ONE_IMAGE_DEV_PREFIX` |
| --opennebula-disk-size | Size of disk for VM in MB | | `ONE_DISK_SIZE` |
| --opennebula-image-id | Image ID to use as the OS | | `ONE_IMAGE_ID` |
| --opennebula-image-name | Image to use as the OS | | `ONE_IMAGE_NAME` |
| --opennebula-image-owner | Owner of the image to use as the OS | | `ONE_IMAGE_OWNER` |
| --opennebula-memory | Size of memory for VM in MB | `1024` | `ONE_MEMORY` |
| --opennebula-network-id | Network ID to connect the machine to | | `ONE_NETWORK_ID` |
| --opennebula-network-name | Network to connect the machine to | | `ONE_NETWORK_NAME` |
| --opennebula-network-owner | User ID of the Network to connect the machine to | | `ONE_NETWORK_OWNER` |
| --opennebula-ssh-user | Set the name of the SSH user | `docker` | `ONE_SSH_USER` |
| --opennebula-vcpu | VCPUs for the VM | `1` | `ONE_VCPU` |

0 comments on commit 86b73ac

Please sign in to comment.