SlideShare ist ein Scribd-Unternehmen logo
1 von 50
#CCCEU14 | #CloudStackWorks
#CCCEU14 | #CloudStackWorks
Test your cloud as code
Pierre-Luc Dion (pdion@cloudops.com)
#CCCEU14 | #CloudStackWorks
Overview
• introduction
• Why?
• cloudstack_spec: how it work
#CCCEU14 | #CloudStackWorks
About Me
• Cloud Architect @ CloudOps
• Work full time with Apache CloudStack
– As user
– As contributor
• Apache CloudStack PMC member
• Ruby and Chef Enthusiast
#CCCEU14 | #CloudStackWorks
About CloudOps
• CloudOps builds and operates CloudStack
based clouds of all shapes and sizes
• Develops cloud infrastructure solutions and
operational models
• 24x7x365 managed service for CloudStack
based cloud infrastructures
• Customers are global
• Based in Montreal, Canada
#CCCEU14 | #CloudStackWorks
Current state of the project
• Proof of concept
• Support
– VPC
– Port Forwarding
– Create snapshot
– Create template from snapshot
– Various zone features validation.
#CCCEU14 | #CloudStackWorks
#CCCEU14 | #CloudStackWorks
Why ?
#CCCEU14 | #CloudStackWorks
What I’m trying to solve
• We have multiple LAB CloudStack
installations running multiple versions and
configurations. Need to validate their
usability.
• CloudStack Release Upgrade tests on real
hardware.
#CCCEU14 | #CloudStackWorks
Monitoring is not enough
• Monitoring can tell if there is enough
Secondary storage. But cannot tell if it’s
usable in CloudStack.
• Monitoring cannot tell if Featured
templates are usable.
#CCCEU14 | #CloudStackWorks
#CCCEU14 | #CloudStackWorks
But what about Marvin?
#CCCEU14 | #CloudStackWorks
I did not tried Marvin
1. Look like it provision CloudStack configs
and tests, right?
2. Defining tests require coding (from user
perspective)
3. Could hardly benefit from ServerSpec,
specinfra or test-kitchen
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Marvin+-+Testing+with+Python
#CCCEU14 | #CloudStackWorks
#CCCEU14 | #CloudStackWorks
cloudstack_spec
#CCCEU14 | #CloudStackWorks
The purposes
• Test existing CloudStack installation
• Validate functionality of a Cloud
• Advanced tests:
– Port-forwarding rules into VPC
– Create Instance from Snapshot
– Create Template from Snapshot
#CCCEU14 | #CloudStackWorks
About cloudstack_spec
• Ruby Rspec based
• Based on ServerSpec
• Test case easy to define
• Use:
– cloudstack_ruby_client
– serverspec
– specinfra
• Code maturity: under heavy dev
#CCCEU14 | #CloudStackWorks
It is not
• Deployment tool
• Replacement to Marvin
• Monitoring plugin/tool
• Reporting tool
#CCCEU14 | #CloudStackWorks
#CCCEU14 | #CloudStackWorks
In Action
#CCCEU14 | #CloudStackWorks
#CCCEU14 | #CloudStackWorks
Define tests
#CCCEU14 | #CloudStackWorks
Zone
require 'spec_helper'
describe zone do
it { should exist }
it { should be_allocated }
its(:local_storage) { should be_set }
its(:security_group) { should_not be_set }
its(:network_type) { should match("Advanced") }
end
#CCCEU14 | #CloudStackWorks
Zone
require 'spec_helper'
describe zone do
it { should exist }
it { should be_allocated }
its(:local_storage) { should be_set }
its(:security_group) { should_not be_set }
its(:network_type) { should match("Advanced") }
end
Do I have a zone?
#CCCEU14 | #CloudStackWorks
Zone
require 'spec_helper'
describe zone do
it { should exist }
it { should be_allocated }
its(:local_storage) { should be_set }
its(:security_group) { should_not be_set }
its(:network_type) { should match("Advanced") }
end
The zone is
enabled
(allocated)?
#CCCEU14 | #CloudStackWorks
Zone
require 'spec_helper'
describe zone do
it { should exist }
it { should be_allocated }
its(:local_storage) { should be_set }
its(:security_group) { should_not be_set }
its(:network_type) { should match("Advanced") }
end
rspec_its: eval
method attributes
#CCCEU14 | #CloudStackWorks
Zone
require 'spec_helper'
describe zone do
it { should exist }
it { should be_allocated }
its(:local_storage) { should be_set }
its(:security_group) { should_not be_set }
its(:network_type) { should match("Advanced") }
end
Easy valid on false
#CCCEU14 | #CloudStackWorks
Zone
require 'spec_helper'
describe zone do
it { should exist }
it { should be_allocated }
its(:local_storage) { should be_set }
its(:security_group) { should_not be_set }
its(:network_type) { should match("Advanced") }
end
Rspec string
validation
#CCCEU14 | #CloudStackWorks
Output results
#CCCEU14 | #CloudStackWorks
Output results
#CCCEU14 | #CloudStackWorks
Output results
#CCCEU14 | #CloudStackWorks
Output results
#CCCEU14 | #CloudStackWorks
#CCCEU14 | #CloudStackWorks
Does my zone have system VMs?
#CCCEU14 | #CloudStackWorks
System vm tests
%w(consoleproxy secondarystoragevm).each do |svm|
describe system_vm(svm) do
it { should exist }
it { should be_running }
it { should be_reachable }
end
end
#CCCEU14 | #CloudStackWorks
SVMs output
#CCCEU14 | #CloudStackWorks
#CCCEU14 | #CloudStackWorks
Create VM inside VPC and test the network
#CCCEU14 | #CloudStackWorks
VPC test Scope
• Create VPC
• Create VPC network Tier
• Create Instance
• Enable Port-Forwarding for SSH
#CCCEU14 | #CloudStackWorks
vpc_spec.rb
describe vpc('spec-vpc1') do
it { should be_created }
it { should exist }
it { should be_ready }
it { should be_reachable }
describe vpc_tier('tier11') do
it { should be_created }
it { should exist }
describe virtual_machine('vm-test1') do
it { should be_created }
it { should_not be_reachable }
it { should exist }
it { should be_running }
its(:open_pf_ssh) { should be_set }
context 'With port forwarding' do
it { should be_reachable.with( :port => 22, :proto => 'tcp' ) }
end
end
end
end
#CCCEU14 | #CloudStackWorks
vpc_spec.rb
describe vpc('spec-vpc1') do
it { should be_created }
it { should exist }
it { should be_ready }
it { should be_reachable }
describe vpc_tier('tier11') do
it { should be_created }
it { should exist }
describe virtual_machine('vm-test1') do
it { should be_created }
it { should_not be_reachable }
it { should exist }
it { should be_running }
its(:open_pf_ssh) { should be_set }
context 'With port forwarding' do
it { should be_reachable.with( :port => 22, :proto => 'tcp' ) }
end
end
end
end
be_created
Create the object
#CCCEU14 | #CloudStackWorks
vpc_spec.rb
describe vpc('spec-vpc1') do
it { should be_created }
it { should exist }
it { should be_ready }
it { should be_reachable }
describe vpc_tier('tier11') do
it { should be_created }
it { should exist }
describe virtual_machine('vm-test1') do
it { should be_created }
it { should_not be_reachable }
it { should exist }
it { should be_running }
its(:open_pf_ssh) { should be_set }
context 'With port forwarding' do
it { should be_reachable.with( :port => 22, :proto => 'tcp' ) }
end
end
end
end
be_reachable
Ping test
#CCCEU14 | #CloudStackWorks
vpc_spec.rb
describe vpc('spec-vpc1') do
it { should be_created }
it { should exist }
it { should be_ready }
it { should be_reachable }
describe vpc_tier('tier11') do
it { should be_created }
it { should exist }
describe virtual_machine('vm-test1') do
it { should be_created }
it { should_not be_reachable }
it { should exist }
it { should be_running }
its(:open_pf_ssh) { should be_set }
context 'With port forwarding' do
it { should be_reachable.with( :port => 22, :proto => 'tcp' ) }
end
end
end
end
be_reachable
Tcp connection test
Using Public IP
#CCCEU14 | #CloudStackWorks
#CCCEU14 | #CloudStackWorks
Results of VPC tests…
#CCCEU14 | #CloudStackWorks
test execution (1/4)
#CCCEU14 | #CloudStackWorks
test execution (2/4)
#CCCEU14 | #CloudStackWorks
test execution (3/4)
#CCCEU14 | #CloudStackWorks
test execution (4/4)
#CCCEU14 | #CloudStackWorks
#CCCEU14 | #CloudStackWorks
Working with Rspec
#CCCEU14 | #CloudStackWorks
Custom Rspec matcher
# If the zone is allocated (Enabled)
RSpec::Matchers.define :be_allocated do |expected|
match do |actual|
actual.allocated? == true
end
failure_message do |actual|
"status: #{actual.allocated?}"
end
description do
"be allocated (Enabled)"
end
failure_message_when_negated do |actual|
"Status: #{actual}"
end
end
#CCCEU14 | #CloudStackWorks
resources (Test cases)
• Test cases are:
– Objects to test are Ruby Class:
CloudstackSpec::Resource::Snapshot
– Unit tests are Ruby Methods inside Class:
self.exist?
#CCCEU14 | #CloudStackWorks
#CCCEU14 | #CloudStackWorks
What’s next?
#CCCEU14 | #CloudStackWorks
Future improvements
• Provide as Gem
• Auto config, same as Serverspec
• More tests
• Better error message
• Add compatibility with ServerSpec
• test-kitchen compatibility?
#CCCEU14 | #CloudStackWorks
Help needed
• ServerSpec integration
– Test from within an
instance
• More test scenarios
#CCCEU14 | #CloudStackWorks
Future usage
• Validate new CloudStack release
• Cloud heath check
• Post automation tests
• Continuous Integration Tests (CI)
#CCCEU14 | #CloudStackWorks
Conclusion
• Test phase in the automated DevOps world
• Tests definition made easy.
• More tests case in progress.
#CCCEU14 | #CloudStackWorks
More Information
• Pierre-Luc Dion
– pdion@cloudops.com
– www.cloudops.com
– @CloudOps_
• Github
– https://github.com/pdion891/cloudstack_spec
#CCCEU14 | #CloudStackWorks
#CCCEU14 | #CloudStackWorks
Thank you!

Weitere ähnliche Inhalte

Was ist angesagt?

Trac Project And Process Management For Developers And Sys Admins Presentation
Trac  Project And Process Management For Developers And Sys Admins PresentationTrac  Project And Process Management For Developers And Sys Admins Presentation
Trac Project And Process Management For Developers And Sys Admins Presentation
guest3fc4fa
 
Infrastructural challenges of a fast-pace startup
Infrastructural challenges of a fast-pace startupInfrastructural challenges of a fast-pace startup
Infrastructural challenges of a fast-pace startup
DevOps Braga
 
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
Juraj Hantak
 

Was ist angesagt? (20)

Leveraging the Power of containerd Events - Evan Hazlett
Leveraging the Power of containerd Events - Evan HazlettLeveraging the Power of containerd Events - Evan Hazlett
Leveraging the Power of containerd Events - Evan Hazlett
 
DockerCon2017 - Skypilot
DockerCon2017 - SkypilotDockerCon2017 - Skypilot
DockerCon2017 - Skypilot
 
Trac Project And Process Management For Developers And Sys Admins Presentation
Trac  Project And Process Management For Developers And Sys Admins PresentationTrac  Project And Process Management For Developers And Sys Admins Presentation
Trac Project And Process Management For Developers And Sys Admins Presentation
 
