SlideShare a Scribd company logo
Introduction          2




• Virtualization
  – What is it?
  – Hands-on lab
• Automation
  – How do you mean?
  – Hands-on lab
• Puppet
  – Manipulating
  – Hands-on lab
• Questions?
Virtualization: What is it?   3




• Stand alone server
  – Host & Guest


• Dedicated Server
  – Guest => Virtual Machine
  – Host => Actual machine


• Benefits
  – Less physical machines
  – Easy to move
Virtualization: What is it?                                                                4




• Virtualization today:
  – VMware         -> vsphere
  – Microsoft      -> Hyper-V
  – Redhat         -> RHEV



  – VMware player         http://www.vmware.com/products/player/


  – VMware esxi           http://www.vmware.com/products/vsphere-hypervisor/overview.html


  – VirtualBox            http://www.virtualbox.org/


  – KVM                   http://www.linux-kvm.org/page/Main_Page


  – Xen                   http://www.xen.org/
Virtualization: Hands-on lab   5
Virtualization: Hands-on lab   6
Virtualization: Hands-on lab   7
Virtualization: Hands-on lab   8
Virtualization: Hands-on lab   9
Virtualization: Hands-on lab   10
Virtualization: Hands-on lab   11
Automation: How do you mean?                             12




• Installing OS
  – > insert disc, choose options, configure root, etc…
  – > Login, create users, configure server
  –>…


• Automation = install steps written in file
  – Kickstart
  – Preseed
Automation: How do you mean?                                               13




• Creating kickstart file
   – Set language, keyboard, timezone, root password, network, …
 lang en_US
 langsupport en_US.UTF-8
 keyboard us
 timezone --utc Europe/Brussels
 rootpw ***
 text
 skipx
 install
 cdrom
 zerombr
 bootloader --location=mbr
 network --bootproto=dhcp
 key XXXXXXXXXXXXXXXX


• Hard disc formating
 clearpart --all --initlabel
 part /boot --fstype ext3 --size=150 --ondisk=sda
 part / --fstype=ext3 --size=1024 --ondisk=sda
 part swap --size=7644 --ondisk=sda
 part pv.6 --size=0 --grow --ondisk=sda
 volgroup vg00 --pesize=32768 pv.6
 logvol /var/log --fstype ext3 --name=varlog    --vgname=vg00 --size=2048
Automation: How do you mean?                                                  14




• Hard disc
  – Additional partition exlibris (35GB)
 clearpart --all --initlabel
 part /boot --fstype ext3 --size=150 --ondisk=sda
 part / --fstype=ext3 --size=1024 --ondisk=sda
 part swap --size=4096 --ondisk=sda
 part pv.6 --size=0 --grow --ondisk=sda
 volgroup vg00 --pesize=32768 pv.6
 logvol /var/log --fstype ext3 --name=varlog    --vgname=vg00   --size=2048
 logvol /var      --fstype ext3 --name=var      --vgname=vg00   --size=1536
 logvol /tmp      --fstype ext3 --name=tmp      --vgname=vg00   --size=5120
 logvol /opt      --fstype ext3 --name=opt      --vgname=vg00   --size=1024
 logvol /usr      --fstype ext3 --name=usr      --vgname=vg00   --size=4096
 logvol /home     --fstype ext3 --name=home     --vgname=vg00   --size=512
 logvol /exlibris --fstype ext3 --name=exlibris --vgname=vg00   --size=35840


• End script
 auth --useshadow --enablemd5
 selinux --disabled
 firewall --enabled --ssh
 firstboot --disabled
 reboot --eject
Automation: How do you mean?                                                15




• Add packages
 repo --name=epel --baseurl=http://dl.fedoraproject.org/pub/epel/5/x86_64/
 %packages
 @core
 epel-release-5-4
 screen
 ruby
 puppet

• Post
  – Define hostname, register with RedHat, set puppetmaster
 %post --log=/root/postinstall.log
 # set hostname to the dns one
 IP=`ifconfig eth0 | grep "addr:" | cut -d':' -f2 | cut -d' ' -f1`
 HOSTNAME=`nslookup $IP | grep "name =" | cut -d'=' -f2 | sed
 's/.(.*)./1/'`
 SHORTHOSTNAME=`nslookup $IP | grep "name =" | cut -d'=' -f2 | sed
 's/.(.*)./1/' | cut -d'.' -f1`
 # replace the hostname in the network configuration
 grep -v "HOSTNAME" /etc/sysconfig/network > /tmp/network
 echo "HOSTNAME=${HOSTNAME}" >> /tmp/network
 cp /tmp/network /etc/sysconfig/network
 echo "${IP}       ${HOSTNAME} ${SHORTHOSTNAME}" >> /etc/hosts
 rhnreg_ks --profilename=${HOSTNAME} --activationkey=XXXXXXXXXXXXX
Automation: How do you mean?                                          16




• Users and SSH
  – Add user, disable root-ssh-login, config port ssh, update system
 # Create user install
 useradd --uid 900 install
 # Set passwd for user install
 echo "***" | passwd --stdin install

 # Disable ssh rootlogin
 sed -e 's/^#PermitRootLoginsyes$/PermitRootLogin no/' <
 /etc/ssh/sshd_config > /tmp/sshd_config
 # Use port 22000 as default
 sed -e 's/^#Ports22$/Port 22000/' < /tmp/sshd_config >
 /tmp/sshd_config2
 mv /tmp/sshd_config2 /etc/ssh/sshd_config
 rm /tmp/sshd_config

 # Open non default port 22000 for ssh
 sed -e 's/--dports22/--dport 22000/' < /etc/sysconfig/iptables >
 /tmp/iptables
 mv /tmp/iptables /etc/sysconfig/iptables

 /usr/bin/yum clean all
 /usr/bin/yum -y update
 /usr/bin/yum clean all
