The Ultimate Guide to Choosing WordPress Pros and Cons
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/
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