IT Operations and DevOps teams often use separate platforms for tracking tickets to track their work. This can be for a variety of reasons. Sometimes the teams must maintain separate platforms for business reasons. Other times they are amid transitioning to an integrated DevOps approach.
Regardless of the reason, more tightly integrated IT Operations and Development processes provides value through improved efficiencies, reporting, and communication.
This series of blog articles will show how to integrate Jira Software with Ivanti Service Manager (ISM) in the cloud, Ivanti’s flagship ITSM platform. This can be done without a ton of manual processing or interrupting the current workflows for the different teams. By following the steps laid out in this series you will have a solid understanding and an effective prototype of how to integration an ITSM platform with Jira Software.
Note: Ivanti Service Manager in the cloud is also known as “Ivanti Neurons for ITSM.” You can find more detailed information on it at Ivanti’s Community site: https://forums.ivanti.com/s/article/Ivanti-Service-Manager-Cloud-Services?language=en_US.
This integration allows for seamless communication between ISM and Jira. It automatically creates a corresponding ticket for the reported issue in each platform regardless of where the ticket is initiated. Removing the extra steps of recreating and filling out the details of the issue a second time eliminates potential human error and saves time. The synchronizing of data between the two systems provides a cohesive audit trail. This makes it easier for stakeholders, including auditors, to track software issues in ISM throughout the software development lifecycle as they change statuses in Jira.
Jira issues are represented as releases in ISM. Attachments providing insight into the issues can be added from either application. Issues can be organized into sprints from Jira to support agile or scrum software development. In Part 1, we will be setting up service accounts and API keys that will be used in the integration.
The process diagram below outlines the workflow for the two systems and the final prototype deployment:
To support this blog, I have provisioned the following lab components:
Ivanti Service Manager-Cloud ISM is an IT service management application for submitting IT service requests, reporting issues with applications or equipment, and getting status updates.
Jira Software-Cloud Jira is an issue and project tracker used by development teams for use as an organized to-do list that follows each task through development, testing, and resolution.
PostMan PostMan is a tool used for API development. It offers the ability to collaborate, and easily build or dissect APIs.
Creating Service Accounts
A key reason for creating service accounts on both platforms is auditing. All automated actions performed by the final integration will be associated with the service accounts, so it will be easy to differentiate between actions taken by users and those made by the automation we build. The technical reason for using the service accounts is to prevent our integration from entering an infinite loop of creating or updating the same issue or release.
Create an ISM Service Account
We’ll start in ISM. Make sure that you have administrator privileges and access to an email that can be associated with the service account before beginning.
1. Login to ISM as an administrator and navigate to the configuration console.
2. Click on Configure > Users and Permissions > Users.
3. Select New Employee and configure the new user.
4. Next click on the Roles tab and link the service user to the Administrator role and save your changes.
Create a Jira Service Account
When creating a service account in Jira it is essential the account be connected to a valid email that can be accessed while you are setting it up.
1. Login to Jira as an administrator and navigate to Settings > Atlassian Admin > User Management and click on the Invite users button.
2. Configure the Invite and send to your service email.
3. From the email accept the invitation and set up the account.
4. Head back to the user management page and find the service account to find the user’s ID.
5. Click on the service account’s name or … > Show details. Take a look at the URL of the User details page.
6. Make note of the string after …users/ in the URL. (In the example below, it is 5fa5a4327cfc240071dcbf8b.) Save this ID for later.
Generating API Keys
In order to make API calls to ISM and Jira we need a method of authentication. This is where API keys come into play. We will use them as our form of authentication (vs. a username/password); this is a typical authentication approach for automation.
Next, we will generate an API key on both platforms for authenticating web requests executed in web service scripts (ISM) and automation rules (Jira).
Create API Key for ISM
1. Login to ISM with administrator privileges and navigate to the configuration console.
2. From the configuration page click Configure > Security Controls > API Keys.
3. Select REST API Key Group.
4. Click the Add API Key button in the top right.
5. Next add a description for your API key, set the On Behalf Of field to the service user account, and the In Role field to Administrator. It will look something like this:
6. Don’t forget to save! You will be able to see your API key back at Configure > Security Controls > API Keys under the REST API Key Group.
Create API Key for Jira
1. Log in to https://id.atlassian.com/manage/api-tokens with the Jira service account you set up earlier.
2. Click Create API token.
3. From the dialog that appears, enter a label like “ISM/Jira Integration” for your token and click Create.
4. Click Copy to copy the token to your clipboard, then paste the token somewhere safe so we can use it later.
Testing REST API and Authentication
In this step, we will verify that you can authenticate to ISM using your newly generated API key. Open PostMan and import the collection of requests I have included at the end of the lab.
1. Select the Authenticate to ISM (Get list of releaseprojects) request.
2. Replace the text YOUR_ISM_TENANT_URL with the tenant URL of your ISM instance.
3. Click on the Headers tab.
4. Paste the API key that you generated for the ISM service account in place of the text API_KEY_FOR_ISM_SERVICE_ACCOUNT.
5. Click Send to send the request.
6. You will receive a response with a status of 200 and json data containing a list of releases in your ISM tenant.
7. If you receive any errors, try re-entering your info or generating a new API token in ISM.
Test REST API for Jira in PostMan
To test authenticating to Jira, use the Authenticate to Jira (Get list of projects) request in the PostMan collection. The request I have set up retrieves a list of all the current projects in Jira.
1. Enter your Jira tenant URL.
2. In the Authorization tab select Basic Auth as the Type of authorization from the drop down.
3. Enter the email of the Jira service account you created earlier as the Username and the API key we generated for the Jira service account as the Password.
4. Hit Send to send the request.
5. The response should return a 200 status and json data containing a list of projects in your Jira instance.
6. If you get an error, try re-entering all the information. If you still receive an error, try generating a new API Key.
You have now successfully created the service accounts and API keys necessary for the integration. As mentioned earlier the accounts and API keys are for authenticating to each of the applications and preventing infinite loops of issue creation and updates.
If you haven’t already, save the following in a safe place before moving on to Part 2:
ISM service account API key
Jira service account email
Jira service account API key
Jira service account user ID
The PostMan collection can be found here: https://github.com/CriticalDesignAssociatesInc/Integrate_Jira_With_ISM_Blog
In part 2 of this blog series, we will configure the integration to link fields together so data for the tickets stay in sync.
Still have questions or want to discuss Jira Software, Ivanti Service Manager, and/or their integration further? Reach out to us at CDA. You can even set up a meeting with us if you’d like. We’d love to discuss how we can help you with your DevOps and automation needs!