0

Dell OMSA 101 – mirroring and bootstraping

If you have a environment that has a lot of dell servers and want to get storage and chassis information OMSA is the way to do it. If your machines have access to the internet you can easily download it from linux.dell.com and install it however if you have a good number of servers and/or do not have access to the internet via your servers you will most likely want to mirror the repository so that you can install it from your trusted host.

In this post we will assume that we have a trusted host that has access to all of the servers in the environment. The trusted host will run httpd service to serve the respository via http.

Setup a local mirror

There is actually 2 different repository's thats needed to have this setup : community repo & hardware repo. we will use /repo/dell as our local directory and /repo as the root of the http services.

Please note you will need to set AllowOverride All for the /repo/dell directory via your httpd.conf files.

Unless storage space isn't a issue you'll most likely want to setup an exclude file to exclude files/directories from the rsync. For my setup I just wanted the most current ( at current time 7.1 ) and my trusted host will only install onto *el and sles servers.

I've created 2 exclude files one for the community repo and the other for the hardware repo.

exclude-community.txt

deb

exclude-hardware.txt

2006_Q4
2007_Q1
2007_Q4
2008_Q1
2008_Q3
2009_Q2
2009_Q4
2010_Q2
2010_Q4
2011_Q1
2011_Q2
2011_Q3
2011_Q4
2012_Q1
OMSA_5.1
OMSA_5.2
OMSA_5.3
OMSA_5.4
OMSA_5.4.1
OMSA_5.5
OMSA_6.0.1
OMSA_6.0.2
OMSA_6.1
OMSA_6.2
OMSA_6.3
OMSA_6.4
OMSA_6.5
OMSA_6.5.1
OMSA_6.5.2
OMSA_6.5.3
OMSA_7.0
DCIA/1.0.0
vcenter-plugin
beta

I've also setup a sync script so that it will populate my repos and mirror from linux.dell.com and setup my local repos properly

sync.sh

#!/bin/sh

# change directory
cd /repo/dell/

# rsync community repo
rsync -avHz --progress --exclude-from '/repo/dell/exclude-community.txt' linux.dell.com::repo/community .

# copy over the right htaccess
cp -f /repo/dell/community/_tools/htaccess_repo_topdir /repo/dell/community/.htaccess

# rsync hardware repo
rsync -avHz --progress --exclude-from '/repo/dell/exclude-hardware.txt' linux.dell.com::repo/hardware .

# copy over the right htaccess
cp -f /repo/dell/hardware/latest/_tools/htaccess_repo_topdir /repo/dell/hardware/latest/.htaccess

# copy over the right htaccess
cp -f /repo/dell/hardware/OMSA_6.3/_tools/htaccess_repo_topdir /repo/dell/hardware/OMSA_6.3/.htaccess

# create symlinks for yum
ln -s /repo/dell/community/content/el4-i386 /repo/dell/community/content/el4Server-i386
ln -s /repo/dell/community/content/el4-x86_64 /repo/dell/community/content/el4Server-x86_64

ln -s /repo/dell/community/content/el5-i386 /repo/dell/community/content/el5Server-i386
ln -s /repo/dell/community/content/el5-x86_64 /repo/dell/community/content/el5Server-x86_64

ln -s /repo/dell/community/content/el6-i386 /repo/dell/community/content/el6Server-i386
ln -s /repo/dell/community/content/el6-x86_64 /repo/dell/community/content/el6Server-x86_64

I would run the sync.sh once a quarter to make sure that I have the latest repo's setup. Dell seems to release new versions every quarter or so.

bootstrap and install OMSA

I generated another script which will bootstrap and install OMSA onto the servers. For my setup I only want to install the base/storage services/rac5 since most of my servers are more recent and I do not want to run the omsa web services on my server.

omsa.sh

#!/bin/sh

echo -e "33[32m[DEBUG] CHECKING OS VERSION33[37m"

if [ `dmidecode | grep -c -i vmware` -ge 1 ]
then
echo -e "33[31m[DEBUG] DETECTED VMWARE GUEST exiting..33[37m"
exit
fi

