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!
Dear @jmooo,
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:
So long
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Very true. Probably once Atlassian will pick up your suggestion and realize it. Who knows ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you have a repo for this role I am curious to see the source code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Dithmar Reutlinger ,
I am getting the below error while executing the ansible play book but notable to understood which directory I have missed,
"invocation": {
"module_args": {
"_raw_params": "/tmp/atlassian-jira-software-8.1.0-x64.bin -q -varfile /tmp/response.varfile",
"_uses_shell": false,
"argv": null,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"stdin_add_newline": true,
"strip_empty_ends": true,
"warn": true
}
},
"msg": "non-zero return code",
"rc": 1,
"start": "2020-12-08 14:30:45.984883",
"stderr": "No directory found in specified location",
"stderr_lines": [
"No directory found in specified location"
],
"stdout": "Unpacking JRE ...\nStarting Installer ...",
"stdout_lines": [
"Unpacking JRE ...",
"Starting Installer ..."
]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Dithmar Reutlinger @Dithmar Reutlinger
Application upgrade is happening in test env perfectly with fewer data. But I am facing a problem in production with back up the JIRA_HOME directory. Due to huge data and attachments, it is taking lots of time. While doing manually we are skipping to back up the JIRA home directory.
Please let us know how we can skip the JIRA_HOME directory (/var/Atlassian/..) in the upgrade process through the Ansible playbook.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are there any repos that I can take a look to start with ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I kinda finished it and we are live as well. I will publish it soon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.