joget workflow v5 training slides - module 20 - basic system administration
Post on 14-Apr-2017
192 Views
Preview:
TRANSCRIPT
All Rights Reserved © Joget Inc
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
Prerequisites
1. Basic knowledge on how to create Joget App.2. Proficient in server administration (i.e. Application
server, Database Server, Networking).
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Content
1. Typical stack for Joget Workflow2. Basic Database Management (MySQL)3. Basic Application Server Management (Tomcat)
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Chapter 1
Typical stack for Joget
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Typical Platform Requirement
Apache Tomcat MySQL JDK
Joget Inc Internal Use Only
All Rights Reserved © Joget IncJoget 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
Fire
wal
l
All Rights Reserved © Joget Inc
Discussion
• Can 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 Review
• General understanding on how Joget Workflow is hosted.
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Chapter 2
Basic Database Management (MySQL)
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Typical Platform Requirement
We are going to inspect the Datasource
Joget Inc Internal Use Only
Apache Tomcat 6 MySQL 5 Sun JDK 6Apache Tomcat MySQL JDK
All Rights Reserved © Joget Inc
Datasource Profile
• Joget 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 Console
Joget Inc Internal Use Only
• The Datasource Profile can also be located in Settings -> Datasource & Profile
All Rights Reserved © Joget Inc
Datasource Profile Configuration in File System
Joget Inc Internal Use Only
• The Datasource Profile can be located in the wflow folder.
All Rights Reserved © Joget Inc
Optional Exercise – Setting up new Database
• Assuming that our current installation of Joget Workflow is connecting to the MySQL database named “jwdb”
• We are going to:1. Create a new database named “wflowdb”, and import it with
necessary structure2. Create a new datasource profile that uses “wflowdb”3. Switch Joget Workflow’s datasource profile to use “wflowdb”
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
1. Setup empty wflowdb
• Assuming MySQL is installed in C:\joget\mysql• Run command prompt
cd 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 fileImport to this database
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
2. Verify Creation of wflowdb
• Run command promptmysql –u rootmysql> show databases;+--------------------+| Database |+--------------------+| information_schema || mysql || wflowdb |+--------------------+3 rows in set (0.00 sec)mysql> exit;Bye
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
3. Create A New Datasource Profile
• Login to Joget as Admin user• Navigate to System Settings > Datasource & Profile
Setting• Amend the URL field and change “jwdb” to “wflowdb”
(without quotation marks)• Specify a new profile name – wflow• Click on the “Save As New Profile” button
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
3. Create A New Datasource Profile
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
4. Compare The Changes in File System
• The value of currentProfile in /wflow/app_datasource.properties is changed to wflow
• A new file, /wflow/app_datasource-wflow.properties is created, with configurations to wflow datasource
Joget 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
Discussion
• Can 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 Review
• General understanding on how Joget connects to the Database system.
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Chapter 3
Basic Application Server Management (Tomcat)
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Typical Platform Requirement
Apache Tomcat MySQL JDK
We are going to inspect Tomcat
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Joget Workflow Application Files
• In Apache Tomcat, there are 2 Joget Workflow web application files to be noted:– {Tomcat}/webapps/jw.war– {Tomcat}/webapps/jwdesigner.war
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Updating Joget
• Essentially, one will only need to replace the .war files with the latest available ones.
• You can update your Joget Workflow by following these steps:1. Stop Joget.2. Delete "jw" folder, "jwdesigner" folder, "jw.war" & "jwdesigner.war" in
your "[Joget Installation Directory]/apache-tomcat-8.0.20/webapps".3. Delete "jw" folder, "jwdesigner" folder in your "[Joget Installation
Directory]/[tomcat]/work/Catalina/localhost".4. Place the downloaded "jw.war" & "jwdesigner.war" in "[Joget
Installation Directory]/[tomcat]/webapps".5. Start Joget.
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
wflow.home Directory
• The location where the following Joget Workflow physical files are stored:– Datasource and profile configurations– XML definition and HTML rendering of forms designed using
Form Builder– Plugins – Graphical image and thumbnail of all processes– Uploaded 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
Backup
• To backup Joget Workflow, you should include:– Database
• mysqldump -u root wflowdb > backup.sql– wflow.home Directory
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Log Files
• When Joget Workflow is running in console, all log messages are shown on the console window
• Log messages from Apache Tomcat are written to {Tomcat}/logs/catalina.yyyy-MM-dd.log
• Log messages from Joget Workflow are written to {Tomcat}/logs/localhost.yyyy-MM-dd.log
• To customize the logging behaviors, edit {Tomcat}/conf/logging.properties file
Joget 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
Troubleshooting
• When you’re 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 Allocation
• Open 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 Port
• Open to edit {Tomcat}/conf/server.xml using text editor• Look for the HTTP/1.1 connector configuration:
• Change the port number to your preferred one, and restart Joget Workflow Server (Apache Tomcat)
<Connector port="8080" protocol="HTTP/1.1"
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Optional Exercise – Setting up SSL
• Assuming that you are running Joget on Tomcat with the default bundle.
• We are going to:-1. Generate a key store file.2. Configure Tomcat to support SSL.
Reference: http://dev.joget.org/community/display/KBv5/Setting+Up+SSL+on+Tomcat
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
1. Generate a key store file
• First of all, we will need to generate a key store file. You may want to generate it with or without a SSL certificate purchased from your SSL certificate provider. This is an example on generating one by ourselves.
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
1. Generate a key store file
Joget Inc Internal Use Only
C:\Program Files\Java\jdk1.7.0\bin>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]: yes
Enter key password for <tomcat> (RETURN if same as keystore password): passwordRe-enter new password: passwordC:\Program Files\Java\jdk1.7.0\bin>
All Rights Reserved © Joget Inc
2. Configure Tomcat to support SSL
• Make sure that your server is not running. Open up \apache-tomcat\conf\server.xml, uncomment and edit the following lines accordingly.
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
2. Configure Tomcat to support SSL
• Port: 8443 to 443 (If you intend to browse to https://yourDomain instead of https://yourDomain:8443)keystoreFile: Path to the .keystore filekeystorePass: The password defined earlier
Joget Inc Internal Use Only
<!-- Define a SSL HTTP/1.1 Connector on port 8443 This connector uses the JSSE configuration, when using APR, the connector should be using the OpenSSL style configuration described in the APR documentation -->
<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS"
keystoreFile="C:/Users/Robert/.keystore" keystorePass="password" />
All Rights Reserved © Joget Inc
2. Configure Tomcat to support SSL
• Start your server. • You may now surf to your Joget at https://yourDomain/jw
or https://yourDomain:8443/jw depending on what is configured.
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Chapter Review
• General understanding on how Joget Workflow is “hosted” runs under application server – Tomcat.
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Module Review
1. Typical stack for Joget Workflow2. Basic Database Management (MySQL)3. Basic Application Server Management (Tomcat)
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Recommended Further Learning
• Best Practices on Application Building• Server performance tuning and hardening.• Database server performance tuning.
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Stay Connected with Joget Workflow
• http://www.joget.org • http://community.joget.org • http://twitter.com/jogetworkflow • http://facebook.com/jogetworkflow • http://youtube.com/jogetworkflow • http://slideshare.net/joget
Joget Inc Internal Use Only
top related