Joget Workflow v5 Training Slides - Module 20 - Basic System Administration

  • View
    162

  • Download
    8

Embed Size (px)

Text of Joget Workflow v5 Training Slides - Module 20 - Basic System Administration

Joget Workflow v4 - Training

Joget Workflow v5

Basic System Administration

http://facebook.com/jogetworkflowhttp://twitter.com/jogetworkflow

Last Revised on May 2016Joget Inc Internal Use Only

All Rights Reserved Joget Inc

1

Joget Inc Internal Use OnlyJoget Inc Internal Use Only

PrerequisitesBasic knowledge on how to create Joget App.Proficient in server administration (i.e. Application server, Database Server, Networking).Joget Inc Internal Use Only

All Rights Reserved Joget Inc

ContentTypical stack for Joget WorkflowBasic Database Management (MySQL)Basic Application Server Management (Tomcat)Joget Inc Internal Use Only

All Rights Reserved Joget Inc

Chapter 1Typical stack for JogetJoget Inc Internal Use Only

All Rights Reserved Joget Inc

Typical Platform RequirementApache TomcatMySQLJDK

Joget Inc Internal Use Only

All Rights Reserved Joget Inc

Joget Inc Internal Use Only

All Rights Reserved Joget Inc

Plugin Types

Joget Inc Internal Use Only

All Rights Reserved Joget Inc

ServerThe typical stack

Joget Inc Internal Use Only Database (MySQL)Application Server (Tomcat)Joget

Firewall

All Rights Reserved Joget Inc

DiscussionCan we use other Application Server container other than Tomcat?Can we use other Database System other than MySQL?Must we use RDBMS?How does Joget talk to MySQL?How do users access Joget Workflow?Can we separate Application Server and Database Server?Joget Inc Internal Use Only

All Rights Reserved Joget Inc

Chapter ReviewGeneral understanding on how Joget Workflow is hosted.Joget Inc Internal Use Only

All Rights Reserved Joget Inc

Chapter 2Basic Database Management (MySQL)Joget Inc Internal Use Only

All Rights Reserved Joget Inc

Typical Platform Requirement

We are going to inspect the DatasourceJoget Inc Internal Use OnlyApache Tomcat 6MySQL 5Sun JDK 6

Apache TomcatMySQLJDK

All Rights Reserved Joget Inc

Datasource ProfileJoget Workflow supports configuration of *multiple datasource profiles, but only 1 profile is activated at any point of time.Joget Inc Internal Use Only

All Rights Reserved Joget Inc

Datasource Profile Configuration in Workflow Management ConsoleJoget Inc Internal Use OnlyThe Datasource Profile can also be located in Settings -> Datasource & Profile

All Rights Reserved Joget Inc

Datasource Profile Configuration in File SystemJoget Inc Internal Use OnlyThe Datasource Profile can be located in the wflow folder.

All Rights Reserved Joget Inc

Optional Exercise Setting up new DatabaseAssuming that our current installation of Joget Workflow is connecting to the MySQL database named jwdbWe are going to:Create a new database named wflowdb, and import it with necessary structureCreate a new datasource profile that uses wflowdbSwitch Joget Workflows datasource profile to use wflowdbJoget Inc Internal Use Only

All Rights Reserved Joget Inc

1. Setup empty wflowdbAssuming MySQL is installed in C:\joget\mysqlRun command promptcd C:\Joget\mysql\binmysql u rootmysql> create database wflowdb;Query OK, 1 row affected (0.05 sec)mysql> exit;Byemysql -u root wflowdb < C:\Joget\data\jwdb-empty.sql

Location of the SQL import file

Import to this database Joget Inc Internal Use Only

All Rights Reserved Joget Inc

2. Verify Creation of wflowdbRun command promptmysql u rootmysql> show databases;+--------------------+| Database |+--------------------+| information_schema || mysql || wflowdb |+--------------------+3 rows in set (0.00 sec)mysql> exit;ByeJoget Inc Internal Use Only

All Rights Reserved Joget Inc

3. Create A New Datasource ProfileLogin to Joget as Admin userNavigate to System Settings > Datasource & Profile SettingAmend the URL field and change jwdb to wflowdb (without quotation marks)Specify a new profile name wflowClick on the Save As New Profile buttonJoget Inc Internal Use Only

All Rights Reserved Joget Inc

3. Create A New Datasource ProfileJoget Inc Internal Use Only

All Rights Reserved Joget Inc

4. Compare The Changes in File SystemThe value of currentProfile in /wflow/app_datasource.properties is changed to wflowA new file, /wflow/app_datasource-wflow.properties is created, with configurations to wflow datasourceJoget Inc Internal Use Only

All Rights Reserved Joget Inc

Database User / Password Changed?Open to edit /wflow/app_datasource-profileName.properties file in text editor.To update database username, amend the values for workflowUser.To update database password, amend the values of workflowPassword.Restart Joget Workflow server (or Apache Tomcat) for changes to take effect.Joget Inc Internal Use Only

