Arch9 - A cloud based continuous delivery implementation

20
A Cloud Based Continuous Delivery Implementation Pavel Chunyayev Amsterdam, 22-04-2015

Transcript of Arch9 - A cloud based continuous delivery implementation

Page 1: Arch9 - A cloud based continuous delivery implementation

A Cloud Based Continuous Delivery

Implementation

Pavel ChunyayevAmsterdam, 22-04-2015

Page 2: Arch9 - A cloud based continuous delivery implementation

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

Page 3: Arch9 - A cloud based continuous delivery implementation

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

Page 4: Arch9 - A cloud based continuous delivery implementation

Declarative vs Imperative

Declarative• I want this server in this state

Imperative• I want you to apply this sequence of actions

Page 5: Arch9 - A cloud based continuous delivery implementation

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.

Page 6: Arch9 - A cloud based continuous delivery implementation

Configuration Management tools

Declarative

Imperative

Mutable Immutable

#!/bin/bash

Page 7: Arch9 - A cloud based continuous delivery implementation

Case 1

Declarative

Imperative

Mutable Immutable

Page 8: Arch9 - A cloud based continuous delivery implementation

Case 1

Challenges• Projects require environments to be created• A lot of environments are similar• Takes time for admins to provision and configure them

Page 9: Arch9 - A cloud based continuous delivery implementation

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

Page 10: Arch9 - A cloud based continuous delivery implementation

Declarative

Imperative

Mutable Immutable

Page 11: Arch9 - A cloud based continuous delivery implementation

Case 2

Declarative

Imperative

Mutable Immutable

Page 12: Arch9 - A cloud based continuous delivery implementation

Case 2

Challenges• Control the state of the environments• Release new versions of applications safely• Automate the procedures to save time

Page 13: Arch9 - A cloud based continuous delivery implementation

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

Production1.3-127

Staging1.3-140

Testing1.3-156

Page 14: Arch9 - A cloud based continuous delivery implementation

Declarative

Imperative

Mutable Immutable

Page 15: Arch9 - A cloud based continuous delivery implementation

Case 3

Declarative

Imperative

Mutable Immutable

Page 16: Arch9 - A cloud based continuous delivery implementation

Case 3

Challenge• Software needs to be tested in different configurations• Test environments are multi-server• Environments take days to provision manually

Page 17: Arch9 - A cloud based continuous delivery implementation

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

Page 18: Arch9 - A cloud based continuous delivery implementation

Environments as a service

Declarative

Imperative

Mutable Immutable

Page 19: Arch9 - A cloud based continuous delivery implementation

Configuration Management Review

Declarative

Imperative

Mutable Immutable

Page 20: Arch9 - A cloud based continuous delivery implementation

Key takeaways

• Optimize for Continuous Delivery

• Automate infrastructure

[email protected]@PavelChunyayev

Any questions?