Bookmark this page

Guided Exercise: Launching a Cloud Application Stack

In this exercise, you will launch a 3-tier web application stack and verify that each application component tier functions correctly.

Outcomes

You should be able to deploy a 3-tier web-based application.

As the student user on the workstation machine, use the lab command to prepare your system for this exercise.

This command ensures that all resources required for this exercise are present.

[student@workstation ~]$ lab cloudapps-stack start

Procedure 8.2. Instructions

  1. Source the /home/student/operator1-finance-rc credentials file to enable administrator privileges, and deploy the 3-tier web application using the /home/student/3tier-stack.yml Heat template.

    [student@workstation ~]$ source ~/operator1-finance-rc
    [student@workstation ~(operator1-research)]$
    1. Review the /home/student/3tier-stack.yml Heat template.

    2. Use the openstack stack create command to deploy the 3-tier stack.

      [student@workstation ~(operator1-finance)]$ openstack stack create \
      > -t 3tier-stack.yml apptracker
      +---------------------+--------------------------------------+
      | Field               | Value                                |
      +---------------------+--------------------------------------+
      | id                  | 7523351e-aec2-4f8d-9110-be3390c467a0 |
      | stack_name          | apptracker                           |
      | description         | application-tracker                  |
      | creation_time       | 2020-08-27T10:08:58Z                 |
      | updated_time        | None                                 |
      | stack_status        | CREATE_IN_PROGRESS                   |
      | stack_status_reason | Stack CREATE started                 |
      +---------------------+--------------------------------------+
    3. Use the openstack server list command to view the deployed servers from the template.

      [student@workstation ~(operator1-finance)]$ openstack server list \
      > -c ID -c Name -c Status -c Networks
      +-----------+------------+--------+---------------------------------------------+
      | ID        | Name       | Status | Networks                                    |
      +-----------+------------+--------+---------------------------------------------+
      | 49e...c48 | app_server | ACTIVE | app_app=192.168.8.10                        |
      | 88c...f81 | web        | ACTIVE | external_network=192...7.10, 172.25.250.171 |
      | 04d...d91 | database   | ACTIVE | app_db=192.168.9.10                         |
      +-----------+------------+--------+---------------------------------------------+
    4. Use the openstack floating ip list command to view the used floating IP address that will be used to access the application.

      [student@workstation ~(operator1-finance)]$ openstack floating ip list
      +-----------+---------------------+------------------+-----------+
      | ID        | Floating IP Address | Fixed IP Address | Port      |
      +-----------+---------------------+------------------+-----------+
      | 1cf...48c | 172.25.250.171      | 192.168.7.10     | c9c...a8c |
      +-----------+---------------------+------------------+-----------+
  2. On workstation, open a web browser and navigate to the floating IP address obtained from the previous step.

    1. Add an item to the queue to verify that the application is working.

    2. Use the openstack console url show command with the server ID obtained from the openstack server list command to obtain the novnc console URL to access the individual instances.

      [student@workstation ~(operator1-finance)]$ openstack console url \
      > show 88c87f40-6f7a-4a4d-87d3-3793e0608689
      +-------+---------------------------------------------------------+
      | Field | Value                                                   |
      +-------+---------------------------------------------------------+
      | type  | novnc                                                   |
      | url   | http://172.25.250.50:6080/vnc_auto.html?path=%3Ft...62d |
      +-------+---------------------------------------------------------+

Finish

On the workstation machine, use the lab command to complete this exercise. This is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab cloudapps-stack finish

This concludes the guided exercise.

Revision: cl110-16.1-4c76154