|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +# install uv |
| 4 | +# clone and checkout ciab |
| 5 | +# git submodule update --init |
| 6 | +# install python3, python3-venv |
| 7 | + |
| 8 | +set -euo pipefail |
| 9 | + |
| 10 | +# rm -rf .venv |
| 11 | +# rm -f site-config/passwords.yml |
| 12 | +# rm -f site-config/globals.yml |
| 13 | + |
| 14 | +# load a yaml config to use. |
| 15 | +test_config="${1}" |
| 16 | + |
| 17 | +# set ip addresses and ifaces |
| 18 | +./testing/setup_ifaces.sh \ |
| 19 | + $(yq '.ci_api_name' $test_config) \ |
| 20 | + $(yq '.ci_neutron_name' $test_config) \ |
| 21 | + $(yq '.ci_api_ip' $test_config) |
| 22 | + |
| 23 | +# set hostname |
| 24 | +sudo hostnamectl set-hostname "ciablocal" |
| 25 | + |
| 26 | +uv venv .venv |
| 27 | +source .venv/bin/activate |
| 28 | +uv pip install \ |
| 29 | + -r requirements.txt \ |
| 30 | + git+https://github.com/openstack/kolla-ansible@unmaintained/2023.1 |
| 31 | + |
| 32 | +kolla-ansible install-deps |
| 33 | + |
| 34 | +# setup passwords. Not overwriting to permit repeated runs |
| 35 | +cp --no-clobber site-config/passwords.yml{.example,} |
| 36 | +kolla-genpwd -p site-config/passwords.yml |
| 37 | + |
| 38 | +# overwriting globals.yml with test config |
| 39 | +cat $test_config >> site-config/globals.yml |
| 40 | + |
| 41 | +# ./cc-ansible --site site-config bootstrap-servers |
| 42 | +# ./cc-ansible --site site-config prechecks |
| 43 | +# ./cc-ansible --site site-config pull |
| 44 | +# ./cc-ansible --site site-config genconfig |
| 45 | +# ./cc-ansible --site site-config deploy |
| 46 | +# ./cc-ansible --site site-config post-deploy |
0 commit comments