Thursday, October 02, 2014

CloudStack simulator on Docker

Docker is a lot of fun, one of its strength is in the portability of applications. This gave me the idea to package the CloudStack management server as a docker image.

CloudStack has a simulator that can fake a data center infrastructure. It can be used to test some of the basic functionalities. We use it to run our integration tests, like the smoke tests on TravisCI. The simulator allows us to configure an advanced or basic networking zone with fake hypervisors.

So I bootstrapped the CloudStack management server, configured the Mysql database with an advanced zone and created a docker image with Packer. The resulting image is on DockerHub, and I realized after the fact that four other great minds already did something similar :)

On a machine running docker:

docker pull runseb/cloudstack
docker run -t -i -p 8080:8080 runseb/cloudstack:0.1.4 /bin/bash
# service mysql restart
# cd /opt/cloudstack
# mvn -pl client jetty:run -Dsimulator

Then open your browser on http://<IP_of_docker_host>:8080/client and enjoy !


  1. Any way to get the latest cloudstack binaries into the docker hub image?

  2. Sure, I will work on it.

  3. Just make a latest tag and you can drop the version and control the latest version server side.
    To get the latest cloudstack binaries, use chef ;)
    Next to this, awesome work Mr Goasguen, works perfect for me to test some knife plugins ;)

  4. Let me know if I can help on that, Sebastien.

  5. Please publish your Packer code. Would really appreciate the ability to customize without duplicating your work! Thanks!