blob: 6e4445fd6a5e18e542ec0e9f26de2198df2ab298 [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
Zack Williamsc6460c22019-12-18 14:54:43 -070029clusters using just a basic Docker environment. The following commands
Matteo Scandolo1f5530b2019-12-17 10:12:31 -080030will 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
Zack Williamsc6460c22019-12-18 14:54:43 -070042Helm provide a capability to install and manage Kubernetes applications.
Matteo Scandolo1f5530b2019-12-17 10:12:31 -080043VOLTHAs 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
Zack Williamsc6460c22019-12-18 14:54:43 -070061From this point follow the :ref:`physical VOLTHA POD installation instructions
62<installation_steps>`. Come back here once done.
Matteo Scandolo1f5530b2019-12-17 10:12:31 -080063
64Install BBSIM (Broad Band OLT/ONU Simulator)
65--------------------------------------------
66
67BBSIM provides a simulation of a BB device. It can be useful for
68testing.
69
70.. code:: bash
71
72 helm install -f minimal-values.yaml --namespace voltha --name bbsim onf/bbsim
73
74Create BBSIM Device
75^^^^^^^^^^^^^^^^^^^
76
77.. code:: bash
78
79 voltctl device create -t openolt -H $(kubectl get -n voltha service/bbsim -o go-template='{{.spec.clusterIP}}'):50060
80
81Enable BBSIM Device
82^^^^^^^^^^^^^^^^^^^
83
84.. code:: bash
85
Zack Williamsc6460c22019-12-18 14:54:43 -070086 voltctl device enable $(voltctl device list --filter Type~openolt -q)