VOL-570 : Change network type used by voltha components

- Updated from weave to calico which is the default network type
- Updated ponsim README file
- Removed deprecated data folder

Amendments:

- Change to specific version of kafka/zookeeper
- Added annotations statement to netconf manifest

Change-Id: Ibc8c06f037c275717b5c79b60443b7fd11545405
diff --git a/k8s/consul.yml b/k8s/consul.yml
index 0ffcc15..650890a 100644
--- a/k8s/consul.yml
+++ b/k8s/consul.yml
@@ -58,7 +58,7 @@
       labels:
         app: consul
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       affinity:
         podAntiAffinity:
diff --git a/k8s/data/clients.conf b/k8s/data/clients.conf
deleted file mode 100644
index c63eca8..0000000
--- a/k8s/data/clients.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-client  10.38.0.0/12 {
- secret = SECRET
-}
diff --git a/k8s/data/users b/k8s/data/users
deleted file mode 100644
index 1e84143..0000000
--- a/k8s/data/users
+++ /dev/null
@@ -1 +0,0 @@
-user Cleartext-Password := "password", MS-CHAP-Use-NTLM-Auth := 0
diff --git a/k8s/envoy_for_consul.yml b/k8s/envoy_for_consul.yml
index 8c02622..6ed7923 100644
--- a/k8s/envoy_for_consul.yml
+++ b/k8s/envoy_for_consul.yml
@@ -35,7 +35,7 @@
       labels:
         app: voltha
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       containers:
         - name: voltha
diff --git a/k8s/fluentd-config.yml b/k8s/fluentd-config.yml
index 42272fd..945ffce 100644
--- a/k8s/fluentd-config.yml
+++ b/k8s/fluentd-config.yml
@@ -1,13 +1,6 @@
 apiVersion: v1
 data:
   fluentd.conf: |
-
-#   Uncomment this source in environments where voltha services are forwarding logs to the fluentd port directly.
-#    <source>
-#      @type forward
-#      port 24224
-#    </source>
-
     <source>
       @id fluentd-containers.log
       @type tail
diff --git a/k8s/fluentd.yml b/k8s/fluentd.yml
index f275bc1..9cb6071 100644
--- a/k8s/fluentd.yml
+++ b/k8s/fluentd.yml
@@ -35,7 +35,7 @@
       labels:
         app: fluentdactv
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       terminationGracePeriodSeconds: 10
       affinity:
@@ -104,7 +104,7 @@
       labels:
         app: fluentdstby
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       terminationGracePeriodSeconds: 10
       affinity:
@@ -170,7 +170,7 @@
       labels:
         app: fluentd
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       tolerations:
         - key: node-role.kubernetes.io/master
diff --git a/k8s/freeradius.yml b/k8s/freeradius.yml
index baa1615..e15c46e 100644
--- a/k8s/freeradius.yml
+++ b/k8s/freeradius.yml
@@ -34,7 +34,7 @@
       labels:
         app: freeradius
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       containers:
         - name: freeradius
diff --git a/k8s/grafana.yml b/k8s/grafana.yml
index 10997b8..284cbd6 100644
--- a/k8s/grafana.yml
+++ b/k8s/grafana.yml
@@ -43,6 +43,8 @@
     metadata:
       labels:
         app: grafana
+      annotations:
+        cni: "calico"
     spec:
       containers:
       - name: grafana
diff --git a/k8s/ingress/10-default-backend.yml b/k8s/ingress/10-default-backend.yml
index 38987aa..f1e33f6 100644
--- a/k8s/ingress/10-default-backend.yml
+++ b/k8s/ingress/10-default-backend.yml
@@ -11,6 +11,8 @@
     metadata:
       labels:
         app: default-http-backend
+      annotations:
+        cni: "calico"
     spec:
       terminationGracePeriodSeconds: 60
       containers:
