blob: dfec06d76667b23b1e687bf89777a9e3cbadd7f5 [file] [log] [blame]
Matteo Scandolo1f5530b2019-12-17 10:12:31 -08001Deploy a virtual VOLTHA POD
2===========================
3
4A guide to install a virtual POD. This is generally used to gain familiarity with the
5environment or to do development.
6
7Quickstart
8----------
9
10Requires:
11
12- ``docker`` and ``go`` installed on your machine
13- `kind-voltha <https://github.com/ciena/kind-voltha>`_ cloned on your machine
14
15.. code:: bash
16
17 TYPE=minimal WITH_RADIUS=y CONFIG_SADIS=y ONLY_ONE=y WITH_BBSIM=y ./voltha up
18
19TLDR;
20-----
21
22Below are the complete steps to install a physical cluster.
23Most of the steps are the same as :ref:`deploy_physical`.
24
25Create Kubernetes Cluster
26-------------------------
27
28Kind provides a command line control tool to easily create Kubernetes
29clusters using just a basic Docker envionrment. The following commands
30will create the desired deployment of Kubernetes and then configure your
31local copy of ``kubectl`` to connect to this cluster.
32
33.. code:: bash
34
35 kind create cluster --name=voltha-$TYPE --config $TYPE-cluster.cfg
36 export KUBECONFIG="$(kind get kubeconfig-path --name="voltha-$TYPE")"
37 kubectl cluster-info
38
39Initialize Helm
40---------------
41
42Helm provide a capabilty to install and manage Kubernetes applications.
43VOLTHAs default deployment mechanism utilized Helm. Before Helm can be
44used to deploy VOLTHA it must be initialized and the repositories that
45container the artifacts required to deploy VOLTHA must be added to Helm.
46
47.. code:: bash
48
49 # Initialize Helm and add the required chart repositories
50 helm init
51 helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com
52 helm repo add stable https://kubernetes-charts.storage.googleapis.com
53 helm repo add onf https://charts.opencord.org
54 helm repo update
55
56 # Create and k8s service account so that Helm can create pods
57 kubectl create serviceaccount --namespace kube-system tiller
58 kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
59 kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
60
61From this point follow the :ref:`physical VOLTHA POD installation instructions <installation_steps>`. Come back here once done.
62
63Install BBSIM (Broad Band OLT/ONU Simulator)
64--------------------------------------------
65
66BBSIM provides a simulation of a BB device. It can be useful for
67testing.
68
69.. code:: bash
70
71 helm install -f minimal-values.yaml --namespace voltha --name bbsim onf/bbsim
72
73Create BBSIM Device
74^^^^^^^^^^^^^^^^^^^
75
76.. code:: bash
77
78 voltctl device create -t openolt -H $(kubectl get -n voltha service/bbsim -o go-template='{{.spec.clusterIP}}'):50060
79
80Enable BBSIM Device
81^^^^^^^^^^^^^^^^^^^
82
83.. code:: bash
84
85 voltctl device enable $(voltctl device list --filter Type~openolt -q)