VERSION="UNKNOWN"

if [ `grep -c Nahant /etc/redhat-release` -ge 1 ]
then
echo -e "33[32m[DEBUG] RHEL4 DETECTED33[37m"
echo -e "33[32m[DEBUG] CLEANING CACHE33[37m"
yum clean all
echo -e "33[32m[DEBUG] BOOTSTRAPING OMSA COMMUNITY REPO33[37m"
wget -q -O - http://10.80.120.58/repo/dell/community/bootstrap.cgi | bash
sleep 2
echo -e "33[32m[DEBUG] INSTALLING yum-dellsysid33[37m"
yum -y install yum-dellsysid
sleep 2
echo -e "33[32m[DEBUG] BOOTSTRAPING DELL HARDWARE REPO33[37m"
wget -q -O - http://10.80.120.58/repo/dell/hardware/OMSA_6.3/bootstrap.cgi | bash
sleep 5
echo -e "33[32m[DEBUG] INSTALLING OMSA33[37m"
yum --disablerepo=Server install -y srvadmin-base srvadmin-storageservices srvadmin-rac5
exit
fi

if [ `grep -c Tikanga /etc/redhat-release` -ge 1 ]
then
echo -e "33[32m[DEBUG] RHEL5 DETECTED33[37m"
echo -e "33[32m[DEBUG] CLEANING CACHE33[37m"
yum clean all
echo -e "33[32m[DEBUG] BOOTSTRAPING OMSA COMMUNITY REPO33[37m"
wget -q -O - http://10.80.120.58/repo/dell/community/bootstrap.cgi | bash
sleep 2
echo -e "33[32m[DEBUG] INSTALLING yum-dellsysid33[37m"
yum --disableplugin=fastestmirror --disablerepo=Cluster,ClusterStorage,Server,VT,misc -y install yum-dellsysid
sleep 2
echo -e "33[32m[DEBUG] BOOTSTRAPING DELL HARDWARE REPO33[37m"
wget -q -O - http://10.80.120.58/repo/dell/hardware/latest/bootstrap.cgi | bash
sleep 5
echo -e "33[32m[DEBUG] INSTALLING OMSA33[37m"
yum --disableplugin=fastestmirror --disablerepo=Cluster,ClusterStorage,Server,VT,misc install -y srvadmin-base srvadmin-storageservices srvadmin-rac5
exit
fi

if [ `grep -c Santiago /etc/redhat-release` -ge 1 ]
then
echo -e "33[32m[DEBUG] RHEL6 DETECTED33[37m"
echo -e "33[32m[DEBUG] CLEANING CACHE33[37m"
yum clean all
echo -e "33[32m[DEBUG] BOOTSTRAPING OMSA COMMUNITY REPO33[37m"
wget -q -O - http://10.80.120.58/repo/dell/community/bootstrap.cgi | bash
sleep 2
echo -e "33[32m[DEBUG] INSTALLING yum-dellsysid33[37m"
yum --disableplugin=fastestmirror --disablerepo=HighAvailability,LoadBalancer,ResilientStorage,ScalableFileSystem,Server -y install yum-dellsysid
sleep 2
echo -e "33[32m[DEBUG] BOOTSTRAPING DELL HARDWARE REPO33[37m"
wget -q -O - http://10.80.120.58/repo/dell/hardware/latest/bootstrap.cgi | bash
sleep 5
echo -e "33[32m[DEBUG] INSTALLING OMSA33[37m"
yum --disableplugin=fastestmirror --disablerepo=HighAvailability,LoadBalancer,ResilientStorage,ScalableFileSystem,Server install -y srvadmin-base srvadmin-storageservices srvadmin-rac5
exit
fi

if [ $VERSION = "UNKNOWN" ]
then
echo -e "33[31m[DEBUG] UNKNOWN RHEL VERSION exiting..33[37m"
exit
fi

You can incorporate this script into the post scripts section of your installs or you can set it up as a separate file and copy and run it locally on each server. you will need to modify the omsa.sh if your installing to sles servers since it uses rug/zypper/yast.

enjoy!!

jlim0930

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.