Skip to content

Commit

Permalink
non docker based install
Browse files Browse the repository at this point in the history
  • Loading branch information
Snehal Maid committed Dec 3, 2024
1 parent 7c4053f commit 99a4e65
Show file tree
Hide file tree
Showing 27 changed files with 1,648 additions and 1,151 deletions.
Binary file modified .DS_Store
Binary file not shown.
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ admin-api/src/cypher/*
admin-api/src/util/license/licenseGenerator.js
admin-api/src/util/license/licenseEncryptionKeyGenerator.js
admin-api/.env
admin-api/dist
admin-api/node_modules/

#engine-api
engine-api/.env
engine-api/dist
engine-api/node_modules/

#ui
ui/.env
ui/build
ui/node_modules/

#testing folders
Expand All @@ -34,3 +37,16 @@ docker/v1/config/keymaker-ui-nginx/neo4j.com.crt
docker/v1/config/keymaker-ui-nginx/neo4j.com.key
docker/v1/build


#nondocker
nondocker/v1/keymaker/admin-api/.env
nondocker/v1/keymaker/admin-api/build
nondocker/v1/keymaker/admin-api/node_modules

nondocker/v1/keymaker/engine-api/.env
nondocker/v1/keymaker/engine-api/build
nondocker/v1/keymaker/engine-api/node_modules

nondocker/v1/keymaker/ui/.env
nondocker/v1/keymaker/ui/build

2,305 changes: 1,157 additions & 1,148 deletions admin-api/package-lock.json

Large diffs are not rendered by default.

Binary file modified docker/.DS_Store
Binary file not shown.
Binary file modified docker/v1/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion docker/v1/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
environment:
- LICENSE_FILE=/app/license/license.lic
- NEO4J_URI=neo4j://localhost:7687
- NEO4J_USERNAME=neo4j
- NEO4J_USER=neo4j
- NEO4J_PASSWORD=neo4j
- NEO4J_DATABASE=neo4j
- GRAPHQL_LISTEN_PORT=4002
Expand Down
2 changes: 1 addition & 1 deletion engine-api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added nondocker/.DS_Store
Binary file not shown.
Binary file added nondocker/v1/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions nondocker/v1/config/keymaker-license/license.lic
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
==== Keymaker 6.1.0 - Labs ==== pxX9jfzeY+lygN9kdKKHQ2s/b1R6p1qRJ221dSZ9I5va33is8q3s815dx4tj6QwaIgXcjGIjpgmmc9YjxvAJzkTNqoCMKbTMmtKzeZxPdGi1Zdlt7paMkwTEYJV/ZFbW4U0hEu2hSIBuemQTJgzfkp6HXCtU2JzUv7FTTR1XHoxvf3dnhlni+AKUSKmcG5PrvWpgNWL4mx6cRHQXTdi6siz+yd+72qLwfWj59zvEavOpxPSTbr8U8GPLzFQdqgFal690V8AxzsqKngQ5O/9dqk2W/2LoT1mtWDs2zyWeNbEcqbaW7O4ovz7i1fNvKhEhkOYIi5hfuzmJv7TyggPJfQ==_$$_83rIq2aedQMR6DkI6yuPNWJ1xh92C1e/3DBlwbN0rmtWcTPYUYSCRxZ4YYMYDr9PIkJkzUe2wJrrRbHiTZ7OAg==
14 changes: 14 additions & 0 deletions nondocker/v1/config/keymaker-ui/env-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
window._dynamicEnv_ = {
REACT_APP_GRAPHQL_URI: "http://localhost:36402/graphql",
REACT_APP_RECOMMENDATION_URI: "http://localhost:36401/graphql",
REACT_APP_EULA_GRAPHQL_URI: "ignore",
REACT_APP_AUTH_DOMAIN: "none",
REACT_APP_AUTH_CLIENT_ID: "none",
REACT_APP_AUTH_CALLBACK: "none",
REACT_APP_AUTH_METHOD: "local",
REACT_APP_AUTH_LOGOUT_URL: "localhost",
REACT_APP_EXPIRE_TIME: "3600",
REACT_APP_HIVE_URI: "",
REACT_APP_HIVE_UI: "",
REACT_APP_SOLUTION: "",
};
Binary file added nondocker/v1/keymaker/.DS_Store
Binary file not shown.
30 changes: 30 additions & 0 deletions nondocker/v1/keymaker/admin-api/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# Get the directory of the script
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "Script Directory: $SCRIPT_DIR"

# Navigate to the admin-api directory
cd ../../../../engine-api

# Print current working directory
echo "Current Directory - $(pwd)"

# Install dependencies
npm install || { echo "npm install failed"; exit 1; }

# Build the project
npm run build || { echo "npm run build failed"; exit 1; }

# Define the destination build directory relative to the script location
BUILD_DEST_DIR="$SCRIPT_DIR/build"

# Create the build destination directory if it doesn't exist
mkdir -p "$BUILD_DEST_DIR"

# Copy necessary files to the build directory
cp -r ./dist/* "$BUILD_DEST_DIR" || { echo "Copying files failed"; exit 1; }

cp -r ./package.json ./node_modules "$SCRIPT_DIR" || { echo "Copying files failed"; exit 1; }

echo "Build completed successfully."
21 changes: 21 additions & 0 deletions nondocker/v1/keymaker/admin-api/create-user.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
USERID=$1
PASSWORD=$2
NAME=$3
PICTURE=$4
echo "Creating $USERID"
if [ "$#" -lt 3 ];
then
echo 'Usage: ./create-user.sh <email> <password> <name> [picture] [graphql port] [https]'
exit 1
fi

PORT=4000
if [[ -n "$5" ]]; then PORT=$5; fi

PROTOCOL=http
if [[ -n "$6" ]]; then PROTOCOL=$6; fi

curl "$PROTOCOL://localhost:$PORT/graphql" \
-H 'content-type: application/json' \
--data '{"query":"mutation {\n createUserSignUp(input: {email: \"'"$USERID"'\", password: \"'"$PASSWORD"'\", name: \"'"$NAME"'\", picture: \"'"$PICTURE"'\"}) {\n email\n name\n picture\n }\n}\n"}' \
--compressed
3 changes: 3 additions & 0 deletions nondocker/v1/keymaker/admin-api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions nondocker/v1/keymaker/admin-api/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "keymaker-admin-api",
"version": "6.1.0",
"description": "API app for Keymaker",
"main": "src/index.js",
"scripts": {
"test": "jest",
"start": "./node_modules/.bin/nodemon --exec babel-node src/index.js",
"build": "babel src -d dist; cp .env dist",
"serve": "node build/index.js"
},
"author": "Henry Ball, Suresh Masilamani, Snehal Maid",
"dependencies": {
"@babel/polyfill": "^7.0.0",
"@graphql-tools/load-files": "^6.5.3",
"@graphql-tools/merge": "^8.2.2",
"@neo4j/graphql": "3.4.0",
"apollo-server-express": "^3.12.0",
"axios": "^0.21.4",
"crypto-js": "^4.1.1",
"dotenv": "^10.0.0",
"express": "^4.18.2",
"graphql": "^16.8.0",
"graphql-tag": "^2.12.6",
"graphql-tools": "^8.2.0",
"graphql-type-json": "^0.3.2",
"jsonwebtoken": "^9.0.1",
"jwks-rsa": "^2.0.4",
"lru-cache": "^6.0.0",
"neo4j-driver": "^4.1.2",
"tweetnacl": "^1.0.3",
"tweetnacl-util": "^0.15.1",
"uuid": "^10.0.0",
"winston": "^3.14.2",
"winston-daily-rotate-file": "^5.0.0"
},
"devDependencies": {
"@babel/cli": "^7.17.0",
"@babel/core": "^7.17.0",
"@babel/node": "^7.16.8",
"@babel/plugin-proposal-object-rest-spread": "^7.16.7",
"@babel/plugin-transform-runtime": "^7.17.0",
"@babel/preset-env": "^7.16.11",
"@babel/runtime": "^7.17.0",
"jest": "^29.4.1",
"nodemon": "^2.0.15"
}
}
15 changes: 15 additions & 0 deletions nondocker/v1/keymaker/admin-api/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# Check if .env file exists and source it
if [ -f .env ]; then
export $(cat .env | xargs)
fi

echo "Starting Admin API Service"

# Get the directory of the script
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "Script Directory: $SCRIPT_DIR"

# Navigate to the build directory and start the server
NODE_APP_INSTANCE=keymaker-admin-api npm run serve
30 changes: 30 additions & 0 deletions nondocker/v1/keymaker/engine-api/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# Get the directory of the script
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "Script Directory: $SCRIPT_DIR"

# Navigate to the admin-api directory
cd ../../../../engine-api

# Print current working directory
echo "Current Directory - $(pwd)"

# Install dependencies
npm install || { echo "npm install failed"; exit 1; }

# Build the project
npm run build || { echo "npm run build failed"; exit 1; }

# Define the destination build directory relative to the script location
BUILD_DEST_DIR="$SCRIPT_DIR/build"

# Create the build destination directory if it doesn't exist
mkdir -p "$BUILD_DEST_DIR"

# Copy necessary files to the build directory
cp -r ./dist/* "$BUILD_DEST_DIR" || { echo "Copying files failed"; exit 1; }

cp -r ./package.json ./node_modules "$SCRIPT_DIR" || { echo "Copying files failed"; exit 1; }

echo "Build completed successfully."
45 changes: 45 additions & 0 deletions nondocker/v1/keymaker/engine-api/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "keymaker-engine-api",
"version": "6.1.0",
"description": "Engine API for Keymaker",
"main": "src/index.js",
"scripts": {
"test": "jest",
"start": "./node_modules/.bin/nodemon --exec babel-node src/index.js",
"build": "babel src -d dist; cp .env dist",
"serve": "node build/index.js"
},
"author": "Suresh Masilamani, Henry Ball, Snehal Maid",
"dependencies": {
"@babel/polyfill": "^7.0.0",
"@graphql-tools/load-files": "^6.5.3",
"@graphql-tools/merge": "^8.2.2",
"@neo4j/graphql": "3.4.0",
"apollo-server-express": "^3.12.0",
"crypto-js": "^4.1.1",
"dotenv": "^10.0.0",
"express": "^4.18.2",
"graphql": "^16.8.0",
"graphql-tag": "^2.12.6",
"graphql-tools": "^8.2.0",
"graphql-type-json": "^0.3.2",
"lru-cache": "^6.0.0",
"neo4j-driver": "^4.1.2",
"tweetnacl": "^1.0.3",
"tweetnacl-util": "^0.15.1",
"uuid": "^10.0.0",
"winston": "^3.14.2",
"winston-daily-rotate-file": "^5.0.0"
},
"devDependencies": {
"@babel/cli": "^7.17.0",
"@babel/core": "^7.17.0",
"@babel/node": "^7.16.8",
"@babel/plugin-proposal-object-rest-spread": "^7.16.7",
"@babel/plugin-transform-runtime": "^7.17.0",
"@babel/preset-env": "^7.16.11",
"@babel/runtime": "^7.17.0",
"jest": "^29.4.1",
"nodemon": "^2.0.15"
}
}
13 changes: 13 additions & 0 deletions nondocker/v1/keymaker/engine-api/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# Check if .env file exists and source it
if [ -f .env ]; then
export $(cat .env | xargs)
fi

# Get the directory of the script
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "Script Directory: $SCRIPT_DIR"

# Navigate to the build directory and start the server
npm run serve
Loading

0 comments on commit 99a4e65

Please sign in to comment.