Skip to content

StackV Deployment

xi-yang edited this page Mar 22, 2017 · 1 revision

Pulling StackV from Github, and deploying it onto the Wildfly server.

Make sure to have installed [Wildfly](Installing Wildfly 10.0.0 on Centos 7.1), and configured [MySQL and Maria DB](Configuring MySQL and MariaDB in Centos)

  1. Download Maven from here, and create a symlink between apache-maven-**/bin/mvn and /usr/bin/mvn

  2. Install git through sudo yum install git

  3. Clone the StackV code from GitHub using git clone [clone url here], and update the code by entering the following.

    git checkout [name of updated branch]
    git pull
    
  4. There are a few databases and logins required for StackV deployment. First, enter mysql -uroot to enter the SQL console, and enter the following source [path to localhost.sql file].

    1. Create three databases -- login, frontend, and rainsdb -- by entering create database [name of database] in the console.

    2. There are two users that need to be created with the following credentials: U/N: login_view ; P/W: loginuser U/N: front_view ; P/W: frontuser. Thus enter the following, then enter SET PASSWORD FOR root@localhost = PASSWORD('xxxx'); to create a password for root.

      CREATE USER 'login_view'@'localhost' IDENTIFIED BY 'loginuser';
      CREATE USER 'front_view'@'localhost' IDENTIFIED BY 'frontuser';
      
    3. Give full privileges to login_view and front_view by running the following

      GRANT ALL ON login.* TO 'login_view'@'localhost';
      GRANT ALL ON frontend.* TO 'front_view'@'localhost';
      
  5. Move into the StackV directory and then enter mvn -Pdeploy-nuke clean install -DskipTests to compile Versastack if deploying for the first time.

    1. If you are not deploying for the first time, leave out the -Pdeploy-nuke, and make sure to clear out the /opt/wildfly/standalone/deployments directory before deploying
  6. To deploy StackV, copy the StackV-ear over into the wildfly deployments directory

    cp StackV-ear/target/StackV-ear-1.0-SNAPSHOT.ear /opt/wildfly/standalone/deployments
    

Troubleshooting

  1. Check the status of wildfly by doing systemctl status wildfly.service
  2. Check the server.log by doing /opt/wildfly/standalone/log/server.log
  3. Run standalone.sh in the /opt/wildfly/bin/ directory to see other errors
  4. If Wildfly is having trouble deploying, make sure that the privileges are for the wildfly user and not root. To change the privileges, run this in StackV
    chown -R wildfly:wildfly /opt/wildfly/*
    

Clone this wiki locally