Skip to content

Commit 3aab17c

Browse files
committed
Add Tempest option to AIO script and improve docs
1 parent b83e6c6 commit 3aab17c

File tree

2 files changed

+35
-12
lines changed

2 files changed

+35
-12
lines changed

doc/source/contributor/environments/ci-aio.rst

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,21 @@ Run the setup script:
4343
./automated-setup.sh
4444
4545
The script will pull the current version of Kayobe and this repository, and
46-
then run the manual setup steps below. The script can be easily edited to use a
47-
different branch of Kayobe or this repository. The script will assume that your
48-
image is LVM-based and will expand the volume sizes to allow ansible
49-
dependencies to install correctly. If it is not, set ``KAYOBE_AIO_LVM`` to
50-
false.
51-
52-
The deployment can be paused after cloning your Kayobe configuration to allow
53-
for custom edits, by setting ``KAYOBE_CONFIG_EDIT_PAUSE`` to ``true``.
46+
then run the manual setup steps below. The script can be easily edited with the
47+
following options:
48+
49+
* ``BASE_PATH`` (default: ``~``) - Directory to deploy from. The directory must
50+
exist before running the script.
51+
* ``KAYOBE_BRANCH`` (default: ``stackhpc/2023.1``) - The branch of Kayobe
52+
source code to use.
53+
* ``KAYOBE_CONFIG_BRANCH`` (default: ``stackhpc/2023.1``) - The branch of
54+
``stackhpc-kayobe-config`` to use.
55+
* ``KAYOBE_AIO_LVM`` (default: ``true``) - Whether the image uses LVM.
56+
* ``KAYOBE_CONFIG_EDIT_PAUSE`` (default: ``false``) - Option to pause
57+
deployment after cloning the kayobe-config branch, so the environment can be
58+
customised before continuing.
59+
* ``AIO_RUN_TEMPEST`` (default: ``false``) - Whether to run Tempest Refstack
60+
after deployment instead of the default VM smoke test.
5461

5562
Manual Setup
5663
============

etc/kayobe/environments/ci-aio/automated-setup.sh

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ KAYOBE_BRANCH=stackhpc/2023.1
77
KAYOBE_CONFIG_BRANCH=stackhpc/2023.1
88
KAYOBE_AIO_LVM=true
99
KAYOBE_CONFIG_EDIT_PAUSE=false
10+
AIO_RUN_TEMPEST=false
1011

1112
if [[ ! -f $BASE_PATH/vault-pw ]]; then
1213
echo "Vault password file not found at $BASE_PATH/vault-pw"
@@ -95,7 +96,22 @@ kayobe overcloud host configure
9596

9697
kayobe overcloud service deploy
9798

98-
export KAYOBE_CONFIG_SOURCE_PATH=$BASE_PATH/src/kayobe-config
99-
export KAYOBE_VENV_PATH=$BASE_PATH/venvs/kayobe
100-
pushd $BASE_PATH/src/kayobe
101-
./dev/overcloud-test-vm.sh
99+
if $AIO_RUN_TEMPEST; then
100+
pushd $BASE_PATH/src/kayobe-config
101+
git submodule init
102+
git submodule update
103+
sudo DOCKER_BUILDKIT=1 docker build --build-arg BASE_IMAGE=rockylinux:9 --file .automation/docker/kayobe/Dockerfile --tag kayobe:latest --network host .
104+
export KAYOBE_AUTOMATION_SSH_PRIVATE_KEY=$(cat ~/.ssh/id_rsa)
105+
mkdir -p tempest-artifacts
106+
sudo -E docker run --name kayobe-automation --detach -it --rm --network host \
107+
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config -v $(pwd)/tempest-artifacts:/stack/tempest-artifacts \
108+
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY kayobe:latest \
109+
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/tempest.sh -e ansible_user=stack
110+
sleep 300
111+
sudo docker logs -f tempest
112+
else
113+
export KAYOBE_CONFIG_SOURCE_PATH=$BASE_PATH/src/kayobe-config
114+
export KAYOBE_VENV_PATH=$BASE_PATH/venvs/kayobe
115+
pushd $BASE_PATH/src/kayobe
116+
./dev/overcloud-test-vm.sh
117+
fi

0 commit comments

Comments
 (0)