blob: 3a4f88a05fe5cad48f9c80a6550e94225370f234 [file] [log] [blame]
Jordan Haltermanca7660a2018-04-04 23:43:23 -07001<!--
2 ~ Copyright 2018-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<scenario name="rolling-upgrade" description="ONOS cluster rolling upgrade">
17 <import file="${ONOS_SCENARIOS}/dist-setup.xml"/>
18 <dependency name="Distributed-Primitives-Setup"/>
19
20 <group name="Upgrade" requires="Distributed-Primitives-Setup">
21 <step name="Push-Bits" exec="onos-push-bits-through-proxy" if="${OCT}"/>
22
23 <group name="Perform-Upgrade">
24 <sequential var="${OC#}"
25 starts="Stop-Service-${#}"
26 ends="Wait-for-Start-${#-1}">
27 <step name="Stop-Service-${#}"
28 exec="onos-service ${OC#} stop"/>
29
30 <step name="Wait-for-Stop-${#}"
31 exec="onos-wait-for-stop ${OC#}"
32 requires="~Stop-Service-${#}"/>
33
34 <step name="Uninstall-${#}"
35 exec="onos-uninstall ${OC#}"
36 requires="~Wait-for-Stop-${#}"/>
37
38 <step name="Push-Bits-${#}"
39 exec="onos-push-bits ${OC#}"
40 unless="${OCT}"
41 requires="~Stop-Service-${#}"/>
42
43 <step name="Install-Upgrade-${#}"
44 exec="onos-install -v ${OC#}"
45 requires="Push-Bits-${#},Push-Bits,Uninstall-${#}"/>
46
47 <step name="Secure-SSH-${#}"
48 exec="onos-secure-ssh -u ${ONOS_WEB_USER} -p ${ONOS_WEB_PASS} ${OC#}"
49 requires="~Install-Upgrade-${#}"/>
50
51 <step name="Wait-for-Start-${#}"
52 exec="onos-wait-for-start ${OC#}"
53 requires="Secure-SSH-${#}"/>
54
55 <step name="Distributed-Primitives-Check-Apps-${#}"
56 exec="onos-check-apps ${OC#} distributedprimitives includes"
57 requires="Wait-for-Start-${#}"/>
58 </sequential>
59 </group>
60
61 <group name="Verify-Upgrade" requires="Perform-Upgrade">
62 <parallel var="${OC#}">
63 <step name="Check-Nodes-${#}"
64 exec="onos-check-nodes ${OC#}"
65 delay="3"/>
66
67 <step name="Check-Components-${#}"
68 exec="onos-check-components ${OC#}"
69 delay="5"
70 requires="~Check-Nodes-${#}"/>
71
72 <step name="Check-Logs-${#}"
73 exec="onos-check-logs ${OC#}"
74 requires="~Check-Components-${#}"/>
75
76 <step name="Check-Apps-${#}"
77 exec="onos-check-apps ${OC#} ${ONOS_APPS},distributedprimitives includes"
78 requires="~Check-Components-${#}"/>
79 </parallel>
80 </group>
81 </group>
82</scenario>