provisioning environments. a simplistic approach

39
Provisioning Environments A simplistic approach

Upload: eder-roger-souza

Post on 17-Jul-2015

245 views

Category:

Technology


0 download

TRANSCRIPT

Provisioning EnvironmentsA simplistic approach

Who?

Eder Roger

@EderRoger

https://github.com/EderRoger

Wender Freese

@WenderFreese

https://github.com/wenderjean

Agenda

● Devops

● Vagrant

● Puppet

● A real example

● Questions?

What this presentation is not about?

● Configuring nginx or other servers

● Loadbalancing

● Configuring MongoDB or other DB's

● MongoDB replicaset

Devops

Anything that makes interactions between

development and operations, better."Thomas Limoncelli"

#devops

Automation at Flickr (2008)

Patrick Debois (Belgium Sysadmin)

Devops days - (30-31)/Oct/2009

Twitter

Devops = Agility + Cooperation

#devops

Problem #1 (Deploy)

More Changes

More Commits

More Deploys

Less time

Interactions between devs and ops, why?

Interactions between devs and ops, why?

Solution

Ops needs to think like devs

Devs needs to think like ops

Problem #2 (New dev comes)

Creating an environment

Install Java

Install Tomcat

Install DB

Start to code

What is Vagrant?

Simple way to create virtualized

environment…

Yes, it’s a tool.

It started in January 2010 by

Mitchell Hashimoto

https://www.vagrantup.com/

What problems are solved?

● Reproducible

● Portable

● Agility

● Automation

● no more "works on my machine"

Compatibility

How does it works?

All starts in a Vagrantfile

All starts in a Vagrantfile

$ vagrant up

$ vagrant ssh database

Trust, that's all...

Is it just this?

No, we have more...

Just an environment won't help you...

Puppet

What is Puppet?

Puppet is IT automation software that defines

and enforces the state of your infrastructure.

● Is a language

● Is an infrastructure manager

Whaaaat!!!

Puppet flexibility

If you have an available environment, you will

probably installs some apps/services on it.

Shellcode X Puppet

Remember Vagrant file?

You need a manifest file

Puppet language files are called "manifests"

manifests/config.pp

Modules and Puppet community

● You don't need to make all by yourself

● Use modules available by community

https://forge.puppetlabs.com/

Using a module

Price

Just for use - $free

A real example

APP SERVER 1

APP SERVER 2

APP SERVER 3

NGINX

REPLICA SET

MONGO 3

MONGO 1

MONGO 2

DRIVER

DRIVER

DRIVER

LB

https://github.com/EderRoger/nginx_loadbalancer

NGINX

APP SERVER 1 APP SERVER 2 APP SERVER 3

REPLICA SET

MONGO 1

MONGO 2

MONGO 3