Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

System requirements

We have successfully tested OpenNaaS to both build and run in

  • Windows 7,
  • GNU Linux systems (Ubuntu +10.10 and Debian)
  • MAC OSX systems

There's a limitation by using Windows XP. The reason is that OpenNaaS uses Fuse 4.4 version,  which requires at least either a Windows 2003 Server, a Windows 2008 Server or Windows 7, in case you're using a Microsoft OS.

Although not tested, there is no reason to believe OpenNaaS should not be able to run in other systems.

Info
titleBuild only
Note that you will need internet connectivity for the build too, as the dependencies are fetched during build by Maven.

Run OpenNaaS

To start OpenNaaS, launch the executable named opennaas in the following folder:

/platform/target/opennaas-${project.version}/opennaas-${project.version}/bin
Note

Notice that there is a .sh and a .bat file.

Please use .bat if you are using Windows, and .sh if you are in a GNU-Linux or Mac OS box.

So, for version 0.10 on linux, you will run it as follows:

Code Block
cd opennaas/platform/target/opennaas-0.10/opennaas-0.10/
./bin/opennaas.sh

By default, OpenNaaS will open a CLI prompt on the terminal. To avoid this you can execute it this way:

Code Block
cd opennaas/platform/target/opennaas-0.10/opennaas-0.10/
./bin/opennaas.sh server

Please note that you will have to configure Karaf's SSH daemon to login the CLI via regular SSH.

 

Congratulations! Now that you have a running OpenNaaS instance, try loading some resources.

 

This tutorial describes the first steps to use OpenNaaS. we are going to add a device and we will do the first operations to manage it.  You can find more information about the Karaf platform and others commands related with the resources on Server Console

OpenNaaS concepts

OpenNaaS is a framework which is developed through the OSGi technology. OSGi consists of a set of components (named bundles) which provide the necessary operations. In this point, Mantychore adds our bundles with their operations. All these operations represent the capabilities for the end users. When you execute OpenNaaS ( ./opennaas.sh (Linux) or ./opennaas.bat (Windows), it will provide a command line (cli) prompt and you will be able to check the different loaded capabilities ( if you type <tab> or list).

To get more information about bundles and how Mantychore use them, go to this link.

Creating resources

The first step in OpenNaaS is the resource virtualization. In this step, a new device is added to the Mantychore system. For this action, it is necessary to create a file to describe what features and capabilities this virtual resource will be able to have.

For this tutorial, a template from this list template can be used as example (for more information, the wiki has a section to describe each parameter).  The command will be:

Code Block
resource:create /home/carlos/Escritorio/resource.descriptor

About resource descriptors and how it works link.

Adding protocols

Each resource has to be linked to the necessary protocols which are used to communicate with the physical device and send its operations. This is an example which uses a netconf protocol to connect with the resource:

Code Block
protocols:context router:junos20  netconf password ssh://myuser:mypassword@193.1.190.254:22/netconf

or the following if you're using key uathentication:

Code Block
protocols:context router:junos20 netconf publickey ssh://myuser@192.1.190.254.22/netconf privateKeyPath

 

Description of the connection parameters:

  • router:junos20 -  specify resource type (router) and resource name (junos20) for the resource we want to assign a protocol to.
  • netconf - name to identify the protocol configuration.
  • ssh://myuser:mypassword@1.1.1.1:22/netconf - URI to describe connection parameters.
  • privateKeyPath - path where the private key is stored.

The information about the used protocols is in this link.

Resources states

A resource is in a set of states which each allow a set of operations. This picture describes these states:

Image Removed

Mainly, a resource will enable all its capabilities when started. For this reason, the next step will be start our resource:

Code Block
resource:start router:junos20

Doing operations with the resource

A resource includes a set of capabilities or features. These capabilities are the available operations a device has. Mantychore supports:

Removing a resource

Finally, if the resource isn't needed anymore, it can be stopped and removed. First, we stop it:

Code Block
resource:stop router:junos20

The resource will deactivate all its capabilities and it will be reset. After, we'll destroy it and delete any resource information in Mantychore..

...