
Replace fedora-20-x86_64 by centos-7-x86_64 in the Fedora-based family libraries for base image. Change the iso file and yum scripts. Change-Id: I3cbae91ba54030dc3b32c52ca72b86a197b8f534 Partial-Bug: #1529673
33 lines
887 B
Bash
Executable File
33 lines
887 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -o errexit -o nounset
|
|
TOP_DIR=$(cd "$(dirname "$0")/.." && pwd)
|
|
source "$TOP_DIR/config/paths"
|
|
source "$CONFIG_DIR/openstack"
|
|
# Pick up VM_PROXY
|
|
source "$CONFIG_DIR/localrc"
|
|
source "$LIB_DIR/functions.guest.sh"
|
|
|
|
indicate_current_auto
|
|
|
|
exec_logfile
|
|
|
|
function set_yum_proxy {
|
|
local YUM_FILE=/etc/yum.conf
|
|
if [ -z "${VM_PROXY-}" ]; then
|
|
return 0;
|
|
fi
|
|
echo "proxy=${VM_PROXY}" | sudo tee -a $YUM_FILE
|
|
}
|
|
|
|
set_yum_proxy
|
|
|
|
# Enable RDO repo
|
|
if [[ ${OPENSTACK_RELEASE:-} = kilo ]]; then
|
|
sudo yum install -y "https://repos.fedorapeople.org/repos/openstack/openstack-kilo/rdo-release-kilo-1.noarch.rpm"
|
|
elif [[ ${OPENSTACK_RELEASE:-} = liberty ]]; then
|
|
sudo yum install -y "https://repos.fedorapeople.org/repos/openstack/openstack-liberty/rdo-release-liberty-2.noarch.rpm"
|
|
else
|
|
echo 2>&1 "ERROR Unknown OpenStack release."
|
|
return 1
|
|
fi
|