Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

(Deprecated - Feb 2017 version) - TODO: update

This page describes how to build the OpenECOMP ONAP Portal webapp and the OpenECOMP ONAP Portal SDK webapp, and how to deploy webapps to a web server.
It does not cover the process of configuring a virtual machine from scratch.

...

  1. In your git working copy, go to the directory ecomp-portal-FE
  2. Clean out the npm cache by running this command:
    npm cache clean
  3. Install all node and grunt dependencies listed in the package.json file by running this command:
    npm install
  4. Install all client dependencies listed in the bower.json file by running this command:
    bower install

Get the Code

Clone the OpenECOMP repositories from your Git repository and create local tracking branches. The required commands are something like these ecomp portal core repository from Gerri.  The URL is something like this (replace 'your_id' of course):

    git

...

clone http://

...

gerrit.onap.org/r/portal

This should create two new folders:

...

a new folder with subfolders, some for the back-end web server components

...

and others for the front-end pages and scripts

...

:

  • quantum - core and webapp
  • thirdparty - framework for onboarding applications

Unfortunately, the local tracking branches have different names in the two repos.


Build and Deploy the

...

ONAP Portal FE+BE Distribution

After all of the above steps have been performed successfully, use the following procedure to build and deploy the front-end and back-end
distributions to a web server.

...

Note that the "dev" argument here relies on the file ecomp-portal-FE-os/client/configurations/dev.json, which defines all API endpoints for this build. You can duplicate this file, modify the endpoints and call it whatever you like.

...

In your git working copy, go to the root directory ecomp-portal-BE and build the distribution by typing this command:

...

Before you build, configure your destination environment so the JavaScript minimization creates the correct back end (BE). This configuration is done in ecomp-portal-FE-os/client/configuration/dev.json (or any other file you want). For example:

...

Also, copy the bower_components folder from ecomp-portal-FE-os to the folder ecomp-portal-FE-os/client then build as shown above:

...

This step will populate the folder ecomp-portal-FE-os/dist with a folder named public. Copy that public folder from comp-portal-FE-os/dist/ to the folder ecomp-portal-BE-os/target/ecomppportalecompportal/ .

Deploy the

...

ONAP Portal Web Application

Now upload the contents of the folder ecomp-portal-BE/target/ecompportal to the web server host, for example on <yourHost>, to /<yourHost>/WebApps/dev/ECOMP_PORTAL/ecomp_portal .

...

Restart tomcat and visit the appropriate page; e.g., https://<yourHost>/ecomp_portal/login.html

Script for Building and Deploying

The build-auto.sh script, shown below, automates all the build and deploy steps. To invoke it, make sure you are in the auto-builds directory, and then give the command build-auto.sh:

Code Block
$ pwd
/<yourHost>/WebApps/dev/ECOMPPORTAL/auto-builds
$ more build-auto.sh

Here is a listing of build-auto.sh:

...