Add scripts to build, test, and deploy fizz-bot using Google Cloud. - #7
Conversation
This removes the need to have a local docker installation.
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
nit: too many newlines at end of file lol
There was a problem hiding this comment.
Updated every file in this directory to end with exactly one newline. :-)
|
|
||
| # Deploy/update the Cloud Run job. | ||
| # We mount the GCS bucket carbon-fizz-bot-config to /config, point FIZZ_CONFIG_DIR to /config/staging, and get the discord token from its secret. | ||
| echo "Deploying Cloud Run job '$JOB_NAME'..." |
There was a problem hiding this comment.
I don't think we want or need to use Cloud Run. We just want an image we can pull and run on a VM, so that it can be a long-lived daemon without having to listen to any http ports or finish and exit within a timeout.
There was a problem hiding this comment.
I agree that Cloud Run wouldn't be a good choice for the production instance. But this script is for testing a staging instance, so I don't think we need it to be a long-lived daemon; running it with a timeout seems like a good thing here to avoid stale instances getting left behind in our google cloud project.
If not this, what alternative would you prefer for testing the image prior to deploying to production? We could add another GCE instance and have a permanently running staging fizz-bot (looks like that'd cost us about $10 per month though).
There was a problem hiding this comment.
Ohh okay yeah I missed that. Can we call this run-gcloud-staging.sh?
zygoloid
left a comment
There was a problem hiding this comment.
One other question: do you want the docker scripts left here too? There's nothing wrong with them, and they'd allow people without gcloud permissions to test fizz-bot containers, but I'm not sure how much that's an interesting use case. (I'd imagine most testing would be done locally with the run.sh script, and the gcloud stuff would only be for pre-deployment testing.)
Yeah I think we can remove the docker scripts. I use run.sh locally for staging, and we're going to use the gcloud ones for our deployment. |
Done. |
|
Cool, thanks |
This removes the need to have a local docker installation.