Overview
In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure out how to complete the tasks on your own! An automated scoring system (shown on this page) will provide feedback on whether you have completed your tasks correctly.
When you take a challenge lab, you will not be taught new Google Cloud concepts. You are expected to extend your learned skills, like changing default values and reading and researching error messages to fix your own mistakes.
To score 100% you must successfully complete all tasks within the time period!
Task 1. Enable the Google App Engine Admin API
- Enable the Google App Engine Admin API for the project to provision and manage the App Engine application.
Click Check my progress to verify the objective.
Enable Google App Engine Admin API
Check my progress
Task 2. Download the Hello World app
Download a simple Hello World app from the relevant repository according to your choice of language for deploying the web application on the VM instance lab-setup at the
$HOMEdirectory (~/).| Language | Repository | | --- | --- | | Python | https://github.com/GoogleCloudPlatform/python-docs-samples.git | | PHP | https://github.com/GoogleCloudPlatform/php-docs-samples.git | | Golang/Go | https://github.com/GoogleCloudPlatform/golang-samples.git |
Go to the directory that contains the
helloworldsample code.
Click Check my progress to verify the objective.
Download the Hello World app
Check my progress
Task 3. Deploy your application
For this task, you need to deploy the helloworld app to the Google App Engine in the us-east4 region.
- Navigate from the root directory to where your application's
app.yamlfile is located.
Note: Deploy the application to the App Engine standard environment.
View your application
- To launch and view the application in your browser, enter the following command:
gcloud app browse
- Click on the link that is provided. Your application is deployed and you can read the default message in your browser.
Click Check my progress to verify the objective.
Deploy the application
Check my progress
Task 4. Deploy updates to your application
- Update your application code to change the default message of
Hello, World!toGoodbye world!and redeploy your application.
Click Check my progress to verify the objective.
Deploy updates to your application
Check my progress
Solution of Lab
Quick
curl -LO raw.githubusercontent.com/ePlus-DEV/storage/refs/heads/main/labs/ARC112/lab.sh
sudo chmod +x lab.sh
./lab.sh


Manual
Run the commands below in SSH on the VM Instance lab-setup.
Task 1 - Enable the Google App Engine Admin API
gcloud services enable appengine.googleapis.com
Task 2 - Download the Hello World app
Make sure to download the web application on the VM instance "lab-setup"
git clone https://github.com/GoogleCloudPlatform/php-docs-samples.git
cd php-docs-samples/appengine/standard/helloworld
After cloning the above command in the
SSH of VM-Instance, come back to yourcloud consoleand open theCloud Shell Terminal.And again,
recloning the sample fileusing the above commands.
Task 3 - Deploy your application
gcloud config set project $DEVSHELL_PROJECT_ID
export ZONE="$(gcloud compute instances list --project=$DEVSHELL_PROJECT_ID --format='value(ZONE)')"
export REGION=${ZONE%-*}
gcloud app create --region=$REGION
gcloud app deploy
gcloud app browse
Choose Region in the list which you have given in your lab. --> (This is the most important thing in this step.)
If asking "Enter your choice (Y/n)" then --> press y
Task 4 - Deploy updates to your application
Here, in the
index.php, change the code to Hello, World! toWhatever the message is in the Task 4.Now, after editing the code, save and exit from the editor by pressing the
Ctrl+X, Y, and then hitEnter.
nano index.php
gcloud app deploy --quiet
