Skip to content

Commit afd30cc

Browse files
authored
Merge pull request #1078 from stackhpc/aio-improvements
AIO Improvements
2 parents 6e71ff1 + 3aab17c commit afd30cc

File tree

2 files changed

+42
-13
lines changed

2 files changed

+42
-13
lines changed

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

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ automates the manual setup steps below, and is recommended for most users.
1010
The manual setup steps are provided for reference, and for users who wish to
1111
make changes to the setup process.
1212

13-
.. warning::
14-
15-
This guide was written for the Yoga release and has not been validated for
16-
Antelope. Proceed with caution.
17-
1813
Prerequisites
1914
=============
2015

@@ -48,10 +43,21 @@ Run the setup script:
4843
./automated-setup.sh
4944
5045
The script will pull the current version of Kayobe and this repository, and
51-
then run the manual setup steps below. The script can be easily edited to use
52-
a different branch of Kayobe or this repository. The script will automatically
53-
determine whether your image is LVM based, if so, it will expand the volume sizes
54-
to allow ansible dependencies to install correctly.
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.
5561

5662
Manual Setup
5763
============

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

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ BASE_PATH=~
66
KAYOBE_BRANCH=stackhpc/2023.1
77
KAYOBE_CONFIG_BRANCH=stackhpc/2023.1
88
KAYOBE_AIO_LVM=true
9+
KAYOBE_CONFIG_EDIT_PAUSE=false
10+
AIO_RUN_TEMPEST=false
911

1012
if [[ ! -f $BASE_PATH/vault-pw ]]; then
1113
echo "Vault password file not found at $BASE_PATH/vault-pw"
@@ -40,6 +42,12 @@ pushd src
4042
[[ -d kayobe-config ]] || git clone https://github.com/stackhpc/stackhpc-kayobe-config kayobe-config -b $KAYOBE_CONFIG_BRANCH
4143
popd
4244

45+
if $KAYOBE_CONFIG_EDIT_PAUSE; then
46+
echo "Deployment is paused, edit configuration in another terminal"
47+
echo "Press enter to continue"
48+
read -s
49+
fi
50+
4351
if ! sudo vgdisplay | grep -q lvm2; then
4452
rm $BASE_PATH/src/kayobe-config/etc/kayobe/environments/ci-aio/inventory/group_vars/controllers/lvm.yml
4553
sed -i -e '/controller_lvm_groups/,+2d' $BASE_PATH/src/kayobe-config/etc/kayobe/environments/ci-aio/controllers.yml
@@ -88,7 +96,22 @@ kayobe overcloud host configure
8896

8997
kayobe overcloud service deploy
9098

91-
export KAYOBE_CONFIG_SOURCE_PATH=$BASE_PATH/src/kayobe-config
92-
export KAYOBE_VENV_PATH=$BASE_PATH/venvs/kayobe
93-
pushd $BASE_PATH/src/kayobe
94-
./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)