Skip to content
forked from CBIIT/cananolab

caNanoLab is a web-based portal designed to capture nanotechnology data.

License

Notifications You must be signed in to change notification settings

isb-cgc/cananolab

 
 

Repository files navigation

caNanoLab Project

Refer to the caNanoLab Wiki Home Page for complete and current caNanoLab user documentation and other technical information.

Software Requirements

  • JDK8 - available at OpenJDK
  • An IDE (there is a Vagrant plugin for JetBrains IdeaJ)
  • For Vagrant VM development:
    • Hashicorp Vagrant
    • Oracle VirtualBox

Before proceeding, make a new project in your IDE and clone the caNanoLab repository from GitHub (github.com/isb-cgc/cananolab).

Local Deployment using a Vagrant VM

Step 0: Install Node and Build the Front End

  • Download and install Node 16 for your machine. Do not use a newer version, and do not install it from the VM.
  • Open a Command Line prompt and change directories to cananolab/software/canaolab-client-new
  • npm i
  • npm install -g @angular/cli@latest
  • ng build --base-href / --output-path ./build/

Step 1: Load provided JAR dependencies

    Download the additional JARs from the dev-tier deployment bucket /jars folder or the caNano Google Drive Build Libraries folder and place them into cananolab/localDev/jars

Step 2: Load provided JAR dependencies

    Create a directory above the git repository root (cananolab) named secure_files. Note that if you are using IdeaJ this directory will be in your IdeajProjects directory.

Step 3a: With IdeaJ integration

  • Launch IdeaJ
  • Install the Vagrant plugin for IdeaJ from File > Settings > Plugins.
    • Start typing Vagrant into the search box and the plugin should appear.
    • The plugin can only be installed after installing Vagrant and VirtualBox on your machine.
    • Double-check that your PATH/path has the Vagrant and VirutalBox executables on it.
  • Tools > Vagrant > Up
    • Your first build will need to download the VirtualBox image. This might take a few extra minutes to complete depending on your connection speed.
    • Subsequent builds will use this same image and should be faster.
    • Vagrant will run several build scripts to load MySQL and set up the database, download and install Wildfly 23, copy the Angular front end into the correct spot, and build the initial WAR.
  • Once the build finishes, in IdeaJ go to Tools > Start SSH Session > Vagrant at [path to your Vagrant build]
    • This will eventually open a terminal in the lower half of the IdeaJ window.
    • It can be slow; alternatively you can use your own SSH client if you prefer.

Step 3b: Without IdeaJ integration

  • In your machine's CLI, change directories to cananolab/software/cananolab-wepapp/
  • vagrant up
  • The build should complete with an exit code of 0. At this point you can SSH into the VM from any SSH client using a login and password of vagrant/vagrant on port 2222.

Step 4: Starting Wildfly on your VM

From the VM command line:
  • cd /home/vagrant/cananolab/shell/
  • sudo -E ./build-and-redeploy.sh &
Leaving off the -d switch will result in the system only starting Wildfly and deploying.

Rebuilding and Redeploying

From the VM command line:
  • cd /home/vagrant/cananolab/software/cananolab-webapp/
  • sudo -E ../../shell/build-and-redeploy.sh -d &

The -d switch will cause the script to rebuild the WAR before starting wildfly and (re)deploying.

Wildfly will output its logs directly to the console.

Local Deployment directly on a Linux/OSX platform

About

caNanoLab is a web-based portal designed to capture nanotechnology data.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 83.2%
  • Java 11.7%
  • HTML 1.8%
  • TypeScript 1.6%
  • CSS 1.3%
  • SCSS 0.2%
  • Other 0.2%