Bug Reference
JIRA-6664: https://issues.apache.org/jira/browse/CLOUDSTACK-6664
Branch
4.5 hopefully.
Introduction
Purpose
This is functional specification of feature "Support Docker as a hypervisor" which has Jira ID CS-6664. Docker hypervisor can spawn containers from Dockerfile, Docker image or Docker tar file.
References
Document History
Glossary
- Dockerfile: This textfile is read by Docker service read to automate the steps you would otherwise take manually to create an image.
- Docker registry: repository server for Docker images.
Feature Specifications
- running Docker containers as VMs in CloudStack
- remove SSVM + CPVM and also Secondary Storage & Primary Storage. Data will be store locally on Docker host.
- running Virtual Router as a Docker container
Use cases
User want to use containers in CloudStack, he can use LXC or Docker hypervisor. For Docker, he can do in several ways:
- run from a Docker image
- build from a Docker file
- run from a Docker tarfile
Architecture and Design description
cloud-plugin-hypervisor-docker
- DockerResource acts like Docker driver, which serves provision commands (startContainer, stopContainer, restartContainer,...) from Agent Manager and make corresponding http requests to Docker service running on HOST.
- DockerGuru fills container parameters for provisioning.
- DockerServerDiscoverer aims to discover and register Docker HOST to Agent Manager.
cloud-setup-agent make some changes to start Docker service in background in Docker host and send register host request to Agent Manager.
docker HTTP client implements http requests to Docker service, using REST API v1.10
Web Services APIs
registerTemplate
- hypervisor: Docker
- format: choose from combo box
- from a Repository image
- from a Dockerfile
- from a Tarfile
- url:
- image name if Repository is chosen
- url if Dockerfile is chosen
- url if Tarfile is chosen
UI flow