Skip to content

Commit

Permalink
Merge pull request #602 from stackhpc/aio-script-lvm
Browse files Browse the repository at this point in the history
AIO script improvements
  • Loading branch information
markgoddard authored Aug 29, 2023
2 parents c79f9d5 + d97da57 commit 4dd592e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
4 changes: 3 additions & 1 deletion doc/source/contributor/environments/ci-aio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ Run the setup script:
The script will pull the current version of Kayobe and this repository, and
then run the manual setup steps below. The script can be easily edited to use
a different branch of Kayobe or this repository.
a different branch of Kayobe or this repository. The script will automatically
determine whether your image is LVM based, if so, it will expand the volume sizes
to allow ansible dependencies to install correctly.

Manual Setup
============
Expand Down
13 changes: 10 additions & 3 deletions etc/kayobe/environments/ci-aio/automated-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ cat << EOF | sudo tee -a /etc/hosts
10.205.3.187 pulp-server pulp-server.internal.sms-cloud
EOF

if [ sudo vgdisplay | grep -q lvm2 ]; then
sudo lvextend -L 4G /dev/rootvg/lv_home -r || true
sudo lvextend -L 4G /dev/rootvg/lv_tmp -r || true
fi

BASE_PATH=~
KAYOBE_BRANCH=stackhpc/yoga
KAYOBE_CONFIG_BRANCH=stackhpc/yoga
Expand All @@ -16,10 +21,10 @@ if [[ ! -f $BASE_PATH/vault-pw ]]; then
fi

if type dnf; then
sudo dnf -y install git python3-virtualenv
sudo dnf -y install git
else
sudo apt update
sudo apt -y install gcc git libffi-dev python3-dev python-is-python3 python3-virtualenv
sudo apt -y install gcc git libffi-dev python3-dev python-is-python3
fi

cd $BASE_PATH
Expand All @@ -32,7 +37,7 @@ popd
mkdir -p venvs
pushd venvs
if [[ ! -d kayobe ]]; then
virtualenv kayobe
python3 -m venv kayobe
fi
# NOTE: Virtualenv's activate and deactivate scripts reference an
# unbound variable.
Expand Down Expand Up @@ -62,6 +67,8 @@ source kayobe-env --environment ci-aio

kayobe control host bootstrap

kayobe playbook run etc/kayobe/ansible/growroot.yml

kayobe overcloud host configure

kayobe overcloud service deploy
Expand Down
6 changes: 6 additions & 0 deletions releasenotes/notes/aio-lvm-script-7de0c919f312040b.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
features:
- |
Improvements to the ci-aio automated deployment script
to allow the script to successfully run on LVM-based
images.

0 comments on commit 4dd592e

Please sign in to comment.