Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: default GCP networking documentation #737

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions docs/configure-gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,38 @@ In real life, the Tenant project id will be stored in a secret place, which is a
This microservice also provides a guide on how to set up the Tenant account.
This app then fetches the project id and performs operations in this project.
If the setup is not correct as the above steps, this service fails, but does not provide corrective measures.

## Configure networking in Tenant project

In a new GCP project, there is no default networking.
For GCP deployment to work properly, one must create default network with ssh inbound allowed.

To do so, run following commands, with your `PROJECT_ID`:

```
gcloud compute networks create default \
--project=PROJECT_ID \
--subnet-mode=auto \
--mtu=1460 \
--bgp-routing-mode=regional

gcloud compute firewall-rules create default-allow-icmp \
--project=PROJECT_ID \
--network=projects/PROJECT_ID/global/networks/default \
--description=Allows\ ICMP\ connections\ from\ any\ source\ to\ any\ instance\ on\ the\ network. \
--direction=INGRESS \
--priority=65534 \
--source-ranges=0.0.0.0/0 \
--action=ALLOW \
--rules=icmp

gcloud compute firewall-rules create default-allow-ssh \
--project=PROJECT_ID \
--network=projects/PROJECT_ID/global/networks/default \
--description=Allows\ TCP\ connections\ from\ any\ source\ to\ any\ instance\ on\ the\ network\ using\ port\ 22. \
--direction=INGRESS \
--priority=65534 \
--source-ranges=0.0.0.0/0 \
--action=ALLOW \
--rules=tcp:22
```