After completing the previous sections of discussing resources and access in google cloud I moved on to a small interactive Lab session with GCP.
In this lab, I used Google Cloud Marketplace to quickly and easily deploy a LAMP (Linux, Apache, Mysql, PHP) stack on a Compute Engine instance. The Bitnami LAMP Stack provides a complete web development environment for Linux that can be launched in one click.
The roles of different components of the LAMP stack are
Linux :- Operating System
Apache HTTP server:- web server
MySQL:- Relational Database
PHP:- Web Application Framework
phpMyAdmin:- php Administration Tool
The Objective of the lab session was to earn how to launch a solution using Cloud Marketplace. Entire lab session was distri buted in three task sections.
TASK1:- Sign in to the Google Cloud Console
For each task, we will get a fixed set of resources for a fixed time with no cost
steps in this task are explained below :
Sign in to Qwiklabs using an incognito window.
Note the lab's access time (for example,
1:15:00
), and make sure you can finish within that time.
There is no pause feature. You can restart if needed, but you have to start at the beginning.When ready, click Start lab.
Note your lab credentials (Username and Password). You will use them to sign in to the Google Cloud Console.
Click Open Google Console.
Click Use another account and copy/paste credentials for this lab into the prompts.
If you use other credentials, you'll receive errors or incur charges.Accept the terms and skip the recovery resource page.
TASK 2:-Use Cloud Marketplace to deploy a LAMP stack
The steps in this task in marked below
In the Google Cloud Console, on the Navigation menu (), click Marketplace.
In the search bar, type
LAMP
and then press ENTER.In the search results, click LAMP Packaged by Bitnami.
If you choose another LAMP stack, such as the Google Click to Deploy offering, the lab instructions will not work as expected.
On the LAMP page, click Launch.
If this is your first time using Compute Engine, the Compute Engine API must be initialized before you can continue.
For Zone, select the deployment zone that Qwiklabs assigned to you.
For Machine Type, select E2 as the Series and e2-medium as the Machine Type.
Leave the remaining settings as their defaults.
Accept the Google Cloud Marketplace Terms of Service near the bottom of the page.
Click Deploy.
If a Welcome to Deployment Manager message appears, click Close to dismiss it.
Task 3:- Verify your deployment
When the deployment is complete, click the Site address link in the right pane. (If the website is not responding, wait 30 seconds and try again.) If you see a redirection notice, click on that link to view your new site.
Close the congratulations browser tab.
On the Google Cloud Console, under Get started with LAMP Packaged by Bitnami, click SSH.
In a new window, a secure login shell session on your virtual machine appears.
In the SSH window, to change the current working directory to
/opt/bitnami
, execute the following command:cd /opt/bitnami
Copied!content_copy
To copy the
phpinfo.php
script from the installation directory to a publicly accessible location under the web server document root, execute the following command:sudo sh -c 'echo "<?php phpinfo(); ?>" > apache2/htdocs/phpinfo.php'
Copied!content_copy
The phpinfo.php script displays your PHP configuration. It is often used to verify a new PHP installation.
To close the SSH window, execute the following command:
exit
Copied!content_copy
Open a new browser tab.
Enter the following URL, and replace
SITE_ADDRESS
with the URL in the Site address field in the right pane of the lampstack page.http://SITE_ADDRESS/phpinfo.php
Copied!content_copy
A summary of the PHP configuration of your server is displayed.
Close the phpinfo tab.
This ends our small interaction session with the GCP marketplace.
Thank you everyone.