#CCCEU14 | #CloudStackWorks
#CCCEU14 | #CloudStackWorks
Cloudstack SimulatorKoushik Das
#CCCEU14 | #CloudStackWorks
Agenda
• Challenges related to product quality
in the community
• Solution to address some of them
• What is the simulator? Benefits?
• Demo
• Q & A
#CCCEU14 | #CloudStackWorks
Challenges related to quality
• Release getting delayed due to quality
issues
• Concern in community to merge big
changes as no easy way to identify
regressions
• Complex to develop test scenarios due
to distributed nature of the product
#CCCEU14 | #CloudStackWorks
Solution
• Use the simulator
#CCCEU14 | #CloudStackWorks
Cloudstack Architecture
11/14/2014 5
#CCCEU14 | #CloudStackWorks
Simulator – What is it?
• Mock library, intercepts all provisioning requests from orchestration layer
• Developed as a plugin that sits on the resource layer
• Ability to simulate success, failure, timeout
• Ability to define scope for simulation or mock – specific agent command, host, cluster, pod, data center, number of executions
#CCCEU14 | #CloudStackWorks
Benefits of Simulator
• Software based approach, no need for
hypervisors/hardware
• Apart from happy-path scenarios, very easy to test
for failure scenarios by injecting faults and delays
• Almost 70-80% of existing tests can run using
Simulator
• More automated tests resulting in improved code
coverage
• Easy to test for scale and performance
• API support – helps in automation
#CCCEU14 | #CloudStackWorks
Simulator APIs
• configureSimulator - define a mock behaviour based on specified criteria
• queryMock - query the status of existing mock. This is useful for checking if the mock actually got executed during the test.
• cleanupMock – remove mock once done with it, so that subsequent tests can start from a fresh state.
#CCCEU14 | #CloudStackWorks
#CCCEU14 | #CloudStackWorks
Demo
#CCCEU14 | #CloudStackWorks
VM deployment retry
• Test path - test/integration/smoke/misc/test_deploy_vm.py
#CCCEU14 | #CloudStackWorks
VM high availability
• Test path - test/integration/smoke/misc/test_vm_ha.py
#CCCEU14 | #CloudStackWorks
CWiki resources
• https://cwiki.apache.org/confluence/display/CLOU
DSTACK/Writing+tests+leveraging+the+simulator
+enhancements
• https://cwiki.apache.org/confluence/display/CLOU
DSTACK/Validating+check-
ins+for+your+local+changes%2C+using+Simulato
r
#CCCEU14 | #CloudStackWorks
#CCCEU14 | #CloudStackWorks
Q & A
Top Related