No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
docs
gdpr-patterns-presentation @ 1fa192d
node
static
utils
.gitignore
.gitmodules
.travis.yml
README.md
config.json
package-lock.json
package.json
setup.sh
test.json
wallaby-jira-issues.js
wallaby-jira-mappings.js
wallaby-jira-proxy.js
wallaby.js

README.md

GraphRisk

https://www.opencodebox.org/projects/graphrisk/

Software Components

GraphRisk is composed from the below software components and their functionalities.

  1. Presentation layer: this is front-end of the application and contains the code for hugo (https://github.com/pbx-gs/gdpr-patterns-presentation) - submodule in this source code
  2. Data Collection: This is component that collects and store JIRA tickets in JSON format
  3. Graph Generator: This is the component that have the responsibility to generate Graphs out of the JSON data files
  4. Server: this is the main software components that runs Hugo and it's the business logic of the application

How to Install

Requirements

  1. Install Neo4j, and create a user neo4j with password 'test'
  2. Hugo 0.36.1 (new version have compatibility issues)
  3. Nodejs >= v8.0 and npm >= v5.0

Installing

  1. git clone git@github.com:pbx-gs/gdpr-patterns.git graphrisk && cd graphrisk
  2. git submodule init && git submodule update && git submodule update --init --recursive
  3. npm install

How to Run the Web Server

Requirements

  1. Set the below environment variables (change as needed)
export Jira_Protocol="https"
export Jira_Host="jira.photobox.com"
export Jira_Username="<jira.user>"
export Jira_Password="<jira.pass>"
export Neo4J_Url="bolt://localhost:7687"
export Neo4J_Username='neo4j'
export Neo4J_Password='test' 
export GIT_HTTP_Url='http://<user>:<pass>@10.8.0.17:18080/gs/graphrisk.git'
export ACTION='UPDATE'

Run Server

  1. bash bin/start-servers-dev.sh
  2. Go to http://localhost:3000/

How to Run the Data Server

Requirements

This step is NOT necessary when you use the central GIT repo

  1. Set the below environment variables (change as needed)
export Jira_Protocol="https"
export Jira_Host="jira.photobox.com"
export Jira_Username="<jira.user>"
export Jira_Password="<jira.pass>"
export Neo4J_Url="bolt://localhost:7687"
export Neo4J_Username='neo4j'
export Neo4J_Password='test' 
export GIT_HTTP_Url='http://<user>:<pass>@10.8.0.17:18080/gs/graphrisk.git'
export ACTION='UPDATE'

change ACTION to 'NEW' when you want to download all the data from JIRA and you don't need only the updated JIRA tickets

Run Server

  1. bash bin/start-servers-data.sh

How to update the graphs in neo4j

  1. The server must be up and running (example: localhost:3000)
  2. run from the project folder: python utils/setup_end_points.py

This will take circa 1-2 hour to update all the Neo4J database that the servers uses

Docker

Build (server and data)

  1. bash bin/build-docker.sh

Run docker server

#!/bin/bash

# Stop if is running
docker stop gdpr-patterns; docker rm gdpr-patterns --force;

# Download latest version from Docker Hub Repo
docker pull pbxgs/gdpr-patterns;

# Run it :)
docker run -d\
	 --name gdpr-patterns\
	 -p 1313:1313\
	 -p 3000:3000\
	 --env Jira_Host=jira.photobox.com\
	 --env Jira_Username=username\
	 --env Jira_Password=password\
	 --env Neo4J_Url=bolt://localhost:7687\
	 --env Neo4J_Username=neo4j\
	 --env Neo4J_Password=test\
	 --env GIT_HTTP_Url='http://user:pass@10.8.0.17:18080/gs/graphrisk.git'\
	 pbxgs/gdpr-patterns

Run docker Data server

#!/bin/bash

# Stop if is running
docker stop gdpr-patterns-data; docker rm gdpr-patterns-data --force;

# Download latest version from Docker Hub Repo
docker pull pbxgs/gdpr-patterns-data;

# Run it :)
docker run -d\
	 --name gdpr-patterns-data\
	 --env Jira_Host=jira.photobox.com\
	 --env Jira_Username=user\
	 --env Jira_Password=pass\
	 --env Neo4J_Url=bolt://localhost:7687\
	 --env Neo4J_Username=neo4j\
	 --env Neo4J_Password=test\
	 --env GIT_HTTP_Url='http://user:pass@10.8.0.17:18080/gs/graphrisk.git'\
	 --env export ACTION='UPDATE'\
	 pbxgs/gdpr-patterns-data