jboss in the trenches - red hat...welcome to trenches bootcamp goal prepare enlisted members on best...
TRANSCRIPT
JBoss in the Trenches
Andrew Block Principal Consultant, Red Hat June 14, 2013
Who Am I?
Andrew Block
Principal Consultant, Red Hat
RHCJA Certified (EAP 5/6)
Currently engaged in
SOA-P to Fuse Implementation
BRMS Architecture and Implementation
Welcome to Trenches Bootcamp
Goal
Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization
Participate
Ask questions! The best way to understand the subject fully is to fill the gaps in your current knowledge
JBoss in the Trenches Bootcamp
The Fine Print
Infrastructure and application management for JBoss EAP can be complex
Assume you have an unlimited amount of:
Time
Money
Resources
Level 1: Orientation
JBoss Versions – Red or Blue Pill
EAP 5 and 6 are significantly different
Design
Structure
Configuration
What versions are you running?
How to tell
JBoss Console
EAP 5
jboss-system.jar inside server lib folder
EAP 6
Management Console
Version.txt inside root server directory
CLI Tool
JBoss Operations Network (JON)
Level 2: Configuration Management
Motivations
Multiple JBoss configurations typically exist in a single Enterprise
How are they managed?
Handling Modifications
How are configuration changes handled?
How are machines patched?
Streamline provisioning
How are applications deployed?
Players
Red Hat Customer Portal (CP)
Version Control System (VCS)
Build Tool
JBoss CLI (EAP 6)
Configuration Management Tool
Management using the Command Line Interface
Introduced in EAP 6
Manage standalone and domain instances remotely
Access to all configurations
Dynamic Model Representation (DMR) syntax
CLI GUI Tool
Visual representation of the CLI tool
Provides a Command Builder
Add the --gui argument to the connection string
Deployment Best Practices
Version Parity
Across environments (DEV, QA, STAGE, PROD)
Developer Machines
Standardize Configurations
Track all versions that are utilized throughout your enterprise
Configuration Approach 1
Download fresh copy of JBoss from CP
Apply changes manually or using build tools
Check in “Gold Copy” into VCS
Changes made are entered as VCS comments and/or scripts are also checked into VCS
Useful when having a large number of JBoss instances with similar configurations
Configuration Approach 1
Configuration Approach 2
Download fresh copy of JBoss from CP
Immediately Check into VCS
Create automated process to configure JBoss Instances
Steps/scripts also checked into VCS
At deployment time, use automated process to apply configurations
Configuration Approach 2
Environment Management
Understand your environments
Environment Management
Isolate your environments
Ensure no shared resources
Databases, load balancers, integration points
Staging should replicate Production
Define the users and roles for access to JBoss servers and supporting tools
Managing Deployments
Application artifacts should be stored in a repository such as Nexus
Deployments should be completed using an automated, scripted process
Hands off!
Test, test, test. Did I mention test?
Should be completed thoroughly in each environment
Make sure plan is in place for rolling back deployments
Managing Deployments
Managing Deployments – EAP 6 Domain
Configuration Management Review
Plan ahead
Document all procedures and processes
Utilize VCS and Configuration Management Tools
Level 3: Optimizing Configurations
Application/Platform Cycle
Application/Platform Cycle
EAP 6 Modes
Standalone vs Domain
Profiles
Base configurations
for EAP
EAP 6 Profiles
Modules in EAP 6
Module Management
Reasons for creating additional core modules
Datasources
3rd party jars
Separate user defined modules
Useful if defining properties files or common jar’s
Set JBOSS_MODULEPATH environmental variable
Slimming
Reduce the number of services
Improves Security and Performance
Module classloader in EAP 6 does most of the work for us now
Test thoroughly!
Security
Create a dedicated system user to run JBoss
Use the EAP 6 Vault
Keystore based mechanism to store plain text passwords
Eliminate plain text passwords
Datasources
LoginModules
Connectors (Tomcat)
Security
Secure the EAP 6 Management Realm
Secure the EAP 6 Management Console
Disable the Management Console
Cannot do if using certain monitoring Tools
Remove JMX Access
Removed by default in domain mode
Logging
Define a robust logging strategy depending on Application and Enterprise requirements
Levels should be set accordingly for each environment
Less verbose as it gets closer to Production
Avoid logging to console in Production
EAP 6 provides a newer and improved API compared to previous versions
Messaging
Multiple providers
Unlock the power of HornetQ on EAP 5
High performance journal maintained on disk
When running on Linux, configure to utilize native asynchronous I/O
Plan for the Future
HornetQ is the default implementation for EAP6
Explore other providers
High Availability
To fully achieve high availability, consider all potential failure scenarios
Considerations
Front end load balancers
Webservers
Application servers
Databases
Other integration points
High Availability
JBoss Caching Options
EAP 5 – JBoss Cache
EAP 6 – Infinispan
HA Implementations
Web – replication of HTTP sessions
Hibernate - second level cache
Stateless and Stateful session beans
Achieving Optimal Performance
Testing
Monitoring
Tuning
Testing
Be sure to test at each level
Application
Integration Testing
Load Testing
Endurance Testing
Stress Testing
Establish dedicated environments to facilitate testing
Monitoring
Necessary in any production environment
Metrics to monitor
Base server statistics (CPU, Memory, HDD)
Persistence (Datasource and ORM)
Transactions
Cache
Web Connectors
JVM (Memory usage and GC)
Tuning
Find that perfect balance
Key areas of focus
JVM
JCA
Web Connectors
JMS
Numerous tools available to determine optimal configurations
Level 4: Migrations
Migrating JBoss Server Configurations
Simplified configuration
Consolidate settings
Update settings
Update static Java libraries
Migrating Applications
EAP 4/5 to EAP 6
Update JNDI Lookups
EJB Lookups
Deployment descriptors
Another platform to JBoss
JBoss Windup (Formerly Cake)
Tool to simplify Java migrations
Produce reports and Level of Effort (LOE)
estimates
JBoss Windup
Level 5: To the Cloud
Avoid the fog
Understand the differences
Public
Private
Hybrid
Know the limitations
Plan accordingly
Monitoring
Deployments
Cloud Software Deployment
1. Push and Tag
2. Clone from Tag in upstream environment
Trenches Graduation
Congratulations!
Completed training on industry tested best practices and principles for configuring and managing JBoss
Go forth and set the JBoss world on fire!!
Thank you
Speaker: Andrew Block Email: [email protected] Follow me on Twitter: @sabre1041