You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-26Lines changed: 31 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
2
-
# Getting started with “Fleet Events" reference solution
2
+
# Getting started
3
3
4
-
This document explains how to get started with Fleet Events. It provides step-by-step instructions and technical details to help you understand the components and deploy a working reference solution to your Google Cloud project. This solution can be beneficial for your near-real-time use cases.
4
+
This document explains how to get started “Fleet Events" reference solution. It provides step-by-step instructions and technical details to help you understand the components and deploy a working reference solution to your Google Cloud project.
5
5
6
-
Fleet Events uses near-real-time events produced by Fleet Engine as a basis for generating custom events and handlers for your specific requirements. The reference solution in this repository includes code for creating fleet events and automated deployment using Terraform.
6
+
This solution can be beneficial for your near-real-time use cases. It uses near-real-time events produced by Fleet Engine as a basis for generating custom events for your specific requirements. The reference solution in this repository includes code for creating fleet events and automated deployment using Terraform.
7
7
8
8
<!-- You can learn more about real time event processing concepts by referencing [this article](https://docs.google.com/document/d/15zeL34K2SfkHHVMpRD0tYdrDiYDy_WzvHEjlwgDI4X8/edit). -->
9
9
@@ -21,9 +21,9 @@ To adjust the configuration parameters, you need to have at least a high-level u
21
21
The end state :
22
22
23
23
* There will be two projects, one for Fleet Engine, and one for the Fleet Events reference solution. Projects are separated so that each can be tied to respective billing accounts. (Example: Fleet Events: your GCP billing account. Fleet Engine: your Google Maps Platform Mobility billing account)
24
-
* Logs from Fleet Engine project will be setup to flow into a Cloud Pub/Sub Topic “Fleet Engine Events” in “Fleet Events” project
25
-
* A Cloud Function that subscribes to the “Fleet Engine Events” Topic will be deployed. This function will have the implementation unique to the use case.
26
-
* A Pub/Sub topic “Custom Events” where generated events will be published.
24
+
* Logs from Fleet Engine project will be setup to flow into a Cloud Pub/Sub Topic in “Fleet Events” project
25
+
* A Cloud Function that processes messages from the Topic will be deployed. This function will have the implementation unique to the use case
26
+
* A Pub/Sub topic where generated events will be published is deployed
27
27
28
28
<!-- Read this deep dive doc to learn more about how building blocks interact with each other and the security applied.
29
29
Deep dive - Security settings -->
@@ -40,7 +40,7 @@ Note down the following information before getting started.
40
40
* example) `my-fleetengine-project`
41
41
***Fleet Events project (project id)**: The project in which this reference solution will be deployed. This project can be pre-created or be generated as part of the automated provisioning. A clean developer sandbox project is highly recommended for safe experiments.
42
42
* example) `my-fleetevents-project`
43
-
***Billing Account for Google Cloud**: This reference solution will make use of several Google Cloud services. Given you may have different billing arrangements between Google Maps Platform (GMP) and Google Cloud Platform (GCP), we highly recommend a separate billing account for GCP. The Fleet Events project above should be associated with this billing account.
43
+
***Billing Account for Google Cloud**: This reference solution will make use of several Google Cloud Platform services. Therefore, the Billing Account for GCP usage is required. You may have different billing arrangements between Google Maps Platform (GMP) and Google Cloud Platform (GCP), in which case the Fleet Events project above should be associated with the latter. If you are not sure, please reach out to your Google account manager or Google Maps Platform reseller.
44
44
* example) `XXXXXX-XXXXXX-XXXXXX` (alphanumeric)
45
45
***Project Folder**: If your organization is adopting a folder structure to manage multiple Google Cloud projects, identify the folder and its id (number) under which the Fleet Events projects should reside.
46
46
* example) `XXXXXXXXXXXX` (all digits)
@@ -59,9 +59,9 @@ Note down the following information before getting started.
59
59
60
60
#### Check permission to configure projects
61
61
62
-
Terraform will run under your Google account’s permissions. (you can also run terraform under service accounts. Links to resources for such setup will be linked later in this doc)
62
+
Terraform will run under your Google account’s permissions. (you can also run terraform under service accounts. Resources to learn about such configuration will be linked later in this doc)
63
63
64
-
For testing, give your developer user account IAM role `roles/editor` in both your **Fleet Engine project** and **Fleet Event project**. This gives you most of the permissions required to quickly go through this solution. Additionally, there are a few additional IAM roles to add.
64
+
For testing, give your developer user account IAM role `roles/editor` in both your **Fleet Engine project** and **Fleet Event project**. This gives you most of the permissions required to quickly go through this solution. Additionally, there are a few additionally required IAM roles.
65
65
66
66
**Fleet Engine** project
67
67
@@ -124,26 +124,31 @@ cd fleet-events-reference-solutions
124
124
125
125
This git repo is structured as follows.
126
126
127
-
*[README.md](./README.md): this readme doc
127
+
*[README.md](./README.md): this "Getting Started" guide
*[diagrams/](./diagrams/): diagrams used in articles
148
153
*`*.md`: additional documents
149
154
@@ -162,7 +167,7 @@ Change the Terraform working directory to one of the examples.
162
167
cd terraform/modules/fleet-events/examples/with_existing_project
163
168
```
164
169
165
-
#### STEP 2 : create a terraform.tfvars file from example
170
+
#### STEP 2 : create a `terraform.tfvars` file from example
166
171
167
172
This example is also a terraform module with input variables defined. These variables can be set in a configuration file `terraform.tfvars`. Make a copy of file `terraform.tfvars.sample` and edit it to match your environment. Your text editor of choice can be used. Example below is using `vi`` as the editor.
168
173
@@ -189,7 +194,7 @@ The full set of variables that can be set can be referenced in the module’s [R
189
194
190
195
##### Naming rules
191
196
192
-
Google Cloud applies different naming restrictions depending on the service and resource. The “Fleet Events” deployment script will generate identifiers or labels so that they are easily recognizable by concatenating given resource names. However, concatenation can hit naming rule limits. The general guidance is to not make identifiers too long. Or, if such errors are observed, reconsider the name. Here are documented naming rules for a few of the major resources types :
197
+
Google Cloud Platform applies different naming restrictions depending on the service and resource. The “Fleet Events” deployment script will generate identifiers or labels by concatenating given resource names so that they are easily recognizable. However, concatenation can hit naming rule limits. The general guidance is to not make identifiers too long. Or, if such errors are observed, reconsider the name and make it shorter. Here are documented naming rules for a few of the major resources types :
When you need to change configuration, update the terraform.tfvar file and rerun terraform from the same folder. In case you want to start over or clean up the environment, de-provisioning can be done by simply running the following command.
262
+
When you need to change configuration, update the `terraform.tfvar` file and rerun terraform from the same folder. In case you want to start over or clean up the environment, de-provisioning can be done by simply running the following command.
258
263
259
264
```shell
260
265
terraform destroy
@@ -279,7 +284,7 @@ Run the following after a few minutes to confirm the state of the service.
279
284
gcloud --project <PROJECT_FLEETEVENTS> services list --enabled
280
285
```
281
286
282
-
Once confirmed, rerun terraform
287
+
Once confirmed, rerun `terraform`
283
288
284
289
```shell
285
290
# re-run terraform
@@ -313,7 +318,7 @@ This requires the current project state to be imported into terraform by running
As in the [bottom of this page](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/firestore_database#import), “terraform import” can be run in one of the supported forms.
321
+
As in the [bottom of this page](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/firestore_database#import), `terraform import` can be run in one of the supported forms.
@@ -322,7 +327,7 @@ As in the [bottom of this page](https://registry.terraform.io/providers/hashicor
322
327
In the case of the error above:
323
328
324
329
* Database resources identifier within Terraform (as in the error message): `module.fleet-events-with-existing-project.module.fleet-events.google_firestore_database.database`
325
-
* Database resource path: `<PROJECT_FLEETEVENTS>/(default)`. Note that Firestore database instance name is always “(default)”
330
+
* Database resource path: `<PROJECT_FLEETEVENTS>/(default)`. Note that Firestore database instance name defaults to `(default)`
326
331
327
332
Therefore, the import command can be run as follows:
@@ -380,7 +385,7 @@ For developers considering wider adoption of terraform, below is a recommended r
380
385
381
386
## Limitations
382
387
383
-
[PubSub Triggers](https://firebase.google.com/docs/functions/pubsub-events?gen=2nd) delivers fleet logs to Cloud Functions. These triggers do not guarantee ordering. Out of order eventing can originate from:
388
+
[PubSub Triggers](https://firebase.google.com/docs/functions/pubsub-events?gen=2nd) deliver fleet logs to Cloud Functions. These triggers do not guarantee ordering. Out of order eventing can originate from:
384
389
385
390
* Logs delivered out of order by Cloud Logging (if used)
386
391
* Logs delivered out of order by PubSub (see [Cloud PubSub: Ordering Messages](https://cloud.google.com/pubsub/docs/ordering))
0 commit comments