Bookmark this page

Lab: Deploy a 3 Tier Application Stack

In this lab, you will deploy an application stack.

Outcomes

You should be able to:

  • Modify a Heat template.

  • Correct entries within a Heat template.

  • Use the Dashboard to deploy a Heat template.

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

This command ensures that the correct Heat template has been deployed.

[student@workstation ~]$ lab comprehensive-lab2 start

Procedure 10.2. Instructions

Before starting this exercise, save any work you want to keep from earlier exercises. Reset your classroom environment.

In this comprehensive review, you will deploy resources necessary to create a 3-tier application stack.

The substeps in this comprehensive review use the CLI to edit necessary files and the GUI to launch the stack.

  1. On workstation as the student user, edit the /home/student/webapp-prodstack.yml file, changing the floating IP address and relying entries from 172.25.250.174 to 172.25.250.150.

    1. On workstation, open a terminal, and edit the /home/student/webapp-prodstack.yml file, changing all references to the floating IP 172.25.250.174 to 172.25.250.150.

      description: application-tracker
      heat_template_version: '2016-10-14'
      parameters:
      ...output omitted...
      
        assigned_float:
          type: string
          description: static floating IP
          default: 172.25.250.150
      
      ...output omitted...
      
        web_config:
          type: OS::Heat::SoftwareConfig
      ...output omitted...
             systemctl enable firewalld
              systemctl start firewalld
              /usr/bin/sed -i s-192.168.173.187-172.25.250.150-g /var/www/html/script/item.js
      
      ...output omitted...
      
        fip_ingress:
          type: OS::Neutron::FloatingIP
      ...output omitted...
            dns_domain: apptrack.lab.example.com.
            floating_ip_address: 172.25.250.150
      
      ...output omitted...
  2. On workstation, log in to the Dashboard and launch the stack based on /home/student/webapp-prodstack.yml as the operator1 user within the production project. For the stack, use production_stack as the Stack Name, set the database user name to produser with a password of prodpassword. All other options should be left as their default. Correct any errors that might exist within the stack template file. Verify the correct operation of the application using the 172.25.250.150 IP address in a web browser.

    1. From workstation, open a web browser and navigate to http://dashboard.overcloud.example.com. Log in to the Dashboard using Example for the domain, operator1 for the user, and redhat as the password. In the upper right corner select Project and ensure the project selected is production.

    2. Navigate to ProjectOrchestrationStacks.

    3. Click Launch Stack.

    4. For Template Source click Browse, select /home/student/webapp-prodstack.yml, and click Open.

    5. The name of the template will appear next to the Browse button, click Next.

    6. Correct the error that is given during the validation of the Heat template, and try again.

      ...output omitted...
        external_network:
          type: OS::Neutron::Net
          properties:
      ...output omitted...
    7. Set Stack Name to production_stack, Password for user "operator1" to redhat, db_pass to prodpassword, and db_user to produser, keep the remaining fields to default.

    8. Click Launch.

    9. Wait for the status to change to Create Complete.

    10. Using a web browser, verify that the application is functioning using the IP address 172.25.250.150.

Evaluation

Grade your work by running the lab command from your workstation machine. Correct any reported failures and rerun the script until successful.

[student@workstation ~]$ lab comprehensive-lab2 grade

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 comprehensive-lab2 finish

This concludes the lab.

Revision: cl110-16.1-4c76154