Matteo Scandolo | 1f5530b | 2019-12-17 10:12:31 -0800 | [diff] [blame] | 1 | Deploy a virtual VOLTHA POD |
| 2 | =========================== |
| 3 | |
| 4 | A guide to install a virtual POD. This is generally used to gain familiarity with the |
| 5 | environment or to do development. |
| 6 | |
| 7 | Quickstart |
| 8 | ---------- |
| 9 | |
| 10 | Requires: |
| 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 | |
| 19 | TLDR; |
| 20 | ----- |
| 21 | |
| 22 | Below are the complete steps to install a physical cluster. |
| 23 | Most of the steps are the same as :ref:`deploy_physical`. |
| 24 | |
| 25 | Create Kubernetes Cluster |
| 26 | ------------------------- |
| 27 | |
| 28 | Kind provides a command line control tool to easily create Kubernetes |
Zack Williams | c6460c2 | 2019-12-18 14:54:43 -0700 | [diff] [blame] | 29 | clusters using just a basic Docker environment. The following commands |
Matteo Scandolo | 1f5530b | 2019-12-17 10:12:31 -0800 | [diff] [blame] | 30 | will create the desired deployment of Kubernetes and then configure your |
| 31 | local 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 | |
| 39 | Initialize Helm |
| 40 | --------------- |
| 41 | |
Zack Williams | c6460c2 | 2019-12-18 14:54:43 -0700 | [diff] [blame] | 42 | Helm provide a capability to install and manage Kubernetes applications. |
Matteo Scandolo | 1f5530b | 2019-12-17 10:12:31 -0800 | [diff] [blame] | 43 | VOLTHA’s default deployment mechanism utilized Helm. Before Helm can be |
| 44 | used to deploy VOLTHA it must be initialized and the repositories that |
| 45 | container 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 Williams | c6460c2 | 2019-12-18 14:54:43 -0700 | [diff] [blame] | 61 | From this point follow the :ref:`physical VOLTHA POD installation instructions |
| 62 | <installation_steps>`. Come back here once done. |
Matteo Scandolo | 1f5530b | 2019-12-17 10:12:31 -0800 | [diff] [blame] | 63 | |
| 64 | Install BBSIM (Broad Band OLT/ONU Simulator) |
| 65 | -------------------------------------------- |
| 66 | |
| 67 | BBSIM provides a simulation of a BB device. It can be useful for |
| 68 | testing. |
| 69 | |
| 70 | .. code:: bash |
| 71 | |
| 72 | helm install -f minimal-values.yaml --namespace voltha --name bbsim onf/bbsim |
| 73 | |
| 74 | Create 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 | |
| 81 | Enable BBSIM Device |
| 82 | ^^^^^^^^^^^^^^^^^^^ |
| 83 | |
| 84 | .. code:: bash |
| 85 | |
Zack Williams | c6460c2 | 2019-12-18 14:54:43 -0700 | [diff] [blame] | 86 | voltctl device enable $(voltctl device list --filter Type~openolt -q) |