Date: Fri, 29 Mar 2024 12:41:22 +0000 (UTC) Message-ID: <241943455.1113.1711716082620@ip-10-30-146-46.us-west-2.compute.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_1112_849979092.1711716082618" ------=_Part_1112_849979092.1711716082618 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Sometimes it=E2=80=99s useful to run ONOS as a serv= ice, particularly in production environments. This is where things get more complicated and specialized= , depending on the operating system you=E2=80=99re running. This section de= scribes how to configure ONOS to run as a service on typical Linux distribu= tions.
When O=
NOS runs as a service, the OS will start it automatically as part of the bo=
ot process. On systemd
upstart
-based systems, it shou=
ld also automatically be restarted if it crashes. Once the service configur=
ation files have been installed, you can typically start, stop, and check t=
he status of ONOS using the servi=
ce
command.
Please not that this guide has different commands for different system= s (i.e. Ubuntu, Debian, etc.) ensure you are running the correct command fo= r your version, have fun.
sudo cp= /opt/onos/init/onos.initd /etc/init.d/onos
sudo up= date-rc.d onos defaults
Note that on other, older, systems that use the /etc/init.d/
scripts but do not included the update-rc.d
command you may =
need to manually create symbolic links in the appropriate rcX.d/ directories as desired, if you wish ONOS to start automatically.
sudo cp= /opt/onos/init/onos.conf /etc/init/onos.conf
sudo cp= /opt/onos/init/onos.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable onos
The ONOS services read configuration options from /opt/onos/o=
ptions
. If you have created an ONOS user (e.g. sdn
=
), you should set ONOS_USER
in /opt/onos/=
options
to the user you wish ONOS to run as.
You can also specify ONOS_APPS
as a default set o=
f applications to activate.
ONOS_US= ER=3Dsdn # Optional: add any apps here that you wish to activate by default ONOS_APPS=3D
Note that ONOS_APPS
is an optional way of specifying defaul=
t apps to activate on a node, but you can also activate apps dynamically ac=
ross the entire ONOS cluster using the ONOS CLI, as described in Managing ONOS applications.<=
/p>
sudo se= rvice onos {start|stop|status}
sudo sy= stemctl {start|stop|status|restart} onos.service