blob: 585de35aa1e2e6df0a9084cbd46f5a5f0e0cc7e1 [file] [log] [blame]
Matteo Scandolo9f619492019-10-25 13:11:58 -07001.. BBSim documentation master file, created by
2 sphinx-quickstart on Fri Oct 25 12:03:42 2019.
3 You can adapt this file completely to your liking, but it should at least
4 contain the root `toctree` directive.
5
6Welcome to BBSim's documentation!
7=================================
8
9.. toctree::
10 :maxdepth: 2
11 :caption: Contents:
12
Matteo Scandoloe383d5d2019-10-25 14:47:27 -070013 operations.rst
Matteo Scandolo9f619492019-10-25 13:11:58 -070014 onu-state-machine.rst
15 development-dependencies.rst
16 bbr.rst
17 bbsimctl.rst
Zdravko Bozakov2da76342019-10-21 09:47:35 +020018 api.rst
Matteo Scandolo9f619492019-10-25 13:11:58 -070019
20
21Quickstart
22----------
23
24BBSim (a.k.a. BroadBand Simulator) is a tool designed to emulate an `Openolt <https://github.com/opencord/openolt>`_
25compatible device.
26
27In order to use BBSim you need to have:
28
29- a Kubernetes cluster
30- helm
31- a working installation of VOLTHA
32
33We strongly recommend the utilization of `kind-voltha <https://github.com/ciena/kind-voltha>`_ to setup such environment.
34
35Installation
36------------
37
38Once VOLTHA is up and running, you can deploy BBSim with this command:
39
40.. code:: bash
41
42 helm install -n bbsim cord/bbsim
43
Matteo Scandoloc1147092019-10-29 09:38:33 -070044If you need to specify a custom image for BBSim you can:
45
46.. code:: bash
47
48 helm install -n bbsim cord/bbsim --set images.bbsim.repository=bbsim --set images.bbsim.tag=candidate --set images.bbsim.pullPolicy=Never
49
Matteo Scandolo9f619492019-10-25 13:11:58 -070050The BBSim installation can be customized to emulate multiple ONUs and multiple PON Ports:
51
52.. code:: bash
53
54 helm install -n bbsim cord/bbsim --set onu=8 --set pon=2
55
Matteo Scandoloc1147092019-10-29 09:38:33 -070056BBSim can also be configured to automatically start Authentication or DHCP:
57
58.. code:: bash
59
60 helm install -n bbsim cord/bbsim --set auth=true --set dhcp=true
61
Matteo Scandolo9f619492019-10-25 13:11:58 -070062Once BBSim is installed you can verify that it's running with:
63
64.. code:: bash
65
66 kubectl logs -n voltha -f $(kubectl get pods -n voltha | grep bbsim | awk '{print $1}')
67
68Provision a BBSim OLT in VOLTHA
69-------------------------------
70
71Create the device:
72
73.. code:: bash
74
75 voltctl device create -t openolt -H $(kubectl get -n voltha service/bbsim -o go-template='{{.spec.clusterIP}}'):50060
76
77Enable the device:
78
79.. code:: bash
80
81 voltctl device enable $(voltctl device list --filter Type~openolt -q)
Matteo Scandoloc1147092019-10-29 09:38:33 -070082
83BBSim startup options
84---------------------
85
86``BBSim`` supports a series of options that can be set at startup, you can see the list via ``./bbsim --help``
87
88.. code:: bash
89
90 $ ./bbsim --help
91 Usage of ./bbsim:
92 -auth
93 Set this flag if you want authentication to start automatically
94 -c_tag int
95 C-Tag starting value, each ONU will get a sequential one (targeting 1024 ONUs per BBSim instance the range is big enough) (default 900)
96 -cpuprofile string
97 write cpu profile to file
98 -dhcp
99 Set this flag if you want DHCP to start automatically
100 -logCaller
101 Whether to print the caller filename or not
102 -logLevel string
103 Set the log level (trace, debug, info, warn, error) (default "debug")
104 -nni int
105 Number of NNI ports per OLT device to be emulated (default 1)
106 -olt_id int
107 Number of OLT devices to be emulated
108 -onu int
109 Number of ONU devices per PON port to be emulated (default 1)
110 -pon int
111 Number of PON ports per OLT device to be emulated (default 1)
112 -s_tag int
113 S-Tag value (default 900)