This commit is contained in:
Azra Sulthana
2019-07-11 05:34:52 +00:00
parent f86f7d52f2
commit b960c1c4cb
20 changed files with 327 additions and 4 deletions

View File

@@ -10,10 +10,13 @@ atl_product_version_cache: "{{ atl_product_home_shared }}/{{ atl_product_edition
atl_release_base_url: "https://product-downloads.atlassian.com/software"
atl_product_base_url: "{{ atl_release_base_url }}/{{ atl_product_family }}/downloads"
atl_product_download_url: "{{ atl_product_base_url }}/atlassian-{{ atl_download_edition | default(atl_product_edition) }}-{{ atl_product_version }}-x64.bin"
atl_product_download_url: "{{ atl_product_base_url }}/atlassian-{{ atl_download_edition | default(atl_product_edition) }}-{{ atl_product_version }}-x64.bin "
atl_crowd_download_url: "{{ atl_product_base_url }}/atlassian-{{ atl_download_edition | default(atl_product_edition) }}-{{ atl_product_version }}.tar.gz"
atl_crowd_latest_url: "https://www.atlassian.com/software/crowd/downloads/binary/crowd-standalone-distribution-{{atl_latest_version}}.tar.gz"
atl_product_download_filename: "{{ atl_download_edition | default(atl_product_edition) }}.{{ atl_product_version }}.bin"
atl_product_download: "{{ atl_installer_temp }}/{{ atl_product_download_filename }}"
atl_crowd_download: "{{ atl_installer_temp }}"
atl_product_varfile: "{{ atl_installer_temp }}/{{ atl_product_family }}.varfile"
atl_marketplace_base: "https://marketplace.atlassian.com"

View File

@@ -0,0 +1 @@
no_op.yml

View File

@@ -0,0 +1,44 @@
- debug:
msg: "atl_latest_version - {{atl_latest_version}}"
- name: Fetch crowd installer
get_url:
url: "{{atl_crowd_download_url}}"
dest: "{{atl_crowd_download}}"
mode: 0755
force: false
when: not atl_latest_version
- name: Fetch latest crowd installer
get_url:
url: "{{ atl_crowd_latest_url }}"
dest: "{{atl_crowd_download}}"
mode: 0755
force: false
when: atl_latest_version != ""
- name: locate installer
find: paths="{{ atl_crowd_download }}" patterns="*crowd*.tar.gz"
register: find_result
- debug: msg = " {{find_result }}"
- name: unarchive
become: true
unarchive:
src: "{{ item.path }}"
dest: "{{atl_product_installation_versioned}}"
# remote_src: yes
with_items: "{{ find_result.files }}"
#- name: unpack crowd
# shell: tar -xvzf {{atl_crowd_download}}/*crowd*{{atl_product_version}}.tar.gz .
- name: Symlink the installed version to current
file:
src: "{{ atl_product_installation_versioned }}/atlassian-crowd-{{atl_product_version}}"
dest: "{{ atl_product_installation_current }}"
state: link
force: true

View File

@@ -0,0 +1,13 @@
---
# This is the process for most products (except ServiceDesk
# basically). Symlink this to <edition>_version_latest.yml for each
# product that supports the standard marketplace API.
- name: Fetch the latest version from URL
set_fact:
atl_product_version_json: "{{ lookup('url', '{{ atl_product_latest_version_url }}') }}"
- name: Set the local var to retrieved version
set_fact:
atl_latest_version: "{{ atl_product_version_json.version }}"

View File

@@ -1,5 +1,3 @@
---
- name: Check for existing version cache file
stat:
path: "{{ atl_product_version_cache }}"
@@ -97,11 +95,18 @@
set_fact:
atl_product_version: "{{ atl_download_version }}"
#- set_fact:
# atl_product_version: '3.4.4'
######################################################################
#- debug:
# msg: "{{ atl_product_edition }}_extra_tasks.yml"
- name: Perform any additional per-edition version setup
include_tasks: "{{ atl_product_edition }}_extra_tasks.yml"
when: atl_product_edition!= "crowd"
- name: Create installation directories
@@ -118,6 +123,8 @@
- "{{ atl_product_version_cache_dir }}"
changed_when: false # For Molecule idempotence check
- debug:
msg: "atl_installer_temp - {{atl_installer_temp}} atl_product_home - {{atl_product_home}} atl_product_installation_versioned- {{atl_product_installation_versioned}} atl_product_version_cache_dir- {{atl_product_version_cache_dir}}"
# At this point atl_product_version should be set, cache if necessary.
- name: Write override cached version when specified
@@ -136,12 +143,14 @@
dest: "{{ atl_product_download }}"
mode: 0755
force: false
when: atl_product_edition!= "crowd"
- name: Create installer varfile
template:
src: "{{ atl_product_family }}.varfile.j2"
dest: "{{ atl_product_varfile }}"
mode: 0755
when: atl_product_edition!= "crowd"
# NOTE: We run the installer as the user rather than root to limit its
# actions. For example, if root and the 'jira' user exists then it
@@ -153,6 +162,11 @@
creates: "{{ atl_product_installation_versioned }}/.install4j/"
become: true
become_user: "{{ atl_product_user }}"
when: atl_product_edition!= "crowd"
- import_tasks: crowd_install.yml
when: atl_product_edition == "crowd"
- name: Symlink the installed version to current
file:
@@ -160,3 +174,4 @@
dest: "{{ atl_product_installation_current }}"
state: link
force: true
when: atl_product_edition != "crowd"

View File

@@ -0,0 +1,13 @@
launch.application$Boolean=false
rmiPort$Long={{ atl_tomcat_mgmt_port | default('8020') }}
app.jiraHome={{ atl_product_home }}
app.install.service$Boolean=false
app.service.account={{ atl_product_user }}
existingInstallationDir={{ atl_product_installation_versioned }}
sys.confirmedUpdateInstallationString=false
sys.languageId=en
sys.installationDir={{ atl_product_installation_versioned }}
executeLauncherAction$Boolean=true
httpPort$Long={{ atl_tomcat_port | default('8080') }}
portChoice=default
executeLauncherAction$Boolean=false