50

JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate
Page 2: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

JBoss in the Trenches

Andrew Block Principal Consultant, Red Hat June 14, 2013

Page 3: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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

Page 4: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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

Page 5: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

JBoss in the Trenches Bootcamp

Page 6: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

The Fine Print

Infrastructure and application management for JBoss EAP can be complex

Assume you have an unlimited amount of:

Time

Money

Resources

Page 7: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Level 1: Orientation

Page 8: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

JBoss Versions – Red or Blue Pill

EAP 5 and 6 are significantly different

Design

Structure

Configuration

Page 9: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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)

Page 10: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Level 2: Configuration Management

Page 11: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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?

Page 12: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Players

Red Hat Customer Portal (CP)

Version Control System (VCS)

Build Tool

JBoss CLI (EAP 6)

Configuration Management Tool

Page 13: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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

Page 14: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

CLI GUI Tool

Visual representation of the CLI tool

Provides a Command Builder

Add the --gui argument to the connection string

Page 15: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Deployment Best Practices

Version Parity

Across environments (DEV, QA, STAGE, PROD)

Developer Machines

Standardize Configurations

Track all versions that are utilized throughout your enterprise

Page 16: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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

Page 17: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Configuration Approach 1

Page 18: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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

Page 19: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Configuration Approach 2

Page 20: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Environment Management

Understand your environments

Page 21: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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

Page 22: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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

Page 23: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Managing Deployments

Page 24: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Managing Deployments – EAP 6 Domain

Page 25: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Configuration Management Review

Plan ahead

Document all procedures and processes

Utilize VCS and Configuration Management Tools

Page 26: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Level 3: Optimizing Configurations

Page 27: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Application/Platform Cycle

Page 28: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Application/Platform Cycle

EAP 6 Modes

Standalone vs Domain

Profiles

Base configurations

for EAP

EAP 6 Profiles

Page 29: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Modules in EAP 6

Page 30: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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

Page 31: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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!

Page 32: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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)

Page 33: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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

Page 34: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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

Page 35: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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

Page 36: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

High Availability

To fully achieve high availability, consider all potential failure scenarios

Considerations

Front end load balancers

Webservers

Application servers

Databases

Other integration points

Page 37: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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

Page 38: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Achieving Optimal Performance

Testing

Monitoring

Tuning

Page 39: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Testing

Be sure to test at each level

Application

Integration Testing

Load Testing

Endurance Testing

Stress Testing

Establish dedicated environments to facilitate testing

Page 40: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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)

Page 41: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Tuning

Find that perfect balance

Key areas of focus

JVM

JCA

Web Connectors

JMS

Numerous tools available to determine optimal configurations

Page 42: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Level 4: Migrations

Page 43: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Migrating JBoss Server Configurations

Simplified configuration

Consolidate settings

Update settings

Update static Java libraries

Page 44: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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

Page 45: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

JBoss Windup

Page 46: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Level 5: To the Cloud

Page 47: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Avoid the fog

Understand the differences

Public

Private

Hybrid

Know the limitations

Plan accordingly

Monitoring

Deployments

Page 48: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Cloud Software Deployment

1. Push and Tag

2. Clone from Tag in upstream environment

Page 49: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

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!!

Page 50: JBoss in the Trenches - Red Hat...Welcome to Trenches Bootcamp Goal Prepare enlisted members on best practices to configure and manage JBoss Middleware in their organization Participate

Thank you

Speaker: Andrew Block Email: [email protected] Follow me on Twitter: @sabre1041