xos container sanity tests across all profiles
Change-Id: I576b29ee4f0ea72cc76f1dfb8969bf1d5b21dc81
diff --git a/roles/xos-container-test-addressmanager/tasks/main.yml b/roles/xos-container-test-addressmanager/tasks/main.yml
new file mode 100644
index 0000000..4e34503
--- /dev/null
+++ b/roles/xos-container-test-addressmanager/tasks/main.yml
@@ -0,0 +1,25 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+#xos-addressmanager-sync tests
+
+- name: Check XOS AddressManager Synchronizer Process
+ shell: ps -f | grep "python addressmanager-synchronizer.py -C /opt/xos/synchronizers/addressmanager/addressmanager_synchronizer_config"
+ register: result
+ until: result | success
+ retries: 10
+ delay: 5
+ tags:
+ - skip_ansible_lint # running a sub job
diff --git a/roles/xos-container-test-core/tasks/main.yml b/roles/xos-container-test-core/tasks/main.yml
index 7ed885d..56312e7 100644
--- a/roles/xos-container-test-core/tasks/main.yml
+++ b/roles/xos-container-test-core/tasks/main.yml
@@ -1,4 +1,3 @@
-
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,8 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
-#xos-spa-gui tests
+#xos-core tests
- name: Check XOS Core Process
shell: ps -f | grep "bash -c cd coreapi; bash ./start_coreapi.sh"
diff --git a/roles/xos-container-test-fabric/tasks/main.yml b/roles/xos-container-test-fabric/tasks/main.yml
index 8b61b21..cacbe7e 100644
--- a/roles/xos-container-test-fabric/tasks/main.yml
+++ b/roles/xos-container-test-fabric/tasks/main.yml
@@ -1,4 +1,3 @@
-
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/roles/xos-container-test-onos/tasks/main.yml b/roles/xos-container-test-onos/tasks/main.yml
index 0b98e27..4585b1f 100644
--- a/roles/xos-container-test-onos/tasks/main.yml
+++ b/roles/xos-container-test-onos/tasks/main.yml
@@ -1,4 +1,3 @@
-
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
#xos-onos-sync tests
- name: Check XOS ONOS Synchronizer Process
diff --git a/roles/xos-container-test-openstack/tasks/main.yml b/roles/xos-container-test-openstack/tasks/main.yml
index 061af56..896a84f 100644
--- a/roles/xos-container-test-openstack/tasks/main.yml
+++ b/roles/xos-container-test-openstack/tasks/main.yml
@@ -1,4 +1,3 @@
-
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
#xos-openstack-sync tests
- name: Check XOS Openstack Synchronizer Process
diff --git a/roles/xos-container-test-postgres/tasks/main.yml b/roles/xos-container-test-postgres/tasks/main.yml
new file mode 100644
index 0000000..6c81a8f
--- /dev/null
+++ b/roles/xos-container-test-postgres/tasks/main.yml
@@ -0,0 +1,32 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#xos-postgres tests
+
+- name: Check PSQL Service Status
+ service:
+ name: postgresql
+ state: started
+ tags:
+ - skip_ansible_lint # running a sub job
+
+- name: Check PSQL Service Version/Port
+ shell: service postgresql status | grep "{{ item }}"
+ register: result
+ with_items:
+ - 9.6/main
+ - port 5432
+ - online
+ tags:
+ - skip_ansible_lint # running a sub job
diff --git a/roles/xos-container-test-vee/tasks/main.yml b/roles/xos-container-test-vee/tasks/main.yml
index 3727191..d822011 100644
--- a/roles/xos-container-test-vee/tasks/main.yml
+++ b/roles/xos-container-test-vee/tasks/main.yml
@@ -1,4 +1,3 @@
-
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/roles/xos-container-test-veg/tasks/main.yml b/roles/xos-container-test-veg/tasks/main.yml
index 07ddfe8..46e969d 100644
--- a/roles/xos-container-test-veg/tasks/main.yml
+++ b/roles/xos-container-test-veg/tasks/main.yml
@@ -1,4 +1,3 @@
-
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/roles/xos-container-test-vnaas/tasks/main.yml b/roles/xos-container-test-vnaas/tasks/main.yml
new file mode 100644
index 0000000..482c843
--- /dev/null
+++ b/roles/xos-container-test-vnaas/tasks/main.yml
@@ -0,0 +1,25 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+#xos-vnod-sync tests
+
+- name: Check XOS VNAAS Synchronizer Process
+ shell: ps -f | grep "python vnaas-synchronizer.py -C /opt/xos/synchronizers/vnaas/vnaas_synchronizer_config"
+ register: result
+ until: result | success
+ retries: 10
+ delay: 5
+ tags:
+ - skip_ansible_lint # running a sub job
diff --git a/roles/xos-container-test-vnod/tasks/main.yml b/roles/xos-container-test-vnod/tasks/main.yml
index a6d5e58..d949ce4 100644
--- a/roles/xos-container-test-vnod/tasks/main.yml
+++ b/roles/xos-container-test-vnod/tasks/main.yml
@@ -1,4 +1,3 @@
-
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/roles/xos-container-test-volt/tasks/main.yml b/roles/xos-container-test-volt/tasks/main.yml
new file mode 100644
index 0000000..8c9092e
--- /dev/null
+++ b/roles/xos-container-test-volt/tasks/main.yml
@@ -0,0 +1,25 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+#xos-volt-sync tests
+
+- name: Check XOS vOLT Synchronizer Process
+ shell: ps -f | grep "python volt-synchronizer.py -C /opt/xos/synchronizers/volt/volt_synchronizer_config"
+ register: result
+ until: result | success
+ retries: 10
+ delay: 5
+ tags:
+ - skip_ansible_lint # running a sub job
diff --git a/roles/xos-container-test-vsg/tasks/main.yml b/roles/xos-container-test-vsg/tasks/main.yml
index 66cd0b0..f310fc2 100644
--- a/roles/xos-container-test-vsg/tasks/main.yml
+++ b/roles/xos-container-test-vsg/tasks/main.yml
@@ -1,4 +1,3 @@
-
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/roles/xos-container-test-vtn/tasks/main.yml b/roles/xos-container-test-vtn/tasks/main.yml
deleted file mode 100644
index b507371..0000000
--- a/roles/xos-container-test-vtn/tasks/main.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-#xos-vtn-sync tests
-
-- name: Check XOS VTN Synchronizer Process
- shell: ps -f | grep "python vtn-synchronizer.py -C /opt/xos/synchronizers/vtn/vtn_synchronizer_config"
- register: result
- until: result | success
- retries: 10
- delay: 5
- tags:
- - skip_ansible_lint # running a sub job
-
-- name: Get Volume Mounts on XOS VTN Synchronizer Container
- shell: mount -l | grep xos_services
- register: volumes
- tags:
- - skip_ansible_lint # running a sub job
-
-- name: Validate Volume Mounts on XOS VTN Synchronizer Container
- assert:
- that: "'/opt/xos_services/{{ item.name }}' in volumes.stdout|lower"
- with_items: "{{ xos_services }}"
- when:
- - "'{{ item.name }}' != 'vnodlocal'"
- - "'{{ item.name }}' != 'volt'"
\ No newline at end of file
diff --git a/roles/xos-container-test-vtr/tasks/main.yml b/roles/xos-container-test-vtr/tasks/main.yml
deleted file mode 100644
index bda83a9..0000000
--- a/roles/xos-container-test-vtr/tasks/main.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-#xos-vtr-sync tests
-
-- name: Check XOS VTR Synchronizer Process
- shell: ps -f | grep "python vtr-synchronizer.py -C /opt/xos/synchronizers/vtr/vtr_synchronizer_config"
- register: result
- until: result | success
- retries: 10
- delay: 5
- tags:
- - skip_ansible_lint # running a sub job
-
-- name: Get Volume Mounts on XOS VTR Synchronizer Container
- shell: mount -l | grep xos_services
- register: volumes
- tags:
- - skip_ansible_lint # running a sub job
-
-- name: Validate Volume Mounts on XOS VTR Synchronizer Container
- assert:
- that: "'/opt/xos_services/{{ item.name }}' in volumes.stdout|lower"
- with_items: "{{ xos_services }}"
- when:
- - "'{{ item.name }}' != 'vnodlocal'"
- - "'{{ item.name }}' != 'volt'"
\ No newline at end of file
diff --git a/roles/xos-container-test-ws/tasks/main.yml b/roles/xos-container-test-ws/tasks/main.yml
new file mode 100644
index 0000000..002b193
--- /dev/null
+++ b/roles/xos-container-test-ws/tasks/main.yml
@@ -0,0 +1,25 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#xos-ws tests
+
+- name: Check Rest GW Process
+ shell: ps -f | grep "node src/server.js --config gateway-config.yml"
+ register: result
+ until: result | success
+ retries: 10
+ delay: 5
+ tags:
+ - skip_ansible_lint # running a sub job
+
diff --git a/xos-container-test.yml b/xos-container-test.yml
new file mode 100644
index 0000000..f8b0ffd
--- /dev/null
+++ b/xos-container-test.yml
@@ -0,0 +1,208 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+---
+
+- name: Include vars
+ hosts: all
+ tasks:
+ - name: Include variables
+ include_vars: "{{ item }}"
+ with_items:
+ - "{{ playbook_dir }}/profile_manifests/{{ cord_profile }}.yml"
+ - "{{ playbook_dir }}/profile_manifests/local_vars.yml"
+ tags:
+ - rcord
+ - ecord
+ - ecord-global
+ - mcord
+
+- name: Add xos onboarded containers to inventory to test
+ hosts: head
+ roles:
+ - xos-onboard-hosts
+ tags:
+ - rcord
+ - ecord
+ - ecord-global
+ - mcord
+
+- name: Check UI Container
+ hosts: xos_ui
+ connection: docker
+ roles:
+ - xos-container-test-ui
+ tags:
+ - rcord
+ - ecord
+ - ecord-global
+ - mcord
+
+- name: Check Chameleon Container
+ hosts: xos_chameleon
+ connection: docker
+ roles:
+ - xos-container-test-chameleon
+ tags:
+ - rcord
+ - ecord
+ - ecord-global
+ - mcord
+
+- name: Check XOS Core Container
+ hosts: xos_core
+ connection: docker
+ roles:
+ - xos-container-test-core
+ tags:
+ - rcord
+ - ecord
+ - ecord-global
+ - mcord
+
+- name: Check XOS WS Container
+ hosts: xos_ws
+ connection: docker
+ roles:
+ - xos-container-test-ws
+ tags:
+ - rcord
+ - ecord
+ - ecord-global
+
+- name: Check XOS DB Container
+ hosts: xos_db
+ connection: docker
+ roles:
+ - xos-container-test-postgres
+ tags:
+ - rcord
+ - ecord
+ - ecord-global
+ - mcord
+
+- name: Check XOS Openstack Synchronizer Container
+ hosts: openstack-synchronizer
+ connection: docker
+ roles:
+ - xos-container-test-openstack
+ tags:
+ - rcord
+ - ecord
+ - ecord-global
+ - mcord
+
+- name: Check XOS ONOS Synchronizer Container
+ hosts: onos-synchronizer
+ connection: docker
+ roles:
+ - xos-container-test-onos
+ tags:
+ - rcord
+ - ecord
+ - ecord-global
+ - mcord
+
+- name: Check XOS Fabric Synchronizer Container
+ hosts: fabric-synchronizer
+ connection: docker
+ roles:
+ - xos-container-test-fabric
+ tags:
+ - rcord
+ - ecord
+ - ecord-global
+ - mcord
+
+- name: Check XOS VROUTER Synchronizer Container
+ hosts: vrouter-synchronizer
+ connection: docker
+ roles:
+ - xos-container-test-vrouter
+ tags:
+ - rcord
+ - ecord
+
+- name: Check XOS VOLT Synchronizer Container
+ hosts: volt-synchronizer
+ connection: docker
+ roles:
+ - xos-container-test-volt
+ tags:
+ - rcord
+
+- name: Check XOS VSG Synchronizer Container
+ hosts: vsg-synchronizer
+ connection: docker
+ roles:
+ - xos-container-test-vsg
+ tags:
+ - rcord
+
+- name: Check XOS VTR Synchronizer Container
+ hosts: vtr-synchronizer
+ connection: docker
+ roles:
+ - xos-container-test-vtr
+ tags:
+ - rcord
+
+- name: Check XOS AddressManager Synchronizer Container
+ hosts: addressmanager-synchronizer
+ connection: docker
+ roles:
+ - xos-container-test-addressmanager
+ tags:
+ - rcord
+
+- name: Check XOS VTN Synchronizer Container
+ hosts: vtn-synchronizer
+ connection: docker
+ roles:
+ - xos-container-test-vtn
+ tags:
+ - rcord
+ - ecord
+
+- name: Check XOS VEG Synchronizer Container
+ hosts: veg-synchronizer
+ connection: docker
+ roles:
+ - xos-container-test-veg
+ tags:
+ - ecord
+
+- name: Check XOS VNOD Synchronizer Container
+ hosts: vnod-synchronizer
+ connection: docker
+ roles:
+ - xos-container-test-vnod
+ tags:
+ - ecord
+
+- name: Check XOS VEE Synchronizer Container
+ hosts: vee-synchronizer
+ connection: docker
+ roles:
+ - xos-container-test-vee
+ tags:
+ - ecord
+
+- name: Check XOS VNAAS Synchronizer Container
+ hosts: vnaas-synchronizer
+ connection: docker
+ roles:
+ - xos-container-test-vnaas
+ tags:
+ - ecord-global