@@ -18,7 +18,7 @@ This template provides a scalable solution for streaming data from Google Cloud
1818The template requires two environment variables:
1919
2020- ` BETTER_STACK_SOURCE_TOKEN ` : Your Better Stack source token
21- - ` BETTER_STACK_INGEST_HOST ` : The Better Stack ingest host URL
21+ - ` BETTER_STACK_INGESTING_HOST ` : The Better Stack ingest host URL
2222
2323## Building the Template
2424
@@ -28,14 +28,24 @@ git clone https://github.com/your-org/gcp-dataflow-pubsub-to-telemetry.git
2828cd gcp-dataflow-pubsub-to-telemetry
2929```
3030
31+ 2 . Choose Google Cloud Platform project to use
32+ ``` bash
33+ # See currently selected project
34+ gcloud config get-value project
35+ # You can switch to a different project using
36+ gcloud projects list
37+ gcloud config set project PROJECT_ID
38+ ```
39+
31402 . Build the Docker image:
3241``` bash
33- docker build -t gcr.io/YOUR_PROJECT /pubsub-to-betterstack .
42+ docker build -t gcr.io/$( gcloud config get-value project ) /pubsub-to-betterstack .
3443```
3544
36453 . Push the image to Google Container Registry:
3746``` bash
38- docker push gcr.io/YOUR_PROJECT/pubsub-to-betterstack
47+ gcloud auth configure-docker
48+ docker push gcr.io/$( gcloud config get-value project) /pubsub-to-betterstack
3949```
4050
4151## Deploying the Template
@@ -48,7 +58,7 @@ You can deploy the template using the Google Cloud Console or the gcloud CLI:
4858gcloud dataflow flex-template run " pubsub-to-betterstack-$( date +%Y%m%d-%H%M%S) " \
4959 --template-file-gcs-location=gs://YOUR_BUCKET/templates/pubsub-to-betterstack.json \
5060 --parameters input_subscription=projects/YOUR_PROJECT/subscriptions/YOUR_SUBSCRIPTION \
51- --region=YOUR_REGION \
61+ --region=$( gcloud config get-value compute/region ) \
5262 --additional-experiments=use_runner_v2
5363```
5464
@@ -62,7 +72,7 @@ gcloud dataflow flex-template run "pubsub-to-betterstack-$(date +%Y%m%d-%H%M%S)"
6272 - ` input_subscription ` : Your PubSub subscription to read from
63736 . Set the environment variables:
6474 - ` BETTER_STACK_SOURCE_TOKEN `
65- - ` BETTER_STACK_INGEST_HOST `
75+ - ` BETTER_STACK_INGESTING_HOST `
66767 . Click "Run Job"
6777
6878## Message Format
0 commit comments