All Rights Reserved Joget Inc

DiscussionCan we use other Application Server container other than Tomcat?Can we use other Database System other than MySQL?Must we use RDBMS?How does Joget talk to MySQL?How do users access Joget Workflow?Can we separate Application Server and Database Server?Joget Inc Internal Use Only

All Rights Reserved Joget Inc

Chapter ReviewGeneral understanding on how Joget connects to the Database system.Joget Inc Internal Use Only

All Rights Reserved Joget Inc

Chapter 3Basic Application Server Management (Tomcat)Joget Inc Internal Use Only

All Rights Reserved Joget Inc

Typical Platform RequirementApache TomcatMySQLJDK

We are going to inspect TomcatJoget Inc Internal Use Only

All Rights Reserved Joget Inc

Joget Workflow Application FilesIn Apache Tomcat, there are 2 Joget Workflow web application files to be noted:{Tomcat}/webapps/jw.war{Tomcat}/webapps/jwdesigner.warJoget Inc Internal Use Only

All Rights Reserved Joget Inc

Updating JogetEssentially, one will only need to replace the .war files with the latest available ones.You can update your Joget Workflow by following these steps:Stop Joget.Delete "jw" folder, "jwdesigner" folder, "jw.war" & "jwdesigner.war" in your "[Joget Installation Directory]/apache-tomcat-8.0.20/webapps".Delete "jw" folder, "jwdesigner" folder in your "[Joget Installation Directory]/[tomcat]/work/Catalina/localhost".Place the downloaded "jw.war" & "jwdesigner.war" in "[Joget Installation Directory]/[tomcat]/webapps".Start Joget.

Joget Inc Internal Use Only

All Rights Reserved Joget Inc

wflow.home DirectoryThe location where the following Joget Workflow physical files are stored:Datasource and profile configurationsXML definition and HTML rendering of forms designed using Form BuilderPlugins Graphical image and thumbnail of all processesUploaded Files Attachments

Joget Inc Internal Use Only

All Rights Reserved Joget Inc

Where is The wflow.home Directory?Open joget-start.bat using text editor, and look for the JAVA_OPTS parameters. wflow.home is configured using the -Dwflow.home option

Joget Inc Internal Use Only

All Rights Reserved Joget Inc

BackupTo backup Joget Workflow, you should include:Databasemysqldump -u root wflowdb > backup.sqlwflow.home DirectoryJoget Inc Internal Use Only

All Rights Reserved Joget Inc

Log FilesWhen Joget Workflow is running in console, all log messages are shown on the console windowLog messages from Apache Tomcat are written to {Tomcat}/logs/catalina.yyyy-MM-dd.logLog messages from Joget Workflow are written to {Tomcat}/logs/localhost.yyyy-MM-dd.logTo customize the logging behaviors, edit {Tomcat}/conf/logging.properties fileJoget Inc Internal Use Only

All Rights Reserved Joget Inc

What is a Stack Trace?

Joget Inc Internal Use Only

All Rights Reserved Joget Inc

What is a Stack Trace?When an error is thrown, a stack trace will depict a sequence of events executed in the code level, which can precisely suggest the point where an exception is caught.Stack trace could also suggest meaningful error message to help troubleshooting.In the example above, indicative error message is shown before stack trace:ERROR 02 Sep 2010 10:19:51 org.hibernate.util.JDBCExceptionReporter - Cannot create PoolableConnectionFactory (Access denied for user 'roo'@'localhost' (using password: NO))Joget Inc Internal Use Only

All Rights Reserved Joget Inc

TroubleshootingWhen youre seeking for help on troubleshooting, copy the whole stack trace (all log messages printed at the same date time) and share it out. This can help the troubleshooter to have a better idea on the error.

Joget Inc Internal Use Only

All Rights Reserved Joget Inc

Memory AllocationOpen joget-start.bat using text editor, and look for the JAVA_OPTS parameters. Memory allocation is configured using the -Xmx option

Joget Inc Internal Use Only

All Rights Reserved Joget Inc

Changing Apache Tomcat HTTP PortOpen to edit {Tomcat}/conf/server.xml using text editorLook for the HTTP/1.1 connector configuration:

Change the port number to your preferred one, and restart Joget Workflow Server (Apache Tomcat)keytool -genkey -alias tomcat -keyalg RSAEnter keystore password: passwordRe-enter new password: passwordWhat is your first and last name? [Unknown]: RobertWhat is the name of your organizational unit? [Unknown]: homeWhat is the name of your organization? [Unknown]: homeWhat is the name of your City or Locality? [Unknown]: SFWhat is the name of your State or Province? [Unknown]: CAWhat is the two-letter country code for this unit? [Unknown]: USIs CN=Robert, OU=home, O=home, L=SF, ST=CA, C=US correct? [no