From 85ba8a009c655883eb9537e5e3b12eb0d74e2d94 Mon Sep 17 00:00:00 2001 From: Christopher Tabone Date: Wed, 18 Dec 2024 12:32:08 -0400 Subject: [PATCH] Changes for 7.5.0 release. --- Makefile | 3 + environments/shared_variables.yml | 2 +- releases/launch_7.5.0.yml | 127 ++++++++++++++++++++++++++++++ 3 files changed, 131 insertions(+), 1 deletion(-) create mode 100644 releases/launch_7.5.0.yml diff --git a/Makefile b/Makefile index 2cc1146..4d3391a 100644 --- a/Makefile +++ b/Makefile @@ -79,6 +79,9 @@ bash: 7_4_0: docker run -it ${REPO} ansible-playbook -e WEBSERVER_INSTANCE_TYPE=r5a.xlarge -e env=production -e DOCKER_PULL_TAG=7.4.0 -i hosts launch_7.4.0.yml --vault-password-file=.password +7_5_0: + docker run -it ${REPO} ansible-playbook -e WEBSERVER_INSTANCE_TYPE=r5a.2xlarge -e env=production -e DOCKER_PULL_TAG=7.5.0 -i hosts launch_7.5.0.yml --vault-password-file=.password + run_human_variant_indexer: docker run -it ${REPO} ansible-playbook -e env=stage -e ALLIANCE_RELEASE=7.4.0 -e DOCKER_PULL_TAG=7.3.0 -i hosts playbook_run_human_variant_indexer.yml --vault-password-file=.password diff --git a/environments/shared_variables.yml b/environments/shared_variables.yml index c172fcb..64f8650 100644 --- a/environments/shared_variables.yml +++ b/environments/shared_variables.yml @@ -29,7 +29,7 @@ SWAP_SIZE: "{{ lookup('env','SWAP_SIZE') | default('128G', True) }}" # Neo4j Config NEO_ON_OFF_HEAP: "OFF_HEAP" -NEO_MAX_HEAP: "15GB" +NEO_MAX_HEAP: "30GB" NEO_OFF_HEAP_MAX: "0GB" NEO_TRANSACTION: "0" diff --git a/releases/launch_7.5.0.yml b/releases/launch_7.5.0.yml new file mode 100644 index 0000000..e54c0e6 --- /dev/null +++ b/releases/launch_7.5.0.yml @@ -0,0 +1,127 @@ +--- + +- name: Setup SSH Keys + hosts: local + connection: local + gather_facts: False + + pre_tasks: + - name: Import Secret Variable file + include_vars: "environments/shared_secrets.yml" + + - name: Copy SSH private key file + copy: + content: "{{ AGRSSL2_content }}" + dest: "/root/.ssh/id_rsa" + mode: 0600 + +- name: Setup Docker Server + hosts: local + connection: local + gather_facts: False + + vars_files: + - "environments/{{ env }}/main.yml" # ENV must always be loaded first + - "environments/shared_secrets.yml" + - "environments/shared_aws_instance_variables.yml" + + tasks: + - name: Launch instances + ec2_instance: + key_name: AGR-ssl2 + security_groups: ["default"] + instance_type: "{{ WEBSERVER_INSTANCE_TYPE }}" + image_id: ami-05668c1bb69ebd078 + region: us-east-1 + availability_zone: us-east-1a + iam_instance_profile: S3DataAccess + aws_access_key: "{{ AWS_ACCESS_KEY }}" + aws_secret_key: "{{ AWS_SECRET_KEY }}" + volumes: + - device_name: /dev/xvda + ebs: + volume_type: gp3 + volume_size: 500 + delete_on_termination: yes + wait: yes + wait_timeout: 600 + user_data: "" # Otherwise get weird error on start up + tags: + Name: "AGR Release 7.5.0" + register: ec2 + + - name: Add all instance public IPs to host group + add_host: + hostname: '{{ item.private_ip_address }}' + groupname: launched + with_items: "{{ ec2.instances }}" + register: launched + + - name: Retrieve all volumes for a queried instance + ec2_vol_info: + region: us-east-1 + aws_access_key: "{{ AWS_ACCESS_KEY }}" + aws_secret_key: "{{ AWS_SECRET_KEY }}" + filters: + attachment.instance-id: '{{ item.instance_id }}' + with_items: "{{ ec2.instances }}" + register: ec2_volumes + + - name: Ensure all volumes are tagged + ec2_tag: + region: us-east-1 + resource: '{{ item.1.id }}' + aws_access_key: "{{ AWS_ACCESS_KEY }}" + aws_secret_key: "{{ AWS_SECRET_KEY }}" + tags: + Name: "Ansible Generated Volume - AGR Release 7.5.0" + with_subelements: + - "{{ ec2_volumes.results }}" + - volumes + + - name: Waiting for SSH to be up + wait_for: + host: "{{ item.private_ip_address }}" + port: 22 + delay: 5 + timeout: 300 + state: started + with_items: "{{ ec2.instances }}" + +- name: Configure Servers + hosts: launched + user: core + gather_facts: False + + roles: + - install_python + - setup_docker + - setup_swap + + vars: + NEO_PAGE_CACHE: "8g" + NEO_MAX_HEAP: "6g" + REPO: "stage" + + vars_files: + - "environments/{{ env }}/main.yml" # ENV must always be loaded first + - "environments/shared_secrets.yml" + - "environments/shared_variables.yml" + - "environments/shared_aws_instance_variables.yml" + + tasks: + - name: Setup Neo, Run Loader, Run Loader Tests + block: + - include_tasks: tasks/start_monitoring.yml + - include_tasks: tasks/start_es_env.yml + - include_tasks: tasks/start_neo_data.yml + - include_tasks: tasks/start_infinispan_data.yml + - include_tasks: tasks/start_api_quarkus.yml + - include_tasks: tasks/start_jbrowse.yml + - include_tasks: tasks/start_apollo.yml + - include_tasks: tasks/run_restore_index.yml + - include_tasks: tasks/start_nginx.yml + + rescue: + - fail: + msg: 'Tasked Failed Terminating instances'