ONOS === ### Install, and Running as a service https://url.fit/ZhJPA nosignal (nosignal@g2.nctu.edu.tw) ONOS/CORD Taiwan workshop 2017 --- ## Outline - Requirements - ONOS Installation - Running ONOS with network emulator Mininet - User Interfaces --- ## Requirements ---- ## Hard requirements :::info 2 core CPU 2 GB RAM 10 GB hdd 1 NIC (any speed) ::: ---- ## Software requirements ```shell= # Ubuntu 14.04 or 16.04 # Add user for onos (such as sdn) sudo adduser sdn --system --group # Java8 sudo apt-get update sudo apt-get install software-properties-common -y sudo add-apt-repository ppa:webupd8team/java -y sudo apt-get update echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections sudo apt-get install oracle-java8-installer oracle-java8-set-default -y # Curl sudo apt-get install curl ``` --- ## Installation ---- ## Download offical binary ```shell= # Create /opt sudo mkdir -p /opt && cd /opt # Download ONOS and untar to /opt sudo wget -c http://onos.sdn.nctu.edu.tw/onos/release/onos-1.9.0.tar.gz sudo tar xzf onos-1.9.0.tar.gz sudo mv onos-1.9.0 onos sudo chown -R sdn:sdn onos ``` ---- ## Configure startup options *sudo -u sdn vim /opt/onos/options* ```shell= # running onos with user sdn export ONOS_USER=sdn # default active drivers and openflow export ONOS_APPS=drivers,openflow ``` ---- ## Install service files ### For ubuntu 16.04 ```shell= sudo cp /opt/onos/init/onos.initd /etc/init.d/onos sudo cp /opt/onos/init/onos.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable onos ``` ### For ubuntu 14.04 ```shell= sudo cp /opt/onos/init/onos.initd /etc/init.d/onos sudo cp /opt/onos/init/onos.conf /etc/init/onos.conf ``` ---- ## Running ONOS as a service ### For ubuntu 16.04 ```shell= sudo systemctl {start|stop|status|restart} onos.service ``` ### For ubuntu 14.04 ```shell= sudo service onos {start|stop|status} ``` --- ## Running ONOS with network emulator Mininet ---- ## Before install your Mininet ... ### Remember to stop ONOS ---- ## Install Mininet From apt-get ```shell= sudo apt-get install mininet ``` From source ```shell= cd ~/ && git clone https://github.com/mininet/mininet cd mininet && git checkout 2.2.1 util/install.sh -a ``` ---- ## Test your Mininet ```shell= sudo mn --test pingall ``` ---- ## Attach Mininet to ONOS *Rememeber to run your ONOS* ```shell= # Run mininet command to connect to ONOS sudo mn --controller=remote,ip=127.0.0.1,port=6653 --topo=tree,depth=2 # Also can run mininet with python script and connect to ONOS # Sample python file: https://url.fit/Zdd7P sudo python mininet-sample.py ``` --- ## User Interfaces ---- ## ONOS Web UI ---- ## Setup user password ```shell= # Remove default account /opt/onos/bin/onos-user-password onos --remove # Add your own account /opt/onos/bin/onos-user-password sdndstw onosrocks ``` ---- ## Open your browser and login with your account http://{your_server_ip}:8181/onos/ui ---- ## Topology  ---- ## Applications  ---- ## Devices  ---- ## Links  ---- ## Hosts  ---- ## ONOS Command Line Interface ---- ## Setup key and login ONOS CLI ```shell= # Generate & add user key to karaf ssh-keygen -t rsa /opt/onos/bin/onos-user-key $USER ~/.ssh/id_rsa.pub # Login to CLI /opt/onos/bin/onos ``` ---- ## ONOS welcome screen  ---- ## Show apps  ---- ## Show devices  ---- ## Show links  ---- ## Show hosts  --- ### Time for you to play ONOS by yourself --- ## Q&A --- ## Thank You!! ###### tags: `Service` `ONOS` `SDN`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up