Google Certified Associate Cloud Engineer 2020

Sign Up Free or Log In to participate!

How and where can i load the script for the lab ?

How and where can i load the script for the lab ?

2 Answers

The link to the startup script for this lab can be found in the previous video; but I’ve also linked it below. This will be what you’ll use to startup your instances as part of your lab:

https://raw.githubusercontent.com/ACloudGuru/gcp-cloud-engineer/master/compute-labs/worker-startup-script.sh

Take some time to read it through carefully; some of the secrets to passing this lab lie in the script itself

Ashish Vishwakarma

Thanks!!

If the question is where you upload the script versus where you download it:

1- using the console, when you create the VM, expand the " Management, security, disks, networking, sole tenancy" section at the very bottom, and in the Management tab, there is a "Startup script" text box to paste it

You can also create a metadata called "startup-script-url" and provide the URL

2- Using Cloud Shell, you have to use the metadata "startup-script-url" and either provide a link to it or also copy the code between quotes (but that is ugly)

gcloud compute instances create example-instance –metadata startup-script-url= —

I hope this helps

Ashish Vishwakarma

Thanks!!

Matthieu Lienart

The full documentation is available here: https://cloud.google.com/compute/docs/startupscript

Valentin Vanderborght

Thanks Matthieu for the answer. Using the cloud shell, you could use this alternative. You could create a text file using the ‘touch’ command and copy-paste the script in it. Then, you can use the flag –metadata-from-file startup-script=script.txt

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?