Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

On any secure machine with openssl installed (It is easiest doing this directly on your DataStage Engine where MettleCI Workbench is installed)…

  1. Generate a 1024-bit private key: jira_privatekey.pem

    Code Block
    $> openssl genrsa -out jira_privatekey.pem 1024
    Generating RSA private key, 1024 bit long modulus
    .......++++++
    ..++++++
    e is 65537 (0x10001)
    $>

  2. Create an X509 certificate: jira_publickey.cer

    Code Block
    $> openssl req -newkey rsa:1024 -x509 -key jira_privatekey.pem -out jira_publickey.cer -days 3650
    You are about to be asked to enter information that will be incorporated
    into your certificate request.
    What you are about to enter is what is called a Distinguished Name or a DN.
    There are quite a few fields but you can leave some blank
    For some fields there will be a default value,
    If you enter '.', the field will be left blank.
    -----
    Country Name (2 letter code) [XX]:AU
    State or Province Name (full name) []:Victoria
    Locality Name (eg, city) [Default City]:Melbourne
    Organization Name (eg, company) [Default Company Ltd]:Data Migrators Pty Ltd
    Organizational Unit Name (eg, section) []:MettleCI
    Common Name (eg, your name or your server's hostname) []:myhost.datamigrators.io
    Email Address []:admin@mettleci.com
    $>

  3. Extract the private key (PKCS8 format) to a ‘pkcs8’ file: jira_privatekey.pkcs8

    Code Block
    $> openssl pkcs8 -topk8 -nocrypt -in jira_privatekey.pem -out jira_privatekey.pkcs8
    $> ll jira_*
    -rw-r--r-- 1 mciworkb dstage  916 Aug  2 15:10 jira_privatekey.pkcs8
    -rw-r--r-- 1 mciworkb dstage  887 Aug  2 15:05 jira_privatekey.pem
    -rw-r--r-- 1 mciworkb dstage 1224 Aug  2 15:08 jira_publickey.cer
    $>

  4. Extract the public key from the certificate to a ‘pem’ file: jira_publickey.pem file:

    Code Block
    $> openssl x509 -pubkey -noout -in jira_publickey.cer > jira_publickey.pem
    $>

  5. Ensure all files are owned by the account used to execute the MettleCI Workbench service:

    Code Block
    $> chown mciworkb jira_*
    $>

Step 2 - Creating a Jira Application Link

These steps are geared specifically towards Workbench. Atlassian’s own documentation is under the Create an application link section of this page: https://developer.atlassian.com/server/jira/platform/oauth/

  1. Start by going to the Application links option (under Integrations) of your Jira Administration area.

    Image Modified
  2. In the field at the top (under Configure Application Links) enter your MettleCI Workbench URL including protocol and port number (e.g. https://my-engine.company-intranet.com:8443) and click Create new link

  3. On the Configure Application URL window you can leave the default New URL as proposed by Jira (usually identical to the Entered URL). You can safely ignore the ‘No response was received…’ message and click Continue.

    Image Modified

  4. On the next window enter the Application Name

  5. Check the Create incoming link checkbox

    Status
    colourRed
    titleIMPORTant!

  6. Note that we will enter a value for Consumer key later on - but not in this dialog

  7. Click Continue (ensure you leave the other fields blank)

    Image Modified

  8. On the next dialog enter …

    • A random value for Consumer Key (this is just an arbitrary value to uniquely identify this Application Link),

    • The Consumer Name (e.g. ‘MettleCI Workbench’ without quotes), and

    • The Public Key (i.e. the contents of jira_publickey.pem) that will be used by your Workbench application.

      Image Modified
  9. Click Continue

Step 3 - Enter the credentials into workbench

...

You will now want to fill out all the details for your particular Jira Configuration.

Name

This can be anything you like but is often (and is best to use if possible) the name of the Jira project you’re connecting to.

Jira URL

The Application URL you entered when configuring the Application Link Application in Jira

If you have already configured Jira we recommend:

  • Get your Jira Key and Jira URL from the config.yml of the same host (most likely in /opt/dm/mci/config.yml)

Jira Key

The Consumer Key you entered when configuring the Application Link Application in Jira.

Consumer Secret

Copy and paste the contents of your jira_privatekey.pkcs8 file into this field (most likely in your DataStage Engine’s /opt/dm/mci/jira_privatekey.pkcs8 file)

Info

If you have previously configured a Jira application link then you will also find the consumerKey and jiraURL in your config.yml file (most likely in /opt/dm/mci/config.yml)

...

After you’ve set this up:

  1. Restart the Workbench service

  2. Log into Workbench 

  3. Start to perform a check-in (the Job name isn’t important) but start to enter a valid Jira ID in the work item field.

  4. At this point you should be prompted to permit access to Jira so click on Allow

  5. Image Modified

    After this you can actually cancel the check-in since its purpose was simply to complete the Workbench-to-Jira integration.

Done!