From be1f8ba43d74ce91132c671daf8111b6bf022748 Mon Sep 17 00:00:00 2001 From: Geoff Jacobs Date: Fri, 14 Oct 2022 09:38:28 +1100 Subject: [PATCH 1/6] fixing up the issue with bbdc using shared home as local home --- aws_bitbucket_dc_node.yml | 2 -- roles/product_install/tasks/no_op.yml | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/aws_bitbucket_dc_node.yml b/aws_bitbucket_dc_node.yml index 3e75299..797197f 100644 --- a/aws_bitbucket_dc_node.yml +++ b/aws_bitbucket_dc_node.yml @@ -8,8 +8,6 @@ atl_product_edition: "bitbucket" atl_product_user: "bitbucket" - atl_product_home: "{{ atl_shared_mountpoint }}/{{ atl_product_edition }}" - atl_use_system_jdk: true java_major_version: "11" # BB 8 will drop JDK 8 support atl_download_format: "tarball" diff --git a/roles/product_install/tasks/no_op.yml b/roles/product_install/tasks/no_op.yml index ed97d53..22b9f6e 100644 --- a/roles/product_install/tasks/no_op.yml +++ b/roles/product_install/tasks/no_op.yml @@ -1 +1,7 @@ --- +- name: Symlink the the shared home + file: + src: "{{ atl_shared_mountpoint }}/{{ atl_product_edition }}/shared" + dest: "{{ atl_product_home }}/shared" + state: link + force: true \ No newline at end of file From 6f696339db83972858df16913a1c0e3eba1fd07b Mon Sep 17 00:00:00 2001 From: Geoff Jacobs Date: Fri, 14 Oct 2022 10:10:34 +1100 Subject: [PATCH 2/6] need to pre-create the shared folder structure --- roles/product_install/tasks/no_op.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/roles/product_install/tasks/no_op.yml b/roles/product_install/tasks/no_op.yml index 22b9f6e..6d66c6d 100644 --- a/roles/product_install/tasks/no_op.yml +++ b/roles/product_install/tasks/no_op.yml @@ -1,6 +1,14 @@ --- +- name: Create the product local home directory + ansible.builtin.file: + path: "{{ atl_product_home }}/shared" + state: directory + owner: "{{ atl_product_user }}" + group: "{{ atl_product_user }}" + mode: "0644" + - name: Symlink the the shared home - file: + ansible.builtin.file: src: "{{ atl_shared_mountpoint }}/{{ atl_product_edition }}/shared" dest: "{{ atl_product_home }}/shared" state: link From 7748939506f8026afaa33c86a7cb71491dc517d5 Mon Sep 17 00:00:00 2001 From: Geoff Jacobs Date: Fri, 14 Oct 2022 11:00:16 +1100 Subject: [PATCH 3/6] adjusting folder permissions to allow group read access --- roles/product_install/tasks/no_op.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/product_install/tasks/no_op.yml b/roles/product_install/tasks/no_op.yml index 6d66c6d..c14b043 100644 --- a/roles/product_install/tasks/no_op.yml +++ b/roles/product_install/tasks/no_op.yml @@ -5,7 +5,7 @@ state: directory owner: "{{ atl_product_user }}" group: "{{ atl_product_user }}" - mode: "0644" + mode: "0754" - name: Symlink the the shared home ansible.builtin.file: From 4b8126779a6ab9c8737b1acb094b5a01633f1c71 Mon Sep 17 00:00:00 2001 From: Geoff Jacobs Date: Tue, 8 Nov 2022 10:56:26 +1100 Subject: [PATCH 4/6] tagging the database_init role so it can be targetting with a skip-tags --- aws_bitbucket_dc_node.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws_bitbucket_dc_node.yml b/aws_bitbucket_dc_node.yml index 797197f..b67743d 100644 --- a/aws_bitbucket_dc_node.yml +++ b/aws_bitbucket_dc_node.yml @@ -36,7 +36,7 @@ - { role: nfs_mount, when : (atl_fileserver_host is defined) and (atl_fileserver_host|length > 0) } - role: product_common - role: product_install - - role: database_init + - { role: database_init, tags: [database] } - role: bitbucket_config - role: product_startup - role: bitbucket_dataset_restore From 97f7776b1a67df815ec957290a721c6b74a73ccb Mon Sep 17 00:00:00 2001 From: Geoff Jacobs Date: Tue, 8 Nov 2022 13:11:19 +1100 Subject: [PATCH 5/6] defaulting bitbucket home to product default --- aws_bitbucket_dc_node.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aws_bitbucket_dc_node.yml b/aws_bitbucket_dc_node.yml index c8fddb3..7420513 100644 --- a/aws_bitbucket_dc_node.yml +++ b/aws_bitbucket_dc_node.yml @@ -12,10 +12,12 @@ java_major_version: "11" # BB 8 will drop JDK 8 support atl_download_format: "tarball" + atl_product_home: "/var/atlassian/application-data/bitbucket" atl_nfs_mountpoint: "{{ atl_shared_mountpoint }}/bitbucket/shared" atl_nfs_target: "{{ atl_shared_mountpoint }}/bitbucket/shared" atl_nfs_version: "3" + atl_startup_systemd_params: - "UMask=0027" - "LimitNOFILE=4096" From 80074ada771562225b7906694c3ddc038636b8a8 Mon Sep 17 00:00:00 2001 From: Geoff Jacobs Date: Wed, 9 Nov 2022 07:01:46 +1100 Subject: [PATCH 6/6] add a conditional around symlinking shared home --- roles/product_install/defaults/main.yml | 1 + roles/product_install/tasks/no_op.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/product_install/defaults/main.yml b/roles/product_install/defaults/main.yml index d768e62..05d6262 100644 --- a/roles/product_install/defaults/main.yml +++ b/roles/product_install/defaults/main.yml @@ -41,3 +41,4 @@ atl_source_obr_from_marketplace: true atl_servicedesk_download_file: "{{ atl_installer_temp }}/jira-servicedesk.{{ atl_product_version }}.obr" force_version_update: false +skip_shared_home_symlink: false \ No newline at end of file diff --git a/roles/product_install/tasks/no_op.yml b/roles/product_install/tasks/no_op.yml index c14b043..f15c70e 100644 --- a/roles/product_install/tasks/no_op.yml +++ b/roles/product_install/tasks/no_op.yml @@ -12,4 +12,5 @@ src: "{{ atl_shared_mountpoint }}/{{ atl_product_edition }}/shared" dest: "{{ atl_product_home }}/shared" state: link - force: true \ No newline at end of file + force: true + when: not skip_shared_home_symlink | bool \ No newline at end of file