13
#CCCEU14 | #CloudStackWorks #CCCEU14 | #CloudStackWorks Cloudstack Simulator Koushik Das

Cloudstack simulator

Embed Size (px)

Citation preview

Page 1: Cloudstack simulator

#CCCEU14 | #CloudStackWorks

#CCCEU14 | #CloudStackWorks

Cloudstack SimulatorKoushik Das

Page 2: Cloudstack simulator

#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

Page 3: Cloudstack simulator

#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

Page 4: Cloudstack simulator

#CCCEU14 | #CloudStackWorks

Solution

• Use the simulator

Page 5: Cloudstack simulator

#CCCEU14 | #CloudStackWorks

Cloudstack Architecture

11/14/2014 5

Page 6: Cloudstack simulator

#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

Page 7: Cloudstack simulator

#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

Page 8: Cloudstack simulator

#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.

Page 9: Cloudstack simulator

#CCCEU14 | #CloudStackWorks

#CCCEU14 | #CloudStackWorks

Demo

Page 10: Cloudstack simulator

#CCCEU14 | #CloudStackWorks

VM deployment retry

• Test path - test/integration/smoke/misc/test_deploy_vm.py

Page 11: Cloudstack simulator

#CCCEU14 | #CloudStackWorks

VM high availability

• Test path - test/integration/smoke/misc/test_vm_ha.py

Page 12: Cloudstack simulator

#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

Page 13: Cloudstack simulator

#CCCEU14 | #CloudStackWorks

#CCCEU14 | #CloudStackWorks

Q & A