Matteo Scandolo | 9f61949 | 2019-10-25 13:11:58 -0700 | [diff] [blame] | 1 | .. 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 | |
| 6 | Welcome to BBSim's documentation! |
| 7 | ================================= |
| 8 | |
| 9 | .. toctree:: |
| 10 | :maxdepth: 2 |
| 11 | :caption: Contents: |
| 12 | |
Matteo Scandolo | e383d5d | 2019-10-25 14:47:27 -0700 | [diff] [blame] | 13 | operations.rst |
Matteo Scandolo | 9f61949 | 2019-10-25 13:11:58 -0700 | [diff] [blame] | 14 | onu-state-machine.rst |
| 15 | development-dependencies.rst |
| 16 | bbr.rst |
| 17 | bbsimctl.rst |
Zdravko Bozakov | 2da7634 | 2019-10-21 09:47:35 +0200 | [diff] [blame] | 18 | api.rst |
Matteo Scandolo | 9f61949 | 2019-10-25 13:11:58 -0700 | [diff] [blame] | 19 | |
| 20 | |
| 21 | Quickstart |
| 22 | ---------- |
| 23 | |
| 24 | BBSim (a.k.a. BroadBand Simulator) is a tool designed to emulate an `Openolt <https://github.com/opencord/openolt>`_ |
| 25 | compatible device. |
| 26 | |
| 27 | In order to use BBSim you need to have: |
| 28 | |
| 29 | - a Kubernetes cluster |
| 30 | - helm |
| 31 | - a working installation of VOLTHA |
| 32 | |
| 33 | We strongly recommend the utilization of `kind-voltha <https://github.com/ciena/kind-voltha>`_ to setup such environment. |
| 34 | |
| 35 | Installation |
| 36 | ------------ |
| 37 | |
| 38 | Once 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 Scandolo | c114709 | 2019-10-29 09:38:33 -0700 | [diff] [blame] | 44 | If 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 Scandolo | 9f61949 | 2019-10-25 13:11:58 -0700 | [diff] [blame] | 50 | The 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 Scandolo | c114709 | 2019-10-29 09:38:33 -0700 | [diff] [blame] | 56 | BBSim 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 Scandolo | 9f61949 | 2019-10-25 13:11:58 -0700 | [diff] [blame] | 62 | Once 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 | |
| 68 | Provision a BBSim OLT in VOLTHA |
| 69 | ------------------------------- |
| 70 | |
| 71 | Create 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 | |
| 77 | Enable the device: |
| 78 | |
| 79 | .. code:: bash |
| 80 | |
| 81 | voltctl device enable $(voltctl device list --filter Type~openolt -q) |
Matteo Scandolo | c114709 | 2019-10-29 09:38:33 -0700 | [diff] [blame] | 82 | |
| 83 | BBSim 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) |