From cb6f3bdb6173df6d28dff4fca6c778020646214b Mon Sep 17 00:00:00 2001 From: Andy Rajagopalan Date: Mon, 4 Nov 2019 13:37:05 -0800 Subject: [PATCH] made changes to file to allow automated setup of bitbucket --- aws_bitbucket_dc_node.yml | 1 + group_vars/aws_node_local.yml | 2 ++ roles/bitbucket_config/molecule/default/main.yml | 4 ++++ roles/bitbucket_config/tasks/main.yml | 5 ----- roles/bitbucket_config/templates/bitbucket.properties.j2 | 6 +++--- roles/bitbucket_dataset_restore/tasks/main.yml | 6 ++++++ 6 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 roles/bitbucket_config/molecule/default/main.yml create mode 100644 roles/bitbucket_dataset_restore/tasks/main.yml diff --git a/aws_bitbucket_dc_node.yml b/aws_bitbucket_dc_node.yml index 7834e12..26f2f05 100644 --- a/aws_bitbucket_dc_node.yml +++ b/aws_bitbucket_dc_node.yml @@ -33,3 +33,4 @@ - role: database_init - role: bitbucket_config - role: product_startup + - role: bitbucket-dataset-restore diff --git a/group_vars/aws_node_local.yml b/group_vars/aws_node_local.yml index 8a284a4..c80de89 100644 --- a/group_vars/aws_node_local.yml +++ b/group_vars/aws_node_local.yml @@ -133,9 +133,11 @@ atl_rds_security_group: "{{ lookup('env', 'ATL_RDS_SECURITY_GROUP') }}" atl_backup_manifest_url: "{{ lookup('env', 'ATL_BACKUP_MANIFEST_URL') }}" + atl_restore_required: "{{ atl_backup_manifest_url is defined and atl_backup_manifest_url != '' }}" atl_bitbucket_license_key: "{{ lookup('env', 'ATL_BB_LICENSEKEY') }}" atl_bitbucket_admin_password: "{{ lookup('env', 'ATL_BB_ADMIN_PASSWORD') }}" atl_bitbucket_dataset_url: "{{ lookup('env', 'ATL_DATASET_URL') }}" + diff --git a/roles/bitbucket_config/molecule/default/main.yml b/roles/bitbucket_config/molecule/default/main.yml new file mode 100644 index 0000000..116609c --- /dev/null +++ b/roles/bitbucket_config/molecule/default/main.yml @@ -0,0 +1,4 @@ +--- + +atl_bitbucket_license_key: "{{ lookup('env', 'ATL_BB_LICENSEKEY') }}" +atl_bitbucket_admin_password: "{{ lookup('env', 'ATL_BB_ADMIN_PASSWORD') }}" \ No newline at end of file diff --git a/roles/bitbucket_config/tasks/main.yml b/roles/bitbucket_config/tasks/main.yml index 14c4f73..f39eb65 100644 --- a/roles/bitbucket_config/tasks/main.yml +++ b/roles/bitbucket_config/tasks/main.yml @@ -15,11 +15,6 @@ owner: "{{ atl_product_user }}" group: "{{ atl_product_user }}" -- name: Copy Bitbucket dataset from s3 - get_url: - url: "{{ atl_bitbucket_dataset_url }}" - dest: /media/atl/bitbucket/shared/data/migration/import/ - - name: Remove write permissions from installation directory file: path: "{{ atl_product_installation_versioned }}" diff --git a/roles/bitbucket_config/templates/bitbucket.properties.j2 b/roles/bitbucket_config/templates/bitbucket.properties.j2 index 4862142..39b9728 100644 --- a/roles/bitbucket_config/templates/bitbucket.properties.j2 +++ b/roles/bitbucket_config/templates/bitbucket.properties.j2 @@ -18,9 +18,6 @@ plugin.search.elasticsearch.baseurl={{ atl_elasticsearch_endpoint }} server.proxy-name={{ atl_proxy_name }} server.secure={{ atl_ssl_proxy }} server.require-ssl={{ atl_ssl_proxy }} -setup.license={{ atl_bitbucket_license_key }} -setup.sysadmin.username=admin -setup.sysadmin.password={{ atl_bitbucket_admin_password }} {% if atl_ssl_proxy == 'true' %} server.scheme=https server.proxy-port=443 @@ -29,3 +26,6 @@ server.additional-connector.1.port=7991 server.scheme=http server.proxy-port=80 {% endif %} +setup.license={{ atl_bitbucket_license_key }} +setup.sysadmin.username=admin +setup.sysadmin.password={{ atl_bitbucket_admin_password }} diff --git a/roles/bitbucket_dataset_restore/tasks/main.yml b/roles/bitbucket_dataset_restore/tasks/main.yml new file mode 100644 index 0000000..12e726a --- /dev/null +++ b/roles/bitbucket_dataset_restore/tasks/main.yml @@ -0,0 +1,6 @@ +--- + +- name: Copy Bitbucket dataset from s3 + get_url: + url: "{{ atl_bitbucket_dataset_url }}" + dest: /media/atl/bitbucket/shared/data/migration/import/ \ No newline at end of file