Using CVMFS on a distributed Kubernetes cluster - The PRP Experience
Using CVMFS on a distributed Kubernetes cluster - The PRP ExperienceUsing CVMFS on a distributed Kubernetes cluster - The PRP Experience
Using CVMFS on a distributed Kubernetes cluster - The PRP Experience
 
DCUS17 : Docker networking deep dive
DCUS17 : Docker networking deep diveDCUS17 : Docker networking deep dive
DCUS17 : Docker networking deep dive
 
Using SaltStack to orchestrate microservices in application containers at Sal...
Using SaltStack to orchestrate microservices in application containers at Sal...Using SaltStack to orchestrate microservices in application containers at Sal...
Using SaltStack to orchestrate microservices in application containers at Sal...
 
Load Balancing 101
Load Balancing 101Load Balancing 101
Load Balancing 101
 
Containerised Testing at Demonware : PyCon Ireland 2016
Containerised Testing at Demonware : PyCon Ireland 2016Containerised Testing at Demonware : PyCon Ireland 2016
Containerised Testing at Demonware : PyCon Ireland 2016
 
Homer - Workshop at Kamailio World 2017
Homer - Workshop at Kamailio World 2017Homer - Workshop at Kamailio World 2017
Homer - Workshop at Kamailio World 2017
 
