blob: 5c8db43bcfecbcc5c39fe84416bb5a7df6bc97b3 [file] [log] [blame]
Andy Bavier35053b62018-09-20 13:45:45 -07001SHELL := /bin/bash
2BUILD ?= /tmp
3M ?= $(BUILD)/milestones
4MAKEDIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
5WORKSPACE ?= $(HOME)
Andy Bavier6ce277e2018-10-02 10:29:21 -07006VIRTUALENV ?= $(WORKSPACE)/cord/test
Andy Bavier35053b62018-09-20 13:45:45 -07007SEBAVALUES ?= configs/seba-ponsim.yaml
Kailash Khalasi98dabd02018-10-19 13:00:12 -07008TESTTAGS ?= stable
Andy Bavier35053b62018-09-20 13:45:45 -07009
Zack Williams3bcdc262018-09-27 11:00:38 -070010# used to start logging/monitoring and other infrastructure charts
11INFRA_CHARTS ?=
12INFRA_PREREQS = $(foreach chart,$(INFRA_CHARTS),$(M)/$(chart))
13
Zack Williams2a6a1072019-01-07 11:15:12 -070014DOCKER_VERSION ?= "17.06"
15
16K8S_VERSION ?= "1.12.4"
17
18HELM_VERSION ?= "2.12.1"
19HELM_SHA256SUM ?= "891004bec55431b39515e2cedc4f4a06e93782aa03a4904f2bd742b168160451"
Andy Bavier35053b62018-09-20 13:45:45 -070020HELM_PLATFORM ?= "linux-amd64"
21
Zack Williams2a6a1072019-01-07 11:15:12 -070022KAFKA_CHART_VERSION ?= 0.13.3
Andy Bavier1d5b9922019-01-02 15:30:55 -070023KAFKA_POD := "pod/cord-kafka-0"
Zack Williams3bcdc262018-09-27 11:00:38 -070024
Zack Williams5c16dc82019-01-08 10:57:08 -070025ETCD_OPERATOR_VERSION ?= 0.8.3
26
Zack Williams8fa04e72018-11-04 22:16:58 -070027# Arguments passed to helm install/upgrade for all or specific charts
28HELM_GLOBAL_ARGS ?=
29HELM_NEM_ARGS ?= $(HELM_GLOBAL_ARGS)
30HELM_ONOS_ARGS ?= $(HELM_GLOBAL_ARGS)
31HELM_VOLTHA_ARGS ?= $(HELM_GLOBAL_ARGS)
32
Zack Williamsd0c12f02018-11-21 11:54:36 -070033# Targets
34ponsim: $(M)/siab
35
36bbsim: $(M)/bbsim-tosca
37
38both: BBSIM_DHCP_TOSCA =
39both: $(M)/siab $(M)/bbsim-tosca
Andy Bavier35053b62018-09-20 13:45:45 -070040
Andy Baviere5a16f62018-10-11 14:07:15 -070041# https://ftp.gnu.org/old-gnu/Manuals/make-3.79.1/html_chapter/make_6.html#SEC69
42latest: SEBAVALUES := configs/seba-ponsim-latest.yaml
Andy Bavier2a5a78e2019-01-08 16:47:47 -070043latest: ponsim
Andy Baviere5a16f62018-10-11 14:07:15 -070044
45stable: SEBAVALUES := configs/seba-ponsim.yaml
Andy Bavier2a5a78e2019-01-08 16:47:47 -070046stable: ponsim
Andy Baviere5a16f62018-10-11 14:07:15 -070047
Andy Bavier1d5b9922019-01-02 15:30:55 -070048siab-1.0: SEBAVALUES := configs/siab-v1.0.0.yaml
49siab-1.0: KAFKA_POD := "pod/cord-platform-kafka-0"
50# Parallel make won't work here; need to install seba-1.0.0 before siab
51siab-1.0: $(M)/seba-1.0.0 $(M)/siab
52
Andy Bavier35053b62018-09-20 13:45:45 -070053$(M)/setup:
54 mkdir -p $(M)
55 sudo apt update
56 sudo apt install -y httpie jq software-properties-common
57 sudo swapoff -a
Andy Bavier07779ea2018-10-03 15:13:22 -070058 sudo iptables -P FORWARD ACCEPT
Andy Bavier35053b62018-09-20 13:45:45 -070059 touch $@
60
61/usr/bin/docker: | $(M)/setup
62 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 0EBFCD88
63 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(shell lsb_release -cs) stable"
64 sudo apt update
Zack Williams2a6a1072019-01-07 11:15:12 -070065 sudo apt install -y "docker-ce=${DOCKER_VERSION}*"
Andy Bavier35053b62018-09-20 13:45:45 -070066
67/usr/bin/kubeadm: | $(M)/setup /usr/bin/docker
68 curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
69 echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /tmp/kubernetes.list
70 sudo cp /tmp/kubernetes.list /etc/apt/sources.list.d/kubernetes.list
71 sudo apt update
Zack Williams2a6a1072019-01-07 11:15:12 -070072 sudo apt install -y "kubeadm=${K8S_VERSION}-*" "kubelet=${K8S_VERSION}-*" "kubectl=${K8S_VERSION}-*"
Andy Bavier35053b62018-09-20 13:45:45 -070073
74/usr/local/bin/helm:
75 curl -L -o /tmp/helm.tgz "https://storage.googleapis.com/kubernetes-helm/helm-v${HELM_VERSION}-${HELM_PLATFORM}.tar.gz"
76 echo "${HELM_SHA256SUM} /tmp/helm.tgz" | sha256sum -c -
77 cd /tmp; tar -xzvf helm.tgz; sudo mv ${HELM_PLATFORM}/helm /usr/local/bin/helm
78 sudo chmod a+x /usr/local/bin/helm
79 rm -rf /tmp/helm.tgz /tmp/${HELM_PLATFORM}
80
81$(M)/kubeadm: | $(M)/setup /usr/bin/kubeadm
82 sudo kubeadm init --pod-network-cidr=192.168.0.0/16
Andy Baviera7c6a4e2018-09-28 13:29:43 -070083 mkdir -p $(HOME)/.kube
84 sudo cp -f /etc/kubernetes/admin.conf $(HOME)/.kube/config
85 sudo chown $(shell id -u):$(shell id -g) $(HOME)/.kube/config
Zack Williams2a6a1072019-01-07 11:15:12 -070086 kubectl apply -f https://docs.projectcalico.org/v3.3/getting-started/kubernetes/installation/hosted/rbac-kdd.yaml
87 kubectl apply -f https://docs.projectcalico.org/v3.3/getting-started/kubernetes/installation/hosted/kubernetes-datastore/calico-networking/1.7/calico.yaml
Andy Bavier35053b62018-09-20 13:45:45 -070088 kubectl taint nodes --all node-role.kubernetes.io/master-
89 touch $@
90
91$(M)/helm-init: | $(M)/kubeadm /usr/local/bin/helm
92 kubectl create serviceaccount --namespace kube-system tiller
93 kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
94 helm init --service-account tiller
95 until helm ls >& /dev/null; \
96 do \
97 echo "Waiting for Helm to be ready"; \
98 sleep 5; \
99 done
Zack Williams3bcdc262018-09-27 11:00:38 -0700100 helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
Andy Bavier1d5b9922019-01-02 15:30:55 -0700101 helm repo add cord https://charts.opencord.org
Andy Bavier35053b62018-09-20 13:45:45 -0700102 touch $@
103
104$(WORKSPACE)/cord/helm-charts: | $(M)/setup
105 mkdir -p $(WORKSPACE)/cord
106 cd $(WORKSPACE)/cord; git clone https://gerrit.opencord.org/helm-charts
107
108$(M)/kafka: | $(WORKSPACE)/cord/helm-charts $(M)/helm-init
Zack Williams3bcdc262018-09-27 11:00:38 -0700109 cd $(WORKSPACE)/cord/helm-charts && \
Zack Williams8fa04e72018-11-04 22:16:58 -0700110 helm upgrade --install $(HELM_GLOBAL_ARGS) cord-kafka --version $(KAFKA_CHART_VERSION) -f examples/kafka-single.yaml incubator/kafka
Andy Bavier35053b62018-09-20 13:45:45 -0700111 touch $@
112
113$(M)/kafka-running: | $(M)/kafka
Andy Bavier1d5b9922019-01-02 15:30:55 -0700114 kubectl wait $(KAFKA_POD) --for condition=Ready --timeout=180s
Andy Bavier35053b62018-09-20 13:45:45 -0700115 touch $@
116
Zack Williams3bcdc262018-09-27 11:00:38 -0700117$(M)/nem-monitoring: | $(M)/kafka-running
118 cd $(WORKSPACE)/cord/helm-charts && \
119 helm dep up nem-monitoring && \
Zack Williams8fa04e72018-11-04 22:16:58 -0700120 helm upgrade --install $(HELM_GLOBAL_ARGS) nem-monitoring nem-monitoring
Zack Williams3bcdc262018-09-27 11:00:38 -0700121 $(WORKSPACE)/cord/helm-charts/scripts/wait_for_pods.sh
122 touch $@
123
124$(M)/logging: | $(M)/kafka-running
125 cd $(WORKSPACE)/cord/helm-charts && \
126 helm dep up logging && \
Zack Williams8fa04e72018-11-04 22:16:58 -0700127 helm upgrade --install $(HELM_GLOBAL_ARGS) logging -f examples/logging-single.yaml logging
Zack Williams3bcdc262018-09-27 11:00:38 -0700128 $(WORKSPACE)/cord/helm-charts/scripts/wait_for_pods.sh
129 touch $@
130
Andy Bavier35053b62018-09-20 13:45:45 -0700131# Dependency on NEM is there to force ordering for parallel install
132# The idea is to install VOLTHA / ONOS / Mininet while NEM is initializing
Zack Williams3bcdc262018-09-27 11:00:38 -0700133$(M)/onos: | $(M)/kafka-running $(M)/nem $(INFRA_PREREQS)
Zack Williams8fa04e72018-11-04 22:16:58 -0700134 cd $(WORKSPACE)/cord/helm-charts; helm upgrade --install $(HELM_ONOS_ARGS) onos onos -f $(SEBAVALUES)
Andy Bavier35053b62018-09-20 13:45:45 -0700135 touch $@
136
Andy Bavier1e3e9522018-11-06 11:12:00 -0700137$(M)/voltha: | $(M)/kafka-running $(INFRA_PREREQS) $(M)/etcd-operator-ready
Andy Bavier35053b62018-09-20 13:45:45 -0700138 cd $(WORKSPACE)/cord/helm-charts; helm dep up voltha
Zack Williams8fa04e72018-11-04 22:16:58 -0700139 cd $(WORKSPACE)/cord/helm-charts; helm upgrade --install $(HELM_VOLTHA_ARGS) voltha voltha -f $(SEBAVALUES)
Andy Bavier35053b62018-09-20 13:45:45 -0700140 touch $@
141
Andy Bavier1e3e9522018-11-06 11:12:00 -0700142$(M)/etcd-operator-ready: | $(WORKSPACE)/cord/helm-charts $(M)/helm-init
Zack Williams5c16dc82019-01-08 10:57:08 -0700143 cd $(WORKSPACE)/cord/helm-charts; \
144 helm upgrade --install etcd-operator --version $(ETCD_OPERATOR_VERSION) stable/etcd-operator -f $(SEBAVALUES)
Andy Bavier1e3e9522018-11-06 11:12:00 -0700145 until kubectl get crd | grep etcdclusters; \
Andy Bavier35053b62018-09-20 13:45:45 -0700146 do \
Andy Bavier1e3e9522018-11-06 11:12:00 -0700147 echo "Waiting for etcdclusters CRD to be available"; \
Andy Bavier35053b62018-09-20 13:45:45 -0700148 sleep 5; \
149 done
150 touch $@
151
Andy Bavier1e3e9522018-11-06 11:12:00 -0700152$(M)/voltha-running: | $(M)/voltha
Kailashbff9eb72018-11-16 13:03:59 -0800153 timeout 300s bash -c "until kubectl get pod|grep etcd-cluster|grep 1/1; do echo 'Waiting for etcd-cluster to be ready'; sleep 10; done"
Andy Bavier35053b62018-09-20 13:45:45 -0700154 $(WORKSPACE)/cord/helm-charts/scripts/wait_for_pods.sh voltha
155 touch $@
156
157$(M)/ponsim: | $(M)/voltha
Zack Williams8fa04e72018-11-04 22:16:58 -0700158 cd $(WORKSPACE)/cord/helm-charts; helm upgrade --install $(HELM_GLOBAL_ARGS) ponnet ponnet
Andy Bavier35053b62018-09-20 13:45:45 -0700159 $(WORKSPACE)/cord/helm-charts/scripts/wait_for_pods.sh kube-system
Zack Williams8fa04e72018-11-04 22:16:58 -0700160 cd $(WORKSPACE)/cord/helm-charts; helm upgrade --install $(HELM_GLOBAL_ARGS) ponsimv2 ponsimv2 -f $(SEBAVALUES)
Andy Bavier35053b62018-09-20 13:45:45 -0700161 touch $@
162
163$(M)/pon0_fwd: | $(M)/ponsim
164 echo 8 > /tmp/pon0_group_fwd_mask
165 until sudo cp /tmp/pon0_group_fwd_mask /sys/class/net/pon0/bridge/group_fwd_mask; \
166 do \
167 echo "waiting for pon0..."; \
168 sleep 5; \
169 done
170 rm /tmp/pon0_group_fwd_mask
171 touch $@
172
173$(M)/mininet: | $(M)/onos $(M)/ponsim $(M)/pon0_fwd
174 sudo modprobe openvswitch
Zack Williams8fa04e72018-11-04 22:16:58 -0700175 cd $(WORKSPACE)/cord/helm-charts; helm upgrade --install $(HELM_GLOBAL_ARGS) mininet mininet -f $(SEBAVALUES)
Andy Bavier35053b62018-09-20 13:45:45 -0700176 touch $@
177
Zack Williamsd0c12f02018-11-21 11:54:36 -0700178$(M)/nem: | $(M)/kafka-running $(INFRA_PREREQS)
Andy Bavier35053b62018-09-20 13:45:45 -0700179 cd $(WORKSPACE)/cord/helm-charts; helm dep update xos-core
Zack Williams8fa04e72018-11-04 22:16:58 -0700180 cd $(WORKSPACE)/cord/helm-charts; helm upgrade --install $(HELM_NEM_ARGS) xos-core xos-core -f $(SEBAVALUES)
Matteo Scandolof3ceb4c2018-12-12 15:48:38 -0800181 cd $(WORKSPACE)/cord/helm-charts; helm dep update xos-profiles/seba-services
Zack Williams8fa04e72018-11-04 22:16:58 -0700182 cd $(WORKSPACE)/cord/helm-charts; helm upgrade --install $(HELM_NEM_ARGS) seba-services xos-profiles/seba-services -f $(SEBAVALUES)
Matteo Scandolof3ceb4c2018-12-12 15:48:38 -0800183 cd $(WORKSPACE)/cord/helm-charts; helm dep update workflows/att-workflow
Zack Williams8fa04e72018-11-04 22:16:58 -0700184 cd $(WORKSPACE)/cord/helm-charts; helm upgrade --install $(HELM_NEM_ARGS) att-workflow workflows/att-workflow -f $(SEBAVALUES)
Andy Bavierde4537d2018-11-29 11:48:25 -0700185 cd $(WORKSPACE)/cord/helm-charts; helm dep update xos-profiles/base-kubernetes
Zack Williams8fa04e72018-11-04 22:16:58 -0700186 cd $(WORKSPACE)/cord/helm-charts; helm upgrade --install $(HELM_NEM_ARGS) base-kubernetes xos-profiles/base-kubernetes -f $(SEBAVALUES)
Andy Bavier35053b62018-09-20 13:45:45 -0700187 touch $@
188
Zack Williamsd0c12f02018-11-21 11:54:36 -0700189$(M)/nem-running: | $(M)/nem
Andy Bavier35053b62018-09-20 13:45:45 -0700190 $(WORKSPACE)/cord/helm-charts/scripts/wait_for_pods.sh
191 touch $@
192
Zack Williamsd0c12f02018-11-21 11:54:36 -0700193$(M)/ponsim-tosca: | $(M)/nem-running
Andy Bavier35053b62018-09-20 13:45:45 -0700194 timeout 60s bash -c "until ! http -a admin@opencord.org:letmein GET http://127.0.0.1:30001/xosapi/v1/core/serviceinstanceattributes|jq '.items[].backend_status'|grep -v OK; do echo 'waiting for ONOS config to sync'; sleep 5; done"
195 timeout 60s bash -c "until ! http -a admin@opencord.org:letmein GET http://127.0.0.1:30001/xosapi/v1/onos/onosapps|jq '.items[].backend_status'|grep -v OK; do echo 'waiting for ONOS apps to sync'; sleep 5; done"
Andy Bavier905ec802018-10-04 11:08:37 -0700196 timeout 60s bash -c "until http -a karaf:karaf GET http://127.0.0.1:30120/onos/v1/applications/org.opencord.kafka|jq '.state'|grep -q ACTIVE; do echo 'Waiting for Kafka app to become ACTIVE'; sleep 5; done"
Zack Williams8fa04e72018-11-04 22:16:58 -0700197 cd $(WORKSPACE)/cord/helm-charts; helm upgrade --install $(HELM_GLOBAL_ARGS) ponsim-pod xos-profiles/ponsim-pod -f $(SEBAVALUES)
Andy Bavier35053b62018-09-20 13:45:45 -0700198 $(WORKSPACE)/cord/helm-charts/scripts/wait_for_pods.sh
199 touch $@
200
201$(M)/siab: | $(M)/voltha-running $(M)/mininet $(M)/ponsim-tosca
202 until http -a karaf:karaf --ignore-stdin --check-status GET http://127.0.0.1:30120/onos/v1/configuration/org.opencord.olt.impl.Olt; \
203 do \
204 sleep 5; \
205 done
206 http -a karaf:karaf --ignore-stdin POST http://127.0.0.1:30120/onos/v1/configuration/org.opencord.olt.impl.Olt defaultVlan=65535
Andy Bavier905ec802018-10-04 11:08:37 -0700207 timeout 1m bash -c "until http GET http://127.0.0.1:30125/health|jq '.state'|grep -q HEALTHY; do echo 'Waiting for VOLTHA to be HEALTHY'; sleep 10; done"
208 echo "[passed] VOLTHA is HEALTHY"
209 timeout 2m bash -c "until http GET http://127.0.0.1:30125/api/v1/devices|jq '.items[].admin_state'|grep ENABLED|wc -l|grep -q 2; do echo 'Waiting for OLT and ONU to be enabled in VOLTHA'; sleep 10; done"
210 echo "[passed] OLT and ONU are enabled in VOLTHA"
211 timeout 2m bash -c "until http -a karaf:karaf GET http://127.0.0.1:30120/onos/v1/devices|jq '.devices[].available'|grep true|wc -l|grep -q 2; do echo 'Waiting for VOLTHA logical device and agg switch to be available in ONOS'; sleep 10; done"
212 echo "[passed] VOLTHA logical device and agg switch are available in ONOS"
213 timeout 2m bash -c "until http -a admin@opencord.org:letmein GET http://127.0.0.1:30001/xosapi/v1/att-workflow-driver/attworkflowdriverserviceinstances |jq '.items[0].authentication_state'|grep -q AWAITING; do echo 'waiting for ATT Workflow Driver ServiceInstance to be in AWAITING state'; sleep 10; done"
214 echo "[passed] ATT Workflow Driver ServiceInstance is in AWAITING state"
Andy Bavier35053b62018-09-20 13:45:45 -0700215 touch $@
216 echo "SEBA-in-a-Box installation finished!"
217
Andy Bavier1d5b9922019-01-02 15:30:55 -0700218$(M)/seba-1.0.0: | $(WORKSPACE)/cord/helm-charts $(M)/helm-init
219 helm install -n cord-platform cord/cord-platform --version=6.1.0 -f $(WORKSPACE)/cord/helm-charts/$(SEBAVALUES)
220 until kubectl get crd | grep etcdclusters; \
221 do \
222 echo "Waiting for etcdclusters CRD to be available"; \
223 sleep 5; \
224 done
225 touch $(M)/kafka
226 touch $(M)/onos
227 touch $(M)/etcd-operator-ready
228 helm install -n seba cord/seba --version=1.0.0 -f $(WORKSPACE)/cord/helm-charts/$(SEBAVALUES)
229 helm install -n att-workflow cord/att-workflow --version=1.0.2 -f $(WORKSPACE)/cord/helm-charts/$(SEBAVALUES)
230 touch $(M)/voltha
231 touch $(M)/nem
232 touch $@
233
Zack Williamsd0c12f02018-11-21 11:54:36 -0700234# BBSim support
235BBSIM_OLT_TOSCA ?= examples/bbsim-16.yaml
236BBSIM_DHCP_TOSCA ?= examples/bbsim-dhcp.yaml
237
238$(M)/bbsim: | $(M)/onos $(M)/voltha-running $(M)/nem-running
239 cd $(WORKSPACE)/cord/helm-charts && \
240 helm upgrade --install bbsim bbsim -f $(SEBAVALUES) && \
241 scripts/wait_for_pods.sh voltha && \
242 touch $@
243
244$(M)/bbsim-tosca: | $(M)/bbsim
245 cd $(WORKSPACE)/cord/helm-charts && \
246 echo "Loading BBSim TOSCA: $(BBSIM_DHCP_TOSCA) $(BBSIM_OLT_TOSCA)" && \
247 for tosca in $(BBSIM_DHCP_TOSCA) $(BBSIM_OLT_TOSCA) ; do \
248 curl -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @$$tosca http://127.0.0.1:30007/run ; \
249 done && \
250 touch $@
251
252run-tests: | $(M)/qatests
Andy Bavier35053b62018-09-20 13:45:45 -0700253
Andy Bavier01449932018-10-01 16:19:40 -0700254$(M)/qatests-prereqs:
255 sudo apt install -y python-pip virtualenv
Andy Bavier35053b62018-09-20 13:45:45 -0700256 touch $@
257
Andy Bavier01449932018-10-01 16:19:40 -0700258$(WORKSPACE)/cord/test/cord-tester: | $(M)/setup
259 mkdir -p $(WORKSPACE)/cord/test
260 cd $(WORKSPACE)/cord/test && git clone https://gerrit.opencord.org/cord-tester
Andy Bavier35053b62018-09-20 13:45:45 -0700261
Zack Williamsd0c12f02018-11-21 11:54:36 -0700262PYBOT_ARGS ?=
263$(M)/qatests: | $(M)/siab $(M)/qatests-prereqs $(WORKSPACE)/cord/test/cord-tester
Andy Bavier01449932018-10-01 16:19:40 -0700264 cd $(WORKSPACE)/cord/test/cord-tester/src/test/cord-api/ && \
Andy Bavier6ce277e2018-10-02 10:29:21 -0700265 WORKSPACE=$(VIRTUALENV) bash ./setup_venv.sh && \
266 source $(VIRTUALENV)/venv-cord-tester/bin/activate && \
Andy Bavier01449932018-10-01 16:19:40 -0700267 cd Tests/WorkflowValidations/ && \
Kailash48e7a3f2018-12-06 12:31:32 -0800268 robot $(PYBOT_ARGS) --removekeywords wuks -e notready -i $(TESTTAGS) SIAB.robot
Andy Bavier35053b62018-09-20 13:45:45 -0700269 touch $@
270
271remove-chart-milestones:
272 cd $(M); rm -f kafka kafka-running onos voltha etcd-operator-ready etcd-cluster \
Zack Williamsd0c12f02018-11-21 11:54:36 -0700273 voltha-running ponsim mininet nem nem-running ponsim-tosca siab bbsim bbsim-tosca \
Andy Bavier1d5b9922019-01-02 15:30:55 -0700274 logging nem-monitoring seba-1.0.0
Andy Bavier35053b62018-09-20 13:45:45 -0700275
276remove-kube-milestones:
277 cd $(M); rm -f kubeadm helm-init
278
279remove-test-milestones:
Kailashf8ff8122018-12-03 10:44:06 -0800280 cd $(M); rm -f qatests qatests-prereqs
Andy Bavier35053b62018-09-20 13:45:45 -0700281
282teardown-charts: remove-chart-milestones
Matteo Scandolo0efb3252018-12-10 15:58:45 -0800283 helm delete --purge $(shell helm ls -q | grep -v docker-registry)
Andy Bavier35053b62018-09-20 13:45:45 -0700284
Kailashf8ff8122018-12-03 10:44:06 -0800285reset-kubeadm: remove-chart-milestones remove-kube-milestones remove-test-milestones
Andy Bavier5a02e6d2019-01-16 15:54:30 -0700286 sudo kubeadm reset -f || true
Andy Bavier35053b62018-09-20 13:45:45 -0700287 sudo iptables -F && sudo iptables -t nat -F && sudo iptables -t mangle -F && sudo iptables -X
Andy Bavier5a02e6d2019-01-16 15:54:30 -0700288 sudo rm -f /var/lib/cni/networks/pon0/* || true
289 sudo rm -f /var/lib/cni/networks/pon1/* || true
290 sudo rm -f /var/lib/cni/networks/k8s-pod-network/* || true