blob: bf4e6a6f3633b070d6ab90efe3054c3d1dc91659 [file] [log] [blame]
Zack Williams41513bf2018-07-07 20:08:35 -07001# Copyright 2017-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
Stephane Barbariebcea2f42018-03-02 18:46:32 -050014- name: "VOLT-HA Deploy | Add Namespace"
Stephane Barbarie2cbffca2018-03-26 16:20:03 -040015 command: kubectl apply -f {{ target_voltha_home }}/k8s/namespace.yml
Stephane Barbariebcea2f42018-03-02 18:46:32 -050016 run_once: true
17
18# Ingress
19- name: "VOLT-HA Deploy | Start Ingress Controller"
Stephane Barbarie2cbffca2018-03-26 16:20:03 -040020 command: kubectl apply -f {{ target_voltha_home }}/k8s/ingress
Stephane Barbariebcea2f42018-03-02 18:46:32 -050021 run_once: true
22
23- name: "VOLT-HA Deploy | Wait for Default HTTP backend to be ready"
24 command: kubectl rollout status deployment/default-http-backend -w -n {{ voltha_namespace }}
25 run_once: true
26
27- name: "VOLT-HA Deploy | Wait for Ingress Controller to be ready"
28 command: kubectl rollout status deployment/nginx-ingress-controller -w -n {{ voltha_namespace }}
29 run_once: true
30
31# Zookeeper
32
33- name: "VOLT-HA Deploy | Start zookeeper"
Stephane Barbarie2cbffca2018-03-26 16:20:03 -040034 command: kubectl apply -f {{ target_voltha_home }}/k8s/zookeeper.yml
Stephane Barbariebcea2f42018-03-02 18:46:32 -050035 run_once: true
36
37- name: "VOLT-HA Deploy | Wait for zookeeper to be ready"
38 command: kubectl rollout status statefulset/{{ item }} -w -n {{ voltha_namespace }}
39 with_items:
40 - zookeeper1
41 - zookeeper2
42 - zookeeper3
43 run_once: true
44
45# Kafka
46- name: "VOLT-HA Deploy | Start kafka"
Stephane Barbarie2cbffca2018-03-26 16:20:03 -040047 command: kubectl apply -f {{ target_voltha_home }}/k8s/kafka.yml
Stephane Barbariebcea2f42018-03-02 18:46:32 -050048 run_once: true
49
50- name: "VOLT-HA Deploy | Wait for kafka to be ready"
51 command: kubectl rollout status statefulset/kafka -w -n {{ voltha_namespace }}
52 run_once: true
53
Stephane Barbarie2cbffca2018-03-26 16:20:03 -040054# Fluentd Config
55- name: "VOLT-HA Deploy | Add Fluentd Configuration"
56 command: kubectl apply -f {{ target_voltha_home }}/k8s/fluentd-config.yml
57 run_once: true
Stephane Barbariebcea2f42018-03-02 18:46:32 -050058
Stephane Barbarie2cbffca2018-03-26 16:20:03 -040059# Fluentd
Stephane Barbariebcea2f42018-03-02 18:46:32 -050060- name: "VOLT-HA Deploy | Start fluentd"
Stephane Barbarie2cbffca2018-03-26 16:20:03 -040061 command: kubectl apply -f {{ target_voltha_home }}/k8s/fluentd.yml
Stephane Barbariebcea2f42018-03-02 18:46:32 -050062 run_once: true
63
64- name: "VOLT-HA Deploy | Wait for fluentd to be ready"
65 command: kubectl rollout status deployment/{{ item }} -w -n {{ voltha_namespace }}
66 with_items:
67 - fluentdactv
68 - fluentdstby
Stephane Barbariebcea2f42018-03-02 18:46:32 -050069 run_once: true
70
Stephane Barbarie78d9fa62018-04-19 14:11:05 -040071# Etcd
72- name: "VOLT-HA Deploy | Define etcd cluster role"
73 command: kubectl apply -f {{ target_voltha_home }}/k8s/operator/etcd/cluster_role.yml
Stephane Barbariebcea2f42018-03-02 18:46:32 -050074 run_once: true
75
Stephane Barbarie78d9fa62018-04-19 14:11:05 -040076- name: "VOLT-HA Deploy | Define etcd cluster role binding"
77 command: kubectl apply -f {{ target_voltha_home }}/k8s/operator/etcd/cluster_role_binding.yml
Stephane Barbariebcea2f42018-03-02 18:46:32 -050078 run_once: true
79
Stephane Barbarie78d9fa62018-04-19 14:11:05 -040080- name: "VOLT-HA Deploy | Start etcd operator"
81 command: kubectl apply -f {{ target_voltha_home }}/k8s/operator/etcd/operator.yml
Stephane Barbariebcea2f42018-03-02 18:46:32 -050082 run_once: true
83
Stephane Barbarie78d9fa62018-04-19 14:11:05 -040084- name: "VOLT-HA Deploy | Wait for etcd operator to be ready"
85 command: kubectl rollout status deployment/etcd-operator -w -n {{ voltha_namespace }}
86 run_once: true
87
88- name: "VOLT-HA Deploy | Start etcd cluster"
89 command: kubectl apply -f {{ target_voltha_home }}/k8s/operator/etcd/etcd_cluster.yml
90 run_once: true
91
92# Voltha Core (for etcd)
93- name: "VOLT-HA Deploy | Start VOLT-HA core (for etcd)"
94 command: kubectl apply -f {{ target_voltha_home }}/k8s/vcore_for_etcd.yml
95 run_once: true
96
97- name: "VOLT-HA Deploy | Wait for VOLT-HA core (for etcd) to be ready"
Stephane Barbariebcea2f42018-03-02 18:46:32 -050098 command: kubectl rollout status deployment/vcore -w -n {{ voltha_namespace }}
99 run_once: true
100
101# OFagent
102- name: "VOLT-HA Deploy | Start OpenFlow Agent"
Stephane Barbarie2cbffca2018-03-26 16:20:03 -0400103 command: kubectl apply -f {{ target_voltha_home }}/k8s/ofagent.yml
Stephane Barbariebcea2f42018-03-02 18:46:32 -0500104 run_once: true
105
106- name: "VOLT-HA Deploy | Wait for OpenFlow Agent to be ready"
107 command: kubectl rollout status deployment/ofagent -w -n {{ voltha_namespace }}
108 run_once: true
109
Stephane Barbarie78d9fa62018-04-19 14:11:05 -0400110# Envoy (for etcd)
111- name: "VOLT-HA Deploy | Start Envoy (for etcd)"
112 command: kubectl apply -f {{ target_voltha_home }}/k8s/envoy_for_etcd.yml
Stephane Barbariebcea2f42018-03-02 18:46:32 -0500113 run_once: true
114
Stephane Barbarie78d9fa62018-04-19 14:11:05 -0400115- name: "VOLT-HA Deploy | Wait for Envoy (for etcd) to be ready"
Stephane Barbariebcea2f42018-03-02 18:46:32 -0500116 command: kubectl rollout status deployment/voltha -w -n {{ voltha_namespace }}
117 run_once: true
118
119# Voltha CLI
120- name: "VOLT-HA Deploy | Start VOLT-HA CLI"
Stephane Barbarie2cbffca2018-03-26 16:20:03 -0400121 command: kubectl apply -f {{ target_voltha_home }}/k8s/vcli.yml
Stephane Barbariebcea2f42018-03-02 18:46:32 -0500122 run_once: true
123
124- name: "VOLT-HA Deploy | Wait for VOLT-HA CLI to be ready"
125 command: kubectl rollout status deployment/vcli -w -n {{ voltha_namespace }}
126 run_once: true
127
128# NETCONF
129- name: "VOLT-HA Deploy | Start NETCONF"
Stephane Barbarie2cbffca2018-03-26 16:20:03 -0400130 command: kubectl apply -f {{ target_voltha_home }}/k8s/netconf.yml
Stephane Barbariebcea2f42018-03-02 18:46:32 -0500131 run_once: true
132
133- name: "VOLT-HA Deploy | Wait for NETCONF to be ready"
134 command: kubectl rollout status deployment/netconf -w -n {{ voltha_namespace }}
135 run_once: true
136
137# Grafana
138- name: "VOLT-HA Deploy | Start Grafana"
Stephane Barbarie2cbffca2018-03-26 16:20:03 -0400139 command: kubectl apply -f {{ target_voltha_home }}/k8s/grafana.yml
Stephane Barbariebcea2f42018-03-02 18:46:32 -0500140 run_once: true
141 when: monitor_voltha_stats
142
143- name: "VOLT-HA Deploy | Wait for Grafana to be ready"
144 command: kubectl rollout status deployment/grafana -w -n {{ voltha_namespace }}
145 run_once: true
146 when: monitor_voltha_stats
147
148# Dashd and Shovel
149- name: "VOLT-HA Deploy | Start DASHD and SHOVEL"
Stephane Barbarie2cbffca2018-03-26 16:20:03 -0400150 command: kubectl apply -f {{ target_voltha_home }}/k8s/stats.yml
Stephane Barbariebcea2f42018-03-02 18:46:32 -0500151 run_once: true
152 when: monitor_voltha_stats
153
154- name: "VOLT-HA Deploy | Wait for DASHD and SHOVEL to be ready"
155 command: kubectl rollout status deployment/{{ item }} -w -n {{ voltha_namespace }}
156 with_items:
157 - dashd
158 - shovel
159 run_once: true
160 when: monitor_voltha_stats