added cassandra client update and cassandra rebuild
diff --git a/installations/dc2/clean.yml b/installations/dc2/clean.yml new file mode 100644 index 0000000..72ff1ad --- /dev/null +++ b/installations/dc2/clean.yml
@@ -0,0 +1,17 @@ +--- +- hosts: localhost + connection: local + + tasks: + - name: Remove .ansible_cache + file: + path: '{{ item }}' + state: absent + force: yes + with_items: + - '~/.ansible/tmp/cache' + - '~/.ansible/tmp/ansible.log' + - 'ssh_keys' + - 'configs_and_logs' + - 'rpm_resources' +
diff --git a/installations/dc2/components/opdk-install-component.yml b/installations/dc2/components/opdk-install-component.yml new file mode 100644 index 0000000..8e67039 --- /dev/null +++ b/installations/dc2/components/opdk-install-component.yml
@@ -0,0 +1,29 @@ +--- +- hosts: '{{ hosts }}' + strategy: free + roles: + - opdk-setup-apigee-user + - opdk-setup-os-ds + +- hosts: '{{ hosts }}' + strategy: free + roles: + - opdk-setup-openjdk + +- hosts: '{{ hosts }}' + strategy: free + roles: + - opdk-setup-bootstrap + +- hosts: '{{ hosts }}' + strategy: free + roles: + - opdk-setup-silent-installation-config + - opdk-setup-component-installer + +- hosts: '{{ hosts }}' + serial: 1 + roles: + - { role: opdk-setup-component, profile: '{{ component_profile }}' } + +
diff --git a/installations/dc2/components/opdk-setup-postgres-common.yml b/installations/dc2/components/opdk-setup-postgres-common.yml new file mode 100644 index 0000000..047fa2b --- /dev/null +++ b/installations/dc2/components/opdk-setup-postgres-common.yml
@@ -0,0 +1,36 @@ +--- +- hosts: '{{ hosts }}' + strategy: free + roles: + - opdk-setup-apigee-user + - opdk-setup-os-postgres + - opdk-setup-postgres-config + tags: + - os-pg + - os + - pg + +- include: ../components/opdk-install-component.yml + vars: + hosts: '{{ hosts }}' + component_profile: 'ps' + tags: + - pg + +- include: 'opdk-setup-postgres-{{ pg_component }}.yml' + when: pg_component is defined + +- hosts: '{{ hosts }}' + serial: 1 + roles: + - opdk-setup-default-settings + tasks: + - name: Obtain server self report + opdk_server_self: + server_type: 'ps' + username: '{{ opdk_user_email }}' + password: '{{ opdk_user_pass }}' + ignore_errors: yes + tags: + - pg + - pgmaster
diff --git a/installations/dc2/components/opdk-setup-postgres-master.yml b/installations/dc2/components/opdk-setup-postgres-master.yml new file mode 100644 index 0000000..199ec68 --- /dev/null +++ b/installations/dc2/components/opdk-setup-postgres-master.yml
@@ -0,0 +1,7 @@ +--- +- hosts: '{{ hosts }}' + serial: 1 + roles: + - opdk-setup-postgres-master + tags: + - pgmaster
diff --git a/installations/dc2/components/opdk-setup-postgres-standby.yml b/installations/dc2/components/opdk-setup-postgres-standby.yml new file mode 100644 index 0000000..81e9fdb --- /dev/null +++ b/installations/dc2/components/opdk-setup-postgres-standby.yml
@@ -0,0 +1,7 @@ +--- +- hosts: '{{ hosts }}' + serial: 1 + roles: + - opdk-setup-postgres-standby + tags: + - pgstandby
diff --git a/installations/dc2/configuration/opdk-setup-org-config.yml b/installations/dc2/configuration/opdk-setup-org-config.yml new file mode 100644 index 0000000..709cf2d --- /dev/null +++ b/installations/dc2/configuration/opdk-setup-org-config.yml
@@ -0,0 +1,6 @@ +--- +- hosts: '{{ hosts }}' + strategy: free + roles: + - opdk-setup-org-config +
diff --git a/installations/dc2/configuration/opdk-setup-org.yml b/installations/dc2/configuration/opdk-setup-org.yml new file mode 100644 index 0000000..90453ac --- /dev/null +++ b/installations/dc2/configuration/opdk-setup-org.yml
@@ -0,0 +1,5 @@ +--- +- hosts: '{{ hosts }}' + strategy: free + roles: + - opdk-setup-org
diff --git a/installations/dc2/configuration/opdk-setup-os.yml b/installations/dc2/configuration/opdk-setup-os.yml new file mode 100644 index 0000000..5b148a7 --- /dev/null +++ b/installations/dc2/configuration/opdk-setup-os.yml
@@ -0,0 +1,15 @@ +--- +- hosts: '{{ hosts }}' + become: yes + gather_facts: no + strategy: free + pre_tasks: + - name: Load credentials from encrypted file + include_vars: '~/.apigee/credentials.yml' + roles: + - opdk-setup-os-minimum + - opdk-setup-selinux-disable + - opdk-shutdown-iptables + - opdk-time-sync + - opdk-setup-os-common +
diff --git a/installations/dc2/configuration/update-user.yml b/installations/dc2/configuration/update-user.yml new file mode 100644 index 0000000..dc29f0a --- /dev/null +++ b/installations/dc2/configuration/update-user.yml
@@ -0,0 +1,42 @@ +--- +- hosts: '{{ hosts }}' + become: yes +# gather_facts: no + + vars: + pubkey: '~/.ssh/id_rsa.pub' + + tasks: +# - name: Wait for port 22 +# wait_for: +# port: 22 +# timeout: 300 +# delay: '{{ delay_before_check }}' + + - name: Build EC2 facts cache + ec2_facts: + + - name: Build setup facts cache + setup: + + - name: Copy local public keys to server for user {{ user }} + authorized_key: + user: '{{ user }}' + state: present + key: "{{ lookup('file', '{{ pubkey }}') }}" + + - name: Permit root login over SSH + lineinfile: + state: present + dest: /etc/ssh/sshd_config + regexp: '(^#)(PermitRootLogin yes)' + line: '\2' + backrefs: yes + notify: + - Restart SSH service + + handlers: + - name: Restart SSH service + service: + name: sshd + state: restarted
diff --git a/installations/dc2/installation-rollback.yml b/installations/dc2/installation-rollback.yml new file mode 100644 index 0000000..4fe5413 --- /dev/null +++ b/installations/dc2/installation-rollback.yml
@@ -0,0 +1,6 @@ +--- +- hosts: '{{ hosts }}' + vars: + remove_data_on_rollback: true + roles: + - opdk-setup-bootstrap-rollback
diff --git a/installations/dc2/installation.yml b/installations/dc2/installation.yml new file mode 100644 index 0000000..93e7a1e --- /dev/null +++ b/installations/dc2/installation.yml
@@ -0,0 +1,95 @@ +--- +- include: component_installations/opdk-install-component.yml + vars: + hosts: 'dc-2-ds' + component_profile: 'ds' + tags: + - ds + +- include: component_installations/opdk-install-component.yml + vars: + hosts: 'dc-1-ds' + component_profile: 'ds' + tags: + - ds + +- include: component_updates/opdk-cassandra-client-update.yml + vars: + hosts: 'dc-1-ms' + +- include: component_installations/opdk-install-component.yml + vars: + hosts: 'dc-1-ms' + component_profile: 'ms' + tags: + - ms + +- include: component_installations/opdk-cassandra-rebuild.yml + vars: + hosts: 'dc-2-ds' + +- include: component_installations/opdk-install-component.yml + vars: + hosts: 'dc-2-ms' + component_profile: 'ms' + tags: + - ms2 + +- include: component_installations/opdk-install-component.yml + vars: + hosts: 'dc-2-rmp' + component_profile: 'rmp' + tags: + - rmp + +- include: component_installations/opdk-install-component.yml + vars: + hosts: 'dc-1-rmp' + component_profile: 'rmp' + tags: + - rmp + +- include: component_installations/opdk-install-component.yml + vars: + hosts: 'dc-2-qpid' + component_profile: 'qs' + tags: + - qpid + +- include: component_installations/opdk-setup-postgres-master.yml + vars: + hosts: 'dc-2-pgmaster' + tags: + - pgmaster + +- include: component_installations/opdk-setup-postgres-standby.yml + vars: + hosts: 'dc-2-pgstandby' + tags: + - pgstandby + +- include: validation/opdk-setup-org-config.yml + vars: + hosts: 'dc-2-ms' + tags: + - org-config + +- include: validation/opdk-setup-org.yml + vars: + hosts: 'dc-2-ms' + tags: + - org + +- include: validation/opdk-setup-validate.yml + tags: + - validate + +- include: validation/opdk-setup-status.yml + vars: + hosts: 'planet' + tags: + - status + +- include: validation/opdk-setup-log-files.yml + tags: + - logs
diff --git a/installations/dc2/validations/opdk-server-self.yml b/installations/dc2/validations/opdk-server-self.yml new file mode 100644 index 0000000..76670ed --- /dev/null +++ b/installations/dc2/validations/opdk-server-self.yml
@@ -0,0 +1,68 @@ +--- +- hosts: rmp + serial: 1 + roles: + - opdk-setup-default-settings + tasks: + - name: Obtain router server self report + ignore_errors: yes + opdk_server_self: + server_type: 'router' + username: '{{ opdk_user_email }}' + password: '{{ opdk_user_pass }}' + - debug: var="edge_router_self" + + - name: Obtain message processor server self report + ignore_errors: yes + opdk_server_self: + server_type: 'mp' + username: '{{ opdk_user_email }}' + password: '{{ opdk_user_pass }}' + + - debug: var="edge_mp_self" + + +- hosts: pg + serial: 1 + roles: + - opdk-setup-default-settings + tasks: + - name: Obtain postgres server self report + ignore_errors: yes + opdk_server_self: + server_type: 'ps' + username: '{{ opdk_user_email }}' + password: '{{ opdk_user_pass }}' + + - debug: var="edge_ps_self" + + +- hosts: qpid + serial: 1 + roles: + - opdk-setup-default-settings + tasks: + - name: Obtain qpid server self report + ignore_errors: yes + opdk_server_self: + server_type: 'qs' + username: '{{ opdk_user_email }}' + password: '{{ opdk_user_pass }}' + + - debug: var="edge_qs_self" + + +- hosts: ms + serial: 1 + roles: + - opdk-setup-default-settings + tasks: + - name: Obtain management server self report + ignore_errors: yes + opdk_server_self: + server_type: 'ms' + username: '{{ opdk_user_email }}' + password: '{{ opdk_user_pass }}' + + - debug: var="edge_ms_self" +
diff --git a/installations/dc2/validations/opdk-setup-log-files.yml b/installations/dc2/validations/opdk-setup-log-files.yml new file mode 100644 index 0000000..21d31fa --- /dev/null +++ b/installations/dc2/validations/opdk-setup-log-files.yml
@@ -0,0 +1,25 @@ +--- +- hosts: planet + strategy: free + roles: + - { role: fetch-files, fetch_files: '{{ apigee_log_files }}' } + tags: + - logs + - apigee-logs + +- hosts: planet + become: true + strategy: free + roles: + - { role: fetch-files, fetch_files: '{{ system_config_files }}' } + tags: + - logs + - os-logs + +- hosts: planet + strategy: free + roles: + - { role: fetch-files, fetch_files: '{{ apigee_config_files }}' } + tags: + - logs + - config-logs
diff --git a/installations/dc2/validations/opdk-setup-status.yml b/installations/dc2/validations/opdk-setup-status.yml new file mode 100644 index 0000000..7d2745d --- /dev/null +++ b/installations/dc2/validations/opdk-setup-status.yml
@@ -0,0 +1,6 @@ +--- +- hosts: '{{ hosts }}' + roles: + - opdk-setup-status + tags: + - status
diff --git a/installations/dc2/validations/opdk-setup-validate.yml b/installations/dc2/validations/opdk-setup-validate.yml new file mode 100644 index 0000000..6d36c20 --- /dev/null +++ b/installations/dc2/validations/opdk-setup-validate.yml
@@ -0,0 +1,15 @@ +--- +- hosts: rmp + serial: 1 + roles: + - opdk-setup-validate + tags: + - validate + +- hosts: rmp + serial: 1 + roles: + - opdk-setup-validate-cleanup + tags: + - validate + - validate-cleanup
diff --git a/requirements.yml b/requirements.yml index b684db1..a7635c2 100644 --- a/requirements.yml +++ b/requirements.yml
@@ -77,4 +77,8 @@ - src: https://github.com/carlosfrias/apigee-opdk-setup-bootstrap-rollback name: opdk-setup-bootstrap-rollback +- src: https://github.com/carlosfrias/apigee-opdk-cassandra-rebuild + name: opdk-cassandra-rebuild +- src: https://github.com/carlosfrias/apigee-opdk-cassandra-client-update + name: opdk-cassandra-client-update