You are here

architecting your data center (version 2) - part 3 - spacewalk

it was a tough call to make: spacewalk or gitlab; eventually the thought of downloading loads of packages everytime i updated a vm won me over. there is another advantage to having your own spacewalk instance on site that i will talk about in a later article.

you may be wondering why i wanted to install gitlab. well, i want to document my notes in a wiki at the same time i wanted to have a common source code repository, not only for scripts but also for files like /etc/hosts. as i add more VMs i will be adding them to the hosts file.

but i digress, i was talking about spacewalk. this is my third article in a series entitled "architecting your data center (version 2)". the objective being to record my (succesful) steps as i build out an infrastructure for openstack cloud

the spacewalk installation was actually pretty painless, i recycled some scripts i had already written and used those

you start off with the installation script and it will do the rest.

so on the spacewalk vm we do

curl https://raw.githubusercontent.com/marafa/spacewalk/master/install_spacewalk.sh | bash

and once that is done we set up crontab to update daily

0 5 * * * /root/bin/populate.sh > /var/log/spacewalk_populate.log 2>&1; rm -rf /var/tmp/populate.lck

and finally, give the /root/bin/populate.sh script the once over to verify we have enabled the correct procedures to run daily as well as the correct ip for our spacewalk server; this is required for the clients to contact the server.

and last but not least, we ensure that we have our /etc/logrotate.d/spacewalk-populate script in place

/var/log/spacewalk_populate.log {
        daily
        compress
        notifempty
        dateext
        rotate 30
}

leave the vm for 24 hours and i hope your bandwidth is good enough for the process of populating the channels and .. enjoy!