From 7c376f7f5d594a81a152a801d32e667368a2b73a Mon Sep 17 00:00:00 2001 From: Olivier Bourdon Date: Wed, 22 Feb 2017 08:53:07 +0000 Subject: [PATCH] Add MOS 10.0 support and fix 9.x for updates Change-Id: I91d69a6f537bb7c85311aa34a857605e627aee9d --- README.md | 9 ++++++- openrc.default | 36 +++++++++++++++++++++------- requirements/mos10-requirements.txt | 3 +++ tox.ini | 5 ++-- utils/fuel-qa-builder/prepare_env.sh | 7 ++++-- 5 files changed, 46 insertions(+), 14 deletions(-) create mode 100644 requirements/mos10-requirements.txt diff --git a/README.md b/README.md index 643e25e..161b0be 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ for the detailed procedure). cp openrc.default openrc # Edit the openrc file as needed . openrc + # You can also pass a MOS version (default is 9.0 it not specified) + . openrc 7.0 ./utils/fuel-qa-builder/prepare_env.sh 3. Activate the Python virtual environment: @@ -53,7 +55,12 @@ system. Guidelines: -* Run `tox` before submitting a review. +* Run `tox` before submitting a review. You can change MOS version depending on what argument you specified earlier (default is mos9) + +``` +VERSION=mos7 MOS_VERSION=7.0 tox +VERSION=mos9 MOS_VERSION=9.1 tox +``` * Declare test groups using the @test decorator (see the [Proboscis](https://pythonhosted.org/proboscis) documentation for details) diff --git a/openrc.default b/openrc.default index a8eec9c..1837df4 100644 --- a/openrc.default +++ b/openrc.default @@ -1,3 +1,4 @@ +#!/bin/bash if [ $# -gt 1 ]; then echo "No more than 1 argument" return @@ -13,6 +14,15 @@ unset NEUTRON_ENABLE unset NEUTRON_SEGMENT_TYPE unset VENV_PREFIX +# MOS update reset +unset UPDATE_MASTER +unset UPDATE_MASTER_VIA_MOS_MU +unset FUEL_RELEASE_VERSION + +# Locations for MOS +export ISO_BASE=${ISO_BASE:-$HOME/iso} +export ISO_PATH=${ISO_BASE}/MirantisOpenStack-${MOS_VERSION}.iso + case "${MOS_VERSION}" in "7.0") # Location for fuel-qa @@ -25,33 +35,41 @@ case "${MOS_VERSION}" in # Location for fuel-qa export FUELQA_GITREF=stable/8.0 ;; -"9.0" | "9.1") +"9.0" | "9.1" | "9.2") # Location for fuel-qa export FUELQA_GITREF=stable/mitaka + if [ "${MOS_VERSION}" != "9.0" ]; then + export UPDATE_MASTER=True + export UPDATE_MASTER_VIA_MOS_MU=False + export FUEL_RELEASE_VERSION=9.0 + export ISO_PATH=${ISO_BASE}/MirantisOpenStack-${FUEL_RELEASE_VERSION}.iso + fi + ;; +"10.0") + # Location for fuel-qa + export FUELQA_GITREF=stable/newton ;; *) - echo "Unsupported MOS version $MOS_VERSION. Should be one of 7.0, 8.0, 9.0 or 9.1" + echo "Unsupported MOS version $MOS_VERSION. Should be one of 7.0, 8.0, 9.[0-2] or 10.0" return ;; esac -# Locations for MOS -export ISO_BASE=${MY_ISO_BASE:-$HOME/iso} -export ISO_PATH=${ISO_BASE}/MirantisOpenStack-${MOS_VERSION}.iso +export MOS_SHORT_VERSION=$(echo $MOS_VERSION | sed -e 's/\.//g') export ENV_PREFIX=${MY_ENV_PREFIX:-fuel_stacklight_plugin} -export ENV_NAME=${ENV_PREFIX}-${MOS_VERSION} +export ENV_NAME=${ENV_PREFIX}${MOS_SHORT_VERSION} export VENV_BASE=${MY_VENV_BASE:-$HOME} export VENV_PREFIX=${VENV_PREFIX:-stacklight-tests} -export VENV_PATH=${VENV_BASE}/venv-${VENV_PREFIX}-${MOS_VERSION} +export VENV_PATH=${VENV_BASE}/venv-${VENV_PREFIX}${MOS_SHORT_VERSION} # Change this if you didn't use the default database password -export DEVOPS_DB_PASSWORD=devops +export DEVOPS_DB_PASSWORD=fuel_devops # Nodes characteristics export ADMIN_NODE_MEMORY=4096 export ADMIN_NODE_CPU=2 -export SLAVE_NODE_MEMORY=5120 +export SLAVE_NODE_MEMORY=3072 # Locations for plugins artefacts export PLUGINS_HOME=${MY_PLUGINS_HOME:-$HOME/plugins} diff --git a/requirements/mos10-requirements.txt b/requirements/mos10-requirements.txt new file mode 100644 index 0000000..34d87dc --- /dev/null +++ b/requirements/mos10-requirements.txt @@ -0,0 +1,3 @@ +-r requirements.txt +oslo.i18n>=3.1.0 # the more recent python-*client (dependencies of fuel-qa) require at least this version of oslo.i18n +python-ceilometerclient>=2.4 diff --git a/tox.ini b/tox.ini index b823f2d..a5e428e 100644 --- a/tox.ini +++ b/tox.ini @@ -20,8 +20,9 @@ changedir = doc setenv= VENV_PATH={envdir} deps = - -r{toxinidir}/requirements.txt + -r{toxinidir}/requirements/{env:VERSION:mos9}-requirements.txt sphinx +passenv = ISO_PATH, FUELQA_GITREF commands = - {toxinidir}/utils/fuel-qa-builder/prepare_env.sh + {toxinidir}/utils/fuel-qa-builder/prepare_env.sh {env:MOS_VERSION:9.0} sphinx-build -b html -d _build/doctrees . _build/html diff --git a/utils/fuel-qa-builder/prepare_env.sh b/utils/fuel-qa-builder/prepare_env.sh index 46a9e5f..a472005 100755 --- a/utils/fuel-qa-builder/prepare_env.sh +++ b/utils/fuel-qa-builder/prepare_env.sh @@ -22,9 +22,12 @@ if [ -z "${FUELQA_GITREF}" ]; then 8.0) FUELQA_GITREF="stable/8.0" ;; - 9.0) + 9.0 | 9.1 | 9.2) FUELQA_GITREF="stable/mitaka" ;; + 10.0) + FUELQA_GITREF="stable/newton" + ;; *) echo "Don't know which fuel-qa branch to use for ${ISO_PATH}" echo "Please specify it explicitly with the FUELQA_GITREF variable" @@ -32,7 +35,7 @@ if [ -z "${FUELQA_GITREF}" ]; then esac fi -FUEL_REV=`echo $FUELQA_GITREF | sed -e 's?stable/??' -e 's/\.0.*//' -e 's/mitaka/9/'` +FUEL_REV=`echo $FUELQA_GITREF | sed -e 's?stable/??' -e 's/\.0.*//' -e 's/mitaka/9/' -e's/newton/10/'` # Create the virtual environment if it doesn't exist yet if [[ ! -f "$VENV_PATH"/bin/activate ]]; then