Started working on edge upgrades
diff --git a/installations/updates/README.md b/installations/updates/README.md new file mode 100644 index 0000000..3a23557 --- /dev/null +++ b/installations/updates/README.md
@@ -0,0 +1,27 @@ +Apigee OPDK Installation of a Single Data Center +================================================ + +# Ansible Roles + +The following ansible roles will be installed with the requirements.yml file: + +* [opdk-setup-apigee-user](https://github.com/carlosfrias/apigee-opdk-setup-apigee-user) +* [opdk-setup-os-common](https://github.com/carlosfrias/apigee-opdk-setup-os-common) +* [opdk-setup-os-ds](https://github.com/carlosfrias/apigee-opdk-setup-os-ds) +* [opdk-setup-os-minimum](https://github.com/carlosfrias/apigee-opdk-setup-os-minimum) +* [opdk-setup-default-settings](https://github.com/carlosfrias/apigee-opdk-setup-default-settings) +* [opdk-time-sync](https://github.com/carlosfrias/apigee-opdk-time-sync) +* [opdk-setup-openjdk](https://github.com/carlosfrias/apigee-opdk-setup-openjdk) +* [opdk-setup-bootstrap](https://github.com/carlosfrias/apigee-opdk-setup-bootstrap) +* [opdk-setup-silent-installation-config](https://github.com/carlosfrias/apigee-opdk-setup-silent-installation-config) +* [opdk-setup-component](https://github.com/carlosfrias/apigee-opdk-setup-component) +* [opdk-setup-component-installer](https://github.com/carlosfrias/apigee-opdk-setup-component-installer) +* [opdk-setup-selinux-disable](https://github.com/carlosfrias/apigee-opdk-setup-selinux-disable) +* [opdk-shutdown-iptables](https://github.com/carlosfrias/apigee-opdk-shutdown-iptables) +* [opdk-setup-org-config](https://github.com/carlosfrias/apigee-opdk-setup-org-config) +* [opdk-setup-org](https://github.com/carlosfrias/apigee-opdk-setup-org) +* [opdk-setup-validate](https://github.com/carlosfrias/apigee-opdk-setup-validate) +* [opdk-setup-validate-cleanup](https://github.com/carlosfrias/apigee-opdk-setup-validate-cleanup) +* [opdk-setup-apigee-log-files](https://github.com/carlosfrias/apigee-opdk-setup-apigee-log-files) +* [fetch-files](https://github.com/carlosfrias/apigee-fetch-files) +
diff --git a/installations/updates/clean.yml b/installations/updates/clean.yml new file mode 100644 index 0000000..2419405 --- /dev/null +++ b/installations/updates/clean.yml
@@ -0,0 +1,18 @@ +--- +- hosts: localhost + connection: local + tasks: + - name: Clean files + async: 0 + poll: 0 + ignore_errors: yes + file: + path: '{{ item }}' + state: absent + with_items: + - '~/.ansible/tmp/cache' + - '~/.ansible/tmp/ansible.log' + - '~/.apigee/ssh_keys' + - '~/.apigee/logs' + - '~/.apigee/configs' +
diff --git a/installations/updates/components/opdk-update-component.yml b/installations/updates/components/opdk-update-component.yml new file mode 100644 index 0000000..4ba2805 --- /dev/null +++ b/installations/updates/components/opdk-update-component.yml
@@ -0,0 +1 @@ +--
diff --git a/installations/updates/configuration/update_cache.yml b/installations/updates/configuration/update_cache.yml new file mode 100644 index 0000000..6404ede --- /dev/null +++ b/installations/updates/configuration/update_cache.yml
@@ -0,0 +1,11 @@ +--- +- hosts: planet + + pre_tasks: + - setup: + - ec2_facts: + when: "{{ ansible_bios_version | lower | search('amazon') }}" + + roles: + - apigee-opdk-setup-default-settings +
diff --git a/installations/updates/requirements.yml b/installations/updates/requirements.yml new file mode 100644 index 0000000..371139b --- /dev/null +++ b/installations/updates/requirements.yml
@@ -0,0 +1,72 @@ +--- +- src: https://github.com/carlosfrias/apigee-opdk-setup-apigee-user + +- src: https://github.com/carlosfrias/apigee-opdk-setup-os-common + +- src: https://github.com/carlosfrias/apigee-opdk-setup-os-limits + +- src: https://github.com/carlosfrias/apigee-opdk-setup-os-minimum + +- src: https://github.com/carlosfrias/apigee-opdk-setup-default-settings + +- src: https://github.com/carlosfrias/apigee-opdk-time-sync + +- src: https://github.com/carlosfrias/apigee-opdk-setup-openjdk + +- src: https://github.com/carlosfrias/apigee-opdk-setup-bootstrap + +- src: https://github.com/carlosfrias/apigee-opdk-setup-silent-installation-config + +- src: https://github.com/carlosfrias/apigee-opdk-setup-component + +- src: https://github.com/carlosfrias/apigee-opdk-set-reachable + +- src: https://github.com/carlosfrias/apigee-opdk-setup-component-installer + +- src: https://github.com/carlosfrias/apigee-opdk-setup-selinux-disable + +- src: https://github.com/carlosfrias/apigee-opdk-shutdown-iptables + +- src: https://github.com/carlosfrias/apigee-opdk-setup-org-config + +- src: https://github.com/carlosfrias/apigee-opdk-setup-org + +- src: https://github.com/carlosfrias/apigee-opdk-setup-validate + +- src: https://github.com/carlosfrias/apigee-opdk-setup-validate-cleanup + +- src: https://github.com/carlosfrias/apigee-opdk-setup-apigee-log-files + +- src: https://github.com/carlosfrias/apigee-fetch-files + +- src: https://github.com/carlosfrias/apigee-opdk-setup-postgres-config + +- src: https://github.com/carlosfrias/apigee-opdk-setup-postgres-master + +- src: https://github.com/carlosfrias/apigee-opdk-setup-postgres-standby + +- src: https://github.com/carlosfrias/apigee-opdk-setup-os-postgres + +- src: https://github.com/carlosfrias/apigee-opdk-setup-status + +- src: https://github.com/carlosfrias/apigee-opdk-setup-bootstrap-rollback + +- src: https://github.com/carlosfrias/apigee-internal-port-connectivity-validator-mp + +- src: https://github.com/carlosfrias/apigee-internal-port-connectivity-validator-ldap + +- src: https://github.com/carlosfrias/apigee-internal-port-connectivity-validator-cassandra + +- src: https://github.com/carlosfrias/apigee-internal-port-connectivity-validator-zookeeper + +- src: https://github.com/carlosfrias/apigee-internal-port-connectivity-validator-ms + +- src: https://github.com/carlosfrias/apigee-internal-port-connectivity-validator-postgres + +- src: https://github.com/carlosfrias/apigee-internal-port-connectivity-validator-router + +- src: https://github.com/carlosfrias/apigee-internal-port-connectivity-validator-qpid + +- src: https://github.com/carlosfrias/apigee-internal-port-connectivity-validator-ui + +- src: https://github.com/carlosfrias/apigee-opdk-enable-swap
diff --git a/installations/updates/resources/postgresql.properties.j2 b/installations/updates/resources/postgresql.properties.j2 new file mode 100644 index 0000000..835e8c8 --- /dev/null +++ b/installations/updates/resources/postgresql.properties.j2
@@ -0,0 +1 @@ +conf_pg_hba_replication.connection=host replication apigee {{ groups['dc-1-pgstandby'][0] }}/32 trust\ \nhost replication apigee {{ groups['dc-1-pgstandby'][1] }}/32 trust \ No newline at end of file
diff --git a/installations/updates/update.yml b/installations/updates/update.yml new file mode 100644 index 0000000..059e7cb --- /dev/null +++ b/installations/updates/update.yml
@@ -0,0 +1,35 @@ +--- +- include: configuration/update_cache.yml + +- include: configuration/load-opdk-credentials.yml + vars: + hosts: 'planet' + tags: + - credentials + +- hosts: planet + roles: + - apigee-opdk-start-components + +- hosts: pgmaster[0] + + roles: + - apigee-opdk-setup-default-settings + + tasks: + - name: Configure new standby node + template: + src: resources/postgresql.properties.j2 + dest: '{{ apigee_installation_home }}/customer/application/postgresql.properties' + + - name: Restarting pgmaster to begin replicating to the extra standby + shell: '{{ apigee_service }} apigee-postgresql restart' + + - name: Verify that pg_hba.conf reflects both standby servers + shell: 'cat {{ apigee_installation_home }}/apigee-postgresql/conf/pg_hba.conf' + + - name: Pause and view pg_hba.conf rendered above + pause: + + +