Alfresco Environment Validation and "Day Zero" Configuration

Post on 22-May-2015

4.768 views 6 download

Tags:

description

This session will commence with the environmental checks that should be performed prior to the installation of Alfresco, and then describe the "day zero" configuration changes that should be made to ensure that the installed Alfresco instance is optimally configured.

Transcript of Alfresco Environment Validation and "Day Zero" Configuration

1

BP-1 - Alfresco Environment Validation & "Day Zero" ConfigurationPeter MonksDirector, Professional Services, Alfresco

twitter: @pmonks, @AlfrescoPS

2

Agenda

“Day Zero” Configuration

• Alfresco’s default configuration• What is “Day Zero” configuration?• Why perform it, and when?• Configuration steps

Environment Validation

• What is environment validation?• Why perform it, and when?• Validation steps• Environment Validation Tool

3

Environment Validation

• Validate environment suitability for installation of Alfresco

• Specifically:• Validate against Supported Platforms• Validate environment:

• Server hardware• OS configuration• 3rd party applications• Database configuration• Network characteristics

What is environment validation?

4

Environment Validation

• Why?• To pro-actively avoid issues, before they occur

• When?• Prior to installing Alfresco for any purpose:

• Evaluation• Development• QA / Test• Production mirror• Production• Disaster recovery

• All installations benefit from this process!

Why perform it, and when?

Copyright © Hergé / Moulinsart

5

Environment Validation

• Supported Platforms• http://www.alfresco.com/services/subscription/supported-platforms/

• Server hardware• CPU clock speed (2.5+Ghz)• 32 bit vs 64 bit

• OS configuration• File handles (Unix-like OSes – 4096+)• Port availability• Availability of JLAN DLLs (Windows)

Validation Steps

6

Environment Validation

• 3rd party applications• OpenOffice• ImageMagick• SWFTools

• Database configuration• Character encoding (UTF8)• MySQL database engine (InnoDB)

• Network characteristics• DNS configuration (for clustering)• Database server

• Connectivity• Packet loss• Latency

Validation Steps (cont.)

7

Environment Validation

BUT WAIT!

CAN’T THIS BE AUTOMATED?

8

Environment Validation

Why yes it can…

…introducing the “Environment Validation Tool”!

Environment Validation Tool

Copyright © Hergé / Moulinsart

9

Environment Validation

• What does it do?• Checks Supported Platforms†

• Checks environment†

• How do I run it?• Command line Java program• Dependencies:

• JDK 1.2+ (1.4+ in next version)• JDBC driver

• Can be run prior to installation (or even download) of Alfresco

• How do I get it?• Available for download from Alfresco Knowledge Base

† Some manual validation may still be necessary.

Environment Validation Tool

10

Environment Validation

Environment Validation Tool Demo

11

“Day Zero” Configuration

• Optimized for evaluation of Alfresco

• Assumptions:• Single user

• Minimal traffic & concurrency

• Small content set• Low-end machine (laptop)

• Resulting configuration:• Maximizes available functionality• Optimizes resource usage over performance / scalability

∴ NOT SUITABLE FOR TEST OR PRODUCTION!

Alfresco’s Default Configuration

12

“Day Zero” Configuration

1. Environment Validation

2. Reconfiguration of Alfresco for:• High traffic• Concurrent transactions• Large content sets• Production grade hardware

What is “Day Zero” configuration?

13

“Day Zero” Configuration

• Why?• To pro-actively avoid issues, before they occur

• When?• Prior to installing Alfresco for:

• Development• QA / Test, particularly performance test• Production mirror• Production• Disaster recovery

• Even evaluation environments can benefit, if going beyond “kicking the tyres”

Why perform it, and when?

Co

pyri

ght ©

Her

/ Mou

linsa

rt

14

“Day Zero” Configuration

• Increase maximum heap (-Xmx) to at least 1GB• If the server has sufficient RAM, ideally:

• 1.5GB on 32bit JVM• 2+GB on 64bit JVM

• Configured in alfresco.[sh|bat] startup script:

