commit | fcbb9259a4b872f0f90fd2e6623b89824b01bb5d | [log] [tgz] |
---|---|---|
author | Matteo Scandolo <matteo.scandolo@gmail.com> | Thu Nov 19 12:19:02 2020 -0800 |
committer | Andrea Campanella <andrea@opennetworking.org> | Fri Nov 20 09:52:19 2020 +0100 |
tree | f1a8a6c182ef76409544f07c4d3e918c19765f6e | |
parent | 3152acafd7057148fc3e6b9e4a58f6b76a6c0b13 [diff] |
[VOL-3630] Passing KV_STORE_DATAPATH_PREFIX the container Change-Id: I3185fd1cd5d00300568a958ba4bebbedc21b9ea6
This repository defines Kubernetes Helm charts that can be used to deploy a VOLTHA instance. More information and documentation can be found in the voltha docs which we recommend as the starting point.
To deploy VOLTHA a Kubernetes environment is required. There are many mechanisms to deploy a Kubernetes environment and how to do so is out of scope for this project. A Simple search on the Internet will lead to the many possibilities.
In addition to a base Kubernetes in order to pass traffic to an OLT additional services that are external to VOLTHA are required, such as an OpenFlow Controller with applications to support authentication (EAPOL
) and IP address allocation (DHCP
) as examplified by the SEBA Project.
We suggest an automated deployment of VOLTHA by using kind-volta as described in the voltha docs. Note that kind-voltha
is a thin wrapper over helm
chart commands, automating some commands and arguments.
The following describes how to deploy VOLTHA manually.
To use the charts for VOLTHA the following two Helm repositories should be added to your helm environment:
helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/ helm repo add stable https://kubernetes-charts.storage.googleapis.com helm repo update
To use the charts for VOLTHA the following two Helm repositories should be added to your helm environment:
helm repo add onos https://charts.onosproject.org helm repo update
then to install ONOS:
helm install --create-namespace --set image.pullPolicy=Always,image.repository=voltha/voltha-onos,image.tag=master,replicas=3,atomix.replicas=3 --set defaults.log_level=DEBUG --namespace default onos onos/onos-classic
Add the helm chart repository and build the chart dependencies as follows:
helm repo add onf https://charts.opencord.org helm repo update
If you are developing and want to modify and use the charts from a local copy:
git clone https://github.com/opencord/voltha-helm-charts cd voltha-helm-charts helm dependency build ./voltha
ETCD deployes an ETCD cluster using standard Kubernetes manifests. As the VOLTHA helm charts use ETCD, it must be installed before the VOLTHA helm chart.
helm install -f --create-namespace --set replicas=1 --namespace default etcd incubator/etcd
At this point the VOLTHA Helm charts can be used to deploy the VOLTHA core components:
helm install -f values.yaml --create-namespace --set therecanbeonlyone=true --set services.etcd.service=etcd.default.svc --set services.etcd.port=2379 --set services.etcd.address=etcd.default.svc:2379 --set kafka_broker=kafka.default.svc:9092 --set services.kafka.adapter.service=kafka.default.svc --set services.kafka.adapter.port=9092 --set services.kafka.cluster.service=kafka.default.svc --set services.kafka.cluster.port=9092 --set services.kafka.adapter.address=kafka.default.svc:9092 --set services.kafka.cluster.address=kafka.default.svc:9092 --set 'services.controller[0].service=onos-onos-classic-0.onos-onos-classic-hs.default.svc' --set 'services.controller[0].port=6653' --set 'services.controller[0].address=onos-onos-classic-0.onos-onos-classic-hs.default.svc:6653' --namespace voltha voltha onf/voltha
An example fo the values.yaml
The adapters for the OpenOLT and OpenONU are in separate helm charts.
To install the OpenOLT adapter use:
helm install -f values.yaml --create-namespace --set services.etcd.service=etcd.default.svc --set services.etcd.port=2379 --set services.etcd.address=etcd.default.svc:2379 --set kafka_broker=kafka.default.svc:9092 --set services.kafka.adapter.service=kafka.default.svc --set services.kafka.adapter.port=9092 --set services.kafka.cluster.service=kafka.default.svc --set services.kafka.cluster.port=9092 --set services.kafka.adapter.address=kafka.default.svc:9092 --set services.kafka.cluster.address=kafka.default.svc:9092 --namespace voltha open-olt onf/voltha-adapter-openolt
To install the OpenONU adapter use:
helm install -f values.yaml --create-namespace --set services.etcd.service=etcd.default.svc --set services.etcd.port=2379 --set services.etcd.address=etcd.default.svc:2379 --set kafka_broker=kafka.default.svc:9092 --set services.kafka.adapter.service=kafka.default.svc --set services.kafka.adapter.port=9092 --set services.kafka.cluster.service=kafka.default.svc --set services.kafka.cluster.port=9092 --set services.kafka.adapter.address=kafka.default.svc:9092 --set services.kafka.cluster.address=kafka.default.svc:9092 --namespace voltha open-onu onf/voltha-adapter-openonu
An example fo the values.yaml
Optionally, a Jaeger tracing stack based all-in-one PoD can be deployed in voltha setup to collect and analyze execution traces generated by various Voltha containers for execution time analysis and troubleshooting. Refer to below links for more details on Open Tracing approach:
Open Tracing Jaeger Distributed Tracing Stack
To install the Voltha Tracing PoD use:
helm install --namespace voltha --name voltha-tracing ./voltha-tracing
VOLTHA relies on Kafka for inter-component communication and Etcd for persistent storage.
Kafka or Etcd values MUST be overridden when deploying VOLTHA so that the VOLTHA components can locate the required services. These values MUST be overridden when installing both the voltha
and the voltha-adapter-simulated
chart. The relevant property keys are:
services: kafka: adapter: service: voltha-kafka.voltha.svc.cluster.local port: 9092 cluster: service: voltha-kafka.voltha.svc.cluster.local port: 9092 etcd: service: voltha-etcd-cluster-client.voltha.svc.cluster.local port: 2379 controller: service: onos-openflow.default.svc.cluster.local port: 6653
voltctl
voltctl
is a replacement for the voltha-cli
container in VOLTHA that provides access to the VOLTHA CLI when a user connects to the container via SSH
. voltctl
provides a use model similar to docker
, etcdctl
, or kubectl
for VOLTHA.
As voltctl
is a binary executable as opposed to a Docker container it must be installed separately onto the machine(s) on which it is to be run. The Release Page for voltctl
maintains of pre-built binaries that can be installed. The following is an example of how, in the example environment, voltctl
can be installed with bash completion and configured:
sudo wget https://github.com/opencord/voltctl/releases/download/v1.3.0/voltctl-1.3.0-linux-amd64 -O /usr/bin/voltctl source <(voltctl completion bash | sudo tee /etc/bash_completion.d/voltctl) mkdir $HOME/.volt voltctl -a v2 -s voltha-api.voltha.svc.cluster.local:55555 config > $HOME/.volt/config
To remove the VOLTHA and Simulated Adapter deployments standard Helm commands can be utilized:
helm delete --purge voltha voltha-adapter-simulated voltha-adapter-openolt voltha-adapter-openonu voltha-etcd-operator
Known VOLTHA issues are tracked in JIRA. Issues that may specifically be observed, or at the very least were discovered, in this environment can be found in JIRA via a JIRA Issue Search.
On patchset submission, jobs are run in Jenkins that validate the correctness of the helm charts.
The code for these jobs can be found in helm-repo-tools
The two scripts that should be run to test are:
helmlint.sh
chart_version_check.sh