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.
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.
What We’re Setting up¶
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
Set up RackHD in Docker using Docker Compose¶
How to set up these environments is shown as follows.
Clone the RackHD repository
git clone https://github.com/RackHD/RackHD.git cd RackHD/example/rackhd
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
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.
sudo docker-compose logswill 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.