diff --git a/k8s/ingress/60-cluster-ingress-nginx.yml b/k8s/ingress/60-cluster-ingress-nginx.yml
index 5b86979..05b720b 100644
--- a/k8s/ingress/60-cluster-ingress-nginx.yml
+++ b/k8s/ingress/60-cluster-ingress-nginx.yml
@@ -13,6 +13,7 @@
       labels:
         app: ingress-nginx
       annotations:
+        cni: "calico"
         prometheus.io/port: '10254'
         prometheus.io/scrape: 'true'
     spec:
diff --git a/k8s/kafka.yml b/k8s/kafka.yml
index a75bbeb..706eed4 100644
--- a/k8s/kafka.yml
+++ b/k8s/kafka.yml
@@ -30,7 +30,7 @@
       labels:
         app: kafka
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       terminationGracePeriodSeconds: 10
       affinity:
diff --git a/k8s/netconf.yml b/k8s/netconf.yml
index 82f5022..9bb7e67 100644
--- a/k8s/netconf.yml
+++ b/k8s/netconf.yml
@@ -22,6 +22,8 @@
     metadata:
       labels:
         app: netconf
+      annotations:
+        cni: "calico"
     spec:
       terminationGracePeriodSeconds: 10
       affinity:
diff --git a/k8s/ofagent.yml b/k8s/ofagent.yml
index 76844ee..c2415ae 100644
--- a/k8s/ofagent.yml
+++ b/k8s/ofagent.yml
@@ -10,7 +10,7 @@
       labels:
         app: ofagent
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       terminationGracePeriodSeconds: 10
       affinity:
diff --git a/k8s/olt.yml b/k8s/olt.yml
index 88925ec..cd64d51 100644
--- a/k8s/olt.yml
+++ b/k8s/olt.yml
@@ -25,7 +25,7 @@
        labels:
          app: olt
        annotations:
-         cni: "weave"
+         cni: "calico"
      spec:
        containers:
          - name: olt
diff --git a/k8s/onos.yml b/k8s/onos.yml
index f1aeb00..331a10c 100644
--- a/k8s/onos.yml
+++ b/k8s/onos.yml
@@ -31,7 +31,7 @@
       labels:
         app: onos
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       containers:
         - name: onos
diff --git a/k8s/onu.yml b/k8s/onu.yml
index 2d262ff..edea4d2 100644
--- a/k8s/onu.yml
+++ b/k8s/onu.yml
@@ -25,7 +25,7 @@
        labels:
          app: onu
        annotations:
-         cni: "weave,pon0"
+         cni: "calico,pon0"
      spec:
        containers:
          - name: onu
diff --git a/k8s/single-node/consul.yml b/k8s/single-node/consul.yml
index ec980e8..c07f4dc 100644
--- a/k8s/single-node/consul.yml
+++ b/k8s/single-node/consul.yml
@@ -56,7 +56,7 @@
       labels:
         app: consul
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       terminationGracePeriodSeconds: 10
       containers:
diff --git a/k8s/single-node/fluentd.yml b/k8s/single-node/fluentd.yml
index 8a9c4df..4204787 100644
--- a/k8s/single-node/fluentd.yml
+++ b/k8s/single-node/fluentd.yml
@@ -24,7 +24,7 @@
       labels:
         app: fluentd
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       terminationGracePeriodSeconds: 10
       containers:
diff --git a/k8s/single-node/kafka.yml b/k8s/single-node/kafka.yml
index 2d11968..c11e3dc 100644
--- a/k8s/single-node/kafka.yml
+++ b/k8s/single-node/kafka.yml
@@ -28,7 +28,7 @@
       labels:
         app: kafka
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       terminationGracePeriodSeconds: 10
       containers:
diff --git a/k8s/single-node/netconf.yml b/k8s/single-node/netconf.yml
index 19c188a..1487dc9 100644
--- a/k8s/single-node/netconf.yml
+++ b/k8s/single-node/netconf.yml
@@ -22,6 +22,8 @@
     metadata:
       labels:
         app: netconf
