You could run Trellis with a single instance of ONOS. But it is recommended to run ONOS as a cluster.
The idea is to have a 'build' machine, where you have ONOS source code, and can use buck to build ONOS. But to launch it in operation you use ‘target’ machines (VMs, containers or servers). Typically we use STC to launch ONOS in the 3 target machines which form the ONOS cluster.
The basic idea is:
Prepare your target machines
This is done only once.
You do not need to follow the directions for the “Mininet Target Machine” as you are using hardware switches.
Create a “Cell” file
on your build machine to give it the information it needs for the target machines. Note that you should also source the bash_profile that comes with ONOS
$ source onos/tools/dev/bash_profile
Info on cells here: https://wiki.onosproject.org/display/ONOS/Cells+and+ONOS+test+scripts#CellsandONOStestscripts-TestCells
For example, my cell looks like this:
$ cell
ONOS_CELL=fabric3hwVR
OCI=10.128.0.216
OC1=10.128.0.216
OC2=10.128.0.217
OC3=10.128.0.218
ONOS_APPS=drivers,openflow,segmentrouting,fpm,dhcprelay,netcfghostprovider
ONOS_GROUP=admin
ONOS_NIC=10.128.0.*
ONOS_SCENARIOS=/Users/sauravdas/onos/tools/test/scenarios
ONOS_TOPO=default
ONOS_USER=admin
ONOS_USE_SSH=true
ONOS_WEB_PASS=rocks
ONOS_WEB_USER=onos
OC1, OC2 and OC3 are the IP addresses of the 3 target machines where the ONOS cluster will be deployed. The ONOS_APPS are the apps you want to automatically deploy at launch. 'admin' is used to login to the target machines, and the password is not required as you have setup the target machines for password-less access over ssh.
Check your Environment
Check if your env is ok with stc prequesites (you only have to do this once)
$ stc prerequisites
2017-02-07 12:10:23 Prerequisites started
2017-02-07 12:10:23 Check-Passwordless-Login-1 started -- ssh -n -o ConnectTimeout=3 -o PasswordAuthentication=no admin@10.128.0.216 date
2017-02-07 12:10:23 Check-ONOS-Bits started -- onos-check-bits
2017-02-07 12:10:23 Check-Passwordless-Login-3 started -- ssh -n -o ConnectTimeout=3 -o PasswordAuthentication=no admin@10.128.0.218 date
2017-02-07 12:10:23 Check-Passwordless-Login-2 started -- ssh -n -o ConnectTimeout=3 -o PasswordAuthentication=no admin@10.128.0.217 date
2017-02-07 12:10:23 Check-Environment started -- test -n /Users/sauravdas/onos -a -n 10.128.0.* -a -n 10.128.0.216
2017-02-07 12:10:23 Check-Environment completed
2017-02-07 12:10:23 Check-Passwordless-Login-1 completed
2017-02-07 12:10:23 Check-Passwordless-Login-2 completed
2017-02-07 12:10:23 Check-Passwordless-Login-3 completed
2017-02-07 12:10:25 Check-ONOS-Bits completed
2017-02-07 12:10:25 Prerequisites completed
0:01 Passed! 6 steps succeeded
Launch STC
Finally launch with STC setup once you have built ONOS . Here is what it looks like when I launch
$ stc setup
2016-12-23 12:26:44 Setup started
2016-12-23 12:26:44 Uninstall-3 started -- onos-uninstall 10.128.0.218
2016-12-23 12:26:44 Uninstall-2 started -- onos-uninstall 10.128.0.217
2016-12-23 12:26:44 Uninstall-1 started -- onos-uninstall 10.128.0.216
2016-12-23 12:26:44 Push-Bits-2 started -- onos-push-bits 10.128.0.217
2016-12-23 12:26:44 Push-Bits-3 started -- onos-push-bits 10.128.0.218
2016-12-23 12:26:44 Push-Bits-1 started -- onos-push-bits 10.128.0.216
2016-12-23 12:26:45 Push-Bits-1 completed
2016-12-23 12:26:46 Push-Bits-2 completed
2016-12-23 12:26:46 Push-Bits-3 completed
2016-12-23 12:26:46 Uninstall-3 completed
2016-12-23 12:26:46 Kill-3 started -- onos-kill 10.128.0.218
2016-12-23 12:26:46 Uninstall-2 completed
2016-12-23 12:26:46 Kill-2 started -- onos-kill 10.128.0.217
2016-12-23 12:26:46 Uninstall-1 completed
2016-12-23 12:26:46 Kill-1 started -- onos-kill 10.128.0.216
2016-12-23 12:26:46 Kill-3 completed
2016-12-23 12:26:46 Install-3 started -- onos-install 10.128.0.218
2016-12-23 12:26:46 Kill-1 completed
2016-12-23 12:26:46 Install-1 started -- onos-install 10.128.0.216
2016-12-23 12:26:46 Kill-2 completed
2016-12-23 12:26:46 Install-2 started -- onos-install 10.128.0.217
2016-12-23 12:26:52 Install-2 completed
2016-12-23 12:26:52 Secure-SSH-2 started -- onos-secure-ssh -u onos -p rocks 10.128.0.217
2016-12-23 12:26:52 Install-1 completed
2016-12-23 12:26:52 Secure-SSH-1 started -- onos-secure-ssh -u onos -p rocks 10.128.0.216
2016-12-23 12:26:52 Install-3 completed
2016-12-23 12:26:52 Secure-SSH-3 started -- onos-secure-ssh -u onos -p rocks 10.128.0.218
2016-12-23 12:27:07 Secure-SSH-1 completed
2016-12-23 12:27:07 Wait-for-Start-1 started -- onos-wait-for-start 10.128.0.216
2016-12-23 12:27:09 Secure-SSH-3 completed
2016-12-23 12:27:09 Wait-for-Start-3 started -- onos-wait-for-start 10.128.0.218
2016-12-23 12:27:13 Secure-SSH-2 completed
2016-12-23 12:27:13 Wait-for-Start-2 started -- onos-wait-for-start 10.128.0.217
2016-12-23 12:27:14 Wait-for-Start-1 completed
2016-12-23 12:27:14 Check-Components-1 started -- onos-check-components 10.128.0.216
2016-12-23 12:27:14 Check-Nodes-1 started -- onos-check-nodes 10.128.0.216
2016-12-23 12:27:14 Wait-for-Start-3 completed
2016-12-23 12:27:14 Check-Nodes-3 started -- onos-check-nodes 10.128.0.218
2016-12-23 12:27:14 Check-Components-3 started -- onos-check-components 10.128.0.218
2016-12-23 12:27:16 Wait-for-Start-2 completed
2016-12-23 12:27:16 Check-Nodes-2 started -- onos-check-nodes 10.128.0.217
2016-12-23 12:27:16 Check-Components-2 started -- onos-check-components 10.128.0.217
2016-12-23 12:27:18 Check-Nodes-1 completed
2016-12-23 12:27:18 Check-Nodes-3 completed
2016-12-23 12:27:19 Check-Nodes-2 completed
2016-12-23 12:27:20 Check-Components-1 completed
2016-12-23 12:27:20 Check-Apps-1 started -- onos-check-apps 10.128.0.216 drivers,openflow,segmentrouting,vrouter,dhcprelay includes
2016-12-23 12:27:20 Check-Logs-1 started -- onos-check-logs 10.128.0.216
2016-12-23 12:27:20 Check-Components-3 completed
2016-12-23 12:27:20 Check-Apps-3 started -- onos-check-apps 10.128.0.218 drivers,openflow,segmentrouting,vrouter,dhcprelay includes
2016-12-23 12:27:20 Check-Logs-3 started -- onos-check-logs 10.128.0.218
2016-12-23 12:27:20 Check-Apps-1 completed
2016-12-23 12:27:20 Check-Apps-3 completed
2016-12-23 12:27:20 Check-Logs-1 completed
2016-12-23 12:27:20 Check-Logs-3 completed
2016-12-23 12:27:21 Check-Components-2 completed
2016-12-23 12:27:21 Check-Logs-2 started -- onos-check-logs 10.128.0.217
2016-12-23 12:27:21 Check-Apps-2 started -- onos-check-apps 10.128.0.217 drivers,openflow,segmentrouting,vrouter,dhcprelay includes
2016-12-23 12:27:21 Check-Apps-2 completed
2016-12-23 12:27:21 Check-Logs-2 completed
2016-12-23 12:27:21 Setup completed
0:36 Passed! 31 steps succeeded
Utilities
Use utilities like onos-netcfg to configure any one instance of ONOS (all instances will automatically get configured)
$ onos-netcfg $OC1 network-cfg-hw-vr.json
Remotely log into cli
$ onos -w $OC1
Remotely access the log
$ onos-log $OC1