Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 1 | |
| 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | |
Srikanth Vavilapalli | a7ae651 | 2017-02-13 02:29:21 +0000 | [diff] [blame] | 17 | --- |
| 18 | # monitoringservice-onboard/tasks/main.yml |
| 19 | |
| 20 | - name: Disable onboarding |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 21 | command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} {{ head_cord_profile_dir }}/disable-onboarding.yaml" |
Srikanth Vavilapalli | a7ae651 | 2017-02-13 02:29:21 +0000 | [diff] [blame] | 22 | tags: |
| 23 | - skip_ansible_lint # TOSCA loading should be idempotent |
| 24 | |
| 25 | - name: Have XOS container mount monitoringservice volume |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 26 | command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} {{ head_cord_profile_dir }}/xos-monitoringservice.yaml" |
Srikanth Vavilapalli | a7ae651 | 2017-02-13 02:29:21 +0000 | [diff] [blame] | 27 | tags: |
| 28 | - skip_ansible_lint # TOSCA loading should be idempotent |
| 29 | |
| 30 | - name: Onboard monitoringservice |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 31 | command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} {{ head_cord_profile_dir }}/monitoring-onboard.yaml" |
Srikanth Vavilapalli | a7ae651 | 2017-02-13 02:29:21 +0000 | [diff] [blame] | 32 | tags: |
| 33 | - skip_ansible_lint # TOSCA loading should be idempotent |
| 34 | |
| 35 | - name: Enable onboarding |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 36 | command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} {{ head_cord_profile_dir }}/enable-onboarding.yaml" |
Srikanth Vavilapalli | a7ae651 | 2017-02-13 02:29:21 +0000 | [diff] [blame] | 37 | tags: |
| 38 | - skip_ansible_lint # TOSCA loading should be idempotent |
| 39 | |
| 40 | - name: Wait for monitoring to be onboarded |
| 41 | uri: |
| 42 | url: "http://localhost:{{ xos_bootstrap_ui_port }}/api/utility/onboarding/services/monitoring/ready/" |
| 43 | method: GET |
| 44 | return_content: yes |
| 45 | register: xos_onboard_status |
| 46 | until: '"true" in xos_onboard_status.content' |
| 47 | retries: 60 |
| 48 | delay: 2 |
| 49 | |
| 50 | - name: Wait for XOS to be onboarded after monitoringservice onboarding |
| 51 | uri: |
| 52 | url: "http://localhost:{{ xos_bootstrap_ui_port }}/api/utility/onboarding/xos/ready/" |
| 53 | method: GET |
| 54 | return_content: yes |
| 55 | register: xos_onboard_status |
| 56 | until: '"true" in xos_onboard_status.content' |
| 57 | retries: 60 |
| 58 | delay: 2 |
| 59 | |