Lab 3: AS3 Application creation and deletion using AWX/Ansible Tower and BIG-IQ

David has been tasked with the creation of a new application on the BIG-IP that has been requested by the application owner. David will use AS3 declaration and BIG-IQ to build the application on the appropriate BIG-IPs using an Ansible Playbook that is stored in their GitHub repository. First the Admin will need to login to Ansible Tower to ensure that the latest templates have the pulled from Github

Lab environment access

Once you connect to the UDF course portal, you will land on the Documentation tab where you can find the link to the lab guide.

Once you have the lab guide open, click on the Deployment tab to access the various systems in the lab.

udf

In order to complete this lab, you will find 2 ways to access the different systems in this lab.

  1. Going directly to the BIG-IQ CM or BIG-IP TMUI or WEB SHELL/SSH (RECOMMENDED).

    To access the BIG-IQ directly, click on the ACCESS button under BIG-IQ CM and select TMUI. The credentials to access the BIG-IQ TMUI are david/david and paula/paula as directed in the labs.

    udf_bigiq_tmui

    To ssh into a system, you can click on WEB SHELL or SSH (you will need your ssh keys setup in the lab environment for SSH).

    You can also click on DETAILS on each component to see the credentials (login/password).

  2. From the lab embeded Google Chrome browser.

    In your lab deployment, click on the ACCESS button of the Ubuntu Lamp Server system and click on Google Chrome.

    You can also use XRDP as an alternative, click on the resolution that works for your laptop. When the RDP session launches showing Session: Xorg, simply click OK, no credentials are needed. Modern laptops with higher resolutions you might want to use 1440x900 and once XRDP is launched Zoom to 200%.


    udf_ubuntu_rdp_vnc

Exercise 3.1 – Application Creation

  1. Click on the AWX (Ansible Tower) button on the system Ubuntu Lamp Server in the Lab Environment. Use admin/purple123 to authenticate.

image26

  1. Navigate to the Projects page and click on the refresh button for the BIG-IQ-LAB project to get the latest version of the templates.

image27

  1. Navigate to the Jobs page and click on the BIG-IQ-LAB job to to verify it was successful.

    Note: There may be more than one job with this name. Choose the first in the list

image50

image51

  1. Navigate to the Templates page and click on job Template beside New_AS3_App to review the template

image53

  1. Make sure the PLAYBOOK lab/f5-ansible-bigiq-as3-demo/tower/app_create.yml is selected.

image54

Note

You can go on the GitHub repository https://github.com/f5devcentral/f5-big-iq-lab/tree/develop/lab/f5-ansible-bigiq-as3-demo to review the playbooks and Jinja2 templates.

  1. Log out of AWX (Ansible Tower) as Admin by clicking on the Power Button in the upper right corner

image48

  1. Login on as david (david/david)* to create the new application. Then click on Sign In

image49

  1. Navigate to the Templates page and click on job Template beside New_AS3_App to review the template

image28

  1. Click on Launch

image30

  1. CREDENTIAL: Select BIG-IQ Creds as Credential Type. Then select david-iq. Click on NEXT
image31
  1. SURVEY: Enter below information regarding your application service definition. Click on NEXT
TENANT NAME AnsibleTower
APP SERVICE NAME MyApp139
APP TYPE http_app
SERVICE IP 10.1.10.139
NODES 10.1.20.120 and 10.1.20.121
image32
  1. PREVIEW: Review the summary of the template deployment. Click on LAUNCH
image33
  1. Follow the Job deployment of the Ansible playbook.

image34

Note

The FAILED - RETRYING messages are expected as the playbook runs into a LOOP to check the AS3 task completion and will show failed until loop is completed.

  1. When the job is completed, check the PLAY RECAP and make sure that failed= status is 0.

    image35

  2. From within the LAMP server RDP/noVNC session, logon to BIG-IQ as david (davidi/david) by opening a browser and go to: https://10.1.1.4 or directly via the TMUI. Go to the Application tab and check the application is displayed and configured correctly.

  3. Select AnsibleTower Application tile,

image36
  1. Select AnsibleTower_MyApp139 Application Service.

    image37

  2. Click on the Properties bubble under APPLICATION SERVICE, then click on the Configuration tab, and review the AS3 configuration.

    image38

Exercise 3.2 – Application Deletion

The application owner has informed David that the application is no longer needed and needs to be deleted. David will use an AS3 declaration and BIG-IQ to remove the previously added application from the BIG-IPs.

  1. Return to AWX (Ansible Tower) and if needed log back in as david (david/david) Navigate to the Templates page and click on Delete_AS3_App

    image39

  2. Click on the Launch button to start a job using this template*.

    image40

  3. CREDENTIAL: Select BIG-IQ Creds as Credential Type. Then select david-iq. Click on NEXT

    image41

  4. SURVEY: Enter below information regarding your application service definition. Click on NEXT.

TENANT NAME AnsibleTower
image42
  1. PREVIEW: Review the summary of the template deployment. Click on LAUNCH

    image43

  2. Follow the JOB deployment of the Ansible playbook.

    image44

    Note

    The FAILED - RETRYING messages are expected as the playbook runs into a LOOP to check the AS3 task completion and will show failed until loop is completed.

  3. When the job is completed, check the PLAY RECAP and make sure that failed= status is 0.

image45
  1. Logon on BIG-IQ as david (david/david), go to main Application page

  2. Select AnsibleTower Application tile

    image46

  3. Notice that the application is now deleted.

image47