+      annotations:
+        cni: "calico"
     spec:
       terminationGracePeriodSeconds: 10
       containers:
diff --git a/k8s/single-node/ofagent.yml b/k8s/single-node/ofagent.yml
index fc3b45f..ac82f2a 100644
--- a/k8s/single-node/ofagent.yml
+++ b/k8s/single-node/ofagent.yml
@@ -10,7 +10,7 @@
       labels:
         app: ofagent
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       terminationGracePeriodSeconds: 10
       containers:
diff --git a/k8s/single-node/vcli.yml b/k8s/single-node/vcli.yml
index 848bd3a..2784a96 100644
--- a/k8s/single-node/vcli.yml
+++ b/k8s/single-node/vcli.yml
@@ -25,7 +25,7 @@
       labels:
         app: vcli
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       containers:
         - name: vcli
diff --git a/k8s/single-node/vcore_for_consul.yml b/k8s/single-node/vcore_for_consul.yml
index 7494740..6d5c672 100644
--- a/k8s/single-node/vcore_for_consul.yml
+++ b/k8s/single-node/vcore_for_consul.yml
@@ -32,7 +32,7 @@
       labels:
         app: vcore
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       containers:
       - name: voltha
diff --git a/k8s/single-node/vcore_for_etcd.yml b/k8s/single-node/vcore_for_etcd.yml
index 4e306cb..ff579dc 100644
--- a/k8s/single-node/vcore_for_etcd.yml
+++ b/k8s/single-node/vcore_for_etcd.yml
@@ -32,7 +32,7 @@
       labels:
         app: vcore
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       containers:
         - name: voltha
diff --git a/k8s/single-node/zookeeper.yml b/k8s/single-node/zookeeper.yml
index 9ced14a..d28aa39 100644
--- a/k8s/single-node/zookeeper.yml
+++ b/k8s/single-node/zookeeper.yml
@@ -34,7 +34,7 @@
       labels:
         app: zookeeper
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       containers:
       - name: zoo
diff --git a/k8s/stats.yml b/k8s/stats.yml
index 91202ff..953e68a 100644
--- a/k8s/stats.yml
+++ b/k8s/stats.yml
@@ -12,6 +12,8 @@
     metadata:
       labels:
         app: dashd
+      annotations:
+        cni: "calico"
     spec:
       containers:
       - name: dashd
@@ -43,6 +45,8 @@
     metadata:
       labels:
         app: shovel
+      annotations:
+        cni: "calico"
     spec:
       containers:
       - name: shovel
diff --git a/k8s/vcli.yml b/k8s/vcli.yml
index e1563ab..b1708ae 100644
--- a/k8s/vcli.yml
+++ b/k8s/vcli.yml
@@ -25,7 +25,7 @@
       labels:
         app: vcli
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       containers:
         - name: vcli
diff --git a/k8s/vcore_for_consul.yml b/k8s/vcore_for_consul.yml
index 41f40c4..2679451 100644
--- a/k8s/vcore_for_consul.yml
+++ b/k8s/vcore_for_consul.yml
@@ -32,7 +32,7 @@
       labels:
         app: vcore
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       containers:
       - name: voltha
diff --git a/k8s/vcore_for_etcd.yml b/k8s/vcore_for_etcd.yml
index 4292cb7..37ceeea 100644
--- a/k8s/vcore_for_etcd.yml
+++ b/k8s/vcore_for_etcd.yml
@@ -32,7 +32,7 @@
       labels:
         app: vcore
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       containers:
         - name: voltha
diff --git a/k8s/zookeeper.yml b/k8s/zookeeper.yml
index 112a460..1c7f02d 100644
--- a/k8s/zookeeper.yml
+++ b/k8s/zookeeper.yml
@@ -76,7 +76,7 @@
       labels:
         app: zookeeper-1
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       containers:
       - name: zoo1
@@ -116,7 +116,7 @@
       labels:
         app: zookeeper-2
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       containers:
       - name: zoo2
