Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Commit

Permalink
Add MOS 10.0 support and fix 9.x for updates
Browse files Browse the repository at this point in the history
Change-Id: I91d69a6f537bb7c85311aa34a857605e627aee9d
  • Loading branch information
obourdon committed Apr 11, 2017
1 parent 0a6cbdc commit 7c376f7
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 14 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)

Expand Down
36 changes: 27 additions & 9 deletions openrc.default
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
if [ $# -gt 1 ]; then
echo "No more than 1 argument"
return
Expand All @@ -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
Expand All @@ -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}
Expand Down
3 changes: 3 additions & 0 deletions requirements/mos10-requirements.txt
Original file line number Diff line number Diff line change
@@ -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
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 5 additions & 2 deletions utils/fuel-qa-builder/prepare_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,20 @@ 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"
exit 1
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
Expand Down

0 comments on commit 7c376f7

Please sign in to comment.