Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Upgrade JIRA with Ansible?

It looks like you can do an unattended install of JIRA, but I don't see a method to do an unattended upgrade?

Specifically my Ansible role currently has to download the latest .bin installer...and quit. I then have to log manually into the server to run the upgrade, I would much prefer Ansible to complete the upgrade on its own without my human fallibility!

5 answers

2 accepted

1 vote
Answer accepted
Thomas Deiler Community Leader Feb 01, 2018

Dear @jmo,

I totally understand your needs. I was same once in the situation to make upgrades more comfortable. So I did this with several RPMs.

It work somehow little bit better, but not unattended. In the end I stopped it.

My recommendation is not to do this with Ansible or any other tool, if data integrity is very important for you (several hundred serious users). There are so many pitfalls, that can make your life harder than upgrading manually. To name some:

  • plugins, that need to be installed via UPM and not just copied inside the plugin directory
  • dependencies to Jira (other linked Apps) that are not notified
  • extra installation steps for specific versions
  • config files that change, where patches cannot be applied

So long

Thomas

Thomas Deiler Community Leader Feb 05, 2018

Dear @jmo,

was my answer fine enough to be also "accepted"?

Many Thanks

Thomas

Yes thanks for this detailed answer Thomas, I'm glad someone has at least tried to work around Atlassian's limitations. Basically the headaches to upgrading manually (updating multiple config files in multiple places, for ex) pale in comparison to the headaches for trying to upgrade automatically.

0 votes
Answer accepted

Ultimately it looks like this is a shortcoming of JIRA, and an example of the incongruities of how apps in the Atlassian suite are installed/updated/maintained. For example Bamboo, Confluence, Crowd and more can have their installations/updates automated, but not JIRA. It would be nice if all the apps in the suite were designed by be administered the same way.

Thomas Deiler Community Leader Feb 05, 2018

Very true. Probably once Atlassian will pick up your suggestion and realize it. Who knows ...

Why should this not be possible for JIRA? I am running all updates via ansible. For example: 

# Create response.varfile from for unattended installation
- name: Create response.varfile
file:
path: /{{ app_path }}/response.varfile
state: touch
mode: 0755
- name: Fill response.varfile
lineinfile:
path: /{{app_path}}/response.varfile
line: "{{ item.line }}"
state: present
create: yes
with_items:
- { line: 'backupJira$Boolean=true' }
- { line: 'app.install.service$Boolean=false' }
- { line: 'existingInstallationDir=/{{ app_path }}/{{ app }}' }
- { line: 'app.jiraHome=/data/{{ app }}' }
- { line: 'sys.confirmedUpdateInstallationString=true' }
- { line: 'sys.languageId=en' }
- { line: 'sys.installationDir=/{{ app_path }}/{{ app }}' }
- { line: 'executeLauncherAction$Boolean=true' }
- { line: 'httpPort$Long=8080' }
- { line: 'portChoice=custom' }

After that you can run the .bin file: 

 - name: Run Upgrade 
command: /{{ app_path }}/atlassian-jira-software-{{jira_version}}-x64.bin -q -varfile /{{app_path}}/response.varfile

 

Worked fine for me. 

Do you have a repo for this role I am curious to see the source code.

Hi @Dithmar Reutlinger , Your suggestion worked like a charm. Can you please let me know how you got the parameters for the response file? It will be helpful for me to do the same for Confluence and Bitbucket.

 

Thanks,

Charles

Hi @Charles Mervin ,

Here is an example for Confluence: 

with_items:
- { 
line'executeLauncherAction$Boolean=true' }      
- { 
line'app.confluenceHome=/data/{{ app}}' }      
- { 
line'sys.confirmedUpdateInstallationString=true' }     
- { 
line'launch.application$Boolean=false' }      
- { 
line'existingInstallationDir=/app/{{ app }}' }      
- { 
line'sys.languageId=en' }      
- { 
line'sys.installationDir=/app/{{ app }}' }     
- { 
line'backupConfluence$Boolean=false' }

 

I am not running Bitbucket so I am not able to support here. 

Regards, Dithmar

Hi @Dithmar Reutlinger ,

Many thanks, this helped with my Confluence upgrade. 

Thanks,

Charles 

Our team has started to automate Jira with Ansible when installer does not exist yet.

So our playbook operates a similar way for most Atlassian products:

- prepare database

- download zip package

- extract it at /opt/atlassian/ and creates a shortcut link as /opt/atlassian/jira

- create service account and configure systemd service

- prepare JIRA_HOME location at /var/atlassian/application-data/jira/

- apply configuration: dbconfig.xml, jira.properties, custom release notes templates, sso support...

- download and apply patches from Jira Field Security, for instance

Some manual steps remains for an effective installation but almost complete an upgrade process. What may be really useful from Ansible too:

- Apps management in UPM but this may help: https://github.com/tschaefer/upmctl at least to bootstrap and get JCLI available: https://marketplace.atlassian.com/apps/6398/jira-command-line-interface-cli?hosting=server&tab=overview

- Update license if renewed since last playbook execution

- Trigger full reindex if put off to upgrade faster

- Integrity checks execution

- Report health check status

If fact, I cannot compare this Ansible playbook usage with Atlassian installer as I have never used it.

0 votes
Sid Community Leader Nov 16, 2020

Are there any repos that I can take a look to start with ?

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you