Merge "Support to specify branch when building the image" into stable/train
This commit is contained in:
commit
09e3a53737
|
@ -447,7 +447,12 @@ function create_guest_image {
|
|||
|
||||
echo "Starting to create guest image..."
|
||||
|
||||
$DEST/trove/integration/scripts/trovestack build-image ${TROVE_DATASTORE_TYPE} ${TROVE_IMAGE_OS} ${TROVE_IMAGE_OS_RELEASE} true
|
||||
TROVE_BRANCH=${TROVE_BRANCH} $DEST/trove/integration/scripts/trovestack \
|
||||
build-image \
|
||||
${TROVE_DATASTORE_TYPE} \
|
||||
${TROVE_IMAGE_OS} \
|
||||
${TROVE_IMAGE_OS_RELEASE} \
|
||||
true
|
||||
|
||||
image_name="trove-${TROVE_IMAGE_OS}-${TROVE_IMAGE_OS_RELEASE}-${TROVE_DATASTORE_TYPE}"
|
||||
image_file=$HOME/images/${image_name}.qcow2
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Set up default directories
|
||||
TROVE_DIR=${TROVE_DIR:-${DEST}/trove}
|
||||
TROVE_REPO=${TROVE_REPO:-${GIT_BASE}/openstack/trove.git}
|
||||
TROVE_BRANCH=${TROVE_BRANCH:-master}
|
||||
TROVE_BRANCH=${TROVE_BRANCH:-'stable/train'}
|
||||
|
||||
TROVE_CLIENT_DIR=${TROVE_CLIENT_DIR:-${TROVECLIENT_DIR:-${DEST}/python-troveclient}}
|
||||
TROVE_CLIENT_REPO=${TROVE_CLIENT_REPO:-${TROVECLIENT_REPO:-${GIT_BASE}/openstack/python-troveclient.git}}
|
||||
|
|
|
@ -80,6 +80,9 @@ The trove guest agent image could be created by running the following command:
|
|||
environment, it should be the ``stack`` user.
|
||||
* ``GUEST_WORKING_DIR``: The place to save the guest image, default value is
|
||||
``$HOME/images``.
|
||||
* ``TROVE_BRANCH``: only used in dev mode. The branch name of Trove code
|
||||
repository, by default it's master, use other branches as needed such as
|
||||
stable/train.
|
||||
|
||||
For example, in order to build a MySQL image for Ubuntu Xenial operating
|
||||
system in development mode:
|
||||
|
|
|
@ -8,7 +8,7 @@ set -o xtrace
|
|||
|
||||
source $_LIB/die
|
||||
|
||||
BRANCH_OVERRIDE=${BRANCH_OVERRIDE:-default}
|
||||
TROVE_BRANCH=${TROVE_BRANCH:-'master'}
|
||||
REQUIREMENTS_FILE=${TROVESTACK_SCRIPTS}/../../requirements.txt
|
||||
|
||||
[ -n "$TMP_HOOKS_PATH" ] || die "Temp hook path not set"
|
||||
|
@ -30,13 +30,10 @@ if [ -f "${DEST}/requirements/${UC_FILE}" ]; then
|
|||
of="${TMP_HOOKS_PATH}/${UC_FILE}"
|
||||
else
|
||||
UC_DIR=$(pwd)
|
||||
UC_BRANCH=${BRANCH_OVERRIDE}
|
||||
if [ "${UC_BRANCH}" == "default" ]; then
|
||||
UC_BRANCH=master
|
||||
fi
|
||||
UC_BRANCH=${TROVE_BRANCH##stable/}
|
||||
|
||||
set +e
|
||||
curl -o "${UC_DIR}/${UC_FILE}" "https://opendev.org/openstack/requirements/raw/branch/${UC_BRANCH}/${UC_FILE}"
|
||||
curl -L -o "${UC_DIR}/${UC_FILE}" "https://releases.openstack.org/constraints/upper/${UC_BRANCH}"
|
||||
set -e
|
||||
|
||||
if [ -f "${UC_DIR}/${UC_FILE}" ]; then
|
||||
|
|
|
@ -36,6 +36,8 @@ function build_vm() {
|
|||
export HOST_SCP_USERNAME=${HOST_SCP_USERNAME:-$(whoami)}
|
||||
export HOST_USERNAME=${HOST_SCP_USERNAME}
|
||||
export SSH_DIR=${SSH_DIR:-"$HOME/.ssh"}
|
||||
export DEST=${DEST:-'/opt/stack'}
|
||||
export TROVE_BRANCH=${TROVE_BRANCH:-'master'}
|
||||
manage_ssh_keys
|
||||
fi
|
||||
|
||||
|
|
|
@ -827,7 +827,7 @@ function cmd_build_image() {
|
|||
local IMAGE_GUEST_OS=${2:-'ubuntu'}
|
||||
local IMAGE_GUEST_RELEASE=${3:-'xenial'}
|
||||
local DEV_MODE=${4:-'true'}
|
||||
local guest_username=${5:-"ubuntu"}
|
||||
local guest_username=${5:-'ubuntu'}
|
||||
local output=$6
|
||||
|
||||
if [[ -z "$output" ]]; then
|
||||
|
|
|
@ -59,7 +59,7 @@ GIT_OPENSTACK=${GIT_OPENSTACK:-${GIT_BASE}/openstack}
|
|||
DEVSTACK_REPO=${DEVSTACK_REPO:-${GIT_BASE}/openstack-dev/devstack.git}
|
||||
TROVE_REPO=${TROVE_REPO:-${GIT_OPENSTACK}/trove.git}
|
||||
TROVE_DIR=${TROVE_DIR:-${PATH_TROVE}}
|
||||
TROVE_BRANCH=${TROVE_BRANCH:-master}
|
||||
TROVE_BRANCH=${TROVE_BRANCH:-'stable/train'}
|
||||
TROVE_CLIENT_REPO=${TROVE_CLIENT_REPO:-${TROVECLIENT_REPO:-${GIT_OPENSTACK}/python-troveclient.git}}
|
||||
TROVE_CLIENT_DIR=${TROVE_CLIENT_DIR:-${TROVECLIENT_DIR:-${PATH_PYTHON_TROVECLIENT}}}
|
||||
TROVE_CLIENT_BRANCH=${TROVE_CLIENT_BRANCH:-${TROVECLIENT_BRANCH:-master}}
|
||||
|
|
Loading…
Reference in New Issue