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.
...
The computer must have the following software packages installed:
- Java
- Maven (3.3.3+) currently 3.5.0
- nodejs version >=4.x.x; download from https://nodejs.org/
- node-gyp with all its requirements (e.g., Python v.2.7.x, GCC, …) as listed at https://github.com/nodejs/node-gyp
- grunt-cli installed globally, download from https://github.com/gruntjs/grunt-cli
To install: npm install -g grunt-cli
- bower from http://bower.io/
To install: npm install -g bower
...
- In your git working copy, go to the directory ecomp-portal-FE
- Clean out the npm cache by running this command:
npm cache clean - Install all node and grunt dependencies listed in the package.json file by running this command:
npm install - 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://
...
git clone https://<your_id>@<yourGitRepositoryHost>scm/st_quantum/quantum.git -b BRANCH_1607
This should create two new folders:
...
This should create a new folder with subfolders, some for the
...
back-end web server components
...
and others for the front-end pages and scripts
...
:
...
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-os/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 the 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:
...
:8989/ECOMPPORTAL/login.htm