RackHD: Local Docker Based Environment Set-up

This tutorial will walk you through getting an instance of RackHD up and running on your local desktop or laptop, this will enable you to see the hosted API documentation and experiment with the APIs.

Prerequisites

You will need to install Docker and Docker Compose before setting up the environment.

If you would try provisioning ESXi on the virtual node, change settings of the kvm module in the host OS.

rmmod kvm_intel
rmmod kvm
modprobe kvm ignore_msrs=1
modprobe kvm_intel eptad=1 nested=1

You may also want to consider installing jq which provides a command-line oriented tool for pretty printing and filtering JSON structured data.

../_images/invisible1.png

What We’re Setting up

../_images/vagrant_setup1.png

The Docker Compose file will download the latest released versions of the RackHD Services from the RackHD DockerHub. It will create two docker bridge networks to run the services. The rackhd_admin network will be used to connect the services together and to access the RackHD APIs. The rackhd_southbound network will be used by RackHD to connect to the virtual nodes.

The Docker Compose setup also enables port forwarding that allows your localhost to access the RackHD instance:

  • localhost:9090 redirects to rackhd_admin:9090 for access to the REST API
  • localhost:9093 redirects to rackhd_admin:8443 for secure access to the REST API
../_images/invisible1.png

Set up RackHD in Docker using Docker Compose

How to set up these environments is shown as follows.

  1. Clone the RackHD repository

    git clone https://github.com/RackHD/RackHD.git
    cd RackHD/example/rackhd
    
  2. Download and start the RackHD services with the docker-compose up file. This command will load the configuration from the docker-compse.yml file.

    sudo docker-compose -f docker-compose.yml up -d
    
    ../_images/docker_compose_up.png
  3. Now use the docker-compose ps command to check whether the RackHD services are now up and running.

    sudo docker-compose ps
    

    If RackHD is set up successfully, the result will be shown as follows.

    ../_images/docker_compose_ps.png
  4. The command sudo docker-compose logs will output the logs from all the running RackHD services. Additionally, you can stop the services with the command sudo docker-compose stop, or stop and delete the services with sudo docker-compose down.