Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
DEVOPS TOOLS FOR EVERYONE: 

VAGRANT, PUPPET AND WEBMIN
!
Michał Karzyński, DevCon 2014
TALK OUTLINE
1. Vagrant - create#
2. Puppet - configure#
3. Webmin - administer
michal@karzynski.pl DevCon 2014
YOURSTRULY
Michał Karzyński#
• project manager at Politechnika Gdańska#
• freelance developer and consultant#
• polyglot, ...
What does a webapp look like?
LAMP
Apache
Linux
MySQL
PHP
Nginx
Linux
PostgreSQL
Python
Virtualenv
Gunicorn
Nginx
Linux
PostgreSQL
Python
Virtualenv
Gunicorn
Varnish
Redis
Nginx
Linux
PostgreSQL
Python
Virtualenv
Gunicorn
Varnish
Redis
MongoDB
Celery
Postfix
RabbitMQ
Vagrant
$ vagrant up
$ git clone git://.../development.git	
$ cd development	
$ vagrant up
HOW DOES IT WORK?
VAGRANTFILE_API_VERSION = "2"!
!
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|!
config.vm.box =...
• Ease of use#
• Many pre-configured boxes available#
• Support for multiple machines#
• Local support forVirtualBox orVMwa...
PUPPET PROVISIONING
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|!
config.vm.box = "debian-wheezy-64"!
config.vm....
Puppet
INSTALLING A PACKAGE
$ vim /etc/apt/sources.list!
!
deb http://download.webmin.com/download/repository sarge contrib!
!
$ ...
WITH PUPPET
include 'apt'!
!
apt::source { 'webmin':!
location => 'http://download.webmin.com/download/repository/',!
rele...
SET UP A DATABASE
# Install the Postgres server!
class { 'postgresql::server':!
ensure => 'present',!
listen_addresses => ...
ADDING A USER
package { !
'sudo': ensure => present;!
'zsh': ensure => present;!
'git': ensure => present;!
}!
!
user { 'm...
FEATURES
• Store server configuration in text files (manifests)#
• Automatically configure packages, user accounts, services,...
MASTER OF PUPPETS
Master
Puppet Puppet Puppet Puppet
Webmin
YOUR SERVER GUI
https://my-server:10000
YOUR SERVER GUI
PROCESSES
INIT SCRIPTS
NETWORKING
FIREWALL
SERVICES
DATABASES
FEATURES
• Graphically manage packages, user accounts, services#
• Install and configure server software#
• Monitor server ...
SHAMELESS PLUG
DEVOPSTOOLS FOR EVERYONE
1. Vagrant - create#
2. Puppet - configure#
3. Webmin - administer
michal@karzynski.pl DevCon 2014
THANKYOU
• http://www.ikea.com/us/en/catalog/products/60148701/#
• http://www.globtroter.pl/zdjecia/
44393,norwegia,brak,l...
DevOps tools for everyone - Vagrant, Puppet and Webmin
DevOps tools for everyone - Vagrant, Puppet and Webmin
DevOps tools for everyone - Vagrant, Puppet and Webmin
Upcoming SlideShare
Loading in …5
×

DevOps tools for everyone - Vagrant, Puppet and Webmin

31,209 views

Published on

A talk outlining the use of Vagrant, Puppet and Webmin, practical tools for programmers, administrators and DevOps.

  • Be the first to comment

DevOps tools for everyone - Vagrant, Puppet and Webmin

  1. 1. DEVOPS TOOLS FOR EVERYONE: 
 VAGRANT, PUPPET AND WEBMIN ! Michał Karzyński, DevCon 2014
  2. 2. TALK OUTLINE 1. Vagrant - create# 2. Puppet - configure# 3. Webmin - administer michal@karzynski.pl DevCon 2014
  3. 3. YOURSTRULY Michał Karzyński# • project manager at Politechnika Gdańska# • freelance developer and consultant# • polyglot, currently: Python and JavaScript# • author# • web developer since 1996# • @postrational http://michal.karzynski.pl# michal@karzynski.pl DevCon 2014
  4. 4. What does a webapp look like?
  5. 5. LAMP
  6. 6. Apache Linux MySQL PHP
  7. 7. Nginx Linux PostgreSQL Python Virtualenv Gunicorn
  8. 8. Nginx Linux PostgreSQL Python Virtualenv Gunicorn Varnish Redis
  9. 9. Nginx Linux PostgreSQL Python Virtualenv Gunicorn Varnish Redis MongoDB Celery Postfix RabbitMQ
  10. 10. Vagrant
  11. 11. $ vagrant up
  12. 12. $ git clone git://.../development.git $ cd development $ vagrant up
  13. 13. HOW DOES IT WORK? VAGRANTFILE_API_VERSION = "2"! ! Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|! config.vm.box = "debian-wheezy-64"! config.vm.box_url = "https://.../debian-wheezy-64.box"! config.vm.hostname = "wheezy-vm"! end Vagrantfile
  14. 14. • Ease of use# • Many pre-configured boxes available# • Support for multiple machines# • Local support forVirtualBox orVMware# • Build remote clouds on AWS, RackSpace, etc.# • Provisioning using:Ansible, Chef, Docker, Puppet, etc. FEATURES http://www.vagrantup.com
  15. 15. PUPPET PROVISIONING Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|! config.vm.box = "debian-wheezy-64"! config.vm.box_url = "https://www.dropbox.com/s/foj5mml4ft3b363/debian-wheezy-64.box?dl=1"! config.vm.hostname = "wheezy-vm"! ! # Install puppet modules! config.vm.provision :shell do |shell|! shell.inline = "# Install modules from Puppet Forge!                     mkdir -p /etc/puppet/modules;!                     puppet module install puppetlabs/apt;!                     !                     # Install Puppet modules from GitHub!                     aptitude -y install git;!                     cd /etc/puppet/modules;!                     git clone git://github.com/stankevich/puppet-python.git python;!                     "! end! ! # Use Puppet to provision server configuration! config.vm.provision "puppet" do |puppet|! puppet.manifests_path = "manifests"! end! ! end Vagrantfile
  16. 16. Puppet
  17. 17. INSTALLING A PACKAGE $ vim /etc/apt/sources.list! ! deb http://download.webmin.com/download/repository sarge contrib! ! $ wget -qO - http://www.webmin.com/jcameron-key.asc | sudo apt-key add -! $ sudo aptitude update! $ sudo aptitude install webmin!
  18. 18. WITH PUPPET include 'apt'! ! apt::source { 'webmin':! location => 'http://download.webmin.com/download/repository/',! release => 'sarge',! repos => 'contrib',! key => '11F63C51',! include_src => false,! }! ! apt::key { 'webmin':! key => '11F63C51',! key_source => 'http://www.webmin.com/jcameron-key.asc',! }! ! exec { "apt-update-webmin":! command => "/usr/bin/aptitude -y update",! require => [Apt::Source['webmin'], Apt::Key['webmin']],! }! ! package { ! 'webmin': ! ensure => present,! require => Exec['apt-update-webmin'],! } webmin.pp
  19. 19. SET UP A DATABASE # Install the Postgres server! class { 'postgresql::server':! ensure => 'present',! listen_addresses => 'localhost',! encoding => 'UTF8',! manage_firewall => true,! }! ! # Install PostgreSQL client! class { 'postgresql::client': }! ! # And development libraries! class { 'postgresql::lib::devel': }! ! ! # Set up a PostgreSQL database named 'hello' ! # and user named 'hello_django' with a long passphrase! postgresql::server::db { 'hello':! user => 'hello_django',! password => postgresql_password('hello_django', 'xxxxxxxxxxxxx'),! } database.pp
  20. 20. ADDING A USER package { ! 'sudo': ensure => present;! 'zsh': ensure => present;! 'git': ensure => present;! }! ! user { 'michal':! password => 'xxxxxxxxxxxxx',! groups => ['staff', 'sudo'],! ensure => 'present',! managehome => 'true',! shell => '/usr/bin/zsh',! require => Package['zsh'],! }! ! ssh_authorized_key{ 'michal@silver':! user => 'michal',! ensure => 'present', ! type => 'ssh-rsa', ! key => 'xxxxxxxxxxxxx', ! require => User['michal'],! } my_account.pp
  21. 21. FEATURES • Store server configuration in text files (manifests)# • Automatically configure packages, user accounts, services, etc.# • Declarative language to describe machines# • Store configuration of multiple machines on a central Puppet master server# • Update configuration when manifest file changes http://puppetlabs.com
  22. 22. MASTER OF PUPPETS Master Puppet Puppet Puppet Puppet
  23. 23. Webmin
  24. 24. YOUR SERVER GUI https://my-server:10000
  25. 25. YOUR SERVER GUI
  26. 26. PROCESSES
  27. 27. INIT SCRIPTS
  28. 28. NETWORKING
  29. 29. FIREWALL
  30. 30. SERVICES
  31. 31. DATABASES
  32. 32. FEATURES • Graphically manage packages, user accounts, services# • Install and configure server software# • Monitor server activity and log files# • Tweak and test settings# • Execute commands and access files through the browser# • Support for MySQL, PostgreSQL,Apache, PHP and many, many others http://webmin.com
  33. 33. SHAMELESS PLUG
  34. 34. DEVOPSTOOLS FOR EVERYONE 1. Vagrant - create# 2. Puppet - configure# 3. Webmin - administer michal@karzynski.pl DevCon 2014
  35. 35. THANKYOU • http://www.ikea.com/us/en/catalog/products/60148701/# • http://www.globtroter.pl/zdjecia/ 44393,norwegia,brak,latarnia,morska,w,lindesnes,x.html michal@karzynski.pl DevCon 2014 IMAGE CREDITS:

×