Automation: Hands-on lab                                                    17




• Try to create SFX-installation - Packages
 /usr/bin/yum -y install glibc unixODBC unixODBC-devel e2fsprogs-libs
 expat libxml2 zlib libxslt libgcrypt libgpg-error krb5-libs keyutils-libs
 libselinux libsepol gmp pcre libaio gdbm libstdc++ ncurses bzip2-libs
 /usr/bin/yum clean all

 #Disable selinux
 echo 0 > /selinux/enforce
 #stop iptables
 /etc/init.d/iptables stop
 #disable iptables
 /sbin/chkconfig --level 2345 iptables off



  – Sfx-installer can extract only
      • ./sfx_version_4_linux64_installer.run --confirm

  – Sfx-installer can run without disclaimer
      • ./starter.sh nodisclaimer
Automation: Hands-on lab                    18




• Sfx-installer can extract only

• Sfx-installer can run without disclaimer
Automation: Hands-on lab                      19




• Sfx-installer can use auto answer-file




  – Sfx-installer can extract only
  – Sfx-installer can run without disclaimer
Automation: Hands-on lab                                               20




• How to do this?
 mkdir -m777 /exlibris/ftp_from_exlibris
 cd /exlibris/ftp_from_exlibris
 wget 'http://sartre.ugent.be/bt/sfx_version_4_linux64_installer.run‘
 chmod a+x sfx_version_4_linux64_installer.run
 /bin/echo “LICENSE-SFXGLB41" > license.txt
 /bin/echo “LICENSE-SFXLCL41" >> license.txt
 /bin/echo “LICENSE-SFXTST41" >> license.txt

 # extract sfx_installer
 echo "y" > answer.txt
 echo "n" >> answer.txt
 ./sfx_version_4_linux64_installer.run --confirm < answer.txt

 #start installer
 cd build
 echo "y" > answer.txt
 echo "3410" >> answer.txt
 echo "n" >> answer.txt
 ./starter.sh nodisclaimer < answer.txt

 # Set passwd   for users sfx
 echo "***" |   passwd --stdin sfxglb41
 echo "***" |   passwd --stdin sfxlcl41
 echo "***" |   passwd --stdin sfxtst41
Automation: Hands-on lab                                                    21




• Finishing script
 # Add port 80 for browsing
 sed -e 's/^Listens3410$/Listen 80nListen 3410/' <
 /exlibris/sfx_ver/sfx4_1/proxy/conf/httpd.conf > /tmp/httpproxy.conf
 mv /tmp/httpproxy.conf /exlibris/sfx_ver/sfx4_1/proxy/conf/httpd.conf

 # Open the port in the firewall
 sed '/23000/i-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --
 dport 80 -j ACCEPT' < /etc/sysconfig/iptables > /tmp/iptables
 sed '/23000/i-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --
 dport 3410 -j ACCEPT' < /tmp/iptables > /etc/sysconfig/iptables

 #Enable back iptables
 /sbin/chkconfig --level 2345 iptables on
Automation: Hands-on lab   22
Automation: Hands-on lab   23
Virtualization: Hands-on lab   24
Puppet: Manipulating            25




• Automation software

• DSL Language written in Ruby

• Client / server oriented

• Repeatable processes

• Abstraction layers
Puppet: Manipulating                                        26




• Abstraction layers?
  – Package managers | User management | Services
   Apt, dpkg, yum, rpm, pkg, … | useradd, adduser, dscl, …
Puppet: Manipulating                   27




• Server structure
  ‒ puppet/
     ‒ manifests/
     ‒ environments /
         ‒ production /
             ‒ modules /
                  ‒ [a-z][a-z0-9_]* /
                      ‒ files /
                      ‒ manifests /
                           ‒ init.pp
                      ‒ templates /
                      ‒ tests /
             ‒ manifests /
                  ‒ nodes.pp
         ‒ development /
Puppet: Manipulating                           28




• Nodes.pp
 node HOSTNAME {
     include apache;
     class {
         'ntp':
             enable => false;
     }
     apache::vhost {
         'personal_site':
             port    => 80,
             docroot => '/var/www/personal',
             options => 'Indexes MultiViews‘;
     }
 }



• Module
  – [a-z][a-z0-9_]* (except main, settings)
Puppet: Manipulating                                       29


                                  ‒modules /
• init.pp                            ‒[a-z][a-z0-9_]* /
                                          ‒files /
  – Class-name same as module                   ‒service.conf
                                          ‒manifests /
                                                ‒init.pp
• otherclass.pp                                 ‒otherclass.pp
                                          ‒templates /
  – my_module::otherclass                       ‒template.erb
                                          ‒tests /

• files/service.conf
  – puppet:///modules/my_module/service.conf

• templates/template.erb
  – template('my_module/template.erb')
Puppet: Manipulating                                        30




