aboutsummaryrefslogtreecommitdiffstats
path: root/laas/actions/workflows/update_image_workflow.yaml
blob: 812b82936d73d2340ef1c46cc4dd6a1311fd5b4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
---
##############################################################################
# Copyright 2019 Sawyer Bergeron and Others                                 #
#                                                                            #
# 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.                                             #
##############################################################################

version: 1.0

description: "Updates the given image using the given host for scratch space"
input:
  - host  # stackstorm recognized host handle
  - update_from_image  # image to apply to the host and update
  - update_from_os  # os to apply to the host and update
  - update_into_image  # image to save the updated image into
  - update_into_os  # os to save the updated image into
tasks:
  get_target_image:  # primary entry point
    action: laas.fog_getTargetImage
    input:
      host: <% ctx().host %>
      from_image: <% ctx().update_from_image %>
      from_os: <% ctx().update_from_os %>
      target_image: <% ctx().update_into_image %>
      target_os: <% ctx().update_into_os %>
    next:
      - when: <% succeeded() %>
        publish:
          - target_image: <% result().result %>
        do: prepare_host

  prepare_host:
    action: laas.add_management_vlan
    input:
      hosts: <% list(ctx().host) %>
    next:
      - when: <% succeeded() %>
        do: get_ipmi_name

  get_ipmi_name:
    action: laas.get_ipmi_hostname
    input:
      host: <% ctx().host %>
    next:
      - when: <% succeeded() %>
        publish:
          - ipmi_name: <% result().result %>
        do: ping_ipmi

  ping_ipmi:
    action: laas.wait_for_host
    input:
      hostname: <% ctx().ipmi_name %>
      timeout: 200
    next:
      - when: <% succeeded() %>
        do: set_boot

  set_boot:
    action: laas.set_boot_workflow
    input:
      host: <% ctx().host %>
    next:
      - when: <% succeeded %>
        do: image_host

  image_host:
    action: laas.fog_imageWorkflow
    input:
      host: <% ctx().host %>
      image: <% ctx().update_from_image %>
      os: <% ctx().update_from_os %>
    next:
      - when: <% succeeded() %>
        do: run_updates

  run_updates:
    action: laas.update
    input:
      hosts: <% ctx().host %>
      timeout: 900
    next:
      - when: <% succeeded() %>
        do: capture_image

  capture_image:  # exit node
    action: laas.fog_captureWorkflow
    input:
      host: <% ctx().host %>
      image: <% ctx().target_image %>
