Provisioning Environments
A 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
Provisioning  environments. A simplistic approach
Provisioning  environments. A simplistic approach
Provisioning  environments. A simplistic approach

Provisioning environments. A simplistic approach

Editor's Notes

  • #18 About VMWare.. http://www.vagrantup.com/vmware Price: $79 per seat. A single seat can be used on two computers (such as a desktop and a laptop) for a single person.
  • #24 When you use Puppet, you are modeling your infrastructure as code
  • #25 “Puppet” really refers to two different things: the language in which code is written, and the platform that manages infrastructure.
  • #29 The foundation of the Puppet language is its declaration of resources. Each resource describes a component of a system, such as a service that must be running, or a package that must be installed. Some other examples of resources: A user account A specific file A directory of files Any software package Any running service
  • #33 Session Persistence (REDIS)