DevOps Braga #15: Agentless monitoring with icinga and prometheus
DevOps Braga #15: Agentless monitoring with icinga and prometheusDevOps Braga #15: Agentless monitoring with icinga and prometheus
DevOps Braga #15: Agentless monitoring with icinga and prometheus
 
IP Virtual Server(IPVS) 101
IP Virtual Server(IPVS) 101IP Virtual Server(IPVS) 101
IP Virtual Server(IPVS) 101
 
Using Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and JenkinsUsing Docker to build and test in your laptop and Jenkins
Using Docker to build and test in your laptop and Jenkins
 
Presentation security automation (Selenium Camp)
Presentation security automation (Selenium Camp)Presentation security automation (Selenium Camp)
Presentation security automation (Selenium Camp)
 
Arquitecturas de microservicios - Codemotion 2014
Arquitecturas de microservicios  -  Codemotion 2014Arquitecturas de microservicios  -  Codemotion 2014
Arquitecturas de microservicios - Codemotion 2014
 
Infrastructural challenges of a fast-pace startup
Infrastructural challenges of a fast-pace startupInfrastructural challenges of a fast-pace startup
Infrastructural challenges of a fast-pace startup
 
FPV Streaming Server with ffmpeg
FPV Streaming Server with ffmpegFPV Streaming Server with ffmpeg
FPV Streaming Server with ffmpeg
 
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
 
Breaking down a monolith
Breaking down a monolithBreaking down a monolith
Breaking down a monolith
 
Devops services
Devops servicesDevops services
Devops services
 
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
 

Ähnlich wie CloudOps CloudStack Budapest, 2014

Nanocloud cloud scale jvm
Nanocloud   cloud scale jvmNanocloud   cloud scale jvm
Nanocloud cloud scale jvm
aragozin
 

Ähnlich wie CloudOps CloudStack Budapest, 2014 (20)

Nested CloudStack with VMware
Nested CloudStack with VMwareNested CloudStack with VMware
Nested CloudStack with VMware
 
Giles Sirett: Introduction and CloudStack news
Giles Sirett: Introduction and CloudStack news   Giles Sirett: Introduction and CloudStack news
Giles Sirett: Introduction and CloudStack news
 
What’s New in CloudStack 4.15 - CloudStack European User Group Virtual, May 2021
What’s New in CloudStack 4.15 - CloudStack European User Group Virtual, May 2021What’s New in CloudStack 4.15 - CloudStack European User Group Virtual, May 2021
What’s New in CloudStack 4.15 - CloudStack European User Group Virtual, May 2021
 
Azure Quantum with IBM Qiskit and IonQ QPU
Azure Quantum with IBM Qiskit and IonQ QPUAzure Quantum with IBM Qiskit and IonQ QPU
Azure Quantum with IBM Qiskit and IonQ QPU
 
Containerising bootiful microservices javaeeconf
Containerising bootiful microservices javaeeconfContainerising bootiful microservices javaeeconf
Containerising bootiful microservices javaeeconf
 
Easy Cloud Native Transformation using HashiCorp Nomad
Easy Cloud Native Transformation using HashiCorp NomadEasy Cloud Native Transformation using HashiCorp Nomad
Easy Cloud Native Transformation using HashiCorp Nomad
 
Azure quantum workspace
Azure quantum workspaceAzure quantum workspace
Azure quantum workspace
 
Azure Quantum Workspace for developing Q# based quantum circuits
Azure Quantum Workspace for developing Q# based quantum circuitsAzure Quantum Workspace for developing Q# based quantum circuits
Azure Quantum Workspace for developing Q# based quantum circuits
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !
 
Docker for Java Developers
Docker for Java DevelopersDocker for Java Developers
Docker for Java Developers
 
9th docker meetup 2016.07.13
9th docker meetup 2016.07.139th docker meetup 2016.07.13
9th docker meetup 2016.07.13
 
