Skip to content

Add scripts to build, test, and deploy fizz-bot using Google Cloud. - #7

Merged
danakj merged 4 commits into
mainfrom
push-qtymxvlrsovp
Jul 8, 2026
Merged

Add scripts to build, test, and deploy fizz-bot using Google Cloud.#7
danakj merged 4 commits into
mainfrom
push-qtymxvlrsovp

Conversation

@zygoloid

@zygoloid zygoloid commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

This removes the need to have a local docker installation.

This removes the need to have a local docker installation.
@zygoloid
zygoloid requested a review from danakj July 7, 2026 00:41
Comment thread build-gcloud.sh Outdated
Comment thread cloudbuild-push.yaml Outdated
Comment on lines +29 to +31



Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: too many newlines at end of file lol

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated every file in this directory to end with exactly one newline. :-)

Comment thread run-gcloud-staging.sh

# 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'..."

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh okay yeah I missed that. Can we call this run-gcloud-staging.sh?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Comment thread cloudbuild-push.yaml
@zygoloid
zygoloid requested a review from danakj July 7, 2026 18:07

@zygoloid zygoloid left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.)

@danakj

danakj commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

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.

@zygoloid

zygoloid commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

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.

@danakj

danakj commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Cool, thanks

@danakj
danakj merged commit 351ee05 into main Jul 8, 2026
6 checks passed
@danakj
danakj deleted the push-qtymxvlrsovp branch July 8, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants