-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add gcp bash script for easy PR deployment #2
Conversation
To make the name of the instance configurable
scripts/check_ui_online.sh
Outdated
|
||
kibana_syslog=/var/log/syslog | ||
|
||
grep -m 1 "bundles compiled successfully" <(tail -f -n +1 $kibana_syslog) |
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.
it's cumbersome to detect Kibana finished building, this works a least in recent minors, but in case it doesn't work, deployment needs to be checked manually
gcp/main.tf
Outdated
"chmod +x /tmp/bootstrap.sh", | ||
"nohup /tmp/bootstrap.sh ${var.kibana_repo_url} ${var.kibana_repo_branch}", | ||
"chmod +x /tmp/*.sh", | ||
"/tmp/install.sh ${var.kibana_repo_url} ${var.kibana_repo_branch} && /tmp/bootstrap.sh && /tmp/start.sh ", |
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.
splitting of the original bootstrap.sh script so only parts can be executed
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.
I can't get over how cool this is!! Added a few ideas.
Would you be willing to add some documentation explaining deployments.txt
and how that works?
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.
This is so awesome and brings the project to another level. Thanks @kertal! 🚀
fi | ||
log "🍅 Checking for Kibana UI to be available" | ||
eval "ssh -q -o StrictHostKeyChecking=no ubuntu@${PUBLIC_IP} /tmp/check_ui_online.sh" | ||
log "🥗 🥯 ☕ - Kibana UI is available (${KIBANA_URL}) " |
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.
Love your strong emoji game
This PR is adding a script that simplifies the process of deploying a Github PR to google cloud
Usage
Deploy a PR in
./kbn-dev.sh deploy pr {numberOfPR}
Update the instance of a PR
./kbn-dev.sh deploy pr {numberOfPR}
SSH into the instance of a PR
./kbn-dev.sh ssh pr {numberOfPR}
Destroy a PR
./kbn-dev.sh destroy pr {numberOfPR}
Show deployments
./kbn-dev.sh
What's more ...
... it also works with branches and tags
./kbn-dev.sh deploy branch {nameOfBranch}
./kbn-dev.sh deploy tag {nameOfTag}
Btw currently there is no check if a PR or branch or tag exists, but of course this should be done
Why only GCP ?
Because I'm familiar to GCP and havr access to it, but of course it should be possible to extend it to AWS or Azure