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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
17 start_time: "{{ lookup('pipe', 'date +%Y%m%d-%H:%M:%S') }}"
20 path: "/var/log/sw_package_load.log"
26 dest: "/var/log/sw_package_load.log"
28 line: "start_time: {{ start_time }}"
32 - name: Compose the device path of swift volume on Openstack
34 swift_dev: "/dev/disk/by-id/virtio-{{ swift_volume }}"
36 - name: Run what_is_the_filesystem.yml
39 tasks_from: what_is_the_filesystem.yml
41 device: "{{swift_dev}}"
43 - name: Mount the device
45 name: /srv/node/swift-update/
47 fstype: "{{ filesystem_type.stdout | lower | default('ext4') }}"
50 when: swift_volume is defined and swift_volume != ""
53 - name: Compose the device path of swift volume on BareMetal
55 swift_dev: "{{ swift_image_path }}"
57 - name: Run what_is_the_filesystem.yml
60 tasks_from: what_is_the_filesystem.yml
62 device: "{{swift_dev}}"
64 - name: Mount the device
66 name: /srv/node/swift-update/
68 fstype: "{{ filesystem_type.stdout | lower | default('ext4') }}"
71 when: swift_image_path is defined and swift_image_path != ""
73 - name: Prepare mount dir
75 path: /srv/node/swift-update/
84 - include: tasks/start_vnfc.yml
88 - swift_update_service
89 - docker-registry-update
90 - update_registry_service
92 - include: tasks/wait_pod_start.yml
97 - name: wait for container service - swift-update
99 host: "{{ groups.caas_master[0] }}"
100 port: "{{ caas.update_swift_port }}"
104 - include: tasks/wait_pod_start.yml
106 name: registry-update
109 - name: wait for registry-update kubernetes service to start
111 host: "{{ caas.update_registry_url }}"
112 port: "{{ caas.update_registry_port }}"
117 - name: wait for swift-update kubernetes service to start
119 host: "{{ caas.swift_update_url }}"
120 port: "{{ caas.update_swift_port }}"
124 - include: merge-charts.yml
125 - include: merge-images.yml
129 msg: Something went wrong during merge.
132 - name: clean after charts upload
137 - name: Delete the registry and swift for su
138 shell: kubectl delete -f {{ caas.manifests_directory }}/{{item}}
140 - update_registry_service.yml
141 - docker-registry-update.yml
142 - swift_update_service.yml
145 - name: Wait for registry and swift deleted
146 shell: kubectl get pods --all-namespaces | grep -c {{item}}
148 until: ret_rc.stdout == "0"
149 failed_when: ret_rc.stdout == ""
156 - name: Umount the device of the new swift volume
158 name: /srv/node/swift-update/
163 - name: Make sure the fstab entry is removed
165 name: /srv/node/swift-update/
171 dest: "/var/log/sw_package_load.log"
173 line: "end_time: {{ lookup('pipe', 'date +%Y%m%d-%H:%M:%S') }}"