DevOps tools for everyone - Vagrant, Puppet and Webmin
Upcoming SlideShare
Loading in...5
×
 

DevOps tools for everyone - Vagrant, Puppet and Webmin

on

  • 883 views

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

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

Statistics

Views

Total Views
883
Views on SlideShare
241
Embed Views
642

Actions

Likes
1
Downloads
8
Comments
0

5 Embeds 642

http://michal.karzynski.pl 634
http://localhost 3
http://feedly.com 3
http://michal.karzynski.pl. 1
http://prlog.ru 1

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

DevOps tools for everyone - Vagrant, Puppet and Webmin DevOps tools for everyone - Vagrant, Puppet and Webmin Presentation Transcript

  • 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, currently: Python and JavaScript# • author# • web developer since 1996# • @postrational http://michal.karzynski.pl# michal@karzynski.pl DevCon 2014
  • 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 = "debian-wheezy-64"! config.vm.box_url = "https://.../debian-wheezy-64.box"! config.vm.hostname = "wheezy-vm"! end Vagrantfile
  • • 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
  • 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
  • Puppet
  • 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!
  • 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
  • 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
  • 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
  • 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
  • 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 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
  • 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,latarnia,morska,w,lindesnes,x.html michal@karzynski.pl DevCon 2014 IMAGE CREDITS: