GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - Babbili/python-pubsub: using a Pub/Sub push subscription deployed on serverless Google Cloud Run with Cloud Build ci/cd

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
ops
ops
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 
app.py
app.py
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

Python Pub/Sub deployed on Cloud Run

using a Pub/Sub push subscription deployed on serverless Cloud Run with Cloud Build ci/cd


Creating a Pub/Sub topic

The sample service is triggered by messages published to a Pub/Sub topic

To create a new Pub/Sub topic, use the command

gcloud pubsub topics create myTopic

app.py will handle the incoming request and proccess the Pub/Sub messages

The service will return HTTP response codes. Success codes, such as HTTP 200 or 204, acknowledge complete processing of the Pub/Sub message. Error codes, such as HTTP 400


Shipping the code

Shipping code with Cloud Build consists of three steps in cloudbuild.yaml which is triggered on a github repo. branch push event (ci/cd)

  • Building the docker container image,
  • Pushing the container image to Container Registry,
  • Deploying the container image to Cloud Run

Create a Pub/Sub subscription

To create a Pub/Sub subscription, use the command

gcloud pubsub subscriptions create mySubscription --topic myTopic \
--ack-deadline=600 \
--push-endpoint=SERVICE-URL/ # πŸ‘ˆSERVICE-URL is the HTTPS URL provided on deploying the service

πŸŽ‰ Send a Pub/Sub message πŸŽ‰

Trying it out by sending a Pub/Sub message to the topic

gcloud pubsub topics publish myTopic --message "My Message"

About

using a Pub/Sub push subscription deployed on serverless Google Cloud Run with Cloud Build ci/cd

Topics

cicdcloudbuildcloudruncontainerregistrydockergcppubsubpython

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.