added ability to control how to set reachability for routers and mps
diff --git a/installations/dc1/configuration/opdk-set-reachable.yml b/installations/dc1/configuration/opdk-set-reachable.yml
new file mode 100644
index 0000000..f86fc25
--- /dev/null
+++ b/installations/dc1/configuration/opdk-set-reachable.yml
@@ -0,0 +1,10 @@
+---
+- hosts: '{{ hosts }}'
+ strategy: free
+ vars_files:
+ - ~/.apigee/credentials.yml
+ roles:
+ - { role: opdk-set-reachable, reachable: '{{ reachability }}', server_type: 'router' }
+ - { role: opdk-set-reachable, reachable: '{{ reachability }}', server_type: 'mp' }
+ tags:
+ - user
\ No newline at end of file
diff --git a/installations/dc1/installation.yml b/installations/dc1/installation.yml
index d0a5ef7..d304e14 100644
--- a/installations/dc1/installation.yml
+++ b/installations/dc1/installation.yml
@@ -32,6 +32,13 @@
tags:
- ms
+- include: configuration/opdk-set-reachable.yml
+ vars:
+ hosts: 'dc-1-rmp'
+ reachability: 'false'
+ tags:
+ - rmp
+
- include: components/opdk-install-component.yml
vars:
hosts: 'dc-1-rmp'
@@ -40,6 +47,13 @@
tags:
- rmp
+- include: configuration/opdk-set-reachable.yml
+ vars:
+ hosts: 'dc-1-rmp'
+ reachability: 'true'
+ tags:
+ - rmp
+
- include: components/opdk-install-component.yml
vars:
hosts: 'dc-1-qpid'
diff --git a/installations/dc1/requirements.yml b/installations/dc1/requirements.yml
index b19b466..a517868 100644
--- a/installations/dc1/requirements.yml
+++ b/installations/dc1/requirements.yml
@@ -29,6 +29,9 @@
- src: https://github.com/carlosfrias/apigee-opdk-setup-component
name: opdk-setup-component
+- src: https://github.com/carlosfrias/apigee-opdk-set-reachable
+ name: opdk-set-reachable
+
- src: https://github.com/carlosfrias/apigee-opdk-setup-component-installer
name: opdk-setup-component-installer
diff --git a/installations/dc2/components/opdk-install-component.yml b/installations/dc2/components/opdk-install-component.yml
index 98b7d7f..6e9a51a 100644
--- a/installations/dc2/components/opdk-install-component.yml
+++ b/installations/dc2/components/opdk-install-component.yml
@@ -5,12 +5,24 @@
- ~/.apigee/credentials.yml
roles:
- opdk-setup-apigee-user
+ tags:
+ - user
+
+- hosts: '{{ hosts }}'
+ strategy: free
+ vars_files:
+ - ~/.apigee/credentials.yml
+ roles:
- opdk-setup-os-limits
+ tags:
+ - os
- hosts: '{{ hosts }}'
strategy: free
roles:
- opdk-setup-openjdk
+ tags:
+ - openjdk
- hosts: '{{ hosts }}'
strategy: free
@@ -18,6 +30,8 @@
- ~/.apigee/credentials.yml
roles:
- opdk-setup-bootstrap
+ tags:
+ - bootstrap
- hosts: '{{ hosts }}'
strategy: free
@@ -26,79 +40,12 @@
roles:
- opdk-setup-silent-installation-config
- opdk-setup-component-installer
+ tags:
+ - installer
- hosts: '{{ hosts }}'
serial: 1
-
- pre_tasks:
- - name: Check for router server self report
- ignore_errors: yes
- opdk_server_self:
- server_type: 'router'
- username: '{{ opdk_user_email }}'
- password: '{{ opdk_user_pass }}'
-
- - name: Check for message processor server self report
- ignore_errors: yes
- opdk_server_self:
- server_type: 'mp'
- username: '{{ opdk_user_email }}'
- password: '{{ opdk_user_pass }}'
-
- - name: Set uuid if router
- set_fact:
- uuid: '{{ edge_router_self.uUID }}'
- when: edge_router_self is defined
-
- - name: Set uuid if message processor
- set_fact:
- uuid: '{{ edge_mp_self.uUID }}'
- when: edge_mp_self is defined
-
- - name: Set reachability to false if set
- ignore_errors: yes
- uri:
- user: '{{ opdk_user_email }}'
- password: '{{ opdk_user_pass }}'
- method: POST
- url: http://{{ local_mgmt_ip }}:{{ ms_ext_mgmt_port }}/v1/servers/{{ uuid }}
- body: reachable=false
- when: uuid is defined
-
roles:
- { role: opdk-setup-component, profile: '{{ component_profile }}' }
-
- tasks:
- - name: Check for router server self report
- ignore_errors: yes
- opdk_server_self:
- server_type: 'router'
- username: '{{ opdk_user_email }}'
- password: '{{ opdk_user_pass }}'
-
- - name: Check for message processor server self report
- ignore_errors: yes
- opdk_server_self:
- server_type: 'mp'
- username: '{{ opdk_user_email }}'
- password: '{{ opdk_user_pass }}'
-
- - name: Set uuid if router
- set_fact:
- uuid: '{{ edge_router_self.uUID }}'
- when: edge_router_self is defined
-
- - name: Set uuid if message processor
- set_fact:
- uuid: '{{ edge_mp_self.uUID }}'
- when: edge_mp_self is defined
-
- - name: Set reachability to true if changed
- ignore_errors: yes
- uri:
- user: '{{ opdk_user_email }}'
- password: '{{ opdk_user_pass }}'
- method: POST
- url: http://{{ local_mgmt_ip }}:{{ ms_ext_mgmt_port }}/v1/servers/{{ uuid }}
- body: reachable=true
- when: uuid is defined
+ tags:
+ - component
diff --git a/installations/dc2/configuration/opdk-set-reachable.yml b/installations/dc2/configuration/opdk-set-reachable.yml
new file mode 100644
index 0000000..f86fc25
--- /dev/null
+++ b/installations/dc2/configuration/opdk-set-reachable.yml
@@ -0,0 +1,10 @@
+---
+- hosts: '{{ hosts }}'
+ strategy: free
+ vars_files:
+ - ~/.apigee/credentials.yml
+ roles:
+ - { role: opdk-set-reachable, reachable: '{{ reachability }}', server_type: 'router' }
+ - { role: opdk-set-reachable, reachable: '{{ reachability }}', server_type: 'mp' }
+ tags:
+ - user
\ No newline at end of file
diff --git a/installations/dc2/installation.yml b/installations/dc2/installation.yml
index 1ede926..71c9c36 100644
--- a/installations/dc2/installation.yml
+++ b/installations/dc2/installation.yml
@@ -6,11 +6,15 @@
- include: configuration/opdk-setup-os.yml
vars:
hosts: 'planet'
+ tags:
+ - os
- include: configuration/update-user.yml
vars:
hosts: 'planet'
user: 'root'
+ tags:
+ - user
- include: components/opdk-install-component.yml
vars:
@@ -34,6 +38,8 @@
vars:
hosts: 'dc-1-ms'
jdk_version: '1.8'
+ tags:
+ - ms
- include: components/opdk-install-component.yml
vars:
@@ -48,6 +54,8 @@
vars:
hosts: 'dc-2-ds'
jdk_version: '1.8'
+ tags:
+ - ms
- include: components/opdk-install-component.yml
vars:
@@ -56,7 +64,14 @@
jdk_version: '1.8'
opdk_ldap_type: '2'
tags:
- - ms2
+ - ms
+
+- include: configuration/opdk-set-reachable.yml
+ vars:
+ hosts: 'dc-1-rmp'
+ reachability: 'false'
+ tags:
+ - rmp
- include: components/opdk-install-component.yml
vars:
@@ -67,6 +82,20 @@
tags:
- rmp
+- include: configuration/opdk-set-reachable.yml
+ vars:
+ hosts: 'dc-2-rmp'
+ reachability: 'true'
+ tags:
+ - rmp
+
+- include: configuration/opdk-set-reachable.yml
+ vars:
+ hosts: 'dc-1-rmp'
+ reachability: 'false'
+ tags:
+ - rmp
+
- include: components/opdk-install-component.yml
vars:
hosts: 'dc-1-rmp'
@@ -76,6 +105,13 @@
tags:
- rmp
+- include: configuration/opdk-set-reachable.yml
+ vars:
+ hosts: 'dc-1-rmp'
+ reachability: 'true'
+ tags:
+ - rmp
+
- include: components/opdk-install-component.yml
vars:
hosts: 'dc-2-qpid'
diff --git a/installations/dc2/requirements.yml b/installations/dc2/requirements.yml
index c6ea9f2..482da57 100644
--- a/installations/dc2/requirements.yml
+++ b/installations/dc2/requirements.yml
@@ -29,6 +29,9 @@
- src: https://github.com/carlosfrias/apigee-opdk-setup-component
name: opdk-setup-component
+- src: https://github.com/carlosfrias/apigee-opdk-set-reachable
+ name: opdk-set-reachable
+
- src: https://github.com/carlosfrias/apigee-opdk-setup-component-installer
name: opdk-setup-component-installer
diff --git a/installations/monetization/configuration/opdk-set-reachable.yml b/installations/monetization/configuration/opdk-set-reachable.yml
new file mode 100644
index 0000000..f86fc25
--- /dev/null
+++ b/installations/monetization/configuration/opdk-set-reachable.yml
@@ -0,0 +1,10 @@
+---
+- hosts: '{{ hosts }}'
+ strategy: free
+ vars_files:
+ - ~/.apigee/credentials.yml
+ roles:
+ - { role: opdk-set-reachable, reachable: '{{ reachability }}', server_type: 'router' }
+ - { role: opdk-set-reachable, reachable: '{{ reachability }}', server_type: 'mp' }
+ tags:
+ - user
\ No newline at end of file