The simulator is an effective tool that mocks the entire set of hypervisor (agent) commands. It is essential when testing the performance metric of the CloudStack management server without having to deploy large data centers for the purpose. Here we detail some of the tests setup to test various parts of Apache CloudStack in a continuous fashion using the simulator
These build steps are similar to the regular build, deploydb and run of the management server. Only some extra switches are required to run the tests and should be easy to recall and run anytime:
Build with the -Dsimulator switch to enable simulator hypervisors
$ mvn -Pdeveloper -Dsimulator clean install
In addition to the regular deploydb you will be deploying the simulator database where all the agent information is stored for the mockvms, mockvolumes etc.
$ mvn -Pdeveloper -pl developer -Ddeploydb $ mvn -Pdeveloper -pl developer -Ddeploydb-simulator
Same as regular jetty:run.
$ mvn -Dsimulator -pl client jetty:run
To enable the debug ports before the run
export MAVEN_OPTS="-XX:MaxPermSize=512m -Xmx2g -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
Simulator can be used to test every commit of cloudstack using the above workflow. The checkin tests are a small set of tests that check whether certain basic scenarios are not broken by the commit. This workflow is in the pipeline of jobs on the simulator view of jenkins
The pipeline works thus: