Jira is a tool that is used for agile project management, bug and issue tracking

We will develop workflows that use Jira tickets as triggers to upgrade, reboot, and reboot a process on EC2 instances

  1. Open the Editor on the TotalCloud WebApp, and choose to create a workflow from scratch.

2. Click on the Trigger Node, and activate the HTTP trigger.

3. Add a Custom Node. Choose the output from the Trigger Node, and custom from the drop-down. Paste the following code in the custom node editor:

async function process(){
let result = 0;
let {collection,region} = context;
let description = collection[0].issue.fields.description;
let Input = JSON.parse(description)
exit(null, Input)

This is used to parse the data and make it readable for the next node

4. Add a Resource Node. Choose EC2 as service and Instances as resource.

5. Save the workflow after entering a name, and the account and region you want it to be active. Open the Trigger Node, and there will be an HTTP link generated. Copy this link, it will be used in Jira.

6. Login to your Jira Account here.

7. Go to your domain. Press '.' to bring the search bar up. Search for webhooks.

Ensure you have Admin access to your Jira Account when doing this

8. Click Create a WebHook on the top right of the screen. Enter Name and Description, set Status to Enabled, and the paste the URL copied from the TotalCloud Trigger Node

9. Depending on the workflow to be triggered, paste the following JQL under Issue Related Events:

  1. Reboot Instances: summary~"$$wf-name:RebootInstancesByTag$$"

  2. Reboot Instance Process: summary~"$$wf-name:RebootProcessByTag$$"

  3. Upgrade Instance: summary~"$$wf-name:UpgradeEc2MachinesByTag$$"

You enter JQL to filter by any parameter

Ensure that the description of the ticket is also passed. Leave the parameter shown below unchecked:

10. Select the events that you want to trigger the workflow. Click Create.

Continue from this step, on the following links for:

Rebooting Instance

Rebooting Instance Process

Upgrading Instance