How to deploy vCPE

Requirements:

In order to deploy the vCPE application, first of all we need to obtain the binary code of the platform of OpenNaaS and the GUI application. To achieve this step you can follow this tutorial in the section called download.

The platform and the GUI are two separate components:

  • OpenNaaS platform: It is the framework which gives access to the resources and capabilities in order to manage the network.
  • GUI: Interface which is connected with the platform and allows the management vCPEs. It is a web application that requires an application server. The web application is not part of the platform, and thus, is shipped separately of its releases (it’s the war file). Nevertheless, GUI source code can be obtained  by checking out OpenNaaS sources the same way as for the platform.

To boot up the platform we have to run the file opennaas.bat or opennaas.sh (according to SO). The OpenNaaS console will open.

To boot up the GUI, first we should have an application server installed. In our case we will use a Tomcat server, even though we could run other servers such as Glassfish, JBoss, etc…
We have to deploy the application in the server, therefore we have to copy the opennaas-vcpe.war file in to the webapps directory of the application server. If you have build your own binaries, the war file can be found on $OPENNAAS_ROOT/opennaas/clients/opennaas-gui-vcpe/target/opennaas-vcpe.war

Starting the server, the vCPE application will be deployed automatically.

From this moment we will have the whole vCPE environment installed in our system.

Now we have seen how to configure vCPE in our PC but it is possible to have the platform and GUI in separate environments. We need to change the URL of the web services of the platform and the URL of the GUI requests, so that they coincide.

The platform publishes web services that allow the management of the resources remotely. This is how the GUI communicates with the platform. The URL that we publish the services (in the platform) and the  URL that we make requests (GUI) have to be set up if we want to work in separate environments.

  • Platform URL: It is located in the platform file, opennaas/etc/org.opennaas.cfg the property ws.rest.url, and can be modified as needed. Afterwards the platform has to be restarted in order to get the modifications fixed.
  • GUI URL: Once the GUI has been deployed in the tomcat server, we need to indicate the URL where the requests will be launched. This URL is in the file, opennaas-vcpe/WEB-INF/config.properties. We need to restart the application server too.

By default, these URls are configured to use localhost.

In the next post we will explain how vCPE works.