Skip to content

Commit

Permalink
fix: 108 - Fix for Firestore database create cmd. (#113)
Browse files Browse the repository at this point in the history
* 108: Updated the readme.md files from [distributed], [per-project] and [gke with the correct Firestore create command parameter

* fix: 108 - Fix for Firestore database create cmd.

* fix: 108 updated formatting

* updated files formatting to resolve build issues.

* fix: 108 updated files according to rc's.

* Explained Firestore update command
---------

Co-authored-by: David Cueva Tello <davidcueva@google.com>
  • Loading branch information
AkshayKalbhor and davidcueva committed May 10, 2023
1 parent adaa54d commit a49b35f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .mdl.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"MD002": false,
"MD004": { "style": "asterisk" },
"MD007": { "indent": 4 },
"MD013": { "code_blocks": false, "tables": false },
"MD013": { "ignore_code_blocks": true, "tables": false },
"MD029": { "style": "ordered" },
"MD030": { "ul_single": 3, "ul_multi": 3, "ol_single": 2, "ol_multi": 2 }
}
2 changes: 1 addition & 1 deletion .mdl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
rule 'MD007', :indent => 4

# Allow table and code lines to be longer than 80 chars
rule 'MD013', :code_blocks => false, :tables => false
rule 'MD013', :ignore_code_blocks => true, :tables => false

# Ordered list item prefixes
rule 'MD029', :style => :ordered
Expand Down
10 changes: 5 additions & 5 deletions terraform/cloud-functions/distributed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,13 @@ Autoscaler infrastructure, with the exception of Cloud Scheduler, lives.
gcloud app create --region="${AUTOSCALER_APP_ENGINE_LOCATION}"
```

7. Create a database to store the state of the Autoscaler.
State can be stored in either Firestore or Cloud Spanner.
7. The Autoscaler state can be stored in either Firestore or Cloud Spanner.

In case you want to use Firestore, create a new instance
if your project does not have yet.
In case you want to use Firestore, update the database created with the
Google App Engine app to use [Firestore native mode][firestore-native].

```sh
gcloud firestore databases create --region="${AUTOSCALER_APP_ENGINE_LOCATION}"
gcloud firestore databases update --type=firestore-native
```

In case you want to use Cloud Spanner, no action is needed at this point.
Expand Down Expand Up @@ -413,3 +412,4 @@ its configuration issues independently.
[cloud-shell]: https://console.cloud.google.com/?cloudshell=true&_ga=2.43377068.820133692.1587377411-71235912.1585654570&_gac=1.118947195.1584696876.Cj0KCQjw09HzBRDrARIsAG60GP9u6OBk_qQ02rkzBXpwpMd6YZ30A2D4gSl2Wwte1CqPW_sY6mH_xbIaAmIgEALw_wcB
[provider-issue]: https://github.com/hashicorp/terraform-provider-google/issues/6782
[logs-viewer]: https://pantheon.corp.google.com/logs/query
[firestore-native]: https://cloud.google.com/datastore/docs/firestore-or-datastore#in_native_mode
10 changes: 5 additions & 5 deletions terraform/cloud-functions/per-project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,13 @@ In this section you prepare your project for deployment.
gcloud app create --region="${APP_ENGINE_LOCATION}"
```

7. Create a database to store the state of the Autoscaler.
State can be stored in either Firestore or Cloud Spanner.
7. The Autoscaler state can be stored in either Firestore or Cloud Spanner.

In case you want to use Firestore, create a new instance
if your project does not have yet.
In case you want to use Firestore, update the database created with the
Google App Engine app to use [Firestore native mode][firestore-native].

```sh
gcloud firestore databases create --region="${APP_ENGINE_LOCATION}"
gcloud firestore databases update --type=firestore-native
```

In case you want to use Cloud Spanner, no action is needed at this point.
Expand Down Expand Up @@ -335,3 +334,4 @@ page to [configure your Autoscaler](../README.md#configuration).
[terraform-spanner-instance]: https://www.terraform.io/docs/providers/google/r/spanner_instance.html
[terraform-spanner-db]: https://www.terraform.io/docs/providers/google/r/spanner_database.html
[provider-issue]: https://github.com/hashicorp/terraform-provider-google/issues/6782
[firestore-native]: https://cloud.google.com/datastore/docs/firestore-or-datastore#in_native_mode
6 changes: 4 additions & 2 deletions terraform/gke/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,11 @@ In this section you prepare your project for deployment.
gcloud app create --region="${APP_ENGINE_LOCATION}"
```

4. Create a database to store the state of the Autoscaler:
4. To store the state of the Autoscaler, update the database created with the
Google App Engine app to use [Firestore native mode][firestore-native].

```sh
gcloud firestore databases create --region="${APP_ENGINE_LOCATION}"
gcloud firestore databases update --type=firestore-native
```

You will also need to make a minor modification to the Autoscaler
Expand Down Expand Up @@ -553,3 +554,4 @@ following the instructions above.
[terraform-spanner-db]: https://www.terraform.io/docs/providers/google/r/spanner_database.html
[provider-issue]: https://github.com/hashicorp/terraform-provider-google/issues/6782
[organizational-policy]: https://cloud.google.com/resource-manager/docs/organization-policy/overview
[firestore-native]: https://cloud.google.com/datastore/docs/firestore-or-datastore#in_native_mode

0 comments on commit a49b35f

Please sign in to comment.