This challenge requires a bit of set up from terraform and it probs could be done better but here it is.
- Sign into your Google Cloud Platform account and create a new project with what ever name
- Once it has been created note the
project id
- In gcloud make sure you are logged in with the same account with
gcloud auth login
- Download the right terraform binary to the
challenge/terraform
folder and run./terraform init
- Update
challenge/terraform/terraform.tfvars
with the variables, the first is your project ID from above and then a globally unique bucket name ( no one in the world can have the same bucket name) - Run
./terraform plan
check the output make sure it looks all good - Run
./terraform apply
to apply the infrastructuyre set up
I know you can do this with terraform but I couldn't be bothered to find a way to deploy src code to a bucket
- Navigate to the
challenge/app-src
directory and rungcloud app deploy --project <Your Project ID>
- Navigate to the
challenge/cf-src
directory and rungcloud functions deploy professional-signer --region australia-southeast1 --trigger-http --runtime nodejs12 --entry-point signURL --service-account tracy-worker@<your_project_id>.iam.gserviceaccount.com
and make sure you sayN
to any unauthenticated invocations
- To get the IAM key for svc account cory use the command
gcloud iam service-accounts keys create cory.json --iam-account cory-worthington@<your_project_ID_here>.iam.gserviceaccount.com
provide this to the competitors - Run
gcloud app describe --project <your_project_idhere>
and get thedefault_hostname
this is the URL to the app engine instance, provide this also to the competitors.
DONE!