Commit 3cab158a authored by Ricardo Araujo's avatar Ricardo Araujo
Browse files

Update configuration

parent 3e077606
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -12,7 +12,7 @@ Install the dependencies:
::
sudo apt-get install kpartx qemu-utils curl python-yaml
sudo apt-get install kpartx qemu-utils curl python-yaml debootstrap
Install diskimage-builder:
......@@ -28,11 +28,14 @@ Building an image is simple, we have a script!
::
DISTRO="ubuntu" bash tools/build-image.sh
bash tools/build-image.sh
See the script for environment variables to set distribution, etc.
You should be left with a .qcow2 image file of your selected
distribution.
See the script for environment variables to set distribution, etc. By default
it builds an ubuntu-minimal based image. You should be left with a .qcow2
image file of your selected distribution.
Infra uses the -minimal build type for building Ubuntu/CentOS/Fedora. For
example: ubuntu-minimal.
It is a good idea to set ``TMP_DIR`` to somewhere with plenty of space
to avoid the disappointment of a full-disk mid-way through the script
......
......@@ -74,19 +74,6 @@ def git_branches():
return branches
def tokenize(fn, tokens, distribution, comment=None):
for line in open(fn):
if 'dist:' in line and ('dist:%s' % distribution not in line):
continue
if 'qpid' in line:
continue # TODO: explain why this is here
if comment and comment in line:
line = line[:line.find(comment)]
line = line.strip()
if line and line not in tokens:
tokens.append(line)
def _legacy_find_images(basedir):
"""Divine what images we should use based on parsing stackrc."""
images = []
......@@ -143,24 +130,6 @@ def local_prep(distribution):
run_local(['sudo', 'git', 'checkout', branch], cwd=DEVSTACK)
run_local(['sudo', 'git', 'pull', '--ff-only', 'origin'], cwd=DEVSTACK)
if os.path.exists(os.path.join(TMP_MOUNT_PATH, 'usr/bin/apt-get')):
debs = []
debdir = os.path.join(DEVSTACK, 'files', 'debs')
if not os.path.exists(debdir):
debdir = os.path.join(DEVSTACK, 'files', 'apts')
for fn in os.listdir(debdir):
fn = os.path.join(debdir, fn)
tokenize(fn, debs, distribution, comment='#')
branch_data['debs'] = debs
if os.path.exists(os.path.join(TMP_MOUNT_PATH, 'usr/bin/yum')):
rpms = []
rpmdir = os.path.join(DEVSTACK, 'files', 'rpms')
for fn in os.listdir(rpmdir):
fn = os.path.join(rpmdir, fn)
tokenize(fn, rpms, distribution, comment='#')
branch_data['rpms'] = rpms
images = _find_images(DEVSTACK)
if not images:
images = _legacy_find_images(DEVSTACK)
......@@ -174,15 +143,6 @@ def main():
branches = local_prep(RELEASE)
with open(os.path.join(CACHEDIR, 'pkgs-to-install'), 'w') as pkgs:
for branch_data in branches:
if branch_data.get('debs'):
pkgs.write(" ".join(branch_data['debs']) + "\n")
elif branch_data.get('rpms'):
pkgs.write(" ".join(branch_data['rpms']) + "\n")
else:
sys.exit('No supported package data found.')
image_filenames = []
line_template = "%(name)s file %(location)s %(url)s\n"
with open(IMAGES, 'w') as images_list:
......
......@@ -8,3 +8,16 @@ python3-dev:
uuid-runtime:
traceroute:
ntpdate:
gentoolkit:
at:
lvm2:
strace:
tcpdump:
rsyslog:
git:
rsync:
parted:
puppet:
wget:
iputils-ping:
dnsutils:
......@@ -2,15 +2,38 @@
"distro": {
"fedora": {
"python3-dev": "python3-devel"
},
"gentoo": {
"build-essential": "",
"cron": "sys-process/cronie",
"python-dev": "",
"python3-dev": "",
"traceroute": "net-analyzer/traceroute",
"uuid-runtime": ""
}
},
"family": {
"redhat": {
"cron": "cronie",
"build-essential": "glibc-devel gcc make",
"dnsutils": "bind-utils",
"iputils-ping": "iputils",
"python-dev": "python-devel",
"python3-dev": "",
"uuid-runtime": ""
},
"suse": {
"dnsutils": "bind-utils",
"git": "git-core",
"iputils-ping": "iputils",
"ntpdate": "",
"puppet": "ruby2.1-rubygem-puppet",
"python-dev": "python-devel",
"python3-dev": "python3-devel",
"uuid-runtime": "uuidd"
}
},
"default": {
"gentoolkit": ""
}
}
......@@ -223,7 +223,7 @@ class Pump(object):
r = self.getrandom(1, nonblock=True)
if len(r) != 1:
raise Exception("No data returned from getrandom")
print("Nonblocking pool initilaized")
print("Nonblocking pool initialized")
return True
except GeneratorNotInitializedError:
return False
......
......@@ -35,7 +35,35 @@ mv /tmp/forwarding.conf /etc/unbound/
chown root:root /etc/unbound/forwarding.conf
chmod a+r /etc/unbound/forwarding.conf
# Overwrite /etc/resolv.conf at boot
# You'd think rc.local would be simple ...
#
# On Redhat systems, systemd's rc-local service looks for an
# executable /etc/rc.d/rc.local file to run. On Debian/Ubuntu, the
# eqivalent file is /etc/rc.local.
#
# Centos' systemd package symlinks /etc/rc.local to /etc/rc.d/rc.local
# correctly. Fedora, however, does not come with an rc.local file at
# all. Thus if we have a rc.d directory, but no rc.local file, we
# need to create it (if you don't have an rc.d directory, and don't
# have /etc/rc.local, then it's not clear what platform you are on).
#
# Bug [1] is filed to bring Fedora in-line with Centos, and has more
# details on all this. As at 2016-10-18 is unresolved.
#
# [1] https://bugzilla.redhat.com/show_bug.cgi?id=1386052
if [[ ! -e /etc/rc.local ]]; then
if [[ ! -d /etc/rc.d ]]; then
echo "No rc.local and no rc.d directory! See comments in 89-unbound"
exit 1
fi
touch /etc/rc.d/rc.local
ln -sf /etc/rc.d/rc.local /etc/rc.local
# permissions added below. selinux context will be fixed up at
# end of build.
fi
# Overwrite /etc/resolv.conf at boot (let's hope nothing else is using
# rc.local...)
dd of=/etc/rc.local <<EOF
#!/bin/bash
set -o xtrace
......@@ -51,6 +79,12 @@ echo 'nameserver 127.0.0.1' > /etc/resolv.conf
exit 0
EOF
# Debian/Ubuntu ship their dummy rc.local with +x permissions, but
# CentOS (and the file we created for Fedora) do not ... this is to
# avoid it holding up the boot as it relies on the network being up).
# Add +x so it runs.
chmod a+x /etc/rc.local
echo 'include: /etc/unbound/forwarding.conf' >> /etc/unbound/unbound.conf
# Disable DNSSEC
......
Download all repos and packages that a devstack run might need.
===============
openstack-repos
===============
Download all repos and packages that might be needed.
Environment variables:
----------------------
DIB_CUSTOM_PROJECTS_LIST_URL
:Required: No
:Default: None
:Description: Url to a yaml file contains custom list of repos.
The custom yaml file has the same structure as the default file:
'https://git.openstack.org/cgit/openstack-infra/project-config/plain/gerrit/projects.yaml'
Download only the repos that appear in the custom file rather than
downloading all openstack repos that appear in the default file.
:Example:
DIB_CUSTOM_PROJECTS_LIST_URL='file:///etc//project-config//gerrit//custom_projects.yaml'
......@@ -18,6 +18,7 @@
import os
import urllib2
from urllib2 import URLError
import yaml
URL = ('https://git.openstack.org/cgit/openstack-infra/project-config/'
......@@ -27,22 +28,42 @@ TMP_HOOKS_PATH=os.environ['TMP_HOOKS_PATH']
PROJECTS_REPOS=os.path.join(TMP_HOOKS_PATH, 'source-repository-projects-yaml')
GIT_BASE=os.environ.get('GIT_BASE', 'git://git.openstack.org')
CUSTOM_PROJECTS_LIST_URL=os.environ.get('DIB_CUSTOM_PROJECTS_LIST_URL')
def get_project_list(url):
try:
projects = [f['project'] for f in yaml.load(urllib2.urlopen(url))]
return projects
except URLError:
print "Could not open project list url: '%s'" % url
raise
def main():
projects = [f['project'] for f in yaml.load(urllib2.urlopen(URL))]
projects = []
if CUSTOM_PROJECTS_LIST_URL:
projects = get_project_list(CUSTOM_PROJECTS_LIST_URL)
if not projects:
projects = get_project_list(URL)
with open(PROJECTS_REPOS, 'w') as projects_list:
for project in projects:
# Skip repos that are inactive
dirname = os.path.dirname(project)
if not ('attic' in dirname or dirname == 'stackforge'):
args = dict(
name=os.path.basename(project),
location=os.path.join('/opt/git', project),
url='%s/%s.git' % (GIT_BASE, project),
ref='*')
projects_list.write("%(name)s git %(location)s "
"%(url)s %(ref)s\n" % args)
if ('attic' in dirname or dirname == 'stackforge'):
continue
# Skip the /deb- git repo copies
if ('/deb-' in project):
continue
args = dict(
name=os.path.basename(project),
location=os.path.join('/opt/git', project),
url='%s/%s.git' % (GIT_BASE, project),
ref='*')
projects_list.write("%(name)s git %(location)s "
"%(url)s %(ref)s\n" % args)
# Clone openstack-infra/system-config again so that we can use it to
# build the image without interferring with the slave repo cache.
project = 'openstack-infra/system-config'
......
......@@ -60,4 +60,6 @@ fi
set -e
# Make sure resolv.conf settings don't break dib
echo "nameserver $NODEPOOL_STATIC_NAMESERVER_V4"> /etc/resolv.conf
if [ -n "$NODEPOOL_STATIC_NAMESERVER_V4" ] ; then
echo "nameserver $NODEPOOL_STATIC_NAMESERVER_V4"> /etc/resolv.conf
fi
......@@ -39,6 +39,16 @@ case $OS_FAMILY in
# time updating.
update=""
;;
"Gentoo")
# make a fake repo to satisfy the removal below
touch /tmp/fakerepo
repo=/tmp/fakerepo
update=""
;;
"Suse")
repo=/etc/zypp/repos.d/systemsmanagement_puppet.repo
update=""
;;
*)
die "Don't know how to cleanup!"
;;
......
......@@ -4,6 +4,12 @@
"24": {
"npm": ""
}
},
"opensuse": {
"42.2": {
"nodejs": "nodejs4",
"npm": "npm4"
}
}
},
"family": {
......@@ -11,7 +17,8 @@
"nodejs": "nodejs-legacy"
},
"suse": {
"npm": "nodejs-npm"
"nodejs": "nodejs6",
"npm": "npm6"
}
},
"default": {
......
......@@ -2,6 +2,12 @@
"family": {
"debian": {
"libselinux-python": ""
},
"gentoo": {
"libselinux-python": "sys-libs/libselinux"
},
"suse": {
"libselinux-python": ""
}
}
}
script-dir: /etc/nodepool/scripts
elements-dir: /etc/nodepool/elements
images-dir: /opt/nodepool_dib
......@@ -47,6 +46,7 @@ diskimages:
- openstack-repos
- nodepool-base
- cache-devstack
- initialize-urandom
- cache-bindep
- growroot
- infra-package-needs
......@@ -54,9 +54,15 @@ diskimages:
release: xenial
env-vars:
TMPDIR: /opt/dib_tmp
# DIB_CHECKSUM: '1'
DIB_IMAGE_CACHE: /opt/dib_cache
# DIB_APT_LOCAL_CACHE: '0'
# DIB_DISABLE_APT_CLEANUP: '1'
# DIB_GRUB_TIMEOUT: '0'
# DIB_DEBIAN_COMPONENTS: 'main,universe'
NODEPOOL_STATIC_NAMESERVER_V4: 10.20.6.1
providers:
- name: local_01
cloud: cloud4
......
......@@ -51,14 +51,17 @@ source /usr/local/jenkins/slave_scripts/afs-slug.sh
LSBDISTID=$(lsb_release -is)
LSBDISTCODENAME=$(lsb_release -cs)
NODEPOOL_DEBIAN_MIRROR=${NODEPOOL_DEBIAN_MIRROR:-http://$NODEPOOL_MIRROR_HOST/debian}
NODEPOOL_PYPI_MIRROR=${NODEPOOL_PYPI_MIRROR:-http://$NODEPOOL_MIRROR_HOST/pypi/simple}
NODEPOOL_WHEEL_MIRROR=${NODEPOOL_WHEEL_MIRROR:-http://$NODEPOOL_MIRROR_HOST/wheel/$AFS_SLUG}
NODEPOOL_UBUNTU_MIRROR=${NODEPOOL_UBUNTU_MIRROR:-http://$NODEPOOL_MIRROR_HOST/ubuntu}
NODEPOOL_CENTOS_MIRROR=${NODEPOOL_CENTOS_MIRROR:-http://$NODEPOOL_MIRROR_HOST/centos}
NODEPOOL_DEBIAN_OPENSTACK_MIRROR=${NODEPOOL_DEBIAN_OPENSTACK_MIRROR:-http://$NODEPOOL_MIRROR_HOST/debian-openstack}
NODEPOOL_EPEL_MIRROR=${NODEPOOL_EPEL_MIRROR:-http://$NODEPOOL_MIRROR_HOST/epel}
NODEPOOL_FEDORA_MIRROR=${NODEPOOL_FEDORA_MIRROR:-http://$NODEPOOL_MIRROR_HOST/fedora}
NODEPOOL_CEPH_MIRROR=${NODEPOOL_CEPH_MIRROR:-http://$NODEPOOL_MIRROR_HOST/ceph-deb-hammer}
NODEPOOL_UCA_MIRROR=${NODEPOOL_UCA_MIRROR:-http://$NODEPOOL_MIRROR_HOST/ubuntu-cloud-archive}
NODEPOOL_MARIADB_MIRROR=${NODEPOOL_MARIADB_MIRROR:-http://$NODEPOOL_MIRROR_HOST/ubuntu-mariadb}
NODEPOOL_NPM_MIRROR=${NODEPOOL_NPM_MIRROR:-http://$NODEPOOL_MIRROR_HOST/npm/}
PIP_CONF="\
......@@ -89,27 +92,63 @@ deb $NODEPOOL_UBUNTU_MIRROR $LSBDISTCODENAME-security main universe"
CEPH_SOURCES_LIST="deb $NODEPOOL_CEPH_MIRROR $LSBDISTCODENAME main"
UCA_SOURCES_LIST="deb $NODEPOOL_UCA_MIRROR $LSBDISTCODENAME-updates main"
UCA_SOURCES_LIST_LIBERTY="deb $NODEPOOL_UCA_MIRROR trusty-updates/liberty main"
UCA_SOURCES_LIST_MITAKA="deb $NODEPOOL_UCA_MIRROR trusty-updates/mitaka main"
UCA_SOURCES_LIST_NEWTON="deb $NODEPOOL_UCA_MIRROR xenial-updates/newton main"
UCA_SOURCES_LIST_OCATA="deb $NODEPOOL_UCA_MIRROR xenial-updates/ocata main"
UCA_SOURCES_LIST_PIKE="deb $NODEPOOL_UCA_MIRROR xenial-updates/pike main"
MARIADB_SOURCES_LIST_10_0="deb $NODEPOOL_MARIADB_MIRROR/10.0 $LSBDISTCODENAME main"
MARIADB_SOURCES_LIST_10_1="deb $NODEPOOL_MARIADB_MIRROR/10.1 $LSBDISTCODENAME main"
APT_CONF_UNAUTHENTICATED="APT::Get::AllowUnauthenticated \"true\";"
DEBIAN_SOURCES_LIST="\
deb http://httpredir.debian.org/debian $LSBDISTCODENAME main
deb-src http://httpredir.debian.org/debian $LSBDISTCODENAME main
DEBIAN_DEFAULT_SOURCES_LIST="\
deb $NODEPOOL_DEBIAN_MIRROR $LSBDISTCODENAME main
deb-src $NODEPOOL_DEBIAN_MIRROR $LSBDISTCODENAME main"
deb http://httpredir.debian.org/debian $LSBDISTCODENAME-updates main
deb-src http://httpredir.debian.org/debian $LSBDISTCODENAME-updates main
DEBIAN_UPDATES_SOURCES_LIST="\
deb $NODEPOOL_DEBIAN_MIRROR $LSBDISTCODENAME-updates main
deb-src $NODEPOOL_DEBIAN_MIRROR $LSBDISTCODENAME-updates main"
deb http://security.debian.org/ $LSBDISTCODENAME/updates main
deb-src http://security.debian.org/ $LSBDISTCODENAME/updates main
DEBIAN_BACKPORTS_SOURCES_LIST="\
deb $NODEPOOL_DEBIAN_MIRROR $LSBDISTCODENAME-backports main
deb-src $NODEPOOL_DEBIAN_MIRROR $LSBDISTCODENAME-backports main"
deb http://httpredir.debian.org/debian $LSBDISTCODENAME-backports main
deb-src http://httpredir.debian.org/debian $LSBDISTCODENAME-backports main"
DEBIAN_SECURITY_SOURCES_LIST="\
deb $NODEPOOL_DEBIAN_MIRROR $LSBDISTCODENAME-security main
deb-src $NODEPOOL_DEBIAN_MIRROR $LSBDISTCODENAME-security main"
DEBIAN_OPENSTACK_NEWTON_SOURCES_LIST="\
deb $NODEPOOL_DEBIAN_OPENSTACK_MIRROR $LSBDISTCODENAME-newton main
deb $NODEPOOL_DEBIAN_OPENSTACK_MIRROR $LSBDISTCODENAME-newton-backports main"
YUM_REPOS_FEDORA="\
[fedora]
name=Fedora \$releasever - \$basearch
failovermethod=priority
baseurl=$NODEPOOL_FEDORA_MIRROR/releases/\$releasever/Everything/\$basearch/os/
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-\$releasever-\$basearch
skip_if_unavailable=False
deltarpm=False
deltarpm_percentage=0"
YUM_REPOS_FEDORA_UPDATES="\
[updates]
name=Fedora \$releasever - \$basearch - Updates
failovermethod=priority
baseurl=$NODEPOOL_FEDORA_MIRROR/updates/\$releasever/\$basearch/
enabled=1
gpgcheck=1
metadata_expire=6h
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-\$releasever-\$basearch
skip_if_unavailable=False
deltarpm=False
deltarpm_percentage=0"
YUM_REPOS_CENTOS_BASE="\
[base]
name=CentOS-\$releasever - Base
......@@ -146,11 +185,21 @@ sudo mv /tmp/pip.conf /etc/
sudo chown root:root /etc/pip.conf
sudo chmod 0644 /etc/pip.conf
# NOTE(pabelanger): We can remove the jenkins user once we have migrated
# nl01.o.o to production
# Write jenkins user distutils/setuptools configuration used by easy_install
echo "$PYDISTUTILS_CFG" >/home/jenkins/.pydistutils.cfg
echo "$PYDISTUTILS_CFG" | sudo tee /home/jenkins/.pydistutils.cfg
sudo chown jenkins:jenkins /home/jenkins/.pydistutils.cfg
# Write jenkins user npm configuration
echo "$NPMRC" >/home/jenkins/.npmrc
echo "$NPMRC" | sudo tee /home/jenkins/.npmrc
sudo chown jenkins:jenkins /home/jenkins/.npmrc
# Write zuul user distutils/setuptools configuration used by easy_install
echo "$PYDISTUTILS_CFG" | sudo tee /home/zuul/.pydistutils.cfg
sudo chown zuul:zuul /home/zuul/.pydistutils.cfg
# Write zuul user npm configuration
echo "$NPMRC" | sudo tee /home/zuul/.npmrc
sudo chown zuul:zuul /home/zuul/.npmrc
# NOTE(pabelanger): We don't actually have mirrors for ubuntu-precise, so skip
# them.
......@@ -169,8 +218,27 @@ if [ "$LSBDISTID" == "Ubuntu" ] && [ "$LSBDISTCODENAME" != 'precise' ]; then
sudo mv /tmp/ceph-deb-hammer.list /etc/apt/sources.list.available.d/
# Ubuntu Cloud Archive
echo "$UCA_SOURCES_LIST" >/tmp/ubuntu-cloud-archive.list
sudo mv /tmp/ubuntu-cloud-archive.list /etc/apt/sources.list.available.d/
echo "$UCA_SOURCES_LIST_LIBERTY" >/tmp/ubuntu-cloud-archive-liberty.list
sudo mv /tmp/ubuntu-cloud-archive-liberty.list /etc/apt/sources.list.available.d/
echo "$UCA_SOURCES_LIST_MITAKA" >/tmp/ubuntu-cloud-archive-mitaka.list
sudo mv /tmp/ubuntu-cloud-archive-mitaka.list /etc/apt/sources.list.available.d/
echo "$UCA_SOURCES_LIST_NEWTON" >/tmp/ubuntu-cloud-archive-newton.list
sudo mv /tmp/ubuntu-cloud-archive-newton.list /etc/apt/sources.list.available.d/
echo "$UCA_SOURCES_LIST_OCATA" >/tmp/ubuntu-cloud-archive-ocata.list
sudo mv /tmp/ubuntu-cloud-archive-ocata.list /etc/apt/sources.list.available.d/
echo "$UCA_SOURCES_LIST_PIKE" >/tmp/ubuntu-cloud-archive-pike.list
sudo mv /tmp/ubuntu-cloud-archive-pike.list /etc/apt/sources.list.available.d/
# Ubuntu Mariadb
echo "$MARIADB_SOURCES_LIST_10_0" >/tmp/ubuntu-mariadb-10-0.list
sudo mv /tmp/ubuntu-mariadb-10-0.list /etc/apt/sources.list.available.d/
echo "$MARIADB_SOURCES_LIST_10_1" >/tmp/ubuntu-mariadb-10-1.list
sudo mv /tmp/ubuntu-mariadb-10-1.list /etc/apt/sources.list.available.d/
sudo chown root:root /etc/apt/sources.list.available.d/*
sudo chmod 0644 /etc/apt/sources.list.available.d/*
......@@ -186,10 +254,17 @@ if [ "$LSBDISTID" == "Ubuntu" ] && [ "$LSBDISTCODENAME" != 'precise' ]; then
sudo chmod 0644 /etc/apt/apt.conf.d/99unauthenticated
elif [ "$LSBDISTID" == "Debian" ] ; then
echo "$DEBIAN_SOURCES_LIST" >/tmp/sources.list
sudo mv /tmp/sources.list /etc/apt/
sudo chown root:root /etc/apt/sources.list
sudo chmod 0644 /etc/apt/sources.list
echo "$DEBIAN_DEFAULT_SOURCES_LIST" >/tmp/default.list
sudo mv /tmp/default.list /etc/apt/sources.list.d/
echo "$DEBIAN_UPDATES_SOURCES_LIST" >/tmp/updates.list
sudo mv /tmp/updates.list /etc/apt/sources.list.d/
echo "$DEBIAN_BACKPORTS_SOURCES_LIST" >/tmp/backports.list
sudo mv /tmp/backports.list /etc/apt/sources.list.d/
echo "$DEBIAN_SECURITY_SOURCES_LIST" >/tmp/security.list
sudo mv /tmp/security.list /etc/apt/sources.list.d/
sudo chown root:root /etc/apt/sources.list.d/*.list
sudo chmod 0644 /etc/apt/sources.list.d/*.list
# Opt in repos. Jobs that want to take advantage of them can copy or
# symlink them into /etc/apt/sources.list.d/
......@@ -216,4 +291,11 @@ elif [ "$LSBDISTID" == "CentOS" ]; then
sudo chown root:root /etc/yum.repos.d/*
sudo chmod 0644 /etc/yum.repos.d/*
elif [ "$LSBDISTID" == "Fedora" ]; then
echo "$YUM_REPOS_FEDORA" >/tmp/fedora.repo
sudo mv /tmp/fedora.repo /etc/yum.repos.d/
echo "$YUM_REPOS_FEDORA_UPDATES" >/tmp/fedora-updates.repo
sudo mv /tmp/fedora-updates.repo /etc/yum.repos.d/
sudo chown root:root /etc/yum.repos.d/*
sudo chmod 0644 /etc/yum.repos.d/*
fi
......@@ -14,6 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Read through this script. There are a lot of comments that might
# help you!
#
# To run on Ubuntu 14.04, this depends on:
# diskimage-builder
# qemu-utils
......@@ -21,15 +26,75 @@
set -e
export ELEMENTS_PATH=${ELEMENTS_PATH:-nodepool/elements}
## Other options
# export DISTRO=${DISTRO:-centos-minimal}
# export DISTRO=${DISTRO:-fedora-minimal}
export DISTRO=${DISTRO:-ubuntu-minimal}
## Overrite the release
# export DIB_RELEASE=${DIB_RELEASE:-trusty}
# export DIB_RELEASE=${DIB_RELEASE:-25} # fedora
export ELEMENTS_PATH=${ELEMENTS_PATH:-nodepool/elements}
export IMAGE_NAME=${IMAGE_NAME:-devstack-gate}
export NODEPOOL_SCRIPTDIR=${NODEPOOL_SCRIPTDIR:-nodepool/scripts}
export CONFIG_SOURCE=${CONFIG_SOURCE:-https://git.openstack.org/openstack-infra/system-config}
export CONFIG_REF=${CONFIG_REF:-master}
export EXTRA_ELEMENTS=${EXTRA_ELEMENTS:-}
# The list of elements here should match nodepool/nodepool.yaml
## Test your changes to system-config by overriding this; note you can
## get a CONFIG_REF from gerrit should you have uploaded a change
# export CONFIG_SOURCE=${CONFIG_SOURCE:-https://git.openstack.org/openstack-infra/system-config}
# export CONFIG_REF=${CONFIG_REF:-refs/changes/12/123456/1
ZUUL_USER_SSH_PUBLIC_KEY=${ZUUL_USER_SSH_PUBLIC_KEY:-$HOME/.ssh/id_rsa.pub}
if [ ! -f ${ZUUL_USER_SSH_PUBLIC_KEY} ]; then
echo "Error: There is no SSH public key at: ${ZUUL_USER_SSH_PUBLIC_KEY}"
echo "Error: Image build will fail. Exiting now."
exit 1
fi
## If your firewall won't allow outbound DNS connections, you'll want