🧑💻 Add examples
This commit is contained in:
parent
f930b5f746
commit
8b2dcd6671
5 changed files with 74 additions and 0 deletions
21
examples/create_aio.bash
Normal file
21
examples/create_aio.bash
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
AIO_NAME=test5
|
||||
|
||||
|
||||
create_aio_vm \
|
||||
--password secrete123 \
|
||||
--public-key ~/.ssh/id_rsa.pub \
|
||||
--output-image /data/${AIO_NAME}.qcow2 \
|
||||
--input-image ~/rhel-guest-image-8.4-1269.x86_64.qcow2 \
|
||||
--image-size "800G" \
|
||||
--os-variant rhel8.4 \
|
||||
--name ${AIO_NAME} \
|
||||
--local-hostname ${AIO_NAME} \
|
||||
--instance-id ${AIO_NAME} \
|
||||
--gateway 172.23.0.1 \
|
||||
--dns 172.23.0.14 \
|
||||
--mac-1 52:54:00:a5:48:03 \
|
||||
--mac-2 52:54:00:a5:48:04 \
|
||||
--search-domain evatt.ingenious.com.au \
|
||||
--rhn-user $AIO_RHN_USER \
|
||||
--rhn-password $AIO_RHN_PASSWORD
|
||||
|
||||
19
examples/install_remote_venv.bash
Normal file
19
examples/install_remote_venv.bash
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
REMOTE=172.23.0.34
|
||||
AIOH_ENV="/home/stack/tripleo-aio-helpers"
|
||||
AIO_SRC=$HOME/Projects
|
||||
VENV=$AIOH_ENV/venv
|
||||
rsync -avz --exclude venv $AIO_SRC/tripleo-aio-helpers stack@$REMOTE:
|
||||
ssh stack@$REMOTE "sudo dnf install -y python3-tripleoclient"
|
||||
ssh stack@$REMOTE "cd $AIOH_ENV && python3 -m venv venv"
|
||||
ssh stack@$REMOTE "$VENV/bin/pip install --upgrade pip"
|
||||
ssh stack@$REMOTE "cd $AIOH_ENV && source venv/bin/activate && pip install -r requirements.txt"
|
||||
ssh stack@$REMOTE "cd $AIOH_ENV && source venv/bin/activate && pip install --editable ."
|
||||
ssh stack@$REMOTE "cd $AIOH_ENV && source venv/bin/activate && prepare_deployment -u $AIO_RHN_USER --password $AIO_RHN_PASSWORD --address 172.23.0.34 --interface eth1 --dns 172.23.0.14 --gateway 172.23.0.1"
|
||||
ssh stack@$REMOTE "sudo systemctl stop cloud-init"
|
||||
ssh stack@$REMOTE "sudo systemctl disable cloud-init"
|
||||
# ssh stack@$REMOTE "cp containers-prepare-parameters.yaml.gen containers-prepare-parameters.yaml"
|
||||
# ssh stack@$REMOTE "cp standalone_parameters.yaml.gen standalone_parameters.yaml"
|
||||
# ssh stack@$REMOTE "cp deploy.sh.gen deploy.sh"
|
||||
ssh stack@$REMOTE "sudo dnf install -y tmux"
|
||||
ssh stack@$REMOTE "echo \"tmux new -d \; setw remain-on-exit on \; respawnw -k bash deploy.sh\""
|
||||
# ssh stack@$REMOTE "OS_CLOUD=standalone openstack endpoint list"
|
||||
7
examples/prepare_deployment.bash
Normal file
7
examples/prepare_deployment.bash
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
prepare_deployment \
|
||||
-u $AIO_RHN_USER \
|
||||
--password $AIO_RHN_PASSWORD \
|
||||
--address 172.23.0.35/24 \
|
||||
--interface eth1 \
|
||||
--dns 172.23.0.14 \
|
||||
--gateway 172.23.0.1
|
||||
16
examples/setup.bash
Normal file
16
examples/setup.bash
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
FIP_START=117
|
||||
FIP_END=129
|
||||
AIO_HOST=test-5
|
||||
|
||||
echo "Setting up $AIO_HOST"
|
||||
os_migrate_setup \
|
||||
--gateway 172.23.0.1 \
|
||||
--public-network-cidr=172.23.0.1/24 \
|
||||
--public-net-start 172.23.0.$FIP_START \
|
||||
--public-net-end 172.23.0.$FIP_END \
|
||||
--dns-server 172.23.0.14 \
|
||||
--ssh stack@$AIO_HOST \
|
||||
--cirros-url https://isos.evatt.ingenious.com.au/cirros-0.6.2-x86_64-disk.img \
|
||||
--rhel-url https://isos.evatt.ingenious.com.au/rhel-guest-image-8.4-1269.x86_64.qcow2 \
|
||||
--ssh-key ~/.ssh/id_rsa.pub \
|
||||
--debug
|
||||
11
examples/teardown.bash
Normal file
11
examples/teardown.bash
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
AIO_HOST=test-5
|
||||
|
||||
echo "Tearing down $AIO_HOST"
|
||||
|
||||
os_migrate_teardown \
|
||||
--project-name test-project \
|
||||
--username test-user \
|
||||
--cloud standalone \
|
||||
--ssh stack@$AIO_HOST \
|
||||
--delete-instances \
|
||||
--delete-networks
|
||||
Loading…
Add table
Add a link
Reference in a new issue