Scala, docker and testing, oh my! mario camou
Scala, docker and testing, oh my! mario camouScala, docker and testing, oh my! mario camou
Scala, docker and testing, oh my! mario camou
 
Jenkins days workshop pipelines - Eric Long
Jenkins days workshop  pipelines - Eric LongJenkins days workshop  pipelines - Eric Long
Jenkins days workshop pipelines - Eric Long
 
Nanocloud cloud scale jvm
Nanocloud   cloud scale jvmNanocloud   cloud scale jvm
Nanocloud cloud scale jvm
 
NetDevOps Developer Environments with Vagrant @ SCALE16x
NetDevOps Developer Environments with Vagrant @ SCALE16xNetDevOps Developer Environments with Vagrant @ SCALE16x
NetDevOps Developer Environments with Vagrant @ SCALE16x
 
Quarkus Denmark 2019
Quarkus Denmark 2019Quarkus Denmark 2019
Quarkus Denmark 2019
 
[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo
 
When Docker Engine 1.12 features unleashes software architecture
When Docker Engine 1.12 features unleashes software architectureWhen Docker Engine 1.12 features unleashes software architecture
When Docker Engine 1.12 features unleashes software architecture
 
Monitoring Docker at Scale - Docker San Francisco Meetup - August 11, 2015
Monitoring Docker at Scale - Docker San Francisco Meetup - August 11, 2015Monitoring Docker at Scale - Docker San Francisco Meetup - August 11, 2015
Monitoring Docker at Scale - Docker San Francisco Meetup - August 11, 2015
 
Real World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js ApplicationsReal World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js Applications
 

Mehr von CloudOps2005

Mehr von CloudOps2005 (20)

Defense in Depth: Securing your new Kubernetes cluster from the challenges th...
Defense in Depth: Securing your new Kubernetes cluster from the challenges th...Defense in Depth: Securing your new Kubernetes cluster from the challenges th...
Defense in Depth: Securing your new Kubernetes cluster from the challenges th...
 
Human No, Machine Yes: Welcome to the CDF with Incremental Confidence
Human No, Machine Yes: Welcome to the CDF with Incremental ConfidenceHuman No, Machine Yes: Welcome to the CDF with Incremental Confidence
Human No, Machine Yes: Welcome to the CDF with Incremental Confidence
 
The Salmon Algorithm Spawning with Kubernetes
The Salmon Algorithm Spawning with KubernetesThe Salmon Algorithm Spawning with Kubernetes
The Salmon Algorithm Spawning with Kubernetes
 
Own your Destiny in the Cloud - Ian Rae - Cloud Native Day Montreal 2019
Own your Destiny in the Cloud - Ian Rae - Cloud Native Day Montreal 2019Own your Destiny in the Cloud - Ian Rae - Cloud Native Day Montreal 2019
Own your Destiny in the Cloud - Ian Rae - Cloud Native Day Montreal 2019
 
Plateformes et infrastructure infonuagique natif de ville de MontrĂŠall
Plateformes et infrastructure infonuagique natif de ville de MontrĂŠallPlateformes et infrastructure infonuagique natif de ville de MontrĂŠall
Plateformes et infrastructure infonuagique natif de ville de MontrĂŠall
 
Using Rook to Manage Kubernetes Storage with Ceph
Using Rook to Manage Kubernetes Storage with CephUsing Rook to Manage Kubernetes Storage with Ceph
Using Rook to Manage Kubernetes Storage with Ceph
 
Kafka on Kubernetes
Kafka on KubernetesKafka on Kubernetes
Kafka on Kubernetes
 
Kubernetes: Crossing the Chasm
Kubernetes: Crossing the ChasmKubernetes: Crossing the Chasm
Kubernetes: Crossing the Chasm
 
Distributed Logging with Kubernetes
Distributed Logging with KubernetesDistributed Logging with Kubernetes
Distributed Logging with Kubernetes
 
Kubernetes Security with Calico and Open Policy Agent
Kubernetes Security with Calico and Open Policy AgentKubernetes Security with Calico and Open Policy Agent
Kubernetes Security with Calico and Open Policy Agent
 
Advanced Deployment Strategies with Kubernetes and Istio
Advanced Deployment Strategies with Kubernetes and IstioAdvanced Deployment Strategies with Kubernetes and Istio
Advanced Deployment Strategies with Kubernetes and Istio
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
 
Kubernetes Services are sooo Yesterday!
Kubernetes Services are sooo Yesterday!Kubernetes Services are sooo Yesterday!
Kubernetes Services are sooo Yesterday!
 
Amazon EKS: the good, the bad, and the ugly
Amazon EKS: the good, the bad, and the uglyAmazon EKS: the good, the bad, and the ugly
Amazon EKS: the good, the bad, and the ugly
 
Kubernetes, Terraform, Vault, and Consul
Kubernetes, Terraform, Vault, and ConsulKubernetes, Terraform, Vault, and Consul
Kubernetes, Terraform, Vault, and Consul
 
SIG Multicluster and the Path to Federation
SIG Multicluster and the Path to FederationSIG Multicluster and the Path to Federation
SIG Multicluster and the Path to Federation
 
To Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On PremTo Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
 
Operator SDK for K8s using Go
Operator SDK for K8s using GoOperator SDK for K8s using Go
Operator SDK for K8s using Go
 
How to Handle your Kubernetes Upgrades
How to Handle your Kubernetes UpgradesHow to Handle your Kubernetes Upgrades
How to Handle your Kubernetes Upgrades
 
Kubernetes and Cloud Native Meetup - March, 2019
Kubernetes and Cloud Native Meetup - March, 2019Kubernetes and Cloud Native Meetup - March, 2019
Kubernetes and Cloud Native Meetup - March, 2019
 

KĂźrzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

KĂźrzlich hochgeladen (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

CloudOps CloudStack Budapest, 2014

  • 1. #CCCEU14 | #CloudStackWorks #CCCEU14 | #CloudStackWorks Test your cloud as code Pierre-Luc Dion (pdion@cloudops.com)
  • 2. #CCCEU14 | #CloudStackWorks Overview • introduction • Why? • cloudstack_spec: how it work
  • 3. #CCCEU14 | #CloudStackWorks About Me • Cloud Architect @ CloudOps • Work full time with Apache CloudStack – As user – As contributor • Apache CloudStack PMC member • Ruby and Chef Enthusiast
  • 4. #CCCEU14 | #CloudStackWorks About CloudOps • CloudOps builds and operates CloudStack based clouds of all shapes and sizes • Develops cloud infrastructure solutions and operational models • 24x7x365 managed service for CloudStack based cloud infrastructures • Customers are global • Based in Montreal, Canada
  • 5. #CCCEU14 | #CloudStackWorks Current state of the project • Proof of concept • Support – VPC – Port Forwarding – Create snapshot – Create template from snapshot – Various zone features validation.
  • 6. #CCCEU14 | #CloudStackWorks #CCCEU14 | #CloudStackWorks Why ?
  • 7. #CCCEU14 | #CloudStackWorks What I’m trying to solve • We have multiple LAB CloudStack installations running multiple versions and configurations. Need to validate their usability. • CloudStack Release Upgrade tests on real hardware.
  • 8. #CCCEU14 | #CloudStackWorks Monitoring is not enough • Monitoring can tell if there is enough Secondary storage. But cannot tell if it’s usable in CloudStack. • Monitoring cannot tell if Featured templates are usable.
  • 9. #CCCEU14 | #CloudStackWorks #CCCEU14 | #CloudStackWorks But what about Marvin?
  • 10. #CCCEU14 | #CloudStackWorks I did not tried Marvin 1. Look like it provision CloudStack configs and tests, right? 2. Defining tests require coding (from user perspective) 3. Could hardly benefit from ServerSpec, specinfra or test-kitchen https://cwiki.apache.org/confluence/display/CLOUDSTACK/Marvin+-+Testing+with+Python
  • 11. #CCCEU14 | #CloudStackWorks #CCCEU14 | #CloudStackWorks cloudstack_spec
  • 12. #CCCEU14 | #CloudStackWorks The purposes • Test existing CloudStack installation • Validate functionality of a Cloud • Advanced tests: – Port-forwarding rules into VPC – Create Instance from Snapshot – Create Template from Snapshot
  • 13. #CCCEU14 | #CloudStackWorks About cloudstack_spec • Ruby Rspec based • Based on ServerSpec • Test case easy to define • Use: – cloudstack_ruby_client – serverspec – specinfra • Code maturity: under heavy dev
  • 14. #CCCEU14 | #CloudStackWorks It is not • Deployment tool • Replacement to Marvin • Monitoring plugin/tool • Reporting tool
  • 15. #CCCEU14 | #CloudStackWorks #CCCEU14 | #CloudStackWorks In Action
  • 16. #CCCEU14 | #CloudStackWorks #CCCEU14 | #CloudStackWorks Define tests
  • 17. #CCCEU14 | #CloudStackWorks Zone require 'spec_helper' describe zone do it { should exist } it { should be_allocated } its(:local_storage) { should be_set } its(:security_group) { should_not be_set } its(:network_type) { should match("Advanced") } end
  • 18. #CCCEU14 | #CloudStackWorks Zone require 'spec_helper' describe zone do it { should exist } it { should be_allocated } its(:local_storage) { should be_set } its(:security_group) { should_not be_set } its(:network_type) { should match("Advanced") } end Do I have a zone?
  • 19. #CCCEU14 | #CloudStackWorks Zone require 'spec_helper' describe zone do it { should exist } it { should be_allocated } its(:local_storage) { should be_set } its(:security_group) { should_not be_set } its(:network_type) { should match("Advanced") } end The zone is enabled (allocated)?
  • 20. #CCCEU14 | #CloudStackWorks Zone require 'spec_helper' describe zone do it { should exist } it { should be_allocated } its(:local_storage) { should be_set } its(:security_group) { should_not be_set } its(:network_type) { should match("Advanced") } end rspec_its: eval method attributes
  • 21. #CCCEU14 | #CloudStackWorks Zone require 'spec_helper' describe zone do it { should exist } it { should be_allocated } its(:local_storage) { should be_set } its(:security_group) { should_not be_set } its(:network_type) { should match("Advanced") } end Easy valid on false
  • 22. #CCCEU14 | #CloudStackWorks Zone require 'spec_helper' describe zone do it { should exist } it { should be_allocated } its(:local_storage) { should be_set } its(:security_group) { should_not be_set } its(:network_type) { should match("Advanced") } end Rspec string validation
  • 27. #CCCEU14 | #CloudStackWorks #CCCEU14 | #CloudStackWorks Does my zone have system VMs?
  • 28. #CCCEU14 | #CloudStackWorks System vm tests %w(consoleproxy secondarystoragevm).each do |svm| describe system_vm(svm) do it { should exist } it { should be_running } it { should be_reachable } end end
  • 30. #CCCEU14 | #CloudStackWorks #CCCEU14 | #CloudStackWorks Create VM inside VPC and test the network
  • 31. #CCCEU14 | #CloudStackWorks VPC test Scope • Create VPC • Create VPC network Tier • Create Instance • Enable Port-Forwarding for SSH
  • 32. #CCCEU14 | #CloudStackWorks vpc_spec.rb describe vpc('spec-vpc1') do it { should be_created } it { should exist } it { should be_ready } it { should be_reachable } describe vpc_tier('tier11') do it { should be_created } it { should exist } describe virtual_machine('vm-test1') do it { should be_created } it { should_not be_reachable } it { should exist } it { should be_running } its(:open_pf_ssh) { should be_set } context 'With port forwarding' do it { should be_reachable.with( :port => 22, :proto => 'tcp' ) } end end end end
  • 33. #CCCEU14 | #CloudStackWorks vpc_spec.rb describe vpc('spec-vpc1') do it { should be_created } it { should exist } it { should be_ready } it { should be_reachable } describe vpc_tier('tier11') do it { should be_created } it { should exist } describe virtual_machine('vm-test1') do it { should be_created } it { should_not be_reachable } it { should exist } it { should be_running } its(:open_pf_ssh) { should be_set } context 'With port forwarding' do it { should be_reachable.with( :port => 22, :proto => 'tcp' ) } end end end end be_created Create the object
  • 34. #CCCEU14 | #CloudStackWorks vpc_spec.rb describe vpc('spec-vpc1') do it { should be_created } it { should exist } it { should be_ready } it { should be_reachable } describe vpc_tier('tier11') do it { should be_created } it { should exist } describe virtual_machine('vm-test1') do it { should be_created } it { should_not be_reachable } it { should exist } it { should be_running } its(:open_pf_ssh) { should be_set } context 'With port forwarding' do it { should be_reachable.with( :port => 22, :proto => 'tcp' ) } end end end end be_reachable Ping test
  • 35. #CCCEU14 | #CloudStackWorks vpc_spec.rb describe vpc('spec-vpc1') do it { should be_created } it { should exist } it { should be_ready } it { should be_reachable } describe vpc_tier('tier11') do it { should be_created } it { should exist } describe virtual_machine('vm-test1') do it { should be_created } it { should_not be_reachable } it { should exist } it { should be_running } its(:open_pf_ssh) { should be_set } context 'With port forwarding' do it { should be_reachable.with( :port => 22, :proto => 'tcp' ) } end end end end be_reachable Tcp connection test Using Public IP
  • 36. #CCCEU14 | #CloudStackWorks #CCCEU14 | #CloudStackWorks Results of VPC tests…
  • 41. #CCCEU14 | #CloudStackWorks #CCCEU14 | #CloudStackWorks Working with Rspec
  • 42. #CCCEU14 | #CloudStackWorks Custom Rspec matcher # If the zone is allocated (Enabled) RSpec::Matchers.define :be_allocated do |expected| match do |actual| actual.allocated? == true end failure_message do |actual| "status: #{actual.allocated?}" end description do "be allocated (Enabled)" end failure_message_when_negated do |actual| "Status: #{actual}" end end
  • 43. #CCCEU14 | #CloudStackWorks resources (Test cases) • Test cases are: – Objects to test are Ruby Class: CloudstackSpec::Resource::Snapshot – Unit tests are Ruby Methods inside Class: self.exist?
  • 44. #CCCEU14 | #CloudStackWorks #CCCEU14 | #CloudStackWorks What’s next?
  • 45. #CCCEU14 | #CloudStackWorks Future improvements • Provide as Gem • Auto config, same as Serverspec • More tests • Better error message • Add compatibility with ServerSpec • test-kitchen compatibility?
  • 46. #CCCEU14 | #CloudStackWorks Help needed • ServerSpec integration – Test from within an instance • More test scenarios
  • 47. #CCCEU14 | #CloudStackWorks Future usage • Validate new CloudStack release • Cloud heath check • Post automation tests • Continuous Integration Tests (CI)
  • 48. #CCCEU14 | #CloudStackWorks Conclusion • Test phase in the automated DevOps world • Tests definition made easy. • More tests case in progress.
  • 49. #CCCEU14 | #CloudStackWorks More Information • Pierre-Luc Dion – pdion@cloudops.com – www.cloudops.com – @CloudOps_ • Github – https://github.com/pdion891/cloudstack_spec
  • 50. #CCCEU14 | #CloudStackWorks #CCCEU14 | #CloudStackWorks Thank you!

Hinweis der Redaktion

  1. Error message are still ugly.
  2. Perform a complete usability test suite on an existing cloud. Most likely for things related to: Storage Networking VR, vpn, acls… Usually installing cloudstack using Chef
  3. Monitoring have is limit. It can monitor CloudStack ressources but hardly monitor usability of CloudStack.
  4. I’m not a Python developer If I want to use Marvin to test existing Cloud, I need to build my own Python scripts.
  5. We have multiple deployment of CloudStack in a lab that something have Power Interruption. Need a way to test our used case against new ACS release
  6. I’m expecting to certifiy our deployed cloud at some point not just troubleshooting lab.
  7. No need to specify a zone, It will use the first one it find.
  8. Simple test definition
  9. The zone is Enabled
  10. Return true/false for zone params using rspec_its its eval method attributes.
  11. Negate a configuration ( valid if not)
  12. Reuse rspec matcher for dev simplicity
  13. Quick Information on the system under test
  14. Test results with color
  15. Execution time and results
  16. And test each process to make sure they exist are are properly created.
  17. So, no code as to be written to perform complexe validation test.
  18. something is wrong
  19. Async job in progress, have to wait the CloudStack Async job is completed.
  20. Validation not just on running or not. Failure provide bit of information
  21. Creating tests in Ruby are not too complicated, it is the mapping
  22. Need to be able to test from inside an Instance, to validate PortForwarding rules, Firewall policies More advanced tests as VPN connections, Ipsec tunnel.
  23. After a Chef run that deployed CloudStack, should test that the new Cloud is working