Jira service desk unattended installation / configuration

Hi there,

I had the task to install Jira service desk for one team. I was unpleasantly surprised by the level of automation around the binary installation.

The goal was to automate the Jira Service Desk setup on Linux Ubuntu 16.04 with ansible and openstack. Unfortunately I could not find much about the binary installer parameters. Especially about the --varfile and how to use it to automate the human interaction.

I was able to use the python expect module to answer the interactive questions (have a look at the “install atlassian service desk” task), but there has to be another way…

---
- name: download the atlassian service desk binary for Linux
  get_url:
    url: https://product-downloads.atlassian.com/software/jira/downloads/atlassian-servicedesk-3.9.0-x64.bin
    dest: /tmp/servicedesk.bin
    mode: 0755
    checksum: md5:9ec1696692c43daad380708724a127b5

- name: install pexpect requirement for interactive installer
  apt: name=python-pexpect state=latest

- name: install atlassian service desk
  expect:
    command: /tmp/servicedesk.bin -c
    responses:
      'OK \[o, Enter\], Cancel \[c\]': "o"
      'Express Install': "1"
      'Install \[i, Enter\], Exit \[e\]': "i"
      'Yes \[y, Enter\], No \[n\]': "y"
    timeout: 600
    echo: yes
    creates: /opt/atlassian/jira/install.reg

- name: install postgres sql database
  apt: name={{ item }} state=latest
  with_items:
    - postgresql
    - postgresql-contrib
    - python-psycopg2

- name: create database
  postgresql_db:
    name: servicedesk
  become_user: postgres

- name: configure postgres
  postgresql_user:
    db: servicedesk
    name: atlassian
    encrypted: yes
    password: a-very-secret-password
    role_attr_flags: SUPERUSER
  become_user: postgres

Same question goes for the configuration of the newly installed instance, I would like to parametrize the configuration through ansible templates. I would like to automatically setup LDAP…

Any hints?

Eric

Hi

Struggling with the same.

There are some better explanations now regarding varfile https://confluence.atlassian.com/adminjiraserver/unattended-installation-938846846.html

The bug however is it forces starting the app after installing (even if the recorded answer would be no) and it can also create multitude of jira accounts :slight_smile:

I would suggest asking this question over at https://community.atlassian.com (the User Community - this community is focused on developing things for Atlassian products).

That said - you can install the app and then update the dbconfig.xml file in the application home with the appropriate configs. As far as the rest of the items - I would suggest bootstrapping the database(and jira home) with a pre-canned configuration