Abiquo 3.4 has a new plugin to work with Docker containers. The Abiquo Docker plugin configuration requires the Abiquo Docker agent, which is called Pilot. The Abiquo Docker configuration currently runs on Ubuntu.
The Abiquo Docker plugin requires Docker version 1.5+.
Docker Containers are not Virtual Machines
Docker containers are applications not virtual machines. In the first version of the Docker plugin, Abiquo has integrated some Docker functionality and added some Abiquo networking functionality to Docker. The integration of Docker means that Abiquo features such as multitenancy, accounting, billing and reporting can be used with Docker. However, not all Abiquo functionality can be used with Docker.
To give an extended example, Abiquo virtual machines have remote access through VNC. But VNC is not available for Docker because Docker containers are not virtual machines. Docker has its own "attach" command with its own protocol for making information from the container available to users. Abiquo does not currently support the Docker attach command.
There are two ways to install the Abiquo Docker plugin: Download the agent package for Ubuntu OR Install a vanilla Ubuntu machine and run the cURL command to install Docker and the Abiquo Pilot agent.
Run the following command as root:
This command will install Docker and the Abiquo pilot agent.
You must configure a docker local registry in order to use Docker with Abiquo.
You can run a local registry on the node you recently installed with the command:
To use this registry with the node, you may need to edit /etc/default/docker config file and add the following option:
Set the registry that Docker will use with the abiquo.docker.registry property in the abiquo.properties file on your Abiquo Server and Remote Services server.
An example value for this property is "http://localhost:5000".
You can set regular expressions to filter the tags of images in the Docker registry. Comma separated list of tag patterns allowed. Existing tags in the Docker registry will be matched against these patterns and Abiquo will only show the ones that match. The format of the pattern is defined by the Java pattern: http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html Example: ^fixedtag$,^tagswithprefix
You can add a Docker host to Abiquo in the same way as a standard hypervisor. First enter the hypervisor type and the IP address.
Abiquo creates Docker networks with VLAN bridges, similar to AIM on KVM, but will not use the built-in Docker networking features. The network in the Docker containers will be fully managed by Abiquo, so you should enable the appropriate network interfaces. Select an appropriate network service type.
You must enable a datastore, but it is not used by Abiquo.
Mark the retrieve existing virtual machine checkbox or click the retrieve button to retrieve Docker containers running on the Docker host.
Select a container and click the capture button to capture a Docker container. As for a standard virtual machine, you will need a suitable virtual appliance with a network that is compatible with the existing network configuration of the Docker container.
The Docker registry should be configured by the System Administrator.
From the Apps library, click the Docker link to access Docker images. Click the Import template button to download a Docker image.
The search dialog for Docker images will open. This dialog is similar to the public cloud image search dialog.
To retrieve all the images from the Docker repository, do not enter any search or filter criteria.
After you have found an image, click the import symbol in the top right-hand corner of the image icon to cache the image in the Abiquo Apps library.
Make sure you have the Docker registry loaded in Abiquo and some Docker templates available in the Datacenter.
You can create a Docker container using a Docker template, by double-clicking or dragging and dropping the template. This is the same as for a regular virtual machine.
The process to configure the Docker container in the same way as a standard virtual machine.
Move the mouse over the container icon and from the options menu, select the Edit option.
You can configure network connections in Abiquo datacenter networks. Abiquo automatically configures a default network connection for containers in the same way as for virtual machines.
Abiquo manually adds network configuration, such as DNS servers and static routes, to containers, so incorrect network configuration, e.g. invalid static routes, may prevent a container from running.
You can add volumes of external storage to Docker containers in the same way as for virtual machines. You will need to prepare your Docker image so your container can work with these volumes.
If your container does not have an entry point, you can pass the command the container will run when starting.
This has to be a single command that could be run with Docker run. It cannot be a shell script.
You can pass environment variables to containers from the Variables tab. The container will receive these variables at startup.
You can deploy the Docker container in Abiquo. It is important to remember that containers are applications, not virtual machines. Once the container has been run, i.e. its command has been executed and completed, the container will terminate and it will be shown as powered off in Abiquo. When a container is powered off, all container information is stored in the file system to regenerate the container when it is powered on again. The controls that apply to VMs, such as start, pause, and so on, can also be used on containers.
You can create an instance of a Docker container. This copy of the Docker container will be stored in the Docker registry with a copy of original template's virtual machine configuration.
The instance will be displayed in your enterprise's Apps library view, in the Instances panel beneath the master template.
A remote search of the Docker registry does not show the instances, because Abiquo filters these snapshots in the remote search to avoid exposing tenant-specific instances to other tenants.
A docker instance cannot be promoted.
Docker only works with the Docker registry and not the Abiquo NFS repository.
There is no support for persistent templates in the Abiquo Docker integration.
Abiquo 3.4 does not provide an interface to Docker attach.