@@ -156,7 +156,7 @@
       labels:
         app: zookeeper-3
       annotations:
-        cni: "weave"
+        cni: "calico"
     spec:
       containers:
       - name: zoo3
diff --git a/ponsim/v2/README.md b/ponsim/v2/README.md
index fe50243..bd2a371 100644
--- a/ponsim/v2/README.md
+++ b/ponsim/v2/README.md
@@ -2,21 +2,71 @@
 
 The PON simulator was re-written for the purpose of easily integrating it in a cluster environment.
 
+It supports the following deployment configurations:
+
+* In a Kubernetes cluster
+* In standalone command line mode (not containerized).
+
+**Please note: Swarm mode is NOT supported by this simulator.**
+
 Here are some differences with the legacy PONSIM implementation:
 * The OLT and ONU instances are deployed as independent entities.
 * Both OLT and ONU are scalable containers.
 * OLT-ONU and VOLTHA-OLT communication is done via GRPC
 
-# 2. Directory structure
+# 2. PON Simulator Usage
+
+```
+Usage of ./ponsim:
+  -alarm_freq int
+    	Frequency of simulated alarms (in seconds) (default 60)
+  -alarm_sim
+    	Enable generation of simulated alarms
+  -api_type string
+    	Type of API used to communicate with devices (PONSIM or BAL) (default "PONSIM")
+  -device_type string
+    	Type of device to simulate (OLT or ONU) (default "OLT")
+  -external_if string
+    	External Communication Interface for read/write network traffic (default "eth1")
+  -fluentd string
+    	Fluentd host address
+  -grpc_addr string
+    	Address used to establish GRPC server connection
+  -grpc_port int
+    	Port used to establish GRPC server connection (default 50060)
+  -internal_if string
+    	Internal Communication Interface for read/write network traffic (default "eth0")
+  -name string
+    	Name of the PON device (default "PON")
+  -no_banner
+    	Omit startup banner log lines
+  -onus int
+    	Number of ONUs to simulate (default 1)
+  -parent_addr string
+    	Address of OLT to connect to (default "olt")
+  -parent_port int
+    	Port of OLT to connect to (default 50060)
+  -promiscuous
+    	Enable promiscuous mode on network interfaces
+  -quiet
+    	Suppress debug and info logs
+  -vcore_endpoint string
+    	Voltha core endpoint address (default "vcore")
+  -verbose
+    	Enable verbose logging
+```
+
+# 3. Directory structure
 
 ```
 ./common - Contains utilities used within the project
 ./core - Contains the main component for handling the OLT/ONU services
 ./grpc - Contains the GRPC server implementation along with the necessary NBI and SBI handlers
-./misc - Contains scripts and required protobuf files
+./protos - Contains protobuf files specific to the PON simulator 
+./scripts - Miscellaneous scripts required by the PON simulator
 ```
 
-# 3. Requirements
+# 4. Requirements
 
 # Golang Installation
 
@@ -40,9 +90,9 @@
 export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
 ```
 
-# 4. Build the PON simulator
+# 5. Build the PON simulator
 
-## Container
+## Container Mode
 
 The PON simulator container can be built by issuing the following command.
 
@@ -50,9 +100,9 @@
 make ponsim
 ```
 
-## Local
+## Standalone Mode
 
-In order to run the PON simulator as a standalone application, you need to do some manual setups
+To run the PON simulator in standalone mode, you need to do some manual setups.
 
 ### Protos
 
