Table of Contents

Installation

Installation Prerequisites

  • Java 8
  • node.js v0.10.x
  • graphviz v2.36.0 or later (only needed if you want to view the directed graph image in the dgbuilder).
  • Maven

Installation Instructions

If node.js isn't installed run the below commands

sudo apt-get install -y nodejs
sudo ln -s /usr/bin/nodejs /usr/bin/node

Clone the project from gerrit move into the git repository folder. Then create a release and start it.

#clone from gerrit
git clone https://gerrit.onap.org/r/ccsdk/distribution && (cd oam && curl -kLo `git rev-parse --git-dir`/hooks/commit-msg http://gerrit.onap.org/r/tools/hooks/commit-msg; chmod +x `git rev-parse --git-dir`/hooks/commit-msg)
cd oam
cd dgbuilder
./createReleaseDir.sh "releaseName" "username" "emailId" "gitLocalRepositoryFullPath"
./start.sh releaseName


gitLocalRepositoryFullPath should point to a directory containing your directed graphs. 
Below is an example of what a user might actually run.



#clone from gerrit
git clone http://username@gerrit.onap.org/r/a/ccsdk/distribution
cd dgbuilder
./createReleaseDir.sh 15.10 username username@foo.com /home/users/username/sdnc/1510/service-logic
./start.sh 15.10

Configuration

Updating gitLocalRepository 

Note: you can also update the gitLocalRepository later from within the dgbuilder application by choosing "Configuration" from the "Menu" and updating the "Git local Repository Path" as shown in the picture below.

Working On Multiple Releases

(Optional) If working on multiple releases you can create additional release directories.

Example: If working on December 2015 release:

./createReleaseDir.sh 1512 username username@foo.com /home/users/userdirectory/sdnc/1512/service-logic

Below are samples of how a release is started and checking the status of the running release

#format of the command
./start.sh releaseName
#example 1
./start.sh 1510
#example 2
./start.sh 1512
#check which release is running
./show_status.sh


Using the application

Accessing the application

Access the application by typing the corresponding URL for the release you are working on in the browser based on the output from the show_status command.

Example: for 1510 release use http://localhost:3100 and for 1512 release use http://localhost:3101.

If your browser prompts you for a username and password use the username provided to the createReleaseDir script as your username.

test123 is the default password.

Note: many users are running a windows host machine and an ubuntu virtual machine.

If you are running a browser on your windows machine such as firefox and want to connect to the ubuntu guest machine running dg builder you will need to set up port forwarding in virtual box.

The port number you need to forward is the same one in the url you are trying to connect to.

Stopping the application

./stop.sh releaseName

Example: ./stop 1510

Additional Notes

Logs

The dgbuilder application related nohup.out gets written to dgbuilder/releases/releaseName/logs directory.

Downloaded XML and JSON files directory

From within the application when the buttons "Download XML" and "Download Json" are used the files get saved on the server in the dgbuilder/releases/releaseName/xml and dgbuilder/releases/releaseName/json directories respectively. 

The json flow file can be used to import the flow in the DG Builder application.

Importing from local git repository

If the local git repository is set, you can import the flows from that directory.


Project information

This page describes how to install and run DG Builder.

To learn how to use DG builder check the page at Service Logic Interpreter Directed Graph Guide

A good page to start with is  Your First Graph

The code for dg builder is hosted on codecloud at https://gerrit.onap.org/r/gitweb?p=sdnc/oam.git;a=tree;f=dgbuilder;hb=refs/heads/master

Authored By: Sheshashailavas Chinthakayala (edited for ONAP by Brian Freeman)

  • No labels

7 Comments

  1. Do you need a local mysql database present for this to work? When I load DGs from local source there is an error "Could not import flow from Local Git Repository". Looking through configuration I see a DB Host IP and DB Port pre-filled but are not valid in my setup.

    1. Never-mind this was a path issue. You have to be very careful about git local repository path, it doesn't seem to take full path.

      1. Hmm. not sure what's going on here... some graphs load, and other give "Could not import flow from Local Git Repository".


        On command line I'm getting

        Error occured:Error: Command failed: cat /opt/onap/ccsdk/sli/plugins/restapi-call-node///opt/onap/ccsdk/sli/plugins/restapi-call-node/provider/src/main/resources/service-configuration-notification-northbound-template.json

        cat: /opt/onap/ccsdk/sli/plugins/restapi-call-node///opt/onap/ccsdk/sli/plugins/restapi-call-node/provider/src/main/resources/service-configuration-notification-northbound-template.json: No such file or directory

        It appears to be double loading path as it checks for file.

        1. FYI It appears my issue was a trailing slash in path for local git. With trailing forward slash, I couldn't import graphs, without it works.

  2. I installed dgbuilder locally , but I am not sure it is up and runs properly:

    20 Sep 17:43:06 - [red] Version: 0.9.1 20 Sep 17:43:06 - [red] Loading palette nodes

    20 Sep 17:43:06 - [red] Server now running at http://127.0.0.1:3101/

    20 Sep 17:43:06 - [red] Flows file not found : /root/oam/dgbuilder/releases/1802/flows/flows.json


    Also, when I try to access from the browser it asks for user/password


    please advise where I can find authentication details ?


  3. Read the tutorial above. Its test123 and the usname should be what you passed in for the createRelaseDir.sh

    ./createReleaseDir.sh 15.10 username username@foo.com /home/users/username/sdnc/1510/service-logic

    1. Thank you Brian, I missed it