• Attend session “BP-2 - Scale your Alfresco Solutions” for more on tuning

Configuration Steps – JVM Heap

…export JAVA_OPTS='-Xms512m –Xmx2048m -Xss1024k -XX:MaxPermSize=256m -XX:NewSize=256m -server'…

15

“Day Zero” Configuration

• Set “dir.root” to an absolute path

• Configured in alfresco-global.properties:

Configuration Steps – dir.root

…## Sample custom content and index data location#-------------dir.root=/var/lib/alfresco/alf_data…

16

“Day Zero” Configuration

• Ensure your database can accept 300 connections per Alfresco instance (cluster node)

• Configuration specifics vary, depending on your database

Configuration Steps – Database Connections

17

“Day Zero” Configuration

• Add “db.pool.max” property and set it to 275

• Configured in alfresco-global.properties:

Configuration Steps – db.pool.max

…## Sample database connection properties#-------------db.name=alfrescodb.username=alfrescodb.password=alfrescodb.host=localhostdb.port=3306db.pool.max=275…

18

“Day Zero” Configuration

• Add “hibernate.jdbc.fetch_size” property and set it to 150• Note: not used by some databases, but a good habit to change it

anyway

• Configured in alfresco-global.properties:

Configuration Steps – JDBC Fetch Size

…## Sample database connection properties#-------------db.name=alfrescodb.username=alfrescodb.password=alfrescodb.host=localhostdb.port=3306db.pool.max=275hibernate.jdbc.fetch_size=150…

19

“Day Zero” Configuration

• Enable JODConverter based integration with OpenOffice

• Configured in alfresco-global.properties:

Configuration Steps – JODConverter

…## External locations#-------------ooo.exe=sofficejodconverter.officeHome=./OpenOffice.orgjodconverter.portNumbers=8101ooo.enabled=falsejodconverter.enabled=trueimg.root=./ImageMagickswf.exe=./bin/pdf2swf…

20

“Day Zero” Configuration

• Set absolute paths for 3rd party components

• Configured in alfresco-global.properties:

• These settings are a little confusing!

Configuration Steps – 3rd Party Component Locations

…## External locations#-------------ooo.exe=sofficejodconverter.officeHome=/opt/OpenOffice.orgjodconverter.portNumbers=8101ooo.enabled=falsejodconverter.enabled=trueimg.root=/usr/localswf.exe=/usr/local/bin/pdf2swf…

Path to OpenOffice Installation directory

Path to directory containing bin/convert executable.

Path and filename of pdf2swf executable.

21

• Configured in jmxrmi.access and jmxrmi.password• Create these files by copying from alfresco-jmxrmi.* templates

• Usernames configured in jmxrmi.access (not normally changed):

• Passwords configured in jmxrmi.password (must change!):

• More documentation on JMX credentials at:http://download.oracle.com/javase/6/docs/technotes/guides/management/agent.html

“Day Zero” Configuration

Configuration Steps – Set JMX Credentials (Enterprise)

…monitorRole readonlycontrolRole readwrite…

…monitorRole change_asapcontrolRole change_asap…

22

“Day Zero” Configuration

• Database-related misconfigurations are the single biggest source of performance issues

• Ensure all database-related “Day Zero” configuration changes are comprehensively applied

• Ensure your database is regularly tuned and maintained

• A certified DBA is required to properly support a production Alfresco database†!

† Only a part time role, but critical nonetheless.

A final word on databases

23

In Conclusion

1. Thoroughly validate your environment

2. Install Alfresco

3. Diligently perform “Day Zero” configuration

4. Start Alfresco (for the 1st time)

5. ???

6. Profit!!

“Day Zero Activities”

Copyright © Hergé / Moulinsart

24

Q&AAny questions?

Copyright © Hergé / Moulinsart

25

Learn MoreEnvironment Validation Tool (KB)“Zero Day Configuration Guide” (KB)wiki.alfresco.comforums.alfresco.comtwitter: @AlfrescoECM Copyright © Hergé / Moulinsart