@@ -80,47 +130,7 @@
 ``` 
 
 
-# 5. PON Simulator Usage
-
-```
-Usage of ./ponsim:
-  -alarm_freq int
-    	Frequency of simulated alarms (in seconds) (default 60)
-  -alarm_sim
-    	Enable generation of simulated alarms
-  -api_type string
-    	Type of API used to communicate with devices (PONSIM or BAL) (default "PONSIM")
-  -device_type string
-    	Type of device to simulate (OLT or ONU) (default "OLT")
-  -external_if string
-    	External Communication Interface for read/write network traffic (default "eth2")
-  -grpc_addr string
-    	Address used to establish GRPC server connection
-  -grpc_port int
-    	Port used to establish GRPC server connection (default 50060)
-  -internal_if string
-    	Internal Communication Interface for read/write network traffic (default "eth1")
-  -name string
-    	Name of the PON device (default "PON")
-  -no_banner
-    	Omit startup banner log lines
-  -onus int
-    	Number of ONUs to simulate (default 1)
-  -parent_addr string
-    	Address of OLT to connect to (default "olt")
-  -parent_port int
-    	Port of OLT to connect to (default 50060)
-  -promiscuous
-    	Enable promiscuous mode on network interfaces
-  -quiet
-    	Suppress debug and info logs
-  -vcore_endpoint string
-    	Voltha core endpoint address (default "vcore")
-  -verbose
-    	Enable verbose logging
-```
-
-# 6. Run in local mode (no container)
+# 6. Run in standalone mode (no container)
 
 ## Create the necessary docker networks
 
@@ -140,6 +150,28 @@
 
 ## Start VOLTHA
 
+Edit compose/docker-compose-system-test.yml to specify the communication type to use between
+the PON simulator and the voltha service.
+ 
+**--ponsim-comm=grpc**
+
+e.g.
+```
+...
+      "/voltha/voltha/main.py",
+      "-v",
+      "--consul=${DOCKER_HOST_IP}:8500",
+      "--rest-port=8880",
+      "--grpc-port=50556",
+      "--kafka=@kafka",
+      "--instance-id-is-container-name",
+      "--interface=eth1",
+      "--backend=consul",
+      "-v",
+      "--ponsim-comm=grpc"
+...
+```
+
 ```
 docker-compose -f compose/docker-compose-system-test.yml up -d
 docker-compose -f compose/docker-compose-auth-test.yml -p auth up -d
@@ -225,25 +257,23 @@
 
 ## Install networking components
 
-Install the Weave network package
+### Support multiple network interfaces
 
-```
-kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
-```
-
-Install the CNI Genie package (Required to support multiple network interfaces in a container)
+Install the CNI Genie package which is required to support multiple network interfaces in a container.
 
 ```
 kubectl apply -f https://raw.githubusercontent.com/Huawei-PaaS/CNI-Genie/master/conf/1.8/genie.yaml
 ```
 
+### Configure network bridge for PON simulator
+
 Configure PON management network template (on each host).  
 
 ```
 # Run as root
 sudo su
 
-cat <<EOF >> /etc/cni/net.d/10-pon0.conf
+cat <<EOF >> /etc/cni/net.d/20-pon0.conf
 {
     "name": "pon0",
     "type": "bridge",
@@ -256,7 +286,7 @@
       "routes": [
         { "dst": "0.0.0.0/0" }
       ]
-    }
+   }
 }
 EOF
 ```
@@ -266,8 +296,7 @@
 ```
 cd k8s
 
-kubectl create configmap freeradius-config --from-file data/clients.conf --from-file data/users
-
+kubectl apply -f namespace.yml
 kubectl apply -f consul.yml
 kubectl apply -f zookeeper.yml
 kubectl apply -f kafka.yml
@@ -276,6 +305,7 @@
 kubectl apply -f ofagent.yml
 kubectl apply -f vcli.yml
 kubectl apply -f onos.yml
+kubectl apply -f freeradius-config.yml
 kubectl apply -f freeradius.yml
 ```
 
@@ -310,7 +340,7 @@
 kubectl apply -f rg.yml
 
 # Enter the RG container
-kubectl exec <rg container id> -ti bash
+kubectl -n voltha exec <rg container id> -ti bash
 
 # Execute some test (e.g. EAPOL authentication)
 wpa_supplicant -i eth0 -Dwired -c /etc/wpa_supplicant/wpa_supplicant.conf