From 7b7daf153c4fe3cbdb3bd59eb91753834afc9b7e Mon Sep 17 00:00:00 2001 From: Varun Arbatti <1063972+theghostwhoforks@users.noreply.github.com> Date: Fri, 22 Nov 2019 16:22:46 +1100 Subject: [PATCH 1/5] DCD-686: Restore backup from manifest --- aws_bitbucket_dc_node.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/aws_bitbucket_dc_node.yml b/aws_bitbucket_dc_node.yml index 7834e12..0258da8 100644 --- a/aws_bitbucket_dc_node.yml +++ b/aws_bitbucket_dc_node.yml @@ -31,5 +31,6 @@ - role: product_common - role: product_install - role: database_init + - role: restore_backups - role: bitbucket_config - role: product_startup From b58deab2c3e5364f918871036b594528d0f69e97 Mon Sep 17 00:00:00 2001 From: Varun Arbatti <1063972+theghostwhoforks@users.noreply.github.com> Date: Tue, 26 Nov 2019 15:23:51 +1100 Subject: [PATCH 2/5] DCD-686: Use dict var to store results of urlsplit --- roles/restore_backups/tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/restore_backups/tasks/main.yml b/roles/restore_backups/tasks/main.yml index 1c81430..a3ccbff 100644 --- a/roles/restore_backups/tasks/main.yml +++ b/roles/restore_backups/tasks/main.yml @@ -29,13 +29,13 @@ - name: Parse the manifest URL set_fact: - atl_backup_manifest_url: "{{ atl_backup_manifest_url | urlsplit }}" + atl_backup_manifest_dict: "{{ atl_backup_manifest_url | urlsplit }}" - name: Extract manifest file information set_fact: - atl_backup_manifest_bucket: "{{ atl_backup_manifest_url.hostname }}" - atl_backup_manifest_path: "{{ atl_backup_manifest_url.path }}" - atl_backup_manifest_dest: "{{ atl_installer_temp }}/{{ atl_backup_manifest_url.path | basename }}" + atl_backup_manifest_bucket: "{{ atl_backup_manifest_dict.hostname }}" + atl_backup_manifest_path: "{{ atl_backup_manifest_dict.path }}" + atl_backup_manifest_dest: "{{ atl_installer_temp }}/{{ atl_backup_manifest_dict.path | basename }}" - name: Fetch the manifest from S3 aws_s3: From 07f55f27bc6a6d0c71cd6f20b8ddf0f0a510467c Mon Sep 17 00:00:00 2001 From: Varun Arbatti <1063972+theghostwhoforks@users.noreply.github.com> Date: Tue, 26 Nov 2019 15:58:50 +1100 Subject: [PATCH 3/5] DCD-686: Use dict var to store results of when looking up the scheme field --- roles/restore_backups/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/restore_backups/tasks/main.yml b/roles/restore_backups/tasks/main.yml index a3ccbff..7b47149 100644 --- a/roles/restore_backups/tasks/main.yml +++ b/roles/restore_backups/tasks/main.yml @@ -44,7 +44,7 @@ bucket: "{{ atl_backup_manifest_bucket }}" object: "{{ atl_backup_manifest_path }}" dest: "{{ atl_backup_manifest_dest }}" - when: atl_backup_manifest_url.scheme == 's3' + when: atl_backup_manifest_dict.scheme == 's3' - name: Load parameters from manifest include_vars: From 85c614d57baa02f07baa4dda1af2f05f8b257b9a Mon Sep 17 00:00:00 2001 From: Varun Arbatti <1063972+theghostwhoforks@users.noreply.github.com> Date: Wed, 27 Nov 2019 15:48:39 +1100 Subject: [PATCH 4/5] DCD-686: add restore backups to confluence node role --- aws_confluence_dc_node.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/aws_confluence_dc_node.yml b/aws_confluence_dc_node.yml index 979f96b..ce6c06e 100644 --- a/aws_confluence_dc_node.yml +++ b/aws_confluence_dc_node.yml @@ -18,6 +18,7 @@ - role: product_common - role: product_install - role: database_init + - role: restore_backups - role: confluence_common - role: confluence_config - role: product_startup From bc0ad759ba1a493a07b7bc321f8e762476b84a79 Mon Sep 17 00:00:00 2001 From: Ben Partridge Date: Wed, 4 Dec 2019 12:51:35 +1100 Subject: [PATCH 5/5] DCD-686: Undo renaming of ald_backup_manifest_url var --- roles/restore_backups/tasks/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/restore_backups/tasks/main.yml b/roles/restore_backups/tasks/main.yml index 7b47149..1c81430 100644 --- a/roles/restore_backups/tasks/main.yml +++ b/roles/restore_backups/tasks/main.yml @@ -29,13 +29,13 @@ - name: Parse the manifest URL set_fact: - atl_backup_manifest_dict: "{{ atl_backup_manifest_url | urlsplit }}" + atl_backup_manifest_url: "{{ atl_backup_manifest_url | urlsplit }}" - name: Extract manifest file information set_fact: - atl_backup_manifest_bucket: "{{ atl_backup_manifest_dict.hostname }}" - atl_backup_manifest_path: "{{ atl_backup_manifest_dict.path }}" - atl_backup_manifest_dest: "{{ atl_installer_temp }}/{{ atl_backup_manifest_dict.path | basename }}" + atl_backup_manifest_bucket: "{{ atl_backup_manifest_url.hostname }}" + atl_backup_manifest_path: "{{ atl_backup_manifest_url.path }}" + atl_backup_manifest_dest: "{{ atl_installer_temp }}/{{ atl_backup_manifest_url.path | basename }}" - name: Fetch the manifest from S3 aws_s3: @@ -44,7 +44,7 @@ bucket: "{{ atl_backup_manifest_bucket }}" object: "{{ atl_backup_manifest_path }}" dest: "{{ atl_backup_manifest_dest }}" - when: atl_backup_manifest_dict.scheme == 's3' + when: atl_backup_manifest_url.scheme == 's3' - name: Load parameters from manifest include_vars: