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 BareMetal
34 swift_dev: "{{ swift_image_path }}"
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_image_path is defined and swift_image_path != ""
52 - name: Prepare mount dir
54 path: /srv/node/swift-update/
63 - include: tasks/start_vnfc.yml
67 - swift_update_service
68 - docker-registry-update
69 - update_registry_service
71 - include: tasks/wait_pod_start.yml
76 - name: wait for container service - swift-update
78 host: "{{ groups.caas_master[0] }}"
79 port: "{{ caas.update_swift_port }}"
83 - include: tasks/wait_pod_start.yml
88 - name: wait for registry-update kubernetes service to start
90 host: "{{ caas.update_registry_url }}"
91 port: "{{ caas.update_registry_port }}"
96 - name: wait for swift-update kubernetes service to start
98 host: "{{ caas.swift_update_url }}"
99 port: "{{ caas.update_swift_port }}"
103 - include: merge-charts.yml
104 - include: merge-images.yml
108 msg: Something went wrong during merge.
111 - name: clean after charts upload
116 - name: Delete the registry and swift for su
117 shell: kubectl delete -f {{ caas.manifests_directory }}/{{item}}
119 - update_registry_service.yml
120 - docker-registry-update.yml
121 - swift_update_service.yml
124 - name: Wait for registry and swift deleted
125 shell: kubectl get pods --all-namespaces | grep -c {{item}}
127 until: ret_rc.stdout == "0"
128 failed_when: ret_rc.stdout == ""
135 - name: Umount the device of the new swift volume
137 name: /srv/node/swift-update/
142 - name: Make sure the fstab entry is removed
144 name: /srv/node/swift-update/
150 dest: "/var/log/sw_package_load.log"
152 line: "end_time: {{ lookup('pipe', 'date +%Y%m%d-%H:%M:%S') }}"