Add a bootstrap repo file stage
Allow for fetching additional dependencies for openstack by allowing for fetching of arbitary repo files during the bootstrap process. Add an initial example that allows for fetching the RDO repo file (which provides quite a few of the same python dependencies that anvil will build automatically if it can not find them itself). Change-Id: Ia51adf017d398863432ecb9d218e163235039488
This commit is contained in:
committed by
Joshua Harlow
parent
e083d188d5
commit
af3ab55e29
26
smithy
26
smithy
@@ -113,6 +113,32 @@ bootstrap_epel()
|
||||
return $?
|
||||
}
|
||||
|
||||
bootstrap_repos()
|
||||
{
|
||||
# Installs other repositories that will allow for installation of packages
|
||||
# from places other than epel. This allows for anvil to find dependencies
|
||||
# from other places (so anvil can avoid building those dependencies in the
|
||||
# first place).
|
||||
[ -z "$REPO_URLS" ] && return 0
|
||||
# If urls were provided but no directory, that's bad.
|
||||
[ -z "$REPO_DIR" ] && return 1
|
||||
for repo_url in $REPO_URLS; do
|
||||
echo "Installing repo file from $repo_url -> $REPO_DIR"
|
||||
local base_filename=$(basename $repo_url)
|
||||
local output_filename="$REPO_DIR/$base_filename"
|
||||
if [ "$VERBOSE" == "0" ]; then
|
||||
wget -q "$repo_url" -O "$output_filename"
|
||||
else
|
||||
wget "$repo_url" -O "$output_filename"
|
||||
fi
|
||||
if [ "$?" != "0" ]; then
|
||||
echo -e "Failed downloading $repo_url -> $output_filename"
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
unsudo()
|
||||
{
|
||||
# If a sudo user is active the given files/directories will be changed to
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
# -*- sh -*-
|
||||
STEPS="selinux epel rpm_packages virtualenv"
|
||||
STEPS="selinux epel repos rpm_packages virtualenv"
|
||||
EPEL_RPM_URL="http://mirrors.kernel.org/fedora-epel/6/i386/epel-release-6-8.noarch.rpm"
|
||||
DISTRO_CONFIG=conf/distros/rhel.yaml
|
||||
REPO_DIR=/etc/yum.repos.d/
|
||||
|
||||
## Uncomment the following to allow for additional dependencies to be found
|
||||
## using the packages built by redhat in there RDO repository. Or add other repo
|
||||
## file providers that provide dependencies that anvil can use to skip building
|
||||
## those same dependencies itself).
|
||||
# REPO_URLS='
|
||||
# http://repos.fedorapeople.org/repos/openstack/openstack-havana/epel-openstack-havana.repo
|
||||
# '
|
||||
|
||||
## Bootstrap for Red Hat based distros
|
||||
REQUIRES='
|
||||
|
||||
Reference in New Issue
Block a user