Skip to content

Commit

Permalink
docs: default GCP networking documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ezr-ondrej authored and lzap committed Oct 31, 2023
1 parent 601f51e commit ad04e26
Showing 1 changed file with 35 additions and 0 deletions.
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
```

0 comments on commit ad04e26

Please sign in to comment.