y-ha.yaml %{_sysconfdir}/opnfv-apex/os-odl-bgpvpn_rocky-noha.yaml %{_sysconfdir}/opnfv-apex/os-odl-sfc-ha.yaml %{_sysconfdir}/opnfv-apex/os-odl-sfc-noha.yaml %{_sysconfdir}/opnfv-apex/os-odl-sfc_rocky-ha.yaml %{_sysconfdir}/opnfv-apex/os-odl-sfc_rocky-noha.yaml %{_sysconfdir}/opnfv-apex/os-odl-fdio-noha.yaml %{_sysconfdir}/opnfv-apex/os-odl_netvirt-fdio-noha.yaml %{_sysconfdir}/opnfv-apex/os-odl-fdio-ha.yaml %{_sysconfdir}/opnfv-apex/os-odl-fdio_dvr-ha.yaml %{_sysconfdir}/opnfv-apex/os-odl-fdio_dvr-noha.yaml %{_sysconfdir}/opnfv-apex/os-odl-l2gw-ha.yaml %{_sysconfdir}/opnfv-apex/os-odl-l2gw-noha.yaml %{_sysconfdir}/opnfv-apex/os-odl-ovs_dpdk-noha.yaml %{_sysconfdir}/opnfv-apex/os-odl-ovs_dpdk-ha.yaml %{_sysconfdir}/opnfv-apex/os-odl-nofeature-ha.yaml %{_sysconfdir}/opnfv-apex/os-odl-nofeature-noha.yaml %{_sysconfdir}/opnfv-apex/os-odl-sriov-ha.yaml %{_sysconfdir}/opnfv-apex/os-odl-sriov-noha.yaml %{_sysconfdir}/opnfv-apex/os-odl-gluon-noha.yaml %{_sysconfdir}/opnfv-apex/os-ovn-nofeature-ha.yaml %{_sysconfdir}/opnfv-apex/os-ovn-rocky-ha.yaml %{_sysconfdir}/opnfv-apex/os-onos-nofeature-ha.yaml %{_sysconfdir}/opnfv-apex/os-onos-sfc-ha.yaml %{_sysconfdir}/opnfv-apex/os-ocl-nofeature-ha.yaml %{_sysconfdir}/opnfv-apex/network_settings.yaml %{_sysconfdir}/opnfv-apex/network_settings_csit.yaml %{_sysconfdir}/opnfv-apex/network_settings_vlans.yaml %{_sysconfdir}/opnfv-apex/network_settings_v6.yaml %{_sysconfdir}/opnfv-apex/k8s-nosdn-nofeature-noha.yaml %{_sysconfdir}/opnfv-apex/network_settings_tenant_vlan.yaml %doc %{_docdir}/opnfv/LICENSE.rst %doc %{_docdir}/opnfv/installation-instructions.html %doc %{_docdir}/opnfv/release-notes.rst %doc %{_docdir}/opnfv/release-notes.html %doc %{_docdir}/opnfv/deploy_settings.yaml.example %doc %{_docdir}/opnfv/network_settings.yaml.example %doc %{_docdir}/opnfv/network_settings_v6.yaml.example %doc %{_docdir}/opnfv/inventory.yaml.example %changelog * Thu Sep 27 2018 Tim Rozet <trozet@redhat.com> - 8.0-0 Updates from Queens to Rocky * Fri Aug 24 2018 Tim Rozet <trozet@redhat.com> - 7.0-7 Add Calipso for Queens * Tue Aug 21 2018 Ricardo Noriega <rnoriega@redhat.com> - 7.0-6 Enable SFC scenarios for Gambia * Tue Aug 14 2018 Tim Rozet <trozet@redhat.com> - 7.0-5 Adds common patches file * Wed Jun 27 2018 Feng Pan <fpan@redhat.com> - 7.0-4 Adds network_settings_tenant_vlan.yaml * Wed Jun 20 2018 Zenghui Shi <zshi@redhat.com> - 7.0-3 Adds Kubernetes deployment scenario * Fri Jun 15 2018 Tim Rozet <trozet@redhat.com> - 7.0-2 Adds missing HA deploy settings for Queens * Fri May 25 2018 Tim Rozet <trozet@redhat.com> - 7.0-1 Adds CSIT network settings file * Wed May 02 2018 Tim Rozet <trozet@redhat.com> - 7.0-0 Updates master with new version and deploy settings * Tue Apr 17 2018 Feng Pan <fpan@redhat.com> - 6.0-4 Removes network_settings_vpp.yaml * Tue Apr 03 2018 Tim Rozet <trozet@redhat.com> - 6.0-3 Adds fetch logs * Fri Mar 09 2018 Tim Rozet <trozet@redhat.com> - 6.0-2 Add upstream deploy files with containers * Wed Feb 14 2018 Tim Rozet <trozet@redhat.com> - 6.0-1 Fix docutils requirement and add python34-distro * Wed Nov 29 2017 Tim Rozet <trozet@redhat.com> - 6.0-0 Bump version for Fraser * Wed Oct 25 2017 Tim Rozet <trozet@redhat.com> - 5.0-9 - Adds GitPython and pygerrit2 dependencies * Mon Oct 2 2017 Tim Rozet <trozet@redhat.com> - 5.0-8 - Adds upstream deployment scenario * Wed Sep 20 2017 Tim Rozet <trozet@redhat.com> - 5.0-7 - Add calipso * Fri Sep 08 2017 Tim Rozet <trozet@redhat.com> - 5.0-6 - Updates clean to use python * Wed Aug 23 2017 Tim Rozet <trozet@redhat.com> - 5.0-5 - Updated requirements * Mon Aug 14 2017 Tim Rozet <trozet@redhat.com> - 5.0-4 - Updated for python refactoring * Mon May 08 2017 Dan Radez <dradez@redhat.com> - 5.0-3 - adding configure-vm * Tue Apr 11 2017 Dan Radez <dradez@redhat.com> - 5.0-2 - Remove l2 scenario files * Tue Apr 04 2017 Dan Radez <dradez@redhat.com> - 5.0-1 - Version update for Euphrates - rename to ovs_dpdk * Wed Mar 29 2017 Dan Radez <dradez@redhat.com> - 4.0-9 - Remove odl_l2-nofeature scenario file - rename all odl_l3 scenario files to odl * Thu Mar 23 2017 Tim Rozet <trozet@redhat.com> - 4.0-8 - Adds os-odl_l3-ovs-ha and noha scenarios * Sun Mar 12 2017 Feng Pan <fpan@redhat.com> - 4.0-7 - Add os-nosdn-fdio-ha.yaml * Fri Mar 10 2017 Feng Pan <fpan@redhat.com> - 4.0-6 - Add os-odl_l3-fdio-noha.yaml and os-odl_l3-fdio-ha.yaml * Wed Mar 08 2017 Dan Radez <dradez@redhat.com> - 4.0-5 - Adding kvm4nfv files - Adding OVN files * Tue Feb 14 2017 Feng Pan <fpan@redhat.com> - 4.0-4 - Add network_settings_vpp.yaml * Fri Feb 3 2017 Nikolas Hermanns <nikolas.hermanns@ericsson.com> - 4.0-3 - change odl_l3-gluon-noha to odl-gluon-noha * Thu Feb 2 2017 Feng Pan <fpan@redhat.com> - 4.0-2 - Add odl_l3-gluon-noha config file * Wed Nov 2 2016 Dan Radez <dradez@redhat.com> - 4.0-1 - Version update for Danube * Fri Sep 16 2016 Dan Radez <dradez@redhat.com> - 3.0-13 - adding bash completion script * Tue Aug 30 2016 Tim Rozet <trozet@redhat.com> - 3.0-12 - Add clean library. * Mon Aug 1 2016 Tim Rozet <trozet@redhat.com> - 3.0-11 - Add nosdn fdio scenarios. * Tue Jul 5 2016 Dan Radez <dradez@redhat.com> - 3.0-10 - Adding functions.sh files * Wed Jun 15 2016 Tim Rozet <trozet@redhat.com> - 3.0-9 - Add fdio scenarios. * Tue Jun 14 2016 Feng Pan <fpan@redhat.com> - 3.0-8 - Add network_settings_v6.yaml * Thu Jun 2 2016 Michael Chapman <michapma@redhat.com> - 3.0-7 - Add custom libvirt domain.xml. * Wed Jun 1 2016 Feng Pan <fpan@redhat.com> - 3.0-6 - Add performance deployment file * Sun May 15 2016 Feng Pan <fpan@redhat.com> - 3.0-5 - Fixes python3 dependency. * Sun May 8 2016 Feng Pan <fpan@redhat.com> - 3.0-4 - Adds dependency for python34-setuptools * Fri Apr 22 2016 Feng Pan <fpan@redhat.com> - 3.0-3 - Adds python network setting parsing lib. * Fri Apr 15 2016 Feng Pan <fpan@redhat.com> - 3.0-2 - Adds python ip utility lib. * Mon Apr 11 2016 Tim Rozet <trozet@redhat.com> - 3.0-1 - adding opnfv-util * Mon Apr 04 2016 Dan Radez <dradez@redhat.com> - 3.0-0 - Version update for Colorado * Mon Apr 04 2016 Dan Radez <dradez@redhat.com> - 2.2-0 - adding dependencies initscripts net-tools iputils iproute iptables * Wed Jan 27 2016 Tim Rozet <trozet@redhat.com> - 2.1-4 - Adds example inventory file and nosdn scenario * Wed Jan 20 2016 Dan Radez <dradez@redhat.com> - 2.1-3 - Updating the installation instructions * Thu Jan 14 2016 Dan Radez <dradez@redhat.com> - 2.1-2 - Package Split