@@ -18,7 +18,7 @@ This template provides a scalable solution for streaming data from Google Cloud
18
18
The template requires two environment variables:
19
19
20
20
- ` 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
22
22
23
23
## Building the Template
24
24
@@ -28,14 +28,24 @@ git clone https://github.com/your-org/gcp-dataflow-pubsub-to-telemetry.git
28
28
cd gcp-dataflow-pubsub-to-telemetry
29
29
```
30
30
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
+
31
40
2 . Build the Docker image:
32
41
``` 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 .
34
43
```
35
44
36
45
3 . Push the image to Google Container Registry:
37
46
``` 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
39
49
```
40
50
41
51
## Deploying the Template
@@ -48,7 +58,7 @@ You can deploy the template using the Google Cloud Console or the gcloud CLI:
48
58
gcloud dataflow flex-template run " pubsub-to-betterstack-$( date +%Y%m%d-%H%M%S) " \
49
59
--template-file-gcs-location=gs://YOUR_BUCKET/templates/pubsub-to-betterstack.json \
50
60
--parameters input_subscription=projects/YOUR_PROJECT/subscriptions/YOUR_SUBSCRIPTION \
51
- --region=YOUR_REGION \
61
+ --region=$( gcloud config get-value compute/region ) \
52
62
--additional-experiments=use_runner_v2
53
63
```
54
64
@@ -62,7 +72,7 @@ gcloud dataflow flex-template run "pubsub-to-betterstack-$(date +%Y%m%d-%H%M%S)"
62
72
- ` input_subscription ` : Your PubSub subscription to read from
63
73
6 . Set the environment variables:
64
74
- ` BETTER_STACK_SOURCE_TOKEN `
65
- - ` BETTER_STACK_INGEST_HOST `
75
+ - ` BETTER_STACK_INGESTING_HOST `
66
76
7 . Click "Run Job"
67
77
68
78
## Message Format
0 commit comments