This repository is a complement to my medium article. If you wanna follow step by step, check my writing.
This is how our infrastructure works:
Running:
$ go run pubsub.go
Running Dockerfile:
$ docker build . -t metrics-exporter
$ docker run -p 2112:2112 metrics-exporter
Deploying to Google Cloud Run:
$ gcloud builds submit --tag gcr.io/$PROJECT_ID/metrics-exporter
$ gcloud run deploy metrics-exporter --image gcr.io/$PROJECT_ID/metrics-exporter --region $REGION --platform managed --allow-unauthenticated --port 2112
Running Dockerfile:
$ docker build . -t prometheus
$ docker run -p 9090:9090 prometheus
Deploying to Google Cloud Run:
$ gcloud builds submit --tag gcr.io/$PROJECT_ID/prometheus
$ gcloud run deploy prometheus --image gcr.io/$PROJECT_ID/prometheus --region $REGION --platform managed --allow-unauthenticated --port 9090
Running Dockerfile:
$ docker build . -t grafana
$ docker run -p 3000:3000 grafana
Deploying to Google Cloud Run:
$ gcloud builds submit --tag gcr.io/$PROJECT_ID/grafana
$ gcloud run deploy grafana --image gcr.io/$PROJECT_ID/grafana --region $REGION --platform managed --allow-unauthenticated --port 3000