• Built-in resources:
     – file
     file { ‘/exlibris’:
         ensure => directory,
         mode    => 777,
         group   => exlibris;
     }
     file {‘/exlibris/ftp_from_exlibris/build/answer.txt’:
         ensure => present,
         content => "yn3410nn",
         require => Exec["extract_sfx"];
 }



     file {
       ‘/exlibris’:
         ensure => directory,
         mode    => 777,
         group   => exlibris;
       ‘/exlibris/ftp_from_exlibris/build/answer.txt’:
         ensure => present,
         content => "yn3410nn",
         require => Exec["extract_sfx"];
 }
Puppet: Manipulating                                                             31



    – package
    package {
      ‘glibc’:
        ensure => ‘installed’;
     ‘unixODBC’:
        ensure => ‘installed’;
      ‘unixODBC-devel’
        ensure => ‘latest’;
     ‘gdbm.i686’:
        ensure => ‘2.2.16-6’;
}



Package { ensure => ‘installed’ }
$package2install = [ ‘glibc’, ‘unixODBC’, ‘unixODBC-devel’, ‘gdbm.i686’ ]
package { $package2install: }



    – exec
 exec {
  ‘download_installer’:
    command => ‘./sfx_version_4_linux64_installer.run --confirm < answer.txt’,
    cwd      => ‘/exlibris/ftp_from_exlibris’,
    creates => ‘/exlibris/ftp_from_exlibris/build’,
    require => File[‘/exlibris/ftp_from_exlibris’];
}
Puppet: Manipulating                                             32



 – user & group
user { ‘ca20c800’:
   ensure      => ‘present’,            group { ‘ca20c800’:
   comment     => ‘Comment for user’,     ensure => ‘present’,
   uid         => ‘600’,                  gid    => ‘600’;
   gid         => ‘600’,                }
   membership => minimum,
   shell       => ‘/bin/bash’,
   home        => ‘/home/$title",
   require     => Group[$title],
   password    => ‘***’;
 }



 – ± 40 different resource types
     • cron
     • mount
     • yumrepo
Puppet: Hands-on lab                                                              33




