to sustain demands of service provider & enterprise networks • Strong abstractions and simplicity ◦ required for development of apps and solutions • Protocol and device behaviour independence ◦ avoid contouring and deformation due to protocol specifics • Separation of concerns and modularity ◦ allow tailoring and customization without speciating the code-base
no API, self-contained, e.g. reactive forwarding, proxy ARP ◦ generally interacts only with the network environment • Application with Service Interface ◦ offers API; for other Apps, CLI, REST or GUI ◦ interacts with network environment, but also other software entities (hence API) • Application ignited as “service component” ◦ “singleton”, with activate/deactivate/modify methods ◦ ignited by OSGi service component run-time (SCR) ◦ dependencies on other services auto-wired by OSGi SCR • Applications may have their own state; use Store pattern ◦ delegates responsibility for tracking state to a separate component
JAR files with an enhanced Manifest ◦ bundles have name and version ◦ bundles explicitly require/import other Java packages ◦ bundles explicit provide/export Java packages for others • Karaf features are means to install or uninstall a set of bundles as a group ◦ features are defined via an XML artifact - a feature repository ◦ feature references, but does not deliver the bundle JAR artifacts • Karaf uses Maven repos as OSGi Bundle Repositories for retrieval of feature and bundle artifacts
life-cycle is controlled by the framework ◦ components defined by OSGI-INF/*.xml files at run-time ◦ ONOS uses maven-scr-plugin to convert Java annotations to OSGI- INF/*.xml files at compile-time • Components can provide @Services to others • Components can @Reference services from others • @Activate, @Modified and @Deactivate methods serve as component life-cycle hooks
for an ONOS bundle or an app ◦ onos-cli-archetype - overlay for apps with CLI extensions ◦ onos-ui-archetype - overlay for apps with GUI extensions ◦ onos-api-archetype - basis for a app Java API bundle • Run mvn archetype:generate to create a working minimal project module • For simpler usage run onos-create-app shell tool
ONOS App aRchive (.oar) files ◦ OAR is a JAR with app.xml, features.xml and bundle artifacts ◦ onos-maven-plugin generates an *.oar file as part of Maven build • Apps are managed on the entire ONOS cluster ◦ via REST API: GET|POST|DELETE /onos/v1/applications ◦ via shell tool: onos-app {install|activate|deactivate|uninstall} ◦ via CLI: onos:app {install|activate|deactivate|uninstall} ◦ via GUI • Back-end installation and activation is done via normal feature & bundle services
to spawn virtual networks ◦ All hosts in the virtual networks are interconnected through a full mesh • Each virtual network contains a full mesh of the hosts within it • BYON allows users to interact with it through CLI commands ◦ In particular, list-networks is a CLI command that you will use in this part ◦ Other available CLI commands are: ▪ create-network - provided ▪ add-host - provided ▪ remove-host - to be implemented ▪ remove-network - to be implemented
Container (LXC) onos3 10.0.3.103 Mininet Network Amazon EC2 VM VPN Development on VM (VirtualBox) or Native Development (Mac or Linux) Developer Laptop 192.168.42.1
(top left corner) > System Preferences, then click Network 2. Click Add (+) at the bottom of the network connection services list, then choose VPN from the Interface pop-up menu. Enter password in Authentication Settings... 3. Click Connect Windows 1. Right-click the network icon in the system tray and select Open Network and Sharing Center 2. Click Set up a new connection or network 3. On the wizard, select Connect to a workplace, and click Next 4. Select Use my internet connection (VPN) 5. Enter user and password, then Connect (Windows only) To disable default gateway: (Note: this must be done before connecting) 1. Open the Network Connections window 2. Right-click the VPN connection > Properties, then click the Networking tab, then TCP/IPv4 3. Click the "Advanced..." button, and uncheck Use default gateway on remote network 4. Click OK three times Server Address: <provided on paper> Test by ping 10.0.3.101 VPN Type: PPTP User: onos Password: onos Encryption: 128 bit
Enhanced NetworkManager addHost method to create and submit required HostToHostIntents • Built & re-deployed the app • Verified that intent is properly installed • Verified that connectivity is established between hosts
all required HostToHostIntents • Enhanced NetworkManager removeNetwork method to withdraw all required HostToHostIntents • Implemented and registered CLI commands • Built & re-deployed the app • Verified that intent is properly withdrawn • Verified that connectivity is severed between hosts
DistributedNetworkStore to delegate events to NetworkManager component • Enhanced NetworkManager to notify event listeners • Created NetworkMonitor component as event listener • Built & re-deployed the app • Verified that listeners are notified about network events
mvn to build and onos-app to deploy app • Used @Reference to get reference to other components • Controlled connectivity between hosts via IntentService • Created a distributed store using ConsistentMap primitive • Implemented CLI commands • Created asynchronous event notification mechanism • Implemented a component as a NetworkEventListener
screencasts on YouTube https://goo.gl/8Druv0 • Browse ONOS Java API http://api.onosproject.org/ • Join ONOS [email protected] mailing list https://wiki.onosproject.org/display/ONOS/ONOS+Mailing+Lists • Engage with ONOS developers & community