provisioning environments, a simplistic approach

32
Provisioning Environments A simplistic approach

Upload: wender-freese

Post on 18-Jul-2015

114 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 = Agility + Cooperation

Problem #1 (Deploy)

More Changes

More Commits

More Deploys

Less time

Interactions between devs and ops, why?

Interactions between devs and ops, why?

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!!!

Remember Vagrant file?

Puppet flexibility

If you have an available environment, you will

probably installs some apps/services on it.

Shellcode X Puppet

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

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