• Sfx & puppet
 class sfx {

   Package { ensure => "installed"}
   $package2install = [ "glibc", "unixODBC-devel", "e2fsprogs-
 libs", "unixODBC", "expat", "libxml2", "zlib", "libxslt", "libgcrypt", "libgpg-
 error", "krb5-libs", "keyutils-
 libs", "libselinux", "libsepol", "gmp", "pcre.i686", "pcre.x86_64", "libaio", "
 gdbm.i686", "gdbm.x86_64", "libstdc++", "ncurses", "bzip2-libs.i686", "bzip2-
 libs.x86_64" ]

  package { $package2install: }


  concat::fragment { "/etc/sysconfig/iptables.sfx.server":
    target => "/etc/sysconfig/iptables",
    source => 'puppet:///modules/sfx/iptables.server',
    order   => 200,
  }
Puppet: Hands-on lab                                  34




• Sfx & puppet
  file {
     ‘/exlibris’:
       ensure => directory,
       group   => exlibris;
     ‘/exlibris/ftp_from_exlibris’:
       ensure   => directory,
       group    => exlibris,
       mode     => 777,
       require => File[‘/exlibris’];
     ‘/exlibris/ftp_from_exlibris/answer.txt’:
       ensure   => present,
       content => ‘ynn’,
     ‘/exlibris/ftp_from_exlibris/build/answer.txt’:
       ensure   => present,
       content => ‘yn3410nn’,
       require => Exec[‘extract_sfx"];
   }
Puppet: Hands-on lab                                                              35




• Sfx & puppet
  exec {
 "download_installer":
   command => "/usr/bin/wget
 http://sartre.ugent.be/bt/sfx_version_4_linux64_installer.run -O
 sfx_version_4_linux64_installer.run;
 /bin/chmod a+x sfx_version_4_linux64_installer.run",
   cwd     => "/exlibris/ftp_from_exlibris",
   creates => "/exlibris/ftp_from_exlibris/sfx_version_4_linux64_installer.run",
   require => File["/exlibris/ftp_from_exlibris"];
 "get_license":
   command => "/usr/bin/wget
 http://lib.ugent.be/files/elag2012/${hostname}.license -O license.txt",
   cwd     => "/exlibris/ftp_from_exlibris",
   creates => "/exlibris/ftp_from_exlibris/license.txt",
   require => File["/exlibris/ftp_from_exlibris"];
 "extract_sfx":
   command => "./sfx_version_4_linux64_installer.run --confirm < answer.txt",
   cwd     => "/exlibris/ftp_from_exlibris",
   creates => "/exlibris/ftp_from_exlibris/build",
   require => File["/exlibris/ftp_from_exlibris/answer.txt"];
 "installing_sfx":
   command => "/etc/init.d/iptables stop; /sbin/chkconfig --level 2345 iptables
 off; ./starter.sh nodisclaimer < answer.txt",
   cwd     => "/exlibris/ftp_from_exlibris/build",
   creates => "/exlibris/sfx_ver",
   timeout => "1800",
   require => File["/exlibris/ftp_from_exlibris/build/answer.txt"]; }
Puppet: Hands-on lab                         36




• Server node
 node 'ca20c802' {
   class {
     'basenode':;
     'vmware::tools':;
     'selinux::disable':;
     'exlibris':;
     'sfx':;

         'icinga':
           nrpe_allowed_hosts => ‘x.x.x.x';
         'icinga::plugins::checksfx':
           perfdata => true;
     }
 }
Puppet: Hands-on lab                                                37




• Sfx-class
 class exlibris {
   realize User_create[exlibris]

  realize   User_create[ca20c801]
  realize   User_create[ca20c802]
  realize   User_create[ca20c803]
  realize   User_create[ca20c804]

     concat::fragment { "/etc/sysconfig/iptables.exlibris.server":
       target => "/etc/sysconfig/iptables",
       source => 'puppet:///modules/exlibris/iptables.server',
       order   => 150,
     }
 }
Questions?                                                 38




                   • Questions?


                    http://www.vmware.com
        http://fedoraproject.org/wiki/Anaconda/Kickstart
                  http://www.puppetlabs.com

                  Omar.Reygaert@UGent.be

More Related Content

What's hot

Nginx 0.9.x 安装手册
Nginx 0.9.x 安装手册Nginx 0.9.x 安装手册
Nginx 0.9.x 安装手册Yiwei Ma
 
Hadoop Installation
Hadoop InstallationHadoop Installation
Hadoop Installation
mrinalsingh385
 
Nginx 0.8.x 安装手册
Nginx 0.8.x 安装手册Nginx 0.8.x 安装手册
Nginx 0.8.x 安装手册Yiwei Ma
 
An example Hadoop Install
An example Hadoop InstallAn example Hadoop Install
An example Hadoop Install
Mike Frampton
 
Single node hadoop cluster installation
Single node hadoop cluster installation Single node hadoop cluster installation
Single node hadoop cluster installation
Mahantesh Angadi
 
Hadoop 2.2.0 Multi-node cluster Installation on Ubuntu
Hadoop 2.2.0 Multi-node cluster Installation on Ubuntu Hadoop 2.2.0 Multi-node cluster Installation on Ubuntu
Hadoop 2.2.0 Multi-node cluster Installation on Ubuntu 康志強 大人
 
DevOps Braga #6
DevOps Braga #6DevOps Braga #6
DevOps Braga #6
DevOps Braga
 
Hadoop installation
Hadoop installationHadoop installation
Hadoop installation
Ankit Desai
 
Node.js basics
Node.js basicsNode.js basics
Node.js basicsBen Lin
 
How we use and deploy Varnish at Opera
How we use and deploy Varnish at OperaHow we use and deploy Varnish at Opera
How we use and deploy Varnish at Opera
Cosimo Streppone
 
Solaris_quickref.pdf
Solaris_quickref.pdfSolaris_quickref.pdf
Solaris_quickref.pdf
RobertoBravo58
 
Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015
Alex S
 
OpenStack Swift - MSST 2011 Tutorial Day
OpenStack Swift - MSST 2011 Tutorial DayOpenStack Swift - MSST 2011 Tutorial Day
OpenStack Swift - MSST 2011 Tutorial Day
Joshua McKenty
 
Light my-fuse
Light my-fuseLight my-fuse
Light my-fuse
Workhorse Computing
 
Hadoop 3.1.1 single node
Hadoop 3.1.1 single nodeHadoop 3.1.1 single node
Hadoop 3.1.1 single node
康志強 大人
 
Composer
ComposerComposer
Composer
Tom Corrigan
 
WordPress Home Server with Raspberry Pi
WordPress Home Server with Raspberry PiWordPress Home Server with Raspberry Pi
WordPress Home Server with Raspberry Pi
Yuriko IKEDA
 
Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)
Soshi Nemoto
 
Beyond Golden Containers: Complementing Docker with Puppet
Beyond Golden Containers: Complementing Docker with PuppetBeyond Golden Containers: Complementing Docker with Puppet
Beyond Golden Containers: Complementing Docker with Puppet
lutter
 

What's hot (20)

Nginx 0.9.x 安装手册
Nginx 0.9.x 安装手册Nginx 0.9.x 安装手册
Nginx 0.9.x 安装手册
 
Hadoop Installation
Hadoop InstallationHadoop Installation
Hadoop Installation
 
Nginx 0.8.x 安装手册
Nginx 0.8.x 安装手册Nginx 0.8.x 安装手册
Nginx 0.8.x 安装手册
 
Run wordcount job (hadoop)
Run wordcount job (hadoop)Run wordcount job (hadoop)
Run wordcount job (hadoop)
 
An example Hadoop Install
An example Hadoop InstallAn example Hadoop Install
An example Hadoop Install
 
Single node hadoop cluster installation
Single node hadoop cluster installation Single node hadoop cluster installation
Single node hadoop cluster installation
 
Hadoop 2.2.0 Multi-node cluster Installation on Ubuntu
Hadoop 2.2.0 Multi-node cluster Installation on Ubuntu Hadoop 2.2.0 Multi-node cluster Installation on Ubuntu
Hadoop 2.2.0 Multi-node cluster Installation on Ubuntu
 
DevOps Braga #6
DevOps Braga #6DevOps Braga #6
DevOps Braga #6
 
Hadoop installation
Hadoop installationHadoop installation
Hadoop installation
 
Node.js basics
Node.js basicsNode.js basics
Node.js basics
 
How we use and deploy Varnish at Opera
How we use and deploy Varnish at OperaHow we use and deploy Varnish at Opera
How we use and deploy Varnish at Opera
 
Solaris_quickref.pdf
Solaris_quickref.pdfSolaris_quickref.pdf
Solaris_quickref.pdf
 
Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015
 
OpenStack Swift - MSST 2011 Tutorial Day
OpenStack Swift - MSST 2011 Tutorial DayOpenStack Swift - MSST 2011 Tutorial Day
OpenStack Swift - MSST 2011 Tutorial Day
 
Light my-fuse
Light my-fuseLight my-fuse
Light my-fuse
 
Hadoop 3.1.1 single node
Hadoop 3.1.1 single nodeHadoop 3.1.1 single node
Hadoop 3.1.1 single node
 
Composer
ComposerComposer
Composer
 
WordPress Home Server with Raspberry Pi
WordPress Home Server with Raspberry PiWordPress Home Server with Raspberry Pi
WordPress Home Server with Raspberry Pi
 
Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)
 
Beyond Golden Containers: Complementing Docker with Puppet
Beyond Golden Containers: Complementing Docker with PuppetBeyond Golden Containers: Complementing Docker with Puppet
Beyond Golden Containers: Complementing Docker with Puppet
 

Viewers also liked

AppCampus overview
AppCampus overviewAppCampus overview
AppCampus overview
Teemu Tapanila
 
The importance of words
The importance of wordsThe importance of words
The importance of words
ConnectingHR
 
AppCampus Overview 19.9
AppCampus Overview 19.9AppCampus Overview 19.9
AppCampus Overview 19.9
Teemu Tapanila
 
Options on export freight hemanshi bharmani
Options on export freight   hemanshi bharmaniOptions on export freight   hemanshi bharmani
Options on export freight hemanshi bharmani
Hemanshi Bharmani
 
TechDays 2013: Creating backend with windows azure mobile services
TechDays 2013: Creating backend with windows azure mobile servicesTechDays 2013: Creating backend with windows azure mobile services
TechDays 2013: Creating backend with windows azure mobile services
Teemu Tapanila
 
Halon Banking Systems
Halon Banking SystemsHalon Banking Systems
Halon Banking Systemsdenisacojo
 

Viewers also liked (7)

Vitaa
VitaaVitaa
Vitaa
 
AppCampus overview
AppCampus overviewAppCampus overview
AppCampus overview
 
The importance of words
The importance of wordsThe importance of words
The importance of words
 
AppCampus Overview 19.9
AppCampus Overview 19.9AppCampus Overview 19.9
AppCampus Overview 19.9
 
Options on export freight hemanshi bharmani
Options on export freight   hemanshi bharmaniOptions on export freight   hemanshi bharmani
Options on export freight hemanshi bharmani
 
TechDays 2013: Creating backend with windows azure mobile services
TechDays 2013: Creating backend with windows azure mobile servicesTechDays 2013: Creating backend with windows azure mobile services
TechDays 2013: Creating backend with windows azure mobile services
 
Halon Banking Systems
Halon Banking SystemsHalon Banking Systems
Halon Banking Systems
 

Similar to Virtualization and automation of library software/machines + Puppet

Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013
grim_radical
 
OpenNebula 5.4 Hands-on Tutorial
OpenNebula 5.4 Hands-on TutorialOpenNebula 5.4 Hands-on Tutorial
OpenNebula 5.4 Hands-on Tutorial
OpenNebula Project
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with Puppet
Kris Buytaert
 
20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasaggarrett honeycutt
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with Ansible
Rayed Alrashed
 
Installing odoo v8 from github
Installing odoo v8 from githubInstalling odoo v8 from github
Installing odoo v8 from github
Antony Gitomeh
 
(WEB307) Scalable Site Management Using AWS OpsWorks | AWS re:Invent 2014
(WEB307) Scalable Site Management Using AWS OpsWorks | AWS re:Invent 2014(WEB307) Scalable Site Management Using AWS OpsWorks | AWS re:Invent 2014
(WEB307) Scalable Site Management Using AWS OpsWorks | AWS re:Invent 2014
Amazon Web Services
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
Kris Buytaert
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
Leo Lorieri
 
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESQuick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESJan Kalcic
 
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
Puppet
 
Challenges of container configuration
Challenges of container configurationChallenges of container configuration
Challenges of container configuration
lutter
 
Using Puppet to Create a Dynamic Network - PuppetConf 2013
Using Puppet to Create a Dynamic Network - PuppetConf 2013Using Puppet to Create a Dynamic Network - PuppetConf 2013
Using Puppet to Create a Dynamic Network - PuppetConf 2013
Puppet
 
Deploying Django with Ansible
Deploying Django with AnsibleDeploying Django with Ansible
Deploying Django with Ansible
andrewmirskynet
 
Puppi. Puppet strings to the shell
Puppi. Puppet strings to the shellPuppi. Puppet strings to the shell
Puppi. Puppet strings to the shell
Alessandro Franceschi
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
biicode
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modules
Kris Buytaert
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawn
Gábor Nyers
 

Similar to Virtualization and automation of library software/machines + Puppet (20)

Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013
 
OpenNebula 5.4 Hands-on Tutorial
OpenNebula 5.4 Hands-on TutorialOpenNebula 5.4 Hands-on Tutorial
OpenNebula 5.4 Hands-on Tutorial
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with Puppet
 
20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with Ansible
 
Puppet
PuppetPuppet
Puppet
 
Installing odoo v8 from github
Installing odoo v8 from githubInstalling odoo v8 from github
Installing odoo v8 from github
 
Dev ops
Dev opsDev ops
Dev ops
 
(WEB307) Scalable Site Management Using AWS OpsWorks | AWS re:Invent 2014
(WEB307) Scalable Site Management Using AWS OpsWorks | AWS re:Invent 2014(WEB307) Scalable Site Management Using AWS OpsWorks | AWS re:Invent 2014
(WEB307) Scalable Site Management Using AWS OpsWorks | AWS re:Invent 2014
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESQuick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
 
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
 
Challenges of container configuration
Challenges of container configurationChallenges of container configuration
Challenges of container configuration
 
Using Puppet to Create a Dynamic Network - PuppetConf 2013
Using Puppet to Create a Dynamic Network - PuppetConf 2013Using Puppet to Create a Dynamic Network - PuppetConf 2013
Using Puppet to Create a Dynamic Network - PuppetConf 2013
 
Deploying Django with Ansible
Deploying Django with AnsibleDeploying Django with Ansible
Deploying Django with Ansible
 
Puppi. Puppet strings to the shell
Puppi. Puppet strings to the shellPuppi. Puppet strings to the shell
Puppi. Puppet strings to the shell
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modules
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawn
 

Recently uploaded

Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 

Recently uploaded (20)

Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 

Virtualization and automation of library software/machines + Puppet

  • 1.
  • 2. Introduction 2 • Virtualization – What is it? – Hands-on lab • Automation – How do you mean? – Hands-on lab • Puppet – Manipulating – Hands-on lab • Questions?
  • 3. Virtualization: What is it? 3 • Stand alone server – Host & Guest • Dedicated Server – Guest => Virtual Machine – Host => Actual machine • Benefits – Less physical machines – Easy to move
  • 4. Virtualization: What is it? 4 • Virtualization today: – VMware -> vsphere – Microsoft -> Hyper-V – Redhat -> RHEV – VMware player http://www.vmware.com/products/player/ – VMware esxi http://www.vmware.com/products/vsphere-hypervisor/overview.html – VirtualBox http://www.virtualbox.org/ – KVM http://www.linux-kvm.org/page/Main_Page – Xen http://www.xen.org/
  • 12. Automation: How do you mean? 12 • Installing OS – > insert disc, choose options, configure root, etc… – > Login, create users, configure server –>… • Automation = install steps written in file – Kickstart – Preseed
  • 13. Automation: How do you mean? 13 • Creating kickstart file – Set language, keyboard, timezone, root password, network, … lang en_US langsupport en_US.UTF-8 keyboard us timezone --utc Europe/Brussels rootpw *** text skipx install cdrom zerombr bootloader --location=mbr network --bootproto=dhcp key XXXXXXXXXXXXXXXX • Hard disc formating clearpart --all --initlabel part /boot --fstype ext3 --size=150 --ondisk=sda part / --fstype=ext3 --size=1024 --ondisk=sda part swap --size=7644 --ondisk=sda part pv.6 --size=0 --grow --ondisk=sda volgroup vg00 --pesize=32768 pv.6 logvol /var/log --fstype ext3 --name=varlog --vgname=vg00 --size=2048
  • 14. Automation: How do you mean? 14 • Hard disc – Additional partition exlibris (35GB) clearpart --all --initlabel part /boot --fstype ext3 --size=150 --ondisk=sda part / --fstype=ext3 --size=1024 --ondisk=sda part swap --size=4096 --ondisk=sda part pv.6 --size=0 --grow --ondisk=sda volgroup vg00 --pesize=32768 pv.6 logvol /var/log --fstype ext3 --name=varlog --vgname=vg00 --size=2048 logvol /var --fstype ext3 --name=var --vgname=vg00 --size=1536 logvol /tmp --fstype ext3 --name=tmp --vgname=vg00 --size=5120 logvol /opt --fstype ext3 --name=opt --vgname=vg00 --size=1024 logvol /usr --fstype ext3 --name=usr --vgname=vg00 --size=4096 logvol /home --fstype ext3 --name=home --vgname=vg00 --size=512 logvol /exlibris --fstype ext3 --name=exlibris --vgname=vg00 --size=35840 • End script auth --useshadow --enablemd5 selinux --disabled firewall --enabled --ssh firstboot --disabled reboot --eject
  • 15. Automation: How do you mean? 15 • Add packages repo --name=epel --baseurl=http://dl.fedoraproject.org/pub/epel/5/x86_64/ %packages @core epel-release-5-4 screen ruby puppet • Post – Define hostname, register with RedHat, set puppetmaster %post --log=/root/postinstall.log # set hostname to the dns one IP=`ifconfig eth0 | grep "addr:" | cut -d':' -f2 | cut -d' ' -f1` HOSTNAME=`nslookup $IP | grep "name =" | cut -d'=' -f2 | sed 's/.(.*)./1/'` SHORTHOSTNAME=`nslookup $IP | grep "name =" | cut -d'=' -f2 | sed 's/.(.*)./1/' | cut -d'.' -f1` # replace the hostname in the network configuration grep -v "HOSTNAME" /etc/sysconfig/network > /tmp/network echo "HOSTNAME=${HOSTNAME}" >> /tmp/network cp /tmp/network /etc/sysconfig/network echo "${IP} ${HOSTNAME} ${SHORTHOSTNAME}" >> /etc/hosts rhnreg_ks --profilename=${HOSTNAME} --activationkey=XXXXXXXXXXXXX
  • 16. Automation: How do you mean? 16 • Users and SSH – Add user, disable root-ssh-login, config port ssh, update system # Create user install useradd --uid 900 install # Set passwd for user install echo "***" | passwd --stdin install # Disable ssh rootlogin sed -e 's/^#PermitRootLoginsyes$/PermitRootLogin no/' < /etc/ssh/sshd_config > /tmp/sshd_config # Use port 22000 as default sed -e 's/^#Ports22$/Port 22000/' < /tmp/sshd_config > /tmp/sshd_config2 mv /tmp/sshd_config2 /etc/ssh/sshd_config rm /tmp/sshd_config # Open non default port 22000 for ssh sed -e 's/--dports22/--dport 22000/' < /etc/sysconfig/iptables > /tmp/iptables mv /tmp/iptables /etc/sysconfig/iptables /usr/bin/yum clean all /usr/bin/yum -y update /usr/bin/yum clean all
  • 17. Automation: Hands-on lab 17 • Try to create SFX-installation - Packages /usr/bin/yum -y install glibc unixODBC unixODBC-devel e2fsprogs-libs expat libxml2 zlib libxslt libgcrypt libgpg-error krb5-libs keyutils-libs libselinux libsepol gmp pcre libaio gdbm libstdc++ ncurses bzip2-libs /usr/bin/yum clean all #Disable selinux echo 0 > /selinux/enforce #stop iptables /etc/init.d/iptables stop #disable iptables /sbin/chkconfig --level 2345 iptables off – Sfx-installer can extract only • ./sfx_version_4_linux64_installer.run --confirm – Sfx-installer can run without disclaimer • ./starter.sh nodisclaimer
  • 18. Automation: Hands-on lab 18 • Sfx-installer can extract only • Sfx-installer can run without disclaimer
  • 19. Automation: Hands-on lab 19 • Sfx-installer can use auto answer-file – Sfx-installer can extract only – Sfx-installer can run without disclaimer
  • 20. Automation: Hands-on lab 20 • How to do this? mkdir -m777 /exlibris/ftp_from_exlibris cd /exlibris/ftp_from_exlibris wget 'http://sartre.ugent.be/bt/sfx_version_4_linux64_installer.run‘ chmod a+x sfx_version_4_linux64_installer.run /bin/echo “LICENSE-SFXGLB41" > license.txt /bin/echo “LICENSE-SFXLCL41" >> license.txt /bin/echo “LICENSE-SFXTST41" >> license.txt # extract sfx_installer echo "y" > answer.txt echo "n" >> answer.txt ./sfx_version_4_linux64_installer.run --confirm < answer.txt #start installer cd build echo "y" > answer.txt echo "3410" >> answer.txt echo "n" >> answer.txt ./starter.sh nodisclaimer < answer.txt # Set passwd for users sfx echo "***" | passwd --stdin sfxglb41 echo "***" | passwd --stdin sfxlcl41 echo "***" | passwd --stdin sfxtst41
  • 21. Automation: Hands-on lab 21 • Finishing script # Add port 80 for browsing sed -e 's/^Listens3410$/Listen 80nListen 3410/' < /exlibris/sfx_ver/sfx4_1/proxy/conf/httpd.conf > /tmp/httpproxy.conf mv /tmp/httpproxy.conf /exlibris/sfx_ver/sfx4_1/proxy/conf/httpd.conf # Open the port in the firewall sed '/23000/i-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp -- dport 80 -j ACCEPT' < /etc/sysconfig/iptables > /tmp/iptables sed '/23000/i-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp -- dport 3410 -j ACCEPT' < /tmp/iptables > /etc/sysconfig/iptables #Enable back iptables /sbin/chkconfig --level 2345 iptables on
  • 25. Puppet: Manipulating 25 • Automation software • DSL Language written in Ruby • Client / server oriented • Repeatable processes • Abstraction layers
  • 26. Puppet: Manipulating 26 • Abstraction layers? – Package managers | User management | Services Apt, dpkg, yum, rpm, pkg, … | useradd, adduser, dscl, …
  • 27. Puppet: Manipulating 27 • Server structure ‒ puppet/ ‒ manifests/ ‒ environments / ‒ production / ‒ modules / ‒ [a-z][a-z0-9_]* / ‒ files / ‒ manifests / ‒ init.pp ‒ templates / ‒ tests / ‒ manifests / ‒ nodes.pp ‒ development /
  • 28. Puppet: Manipulating 28 • Nodes.pp node HOSTNAME { include apache; class { 'ntp': enable => false; } apache::vhost { 'personal_site': port => 80, docroot => '/var/www/personal', options => 'Indexes MultiViews‘; } } • Module – [a-z][a-z0-9_]* (except main, settings)
  • 29. Puppet: Manipulating 29 ‒modules / • init.pp ‒[a-z][a-z0-9_]* / ‒files / – Class-name same as module ‒service.conf ‒manifests / ‒init.pp • otherclass.pp ‒otherclass.pp ‒templates / – my_module::otherclass ‒template.erb ‒tests / • files/service.conf – puppet:///modules/my_module/service.conf • templates/template.erb – template('my_module/template.erb')
  • 30. Puppet: Manipulating 30 • Built-in resources: – file file { ‘/exlibris’: ensure => directory, mode => 777, group => exlibris; } file {‘/exlibris/ftp_from_exlibris/build/answer.txt’: ensure => present, content => "yn3410nn", require => Exec["extract_sfx"]; } file { ‘/exlibris’: ensure => directory, mode => 777, group => exlibris; ‘/exlibris/ftp_from_exlibris/build/answer.txt’: ensure => present, content => "yn3410nn", require => Exec["extract_sfx"]; }
  • 31. Puppet: Manipulating 31 – package package { ‘glibc’: ensure => ‘installed’; ‘unixODBC’: ensure => ‘installed’; ‘unixODBC-devel’ ensure => ‘latest’; ‘gdbm.i686’: ensure => ‘2.2.16-6’; } Package { ensure => ‘installed’ } $package2install = [ ‘glibc’, ‘unixODBC’, ‘unixODBC-devel’, ‘gdbm.i686’ ] package { $package2install: } – exec exec { ‘download_installer’: command => ‘./sfx_version_4_linux64_installer.run --confirm < answer.txt’, cwd => ‘/exlibris/ftp_from_exlibris’, creates => ‘/exlibris/ftp_from_exlibris/build’, require => File[‘/exlibris/ftp_from_exlibris’]; }
  • 32. Puppet: Manipulating 32 – user & group user { ‘ca20c800’: ensure => ‘present’, group { ‘ca20c800’: comment => ‘Comment for user’, ensure => ‘present’, uid => ‘600’, gid => ‘600’; gid => ‘600’, } membership => minimum, shell => ‘/bin/bash’, home => ‘/home/$title", require => Group[$title], password => ‘***’; } – ± 40 different resource types • cron • mount • yumrepo
  • 33. Puppet: Hands-on lab 33 • Sfx & puppet class sfx { Package { ensure => "installed"} $package2install = [ "glibc", "unixODBC-devel", "e2fsprogs- libs", "unixODBC", "expat", "libxml2", "zlib", "libxslt", "libgcrypt", "libgpg- error", "krb5-libs", "keyutils- libs", "libselinux", "libsepol", "gmp", "pcre.i686", "pcre.x86_64", "libaio", " gdbm.i686", "gdbm.x86_64", "libstdc++", "ncurses", "bzip2-libs.i686", "bzip2- libs.x86_64" ] package { $package2install: } concat::fragment { "/etc/sysconfig/iptables.sfx.server": target => "/etc/sysconfig/iptables", source => 'puppet:///modules/sfx/iptables.server', order => 200, }
  • 34. Puppet: Hands-on lab 34 • Sfx & puppet file { ‘/exlibris’: ensure => directory, group => exlibris; ‘/exlibris/ftp_from_exlibris’: ensure => directory, group => exlibris, mode => 777, require => File[‘/exlibris’]; ‘/exlibris/ftp_from_exlibris/answer.txt’: ensure => present, content => ‘ynn’, ‘/exlibris/ftp_from_exlibris/build/answer.txt’: ensure => present, content => ‘yn3410nn’, require => Exec[‘extract_sfx"]; }
  • 35. Puppet: Hands-on lab 35 • Sfx & puppet exec { "download_installer": command => "/usr/bin/wget http://sartre.ugent.be/bt/sfx_version_4_linux64_installer.run -O sfx_version_4_linux64_installer.run; /bin/chmod a+x sfx_version_4_linux64_installer.run", cwd => "/exlibris/ftp_from_exlibris", creates => "/exlibris/ftp_from_exlibris/sfx_version_4_linux64_installer.run", require => File["/exlibris/ftp_from_exlibris"]; "get_license": command => "/usr/bin/wget http://lib.ugent.be/files/elag2012/${hostname}.license -O license.txt", cwd => "/exlibris/ftp_from_exlibris", creates => "/exlibris/ftp_from_exlibris/license.txt", require => File["/exlibris/ftp_from_exlibris"]; "extract_sfx": command => "./sfx_version_4_linux64_installer.run --confirm < answer.txt", cwd => "/exlibris/ftp_from_exlibris", creates => "/exlibris/ftp_from_exlibris/build", require => File["/exlibris/ftp_from_exlibris/answer.txt"]; "installing_sfx": command => "/etc/init.d/iptables stop; /sbin/chkconfig --level 2345 iptables off; ./starter.sh nodisclaimer < answer.txt", cwd => "/exlibris/ftp_from_exlibris/build", creates => "/exlibris/sfx_ver", timeout => "1800", require => File["/exlibris/ftp_from_exlibris/build/answer.txt"]; }
  • 36. Puppet: Hands-on lab 36 • Server node node 'ca20c802' { class { 'basenode':; 'vmware::tools':; 'selinux::disable':; 'exlibris':; 'sfx':; 'icinga': nrpe_allowed_hosts => ‘x.x.x.x'; 'icinga::plugins::checksfx': perfdata => true; } }
  • 37. Puppet: Hands-on lab 37 • Sfx-class class exlibris { realize User_create[exlibris] realize User_create[ca20c801] realize User_create[ca20c802] realize User_create[ca20c803] realize User_create[ca20c804] concat::fragment { "/etc/sysconfig/iptables.exlibris.server": target => "/etc/sysconfig/iptables", source => 'puppet:///modules/exlibris/iptables.server', order => 150, } }
  • 38. Questions? 38 • Questions? http://www.vmware.com http://fedoraproject.org/wiki/Anaconda/Kickstart http://www.puppetlabs.com  Omar.Reygaert@UGent.be