[Users] Centos 6.5 host configuration script -- a tale begun
Itamar Heim
iheim at redhat.com
Sun Jan 5 13:43:03 UTC 2014
On 12/13/2013 06:48 AM, Ted Miller wrote:
> I have been working since Monday to get a Centos 6.5 host node added to
> ovirt. Since 6.5 is just out, I figured I might as well use the latest
> and greatest to build my host. Today I succeeded (I think). I have not
> actually added a VM to the host, but at least ovirt is willing to accept
> that the host is part of the default cluster. My next task will be
> bringing up gluster on that same node.
>
> Since I will be doing at least three more hosts, I wrote a shell script
> to do a the setup that is needed to make the ovirt process succeed.
>
> No, I do not have a similar script for the engine. I got that running
> under Centos 6.4 in a VM, without too much problem. That VM is
> temporarily running on a KVM host (but that host is not under ovirt).
>
> Feel welcome to stare at or run my script and make any comments or
> observations.
>
> * The script is run after a clean install of Centos 6.5 from the
> "minimal" ISO.
> * I will try to remember what each element was there for, if anything
> is not clear.
> * There are probably a few (not many) things there that are not needed
> o Mostly they result in doing something ahead of time that ovirt
> was going to do later anyway.
> * Feel free to point out a better way to do whatever needs to be done.
> * Bits and pieces of the script were stolen from googleing here and there.
> * Parts of the script were cooked up by stewing logs over low heat
> until something useful bubbled to the top.
> * The number of clean reinstalls to test the script is beyond count.
> o I almost broke down and learned how to write a kickstart file
> (but didn't).
> * No guarantees or representations.
> o So far this script has been tested on *exactly one* set of
> bare-metal hardware
> + That hardware is not server-grade. (ovirt keeps complaining
> because I have not configured Power Management :)
> * There are a few things that are personal preferences (things I
> install on all my Linux machines)
> o I believe those preferences are clearly marked.
> o I am leaving them in because they may (incidentally) be
> installing some dependencies that influence the outcome of the
> process.
>
>
> I hope to see a day when a similar script is either not needed, or is
> available and maintained as part of the Centos distro, or as part of
> ovirt. Meanwhile we try to muddle through.
>
> I will copy my script into this webmail interface (OWA) (since I am
> writing at home and this is all I have to work with) and see how bad it
> mangles it. You'll probably need a wide window so that lines don't
> wrap, as Microsoft thinks this OWA interface doesn't ever need to let me
> specify text as "preformat". I called my script ov_host-start.sh
>
>
> # script to prepare Centos 6.5 for ovirt host install process
>
> echo "================= Ted's personal preferences--early
> ========================"
>
> yum -y install nano deltarpm yum-plugin-priorities yum-presto mlocate
>
> echo "=================== end of Ted's personal preferences--early
> ================"
>
> yum -y upgrade
>
> echo "....................install some repos (if not already
> done).................."
> cd /etc/yum.repos.d
> if [ ! -f glusterfs-epel.repo ] ; then
> echo "..............installing gluster repo......................."
> yum -y install wget
> wget
> http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/glusterfs-epel.repo
> echo "..............done installing gluster repo.................."
> fi
>
> if [ ! -f el6-ovirt.repo ] ; then
> echo "..............installing ovirt repo......................."
> yum -y localinstall http://ovirt.org/releases/ovirt-release-el.noarch.rpm
> echo "..............done installing ovirt repo.................."
> fi
>
> if [ ! -f epel.repo ] ; then
> echo "..............installing epel repo......................."
> yum -y localinstall
> http://mirror.us.leaseweb.net/epel/6/i386/epel-release-6-8.noarch.rpm
> echo "..............done installing epel repo.................."
> fi
>
>
> echo "........install libvirt............................"
> yum -y install libvirt qemu-kvm tuned
> echo "........install virt-manager" # with unlisted dependencies
> yum -y install virt-manager xorg-x11-xauth dejavu-lgc-sans-mono-fonts
>
> # create the ovirtmgmt bridge
> if [ ! -f /etc/sysconfig/network-scripts/ifcfg-ovirtmgmt ]; then
> echo "........................creating ovirtmgmt
> bridge......................"
> service libvirtd start
> service libvirtd status
> virsh net-destroy default
> virsh net-undefine default
> virsh iface-bridge eth0 ovirtmgmt
> service network restart
> service libvirtd stop
> service libvirtd status
> fi
>
> echo ".........copy tuned profile..............."
> # copy virtual-host --> rhs-virtualization so ovirt is happy
> cp -r /etc/tune-profiles/virtual-host /etc/tune-profiles/rhs-virtualization
>
> yum -y install vdsm
>
> echo "================= Ted's personal preferences--late
> ================================="
>
> #add lines to send messages to TTY12
> cat /etc/rsyslog.conf | grep tty12
> if [ ! $? -eq 0 ] ; then
> echo ".......................Adding for tty12...................."
> echo " " >> /etc/rsyslog.conf
> echo "# Log everything to tty12" >> /etc/rsyslog.conf
> echo "*.* /dev/tty12" >> /etc/rsyslog.conf
> service rsyslog restart
> fi
>
> echo "...........install gkrellm.............."
> yum -y install gkrellm
>
> #add poll=0 to kill noveau messages
> cat /boot/grub/grub.conf | grep poll=0
> if [ ! $? -eq 0 ] ; then
> echo "............................Adding
> poll=0.........................."
> sed -i '/^[ \t]kernel*/ s/$/ drm-kms-helper.poll=0/g'
> /boot/grub/grub.conf
> fi
>
>
>
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
this shouldn't be complicated - i suggest opening a bug/rfe on any
issue/step (within reason) that should/could be removed.
More information about the Users
mailing list