Initial RHEL7/Centos7 support

Install the right EPEL and puppet rpm's for RHEL7/Centos7.

I have tested this on one of the CentOS nightly builds and
run_puppet.sh, install_modules.sh and a puppet apply of
openstack_project::single_use_slave works as expected

Change-Id: I80024d1afdb4e40d5fe9793ab2ec443b887c5fa8
This commit is contained in:
Ian Wienand 2014-06-30 13:05:42 +10:00
parent b63a96079e
commit 7a5186cfc3

View File

@ -44,6 +44,12 @@ function is_rhel6 {
cat /etc/*release | grep -q 'release 6'
}
function is_rhel7 {
[ -f /usr/bin/yum ] && \
cat /etc/*release | grep -q -e "Red Hat" -e "CentOS" && \
cat /etc/*release | grep -q 'release 7'
}
function is_ubuntu {
[ -f /usr/bin/apt-get ]
}
@ -76,6 +82,23 @@ function setup_puppet_fedora {
ln -s /usr/bin/pip /usr/bin/pip-python
}
function setup_puppet_rhel7 {
local epel_pkg="http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm"
local puppet_pkg="https://yum.puppetlabs.com/el/7/products/x86_64/puppetlabs-release-7-10.noarch.rpm"
# install EPEL
rpm -qi epel-release &> /dev/null || rpm -Uvh $epel_pkg
# NOTE: we preinstall lsb_release to ensure facter sets lsbdistcodename
yum install -y redhat-lsb-core git puppet
rpm -ivh $puppet_pkg
# see comments in setup_puppet_fedora
ln -s /usr/bin/pip /usr/bin/pip-python
}
function setup_puppet_rhel6 {
local epel_pkg="http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm"
local puppet_pkg="http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-6.noarch.rpm"
@ -191,6 +214,8 @@ if is_fedora; then
setup_puppet_fedora
elif is_rhel6; then
setup_puppet_rhel6
elif is_rhel7; then
setup_puppet_rhel7
elif is_ubuntu; then
setup_puppet_ubuntu
else