Bookmark this page

Guided Exercise: Managing Distributed Execution with Automation Mesh

  • Launch jobs from your controllers, observe them running on your execution nodes, and make adjustments to your automation mesh.

Outcomes

  • Create instance groups and associate execution nodes with instance groups.

  • Configure inventories to use an instance group.

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

This command ensures that automation mesh is installed. If automation mesh is not installed, then you must complete the previous exercise or run the lab start mesh-deploy-solve command prior to running the lab command for this exercise.

[student@workstation ~]$ lab start mesh-manage

Procedure 11.2. Instructions

  1. Create the Development Datacenter instance group and add the exec1.lab.example.com and exec2.lab.example.com hosts to it.

    1. Navigate to https://controller.lab.example.com and log in as the admin user with redhat as the password.

      Note

      As an alternative, navigate to https://control2.lab.example.com and log in as the admin user with redhat as the password. Because both controller.lab.example.com and control2.lab.example.com are control nodes using a shared database, you can complete this exercise from either host.

    2. Navigate to AdministrationInstance Groups and then click AddAdd instance group.

    3. Create the instance group using Development Datacenter as the name and then click Save.

    4. Click the Instances tab and then click Associate.

    5. Select the exec1.lab.example.com and exec2.lab.example.com hosts and then click Save.

  2. Create the Production Datacenter instance group and add the exec3.lab.example.com host to it.

    1. Navigate to AdministrationInstance Groups and then click AddAdd instance group.

    2. Create the instance group using Production Datacenter as the name and then click Save.

    3. Click the Instances tab and then click Associate.

    4. Select the exec3.lab.example.com host and then click Save.

  3. Update the Dev inventory to use the Development Datacenter instance group.

    1. Navigate to ResourcesInventories and then click the Edit Inventory icon for the Dev inventory.

    2. Click the search icon for the Instance Groups field, select the Development Datacenter instance group, and then click Select.

    3. Click Save.

  4. Update the Prod inventory to use the Production Datacenter instance group.

    1. Navigate to ResourcesInventories and then click the Edit Inventory icon for the Prod inventory.

    2. Click the search icon for the Instance Groups field, select the Production Datacenter instance group, and then click Select.

    3. Click Save.

  5. Launch the Deploy MOTD job template and select the Dev inventory. Identify the instance group and execution node used by the job.

    1. Navigate to ResourcesTemplates and click the Launch Template icon for the Deploy MOTD job template.

    2. Select the Dev inventory and then click Next.

    3. Click Next to use the default answer to the survey question, and then click Launch.

    4. After the job completes, click the Details tab. The job used the Development Datacenter instance group and used either the exec1.lab.example.com or exec2.lab.example.com execution node.

      Note

      Be patient because it might take more than 30 seconds for the job to complete.

  6. Launch the Deploy MOTD job template and select the Prod inventory. Observe how jobs that use the Prod inventory use the Production Datacenter instance group and the exec3.lab.example.com execution node.

    1. Navigate to ResourcesTemplates and click the Launch Template icon for the Deploy MOTD job template.

    2. Select the Prod inventory and click Next.

    3. Use Production push as the answer to the survey question and then click Next.

    4. Click Launch.

    5. After the job completes, click the Details tab. The job used the Production Datacenter instance group and the exec3.lab.example.com execution node.

      Note

      Be patient because it might take more than 30 seconds for the job to complete.

  7. View the message of the day for hosts in the Dev and Prod inventories. The date stamps in the output of your commands differs from the example output shown in the following instructions.

    1. Display the message of the day for hosts in the Dev inventory. Connect to servera.lab.example.com, notice the message of the day, and then disconnect from the server.

      [student@workstation ~]$ ssh student@servera.lab.example.com
      2022-05-25: Nothing new to report.
      ...output omitted...
      [student@servera ~]$ exit
      logout
      Connection to servera.lab.example.com closed.

      Connect to serverb.lab.example.com, notice the message of the day, and then disconnect from the server.

      [student@workstation ~]$ ssh student@serverb.lab.example.com
      2022-05-25: Nothing new to report.
      ...output omitted...
      [student@serverb ~]$ exit
      logout
      Connection to serverb.lab.example.com closed.
    2. Display the message of the day for hosts in the Prod inventory. Connect to servere.lab.example.com, notice the message of the day, and then disconnect from the server.

      [student@workstation ~]$ ssh student@servere.lab.example.com
      2022-05-25: Production push
      ...output omitted...
      [student@servere ~]$ exit
      logout
      Connection to servere.lab.example.com closed.

      Connect to serverf.lab.example.com, notice the message of the day, and then disconnect from the server.

      [student@workstation ~]$ ssh student@serverf.lab.example.com
      2022-05-25: Production push
      ...output omitted...
      [student@serverf ~]$ exit
      logout
      Connection to serverf.lab.example.com closed.

Finish

On the workstation machine, change to the student user home directory and use the lab command to complete this exercise. This step is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish mesh-manage

This concludes the section.

Revision: do467-2.2-08877c1