57 lines
2.5 KiB
Bash
Executable File
57 lines
2.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eux
|
|
set -o pipefail
|
|
|
|
# Install repo file for Delorean master packages
|
|
# Pin to an older repo for now because newer openstack-keystone requires a
|
|
# newer and not yet avaialable python-pycadf.
|
|
export DELOREAN_REPO=${DELOREAN_REPO:-"http://trunk.rdoproject.org/centos70/77/67/77671d5de0e40da08f31b91823dc93a0c1d39c31_1b51cbaf/delorean.repo"}
|
|
sudo curl -o /etc/yum.repos.d/delorean.repo $DELOREAN_REPO
|
|
# We need to have the main delorean repo have a lower priority than ours to ensure our changes get installed
|
|
sudo sed -i 's/priority=1/priority=10/' /etc/yum.repos.d/delorean.repo
|
|
|
|
# Install repo file for Delorean el7 midstream packages built from
|
|
# rdo-management.
|
|
export DELOREAN_RHEL7_REPO=${DELOREAN_RHEL7_REPO:-"http://trunk-mgt.rdoproject.org/repos/current/delorean-rdo-management.repo"}
|
|
sudo curl -o /etc/yum.repos.d/delorean-rdo-management.repo $DELOREAN_RHEL7_REPO
|
|
|
|
# Delorean requires RDO
|
|
if ! rpm -q rdo-release; then
|
|
sudo yum install -y https://rdo.fedorapeople.org/openstack-kilo/rdo-release-kilo-0.noarch.rpm
|
|
fi
|
|
|
|
if ! rpm -q epel-release; then
|
|
sudo yum install -y http://mirrors.einstein.yu.edu/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
|
|
fi
|
|
|
|
if $(grep -Eqs 'Red Hat Enterprise Linux Server' /etc/redhat-release); then
|
|
# rhos-release is also required, otherwise we have no base RHEL repositories to
|
|
# pull any dependencies from (without using subscription-manager anyway).
|
|
if rpm -q rhos-release; then
|
|
sudo yum remove -y rhos-release
|
|
fi
|
|
sudo yum install -y http://rhos-release.virt.bos.redhat.com/repos/rhos-release/rhos-release-latest.noarch.rpm
|
|
export RUN_RHOS_RELEASE=${RUN_RHOS_RELEASE:-"1"}
|
|
if [ "$RUN_RHOS_RELEASE" = "1" ]; then
|
|
sudo rhos-release 6
|
|
fi
|
|
# We need openwsman-python from the optional repo
|
|
sudo yum install -y yum-utils
|
|
sudo yum install -y yum-plugin-priorities
|
|
sudo yum-config-manager --enable rhelosp-rhel-7-server-opt
|
|
fi
|
|
|
|
# newer openstack-keystone requires python-zope-interface, but that is not
|
|
# avaiable anywhere for EL7. So just install the Fedora package for now. We can
|
|
# add this dep to Delorean going forward.
|
|
if ! rpm -q python-zope-interface; then
|
|
sudo yum install -y http://mirrors.kernel.org/fedora//releases/20/Everything/x86_64/os/Packages/p/python-zope-interface-4.0.5-2.fc20.x86_64.rpm
|
|
fi
|
|
|
|
# Required for building puppet-based images
|
|
# We can remove these once we add a corresponding Requires:
|
|
# to the instack-undercloud spec file.
|
|
sudo yum install -y openstack-heat-templates
|
|
sudo yum install -y openstack-tripleo-puppet-elements
|