-
Notifications
You must be signed in to change notification settings - Fork 45
fix: wpb-22439 offline-vm-setup script to manage VMs wiab-staging #845
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
base: wpb-22439-0-enable-rabbitmq-ansible
Are you sure you want to change the base?
fix: wpb-22439 offline-vm-setup script to manage VMs wiab-staging #845
Conversation
bin/offline-vm-setup.sh
Outdated
| BASE_IMAGE="$BASE_IMAGE_DIR/ubuntu-22.04-base.qcow2" | ||
| IMAGE_URL="https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img" | ||
|
|
||
| if [ ! -d "$NOCLOUD_DIR" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the if block. -p is unconditional, and always succeeds.
bin/offline-vm-setup.sh
Outdated
| VM_VCPU=(2 6 6 6 4 4 4) | ||
| VM_RAM=(4096 8192 8192 8192 8192 8192 8192) | ||
| VM_DISK=(100 100 100 100 100 100 100) | ||
| if [ ! -d "$BASE_IMAGE_DIR" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here. do not mkdir -p in a if'd off block, unless you are doing something else with the if.
bin/offline-vm-setup.sh
Outdated
| # Download base Ubuntu cloud image if not present | ||
| if [ ! -f "$BASE_IMAGE" ]; then | ||
| msg "Downloading Ubuntu 22.04 cloud image to $BASE_IMAGE ..." | ||
| wget -q "$IMAGE_URL" -O "$BASE_IMAGE" || die "Failed to download Ubuntu cloud image" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wget vs curl here. if you're specifying the output file name, curl is same as wget, only saner to debug.
bin/offline-vm-setup.sh
Outdated
| ssh-keygen -t ed25519 -q -N '' -f "$HOME"/.ssh/id_ed25519 | ||
| SSHKEY_DEMO=$(cat "$HOME"/.ssh/id_ed25519.pub) | ||
| SSH_DIR="$DEPLOY_DIR/ssh" | ||
| if [ ! -d "$SSH_DIR" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mkdir -p here.
5441047 to
71c155e
Compare
…al seed iso and VM verification process
1f58fc3 to
7b9a97f
Compare
|



Summary of changes :
This ticket is part of cascading PRs:
#846 - ansible prepare host for vm provisioning
#847 - minor fixes for bin/offline-deploy.sh and cd.sh terraform inventory
#848 - add terraform resources for wiab-staging
#849 - add cd_staging.sh script
#850 - GitHub workflow wiab staging - All the changes are being verified here
#851 - docs for wiab-staging are here
#852 - clean old wiab staging script and workflows
#853 - Testing wiab-staging solution for wire-server-5.14
#856 - postgresql repmgr node config
No labels:
The changes in the PR - can't be verified using Github workflows - will add an asciinema.
Change type
Basic information
Testing
Offline Build CI (label-based)
Add one or more labels to trigger offline builds:
build-default- Full production build (ansible, terraform, all packages)build-demo- Demo/WIAB buildbuild-min- Minimal build (fastest, essential charts only)build-all- Run all three buildsNote: No builds run by default. Add a label to trigger CI.
Tracking
changelog.dKnowledge Transfer
Motivation
Objective
Reason
Use case