Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 1.59 KB

answers-to-exercises.md

File metadata and controls

43 lines (29 loc) · 1.59 KB

Answers to the exercises

Resources can be found at https://github.com/drchrispinnock/gcp-node-example.

  1. Find out how to stop a VM in GCP using gcloud.

For this refer to the gcloud documentation:

For instance my-instance in zone europe-west6-a use the following command:

gcloud compute instances stop my-instance --zone=europe-west6-a
  1. Write a shell script that:
  • creates a new GCP project
  • adds it to a billing account (optional)
  • enables the GCP Compute Engine
  • creates a service account
  • provisions a VM using the service account
  • copies the postinstall script to the VM and then runs it

See exercise2.sh.

  1. Modify the postinstall script so that the Tezos node runs on mainnet

Change NET=nairobinet to NET=mainnet in postinstall.sh.

  1. Modify your script from 2 to setup 3 nodes - one in USA, one in Europe and one in Japan.

See exercise4.sh.

  1. Although we set up our original server to allow connections on 9732 for the Tezos Gossip network, the GCP firewall will prevent the connections. How do you add a rule to allow it?

This is another question where you need to read the document but it will be harder for a beginner. Here is the command:

gcloud compute --project=your-project-id firewall-rules create \
        tezos-gossip-port --direction=INGRESS --priority=1000 \
        --network=default --action=ALLOW --rules=tcp:9732 \
        --source-ranges=0.0.0.0/0