Workshop Exercise 7.2 - Deploying our Application

Table of Contents

Objective

In this exercise, we’ll sync our project in Ansible Controller, create a job template, and run our new playbook.

Step 1 - Syncing Our Project

Return to the Ansible Controller WebUI and navigate to Resources > Projects. Locate the project named Device Edge Codebase and click the Sync Project button on the right hand side of the page.

For reference, this is the sync button: Sync Button

After clicking the sync button, the WebUI will show the project syncing and then a success under the Status column.

Step 2 - Creating a Job Template

In the Controller WebUI. under Resources > Templates, select Add > Add job template and enter the following information:

Parameter Value
Name Deploy Application
Inventory Edge Systems
Project Device Edge Codebase
Execution Environment Device Edge Workshops Execution Environment
Playbook playbooks/deploy-app.yml
Credentials
  • ✓ Device Credentials
  • Remember to click Save.

    Step 3 - Running the Job Template

    Now that the job template has been created, click the Launch button if you are still within the Deploy Application job template. Otherwise, click on the rocket ship on the Templates page to launch the job template. Monitor the output for any errors or issues. However, hopefully the job executes successfully.

    As a reminder, the output of jobs can be reviewed on the Jobs tab.

    Once the playbook completes, visit http://$(your-device-ip-address):1881/ui to view the running application.

    Note

    To retrieve your device IP address, check the host vars in the Ansible Controller WebUI under the Hosts page.

    Similar to the bare metal deployment of the application, the automation could be added to the end of our provisioning workflow as soon as a device calls home.

    Solutions

    Deploy Application job template:

    Deploy Application Job Template

    Application running:

    App Running


    Navigation

    Previous Exercise Click here to return to the Workshop Homepage