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/terraformfolder and run./terraform init - Update
challenge/terraform/terraform.tfvarswith 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 plancheck the output make sure it looks all good - Run
./terraform applyto 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-srcdirectory and rungcloud app deploy --project <Your Project ID> - Navigate to the
challenge/cf-srcdirectory 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.comand make sure you sayNto 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.comprovide this to the competitors - Run
gcloud app describe --project <your_project_idhere>and get thedefault_hostnamethis is the URL to the app engine instance, provide this also to the competitors.
DONE!