Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in...

21
Radu Munteanu January 2015 Cosmin Ilie Deployment Past Present Future

Transcript of Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in...

Page 1: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Radu Munteanu

January 2015

Cosmin Ilie

Deployment

Past Present Future

Page 2: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Deployment

• Deployment & Continuous Delivery

• Why not Continuous Deployment

• Past

• Present

• Future

Content

Page 3: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Page |21 3 Deployment

Random Movie Moment

https://www.youtube.com/watch?v=9qbp2F-wN5M

Page 5: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Page |21 5 Deployment

Why not Continuous Deployment

• Customer scheduled upgrades

• On-premise deployments

• Cost

–Oracle EE

–Monolithic Application

Page 6: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Page |21 6 Deployment

Past

• Manual provisioning

• Manual installation & upgrade

• Manual installation and configuration of

monitoring tools

• Expensive third party backup tool

Page 7: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Page |21 7 Deployment

Present

• Semi-automatic provisioning

• Semi-automated installations

• Manual upgrades

• Automated installation of monitoring

tools

• In-house, semi-automatic backup

Page 8: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Page |21 8 Deployment

App Server

Web Server

Riemann Server

DB Server*

App Server*

Provisioning & Installation Workflow

hiera

RPM Repo

Management Tool Server

Repo Server

mcollective

Page 9: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Page |21 9 Deployment

Hieradata Updated

Infrastructure Updated

Puppet Development Workflow

Push Puppet Module

Puppet Lint > OK Tags Old

Now*

Accept merge request

Scheduled RPM Build

Manual RPM Build based on module versions

Environments: development production management openstack

Organizations: SO PROD

RPM

RPM Auto-Sync all RPM Repos

Auto Install, Run & Test for development Manual RPM Install for other environments

Run Puppet for production management, openstack

Manual sync RPM Repos

Manual install RPM on Puppet Masters

Run Puppet for any environment

Push Hieradata

JSON/YAML Lint > OK Tags

Hieradata RPM Build, RPM Repo Sync, Hieradata Install on Puppet Masters

Accept merge request

Page 10: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Page |21 10 Deployment

Problems

• (dev) Not enough Puppet testing

• (dev) A lot of tools and plug-ins, written

in different languages

• (dev/am) Multiple metadata sources

• (am) Consistency problems across envs

• (am) Separate codebase for dev/prod

Page 11: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Page |21 11 Deployment

Future

• Spawn machines to test Puppet modules

• New tools written in one language, if

possible

• Service Discovery

• Containers

Page 12: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Page |21 12 Deployment

Puppet Development Workflow

Push Puppet module Accept Merge Request

Make Puppet Test RPM

Unit Tests

Spawn test machines, Run Puppet

Puppet Lint

Catalog modules by versions/dependencies Scheduled RPM Build & Repos Sync

Auto Run Puppet on sample machines

Manual trigger Puppet Runs on all machines Infrastructure

Updated

Page 13: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Page |21 13 Deployment

One Lang to Rule Them All

• GoLang

• Static linking

• Concurrency

• Lots of emerging tools

we want to use are in go

Page 14: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Page |21 14 Deployment

Sevice Discovery

• Have services register themselves and

discover other services instead of you

telling them to

• Zookeeper

–Consistency (CP)

–Battle tested

Page 15: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Page |21 15 Deployment

Containers

• What is a container?

• Technologies

–Namespaces

–Cgroups

–SELinux

–UnionFS Source: http://cdn.verbum.org/2014.10-bblisa-atomic/index.html#/

Page 16: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Page |21 16 Deployment

Why Docker?

• Very good tooling

• Wide adoption (Google, Microsoft,

RedHat, AWS, etc.)

• Plans for multiplaform support

Page 17: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Page |21 17 Deployment

Overcome Docker Limitations

• Storage options in Docker

• Networking & Clustering

• Container Hosts

• Building containers

• Repository Servers

Page 18: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Page |21 18 Deployment

Create Containers at Build Time

• Package applications in containers

• Use image layers to minimize pull times

• Have the same version of containers

running on dev/test/prod

• Keep containers build files in source

control

Page 19: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Page |21 19 Deployment

Point Containers to Zookeeper

• Have a single, reliable and real-time

view of the world

• Services should discover other services

and publish their information as well

• Containers start with just the zookeeper

address and minimal info (e.g. tags)

Page 20: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Page |21 20 Deployment

Method Can be Applied to Machines

• This model of configuration can be done

with VM’s or hardware hosts

• One example is Netflix which does this

in AWS

• VM’s require homogenous compute,

storage & network services

Page 21: Deployment - Past, Present, Futurefiles.meetup.com/1784606/Deployment.pdf•Package applications in containers •Use image layers to minimize pull times •Have the same version of

Page |21 21 Deployment

GIFF ME MANAFEEDBACK!

• http://goo.gl/forms/jf4jHE4Ue8 *

* Requires a Google Account