A Cloud Based Continuous
Delivery Implementation
Pavel Chunyayev
Amsterdam, 22-04-2015
Continuous Delivery in 2015
Development
• Commit
• Merge
• Trigger pipeline
Build
• Create artifact
• Assign version
Testing
• Journey across environments
• Quality criteria
Production
• Canary deployment
• Release != deployment
Continuous Delivery in 2015
Development
• Commit
• Merge
• Trigger pipeline
Build
• Create artifact
• Assign version
Infrastructure
• Infrastructure as a code
• Automated
• On-demand
Testing
• Journey across
environments
• Quality criteria
Production
• Canary deployment
• Release != deployment
Declarative vs Imperative
Declarative
• I want this server in this state
Imperative
• I want you to apply this sequence of actions
Mutable (reusable) vs Immutable (disposable)
Reusable
• I want to use the same server during the life of the project.
Immutable
• I want to provision a new server when I need to change something.
Configuration Management tools
Declarative
Imperative
Mutable Immutable
#!/bin/bash
Case 1
Declarative
Imperative
Mutable Immutable
Case 1
Challenges
• Projects require environments to be created
• A lot of environments are similar
• Takes time for admins to provision and configure them
Private cloud enables automation
What we did
• VMware vSphere to provide on-demand VMs
• Puppet to configure environments
• Hiera to separate data from the code
• Jenkins to control the lifecycle
Continuous Delivery
• Huge time savings and code reuse
• Developers are enabled to create configurations
• Deployments are scripted
Apache
New
server
Java
Zabbix
agent
MySQL
Declarative
Imperative
Mutable Immutable
Case 2
Declarative
Imperative
Mutable Immutable
Case 2
Challenges
• Control the state of the environments
• Release new versions of applications safely
• Automate the procedures to save time
Case 2
What we did
• Puppet to control the state of the servers
• Package artifact and assign version
• Deploy specific version to specific environment
• Rebuild the whole environment on deploy
Continuous Delivery
• Visibility
• Repeatable process
• Scripted deployments
Production
1.3-127
Staging
1.3-140
Testing
1.3-156
Declarative
Imperative
Mutable Immutable
Case 3
Declarative
Imperative
Mutable Immutable
Case 3
Challenge
• Software needs to be tested in different configurations
• Test environments are multi-server
• Environments take days to provision manually
Environments as a service
Solution
• Amazon Web Services to provision infrastructure
• Ansible to create procedures for each configuration
• REST API service to coordinate requests
Continuous Delivery
• Ready for both human and robots
• 20 minutes to create any environment
• Reduced feedback time
REST API
Ansible
Environments as a service
Declarative
Imperative
Mutable Immutable
Configuration Management Review
Declarative
Imperative
Mutable Immutable
Key takeaways
• Optimize for Continuous Delivery
• Automate infrastructure
pavel@levi9.com
@PavelChunyayev
Any questions?

Arch9 - A cloud based continuous delivery implementation

Editor's Notes

  • #2 Hello, my name is Pavel Chunyayev, I’m a Continuous Delivery architect. With more than 10 years of experience, more than 5 of them I worked for Levi9 helping our clients to successfully run their applications in production as well as establishing and improving their Continuous Delivery pipelines in order to deliver software in time and of certain quality.
  • #3 Let’s have a look at the CD process to aim for in 2015.
  • #7 It just happens that configuration management is hard with bash scripts.
  • #18 Pass configuration directly through service Any configurations are supported
  • #20 Cloud For best case CD Automated, repeatable, on-demand infrastructure Automation Cycle time, feedback loop Change QA/Sysadmin Quality