BASIC LAB INTERACTION #GCPday5

BASIC LAB INTERACTION #GCPday5

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

  1. Linux :- Operating System

  2. Apache HTTP server:- web server

  3. MySQL:- Relational Database

  4. PHP:- Web Application Framework

  5. 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 :

  1. Sign in to Qwiklabs using an incognito window.

  2. 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.

  3. When ready, click Start lab.

  4. Note your lab credentials (Username and Password). You will use them to sign in to the Google Cloud Console.

  5. Click Open Google Console.

  6. 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.

  7. 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

  1. In the Google Cloud Console, on the Navigation menu (), click Marketplace.

  2. In the search bar, type LAMP and then press ENTER.

  3. 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.

  4. 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.

  5. For Zone, select the deployment zone that Qwiklabs assigned to you.

  6. For Machine Type, select E2 as the Series and e2-medium as the Machine Type.

  7. Leave the remaining settings as their defaults.

  8. Accept the Google Cloud Marketplace Terms of Service near the bottom of the page.

  9. Click Deploy.

  10. If a Welcome to Deployment Manager message appears, click Close to dismiss it.

Task 3:- Verify your deployment

  1. 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.

  2. Close the congratulations browser tab.

  3. 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.

  4. In the SSH window, to change the current working directory to /opt/bitnami, execute the following command:

     cd /opt/bitnami
    

    Copied!content_copy

  5. 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.

  6. To close the SSH window, execute the following command:

     exit
    

    Copied!content_copy

  7. Open a new browser tab.

  8. 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.

  9. Close the phpinfo tab.

This ends our small interaction session with the GCP marketplace.

Thank you everyone.