Merge "Update tools/build-image.sh with some useful options"

This commit is contained in:
Jenkins
2016-12-16 08:50:29 +00:00
committed by Gerrit Code Review

View File

@@ -21,14 +21,25 @@
set -e 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} 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 IMAGE_NAME=${IMAGE_NAME:-devstack-gate}
export NODEPOOL_SCRIPTDIR=${NODEPOOL_SCRIPTDIR:-nodepool/scripts} 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:-} export EXTRA_ELEMENTS=${EXTRA_ELEMENTS:-}
## 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} ZUUL_USER_SSH_PUBLIC_KEY=${ZUUL_USER_SSH_PUBLIC_KEY:-$HOME/.ssh/id_rsa.pub}
if [ ! -f ${ZUUL_USER_SSH_PUBLIC_KEY} ]; then if [ ! -f ${ZUUL_USER_SSH_PUBLIC_KEY} ]; then
echo "Error: There is no SSH public key at: ${ZUUL_USER_SSH_PUBLIC_KEY}" echo "Error: There is no SSH public key at: ${ZUUL_USER_SSH_PUBLIC_KEY}"
@@ -36,6 +47,14 @@ if [ ! -f ${ZUUL_USER_SSH_PUBLIC_KEY} ]; then
exit 1 exit 1
fi fi
## If your firewall won't allow outbound DNS connections, you'll want
## to set these to local resolvers
# NODEPOOL_STATIC_NAMESERVER_V4=192.168.0.1
# NODEPOOL_STATIC_NAMESERVER_V6=2000::...
## This will get dib to drop you into a shell on error, useful for debugging
# export break="after-error"
# The list of elements here should match nodepool/nodepool.yaml # The list of elements here should match nodepool/nodepool.yaml
disk-image-create -x --no-tmpfs -o $IMAGE_NAME \ disk-image-create -x --no-tmpfs -o $IMAGE_NAME \
$DISTRO \ $DISTRO \