Zack Williams | 41513bf | 2018-07-07 20:08:35 -0700 | [diff] [blame] | 1 | # 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 Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 14 | - name: "VOLT-HA Deploy | Add Namespace" |
Stephane Barbarie | 2cbffca | 2018-03-26 16:20:03 -0400 | [diff] [blame] | 15 | command: kubectl apply -f {{ target_voltha_home }}/k8s/namespace.yml |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 16 | run_once: true |
| 17 | |
| 18 | # Ingress |
| 19 | - name: "VOLT-HA Deploy | Start Ingress Controller" |
Stephane Barbarie | 2cbffca | 2018-03-26 16:20:03 -0400 | [diff] [blame] | 20 | command: kubectl apply -f {{ target_voltha_home }}/k8s/ingress |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 21 | 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 Barbarie | 2cbffca | 2018-03-26 16:20:03 -0400 | [diff] [blame] | 34 | command: kubectl apply -f {{ target_voltha_home }}/k8s/zookeeper.yml |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 35 | 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 Barbarie | 2cbffca | 2018-03-26 16:20:03 -0400 | [diff] [blame] | 47 | command: kubectl apply -f {{ target_voltha_home }}/k8s/kafka.yml |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 48 | 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 Barbarie | 2cbffca | 2018-03-26 16:20:03 -0400 | [diff] [blame] | 54 | # 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 Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 58 | |
Stephane Barbarie | 2cbffca | 2018-03-26 16:20:03 -0400 | [diff] [blame] | 59 | # Fluentd |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 60 | - name: "VOLT-HA Deploy | Start fluentd" |
Stephane Barbarie | 2cbffca | 2018-03-26 16:20:03 -0400 | [diff] [blame] | 61 | command: kubectl apply -f {{ target_voltha_home }}/k8s/fluentd.yml |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 62 | 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 Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 69 | run_once: true |
| 70 | |
Stephane Barbarie | 78d9fa6 | 2018-04-19 14:11:05 -0400 | [diff] [blame] | 71 | # 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 Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 74 | run_once: true |
| 75 | |
Stephane Barbarie | 78d9fa6 | 2018-04-19 14:11:05 -0400 | [diff] [blame] | 76 | - 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 Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 78 | run_once: true |
| 79 | |
Stephane Barbarie | 78d9fa6 | 2018-04-19 14:11:05 -0400 | [diff] [blame] | 80 | - name: "VOLT-HA Deploy | Start etcd operator" |
| 81 | command: kubectl apply -f {{ target_voltha_home }}/k8s/operator/etcd/operator.yml |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 82 | run_once: true |
| 83 | |
Stephane Barbarie | 78d9fa6 | 2018-04-19 14:11:05 -0400 | [diff] [blame] | 84 | - 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 Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 98 | 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 Barbarie | 2cbffca | 2018-03-26 16:20:03 -0400 | [diff] [blame] | 103 | command: kubectl apply -f {{ target_voltha_home }}/k8s/ofagent.yml |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 104 | 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 Barbarie | 78d9fa6 | 2018-04-19 14:11:05 -0400 | [diff] [blame] | 110 | # 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 Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 113 | run_once: true |
| 114 | |
Stephane Barbarie | 78d9fa6 | 2018-04-19 14:11:05 -0400 | [diff] [blame] | 115 | - name: "VOLT-HA Deploy | Wait for Envoy (for etcd) to be ready" |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 116 | 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 Barbarie | 2cbffca | 2018-03-26 16:20:03 -0400 | [diff] [blame] | 121 | command: kubectl apply -f {{ target_voltha_home }}/k8s/vcli.yml |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 122 | 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 Barbarie | 2cbffca | 2018-03-26 16:20:03 -0400 | [diff] [blame] | 130 | command: kubectl apply -f {{ target_voltha_home }}/k8s/netconf.yml |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 131 | 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 Barbarie | 2cbffca | 2018-03-26 16:20:03 -0400 | [diff] [blame] | 139 | command: kubectl apply -f {{ target_voltha_home }}/k8s/grafana.yml |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 140 | 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 Barbarie | 2cbffca | 2018-03-26 16:20:03 -0400 | [diff] [blame] | 150 | command: kubectl apply -f {{ target_voltha_home }}/k8s/stats.yml |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 151 | 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 |