-
Notifications
You must be signed in to change notification settings - Fork 23
Add automated AIO setup script #527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/bin/bash | ||
|
||
set -eux | ||
|
||
cat << EOF | sudo tee -a /etc/hosts | ||
10.205.3.187 pulp-server pulp-server.internal.sms-cloud | ||
EOF | ||
|
||
BASE_PATH=~ | ||
KAYOBE_BRANCH=stackhpc/yoga | ||
KAYOBE_CONFIG_BRANCH=stackhpc/yoga | ||
|
||
if [[ ! -f $BASE_PATH/vault-pw ]]; then | ||
echo "Vault password file not found at $BASE_PATH/vault-pw" | ||
exit 1 | ||
fi | ||
|
||
if type dnf; then | ||
sudo dnf -y install git python3-virtualenv | ||
else | ||
sudo apt update | ||
sudo apt -y install gcc git libffi-dev python3-dev python-is-python3 python3-virtualenv | ||
fi | ||
|
||
cd $BASE_PATH | ||
mkdir -p src | ||
pushd src | ||
[[ -d kayobe ]] || git clone https://github.com/stackhpc/kayobe.git -b $KAYOBE_BRANCH | ||
[[ -d kayobe-config ]] || git clone https://github.com/stackhpc/stackhpc-kayobe-config kayobe-config -b $KAYOBE_CONFIG_BRANCH | ||
popd | ||
|
||
mkdir -p venvs | ||
pushd venvs | ||
if [[ ! -d kayobe ]]; then | ||
virtualenv kayobe | ||
fi | ||
# NOTE: Virtualenv's activate and deactivate scripts reference an | ||
# unbound variable. | ||
set +u | ||
source kayobe/bin/activate | ||
set -u | ||
pip install -U pip | ||
pip install ../src/kayobe | ||
popd | ||
|
||
if ! ip l show breth1 >/dev/null 2>&1; then | ||
sudo ip l add breth1 type bridge | ||
fi | ||
sudo ip l set breth1 up | ||
if ! ip a show breth1 | grep 192.168.33.3/24; then | ||
sudo ip a add 192.168.33.3/24 dev breth1 | ||
fi | ||
if ! ip l show dummy1 >/dev/null 2>&1; then | ||
sudo ip l add dummy1 type dummy | ||
fi | ||
sudo ip l set dummy1 up | ||
sudo ip l set dummy1 master breth1 | ||
|
||
export KAYOBE_VAULT_PASSWORD=$(cat $BASE_PATH/vault-pw) | ||
pushd $BASE_PATH/src/kayobe-config | ||
source kayobe-env --environment ci-aio | ||
|
||
kayobe control host bootstrap | ||
|
||
kayobe overcloud host configure | ||
|
||
kayobe overcloud service deploy | ||
|
||
export KAYOBE_CONFIG_SOURCE_PATH=$BASE_PATH/src/kayobe-config | ||
export KAYOBE_VENV_PATH=$BASE_PATH/venvs/kayobe | ||
pushd $BASE_PATH/src/kayobe | ||
./dev/overcloud-test-vm.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
features: | ||
- | | ||
Added a script to the AIO environment that can be used to quickly | ||
deploy an AIO for testing. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.