mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-17 02:13:06 -06:00
Added Ansible playbook to upgrade ZDU bitbucket
This commit is contained in:
62
aws_bitbucket_cluster_zdu.yml
Normal file
62
aws_bitbucket_cluster_zdu.yml
Normal file
@@ -0,0 +1,62 @@
|
||||
---
|
||||
|
||||
- hosts: localhost
|
||||
connection: local
|
||||
vars_files: group_vars/aws_node_local.yml
|
||||
roles:
|
||||
- role: bitbucket_zdu_init
|
||||
|
||||
- hosts: all
|
||||
serial: 1
|
||||
any_errors_fatal: true
|
||||
vars_files: group_vars/aws_node_local.yml
|
||||
vars:
|
||||
# See group_vars/aws_node_local.yml, which pull vars from the environment.
|
||||
atl_product_family: "stash"
|
||||
atl_product_edition: "bitbucket"
|
||||
atl_product_user: "bitbucket"
|
||||
|
||||
atl_product_home: "{{ atl_shared_mountpoint }}/{{ atl_product_edition }}"
|
||||
|
||||
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"
|
||||
- "Environment=BITBUCKET_HOME={{ atl_product_home }}"
|
||||
- "Environment=JVM_MAXIMUM_MEMORY={{ atl_jvm_heap }}"
|
||||
- "Environment=JVM_MINIMUM_MEMORY={{ atl_jvm_heap }}"
|
||||
- "Environment=JVM_SUPPORT_RECOMMENDED_ARGS={{ atl_jvm_opts }}"
|
||||
atl_startup_exec_options:
|
||||
- "-fg"
|
||||
- "--no-search"
|
||||
pre_tasks:
|
||||
- name: Stop bitbucket
|
||||
service:
|
||||
name: "{{ atl_systemd_service_name }}"
|
||||
state: stopped
|
||||
roles:
|
||||
- role: aws_common
|
||||
- role: product_common
|
||||
- role: product_install
|
||||
- role: bitbucket_config
|
||||
- role: product_startup
|
||||
post_tasks:
|
||||
- name: Wait for node to finish startup
|
||||
uri:
|
||||
url: "{{ atl_tomcat_scheme }}://127.0.0.1:{{ atl_tomcat_port }}{{ atl_tomcat_contextpath }}/status"
|
||||
method: GET
|
||||
status_code: 200
|
||||
register: bitbucket_state
|
||||
failed_when: bitbucket_state.json is not defined or (bitbucket_state.json is defined and bitbucket_state.json.state != 'RUNNING')
|
||||
until: bitbucket_state.json is defined and bitbucket_state.json.state == 'RUNNING'
|
||||
retries: 120
|
||||
delay: 5
|
||||
|
||||
- hosts: localhost
|
||||
connection: local
|
||||
vars_files: group_vars/aws_node_local.yml
|
||||
roles:
|
||||
- role: bitbucket_zdu_finish
|
||||
Reference in New Issue
Block a user