Giter Club home page Giter Club logo

windup-web's Introduction

Trying out RHAMT Web Console

If you just want to run RHAMT Web Console, not build or modify it, the simplest way is to use the docker image at https://hub.docker.com/r/windup3/windup-web_nightly/.

If you want to build RHAMT Web Console yourself and run it without setting up a WildFly server and Keycloak, you can build windup-web-distribution after building windup-web to create a self-contained distribution.

Setting up the development environment

Requirements

  1. JDK 8
  2. Maven 3.2.5+ (3.3.x recommended)

Environment setup

  1. Set your local Maven setting.xml by copying file settings.xml from checked out sources into $HOME/.m2/ or use it directly while calling maven with option -s settings.xml

  2. Install NodeJS Package Manager (npm)

    • Debian/Ubuntu: sudo apt-get install npm
    • RHEL 7: 1) Install EPEL 2) sudo yum install npm
    • Fedora: sudo dnf install npm

    NOTE: If npm is version is less than 3.8.8, try the following to force an update:

       sudo npm install -g npm
    
  3. Install yarn package manager

    Note: Check that your installed version of yarn is at least v0.22.0 (yarn --version)

  4. Install Bower using NPM

    • sudo npm install -g bower
    • If you run into problems with permissions (typically EACCES error), use this guide to fix it.
    • npm install command should be replaceable with yarn add.
    • For global packages, use sudo yarn global add. Yarn should be faster, but if there is any problem with it, use NPM. Here is nice comparison of npm and yarn commands.
  5. Get current version of phantomjs

    if phantomjs is not installed yet, run

      sudo npm install -g phantomjs-prebuilt
    

    Or

      sudo npm install -g phantomjs-prebuilt --unsafe-perm
    

    else run

      sudo npm update -g phantomjs-prebuilt
    
  6. For development purpose and regular redeployment, raise the Metaspace limit. In wildfly-10.1.0.Final/bin/standalone.conf, change the MaxMetaspaceSize value to 2048:

    JAVA_OPTS="-Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=2048m -Djava.net.preferIPv4Stack=true"
    

Building the Windup project

To build Windup, you need to clone and build several git repositories:

If you want to contribute to Windup development, here is a script which clones the repositories, adds the upstream and sets up the remote tracking branches. First, you'll need to fork all the repositories to your user account. Then, change your GitHub.com user name in the script below.

GITHUB_USER="OndraZizka"
BASEDIR=$(pwd)
for i in \
windup \
windup-rulesets \
windup-quickstarts \
windup-distribution \
maven-indexer \
windup-maven-plugin \
; do 
    cd $BASEDIR
    git clone [email protected]:$GITHUB_USER/$i.git
    cd $i
    git remote add upstream https://github.com/windup/$i.git
    git fetch upstream
    git branch --set-upstream-to=upstream/master
    git pull
    mvn clean install -DskipTests
done
cd $BASEDIR

# Install NodeJS 6+
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
# Install NPM
sudo apt-get install npm
sudo npm install -g npm

#sudo apt install yarn
sudo npm install -g yarn
sudo npm install -g bower
sudo npm install -g phantomjs-prebuilt
## Then fix NPM permissions, basically by downloading and installing it just for one user…
## https://docs.npmjs.com/getting-started/fixing-npm-permissions

BASEDIR=$(pwd)
for i in \
windup-keycloak-tool \
windup-web \
windup-web-distribution \
; do 
    cd $BASEDIR
    git clone [email protected]:$GITHUB_USER/$i.git
    cd $i
    git remote add upstream https://github.com/windup/$i.git
    git fetch upstream
    git branch --set-upstream-to=upstream/master
    git pull
    mvn clean install -DskipTests
done
cd $BASEDIR

Running the webapp

  • Build: mvn clean install -DskipTests

  • Wildfly/EAP 7 must be run with -c standalone-full.xml as Messaging subsystem is required.

  • Execute the CLI script at: scripts/eap-setup.cli on Wildfly/EAP 7

    bin/jboss-cli.sh -c --file=scripts/eap-setup.cli

  • Deploy the exploded services/target/rhamt-web/api and ui/target/rhamt-web to EAP 7.

    There are 3 possible ways how to do it.

    • Manual copying:

      cp -r services/target/rhamt-web/api ~/apps/wildfly-10.1.0.Final/standalone/deployments/rhamt-web/api.war;
      touch ~/apps/wildfly-10.1.0.Final/standalone/deployments/rmaht-web/api.war.dodeploy;
      cp -r ui/target/rhamt-web ~/apps/wildfly-10.1.0.Final/standalone/deployments/rhamt-web.war;
      touch ~/apps/wildfly-10.1.0.Final/standalone/deployments/rhamt-web.war.dodeploy;
      

      or

    • JBoss CLI deployment, deploy the target directory directly - see WildFly docs:

      deploy services/target/rhamt-web/api --unmanaged;
      deploy ui/target/rhamt-web --unmanaged;
      

      or

    • Editing profile configuration and adding the following block to standalone-full.xml under <server>, at the end of the file:

      <deployments>
          <deployment name="rhamt-web/api" runtime-name="api.war">
              <fs-exploded path=".../windup-web/services/target/rhamt-web/api"/>
          </deployment>
          <deployment name="rhamt-web" runtime-name="rhamt-web.war">
              <fs-exploded path=".../windup-web/ui/target/rhamt-web"/>
          </deployment>
      </deployments>

    Note: Replace ... with real absolute path on your local environment.

  • Follow the steps for deploying keycloak in Keycloak Setup

  • Access the webapp: http://localhost:8080/rhamt-web

Deploy your changes while coding

  • Follow the previous step (use the 3rd way of running the webapp: edit standalone-full.xml)
  • Install webpack: sudo npm install --global [email protected]
  • Move to webapp folder: cd windup-web/ui/src/main/webapp
  • Execute webpack -w

windup-web's People

Contributors

carlosthe19916 avatar d-s avatar gastaldi avatar jonathanvila avatar jsight avatar klinki avatar lincolnthree avatar m-brophy avatar maarc avatar mareknovotny avatar mrizzi avatar ondrazizka avatar philipcattanach avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.