use connections community scripts to speed up installation, configuration and documentation - social...
DESCRIPTION
Speedup documentation, troubleshooting and configuration with free scripts around WebSphere and ConnectionsTRANSCRIPT
Use Connec)ons Community Scripts to speed up installa)on, configura)on and
documenta)on
Christoph Stö:ner – Fritz & Macziol GmbH
2
Christoph Stö:ner -‐ a stoeps
About me
• Christoph Stö:ner – IBM SoHware Consultant at Fritz & Macziol – Specialized in the IBM Connec)ons and IBM Domino Infrastructure – Bavarian – Linux and Scrip)ng Lover, Blogger – Speaker at:
3
Christoph Stö:ner -‐ a stoeps
Agenda
• Scrip)ng? • Install the scripts • Installa)on / Konfigura)on • Performance Tuning • Security • Troubleshoo)ng • Documenta)on
4
Christoph Stö:ner -‐ a stoeps
SCRIPTING?
5
Christoph Stö:ner -‐ a stoeps
Administra)ng WebSphere Appl. Server
• Integrated Solu)on Console – boring – long click paths
• wsadmin.sh|bat – long case sensi)v commands – Jython (Python based) environment
6
Christoph Stö:ner -‐ a stoeps
Why should you use scripts? • Time saver • All servers and apps have a defined se`ngs
– no checklists needed – no typos – consistent
• Be careful! – You can change tons of stuff in seconds – Backup your system, create test machines – Create documenta)on of your changes
7
Christoph Stö:ner -‐ a stoeps
INSTALLATION / KONFIGURATION
8
Christoph Stö:ner -‐ a stoeps
Silent Install
• Visit our session "The Silence of the Installers" at 2:30 pm in D.saga
9
Christoph Stö:ner -‐ a stoeps
Download the scripts
• Download ZIP – https://github.com/stoeps13/ibmcnx2
• Clone with GIT – git clone https://github.com/stoeps13/ibmcnx2 – easier to update
• git pull origin
• Documenta)on – http://scripting101.org
10
Christoph Stö:ner -‐ a stoeps
Installing the scripts
• Extract to a folder of your Deployment Manager – d:\tools\ibmcnx2 – /opt/IBM/ibmcnx2
• Create Link – Windows (mklink <source> <target>)
• mklink /d D:\IBM\WebSphere\AppServer\profiles\Dmgr01\bin\ibmcnx D:\Tools\ibmcnx2\ibmcnx
– Linux (ln <target> <source> • ln –s /opt/IBM/ibmcnx2/ibmcnx /opt/IBM/WebSphere/AppServer/
profiles/Dmgr01/bin/ibmncx
11
Christoph Stö:ner -‐ a stoeps
Proper)es to speed up usage
• copy ibmcnx_sample.proper)es to ibmcnx.proper)es
• edit ibmcnx.proper)es – AdminUsers – AdminGroups – Mul)ple values devided with |
12
Christoph Stö:ner -‐ a stoeps
Database proper)es
• For lookup values in peopleDB • Used within User Check Scripts
– Reader Access to Database is enough – No direct changes
13
Christoph Stö:ner -‐ a stoeps
Database Tuning & WAS
• [Tuning] – Default Parameters of Tuning Guide is used
• [WebSphere] – Temporary Directory – Shall changes be automa)cally synchronized with Nodes
14
Christoph Stö:ner -‐ a stoeps
Create Shellscript to faster start Scripts • create WAS_USER_SCRIPT with Path to JDBC Drivers
– e.g. • vim $WAS_ROOT/profiles/Dmgr01/bin/wasuserscript.sh • export WAS_EXT_DIRS=$WAS_EXT_DIRS:/opt/IBM/JDBC
• create Script to start Menu – e.g.
• vim <WAS_ROOT/profiles/Dmgr01/bin/cnxmenu.sh • export WAS_USER_SCRIPT=$WAS_ROOT/profiles/Dmgr01/bin/ibmcnx/
wasuserscript.sh • ./wsadmin.sh -‐lang jython -‐username wasadmin -‐password password -‐f
ibmcnx/menu/cnxmenu.py
15
Christoph Stö:ner -‐ a stoeps
Create Batch to faster start Scripts
• notepad %WAS_ROOT%\profiles\Dmgr01\bin\cnxmenu.bat • Found no way to get WAS_USER_SCRIPT to work with WAS
8.5.5 • Crea)ng temporary symlink to JDBC Driver and delete aHer
call 16
Christoph Stö:ner -‐ a stoeps
Calling the scripts
• Use your created Shell or Batchfile • Call manually
17
Christoph Stö:ner -‐ a stoeps
PERFORMANCE TUNING
18
Christoph Stö:ner -‐ a stoeps
Performance Tuning Guide
• Good star)ng point with lots of )ps • IBM Connec)ons 4.0 Performance Tuning Guide
– h:p://short.stoeps.de/ibmcnx40perfguide
• IBM Connec)ons 4.5 Performance Tuning Guide Addendu – h:p://short.stoeps.de/ibmcnx45perfaddendum
19
Christoph Stö:ner -‐ a stoeps
Java Heap Size
• Performance Tuning Guide advices you to set JVM Heap equal to JVM Max Heap Size
• You have to change this value on each Applica)on Server – Large Size Deployment about 12 – Medium Size Deployment min. 3 – Addi)onal Apps use more Applica)on Servers (Docs, Forms, ...)
• 40-‐70% of average Memory usage • Don't forget Deployment Manager and Nodeagents
20
Christoph Stö:ner -‐ a stoeps
Java Heap Size through ISC • Servers – Server Types – WebSphere Applica)on Servers –
Applica)on Servers – <servername> – Java and Process Management -‐ Process Defini)on – Java Virtual Machine – About 5 mouse clicks each )me
• System Administra)on – Deployment Manager – Java and Process Management – Process Defini)on – Java Virtual Machine
• System Administra)on – Node Agents – <nodename> – Java and Process Management – Process Defini)on – Java Virtual Machine
21
Christoph Stö:ner -‐ a stoeps
Java Heap Size through Script
• 1 Menu – IBM Connec)ons Configura)on Tasks – 2 – Configure JVM Heap Sizes
• Script shows the actual se`ng and let you change – No value let the actual one
22
Christoph Stö:ner -‐ a stoeps
Database Connec)ons • Se`ng is really important
– more relevant than mul)ple Instances
• ISC – Resources – JDBC – Data Sources – <name> – Connec)on Pool proper)es
• Maximum connec)ons • Minimum connec)ons
• Script – 1 Menu -‐ IBM Connec)ons Configura)on Tasks
• 1 Configure DataSources (ibmcnx/config/DataSource.py)
23
Christoph Stö:ner -‐ a stoeps
Database Connec)ons (2)
24
Christoph Stö:ner -‐ a stoeps
Database Connec)ons (2)
25
Christoph Stö:ner -‐ a stoeps
Java Log Se`ngs
• Like Java Heap, must be set for each Applica)on Server, Node Agent and Deployment Manager
• Default is not enough for approprate Troubleshoo)ng • I prefer
– 20 MB Log File (Default 1 MB) – 5 – 10 Historic Files
26
Christoph Stö:ner -‐ a stoeps
Java Log Se`ngs (2)
27
Christoph Stö:ner -‐ a stoeps
JVM Parameters
• JVM Logfile Language depends on Opera)ng System Language • Change to english, even when you use different OS Language
– easier to find errors through Search engines – faster response on PMR
• Must be set in each Deployment Manager, Node Agents and Applica)on Server JVM – append "-‐Duser.language=en –Duser.region=GB to "Generic JVM
arguments"
28
Christoph Stö:ner -‐ a stoeps
JVM Parameters (2)
29
Christoph Stö:ner -‐ a stoeps
Monitoring Policy
30
Christoph Stö:ner -‐ a stoeps
Monitoring Policy (2)
• Monitoring policy start Applica)on Server when Nodeagents starts
31
Christoph Stö:ner -‐ a stoeps
Create Cluster Members on addi)onal Node
32
Christoph Stö:ner -‐ a stoeps
Create Cluster Members on addi)onal Node (2)
33
Christoph Stö:ner -‐ a stoeps
Change Database Server and Host
• Some)mes you want to change the Database Host and Port
• You can change this in each DataSource or in one step with a script
34
Christoph Stö:ner -‐ a stoeps
Manually synchronize Nodes
• ISC – System Administra)on – Nodes – check Nodes – Full Resynchronize
• Script – 9 Synchronize all Nodes
35
Christoph Stö:ner -‐ a stoeps
SECURITY
36
Christoph Stö:ner -‐ a stoeps
J2EE Security Roles
• Important to set Security Roles consistent • First version published Klaus Bild (h:p://www.kbild.ch)
37
Christoph Stö:ner -‐ a stoeps
Different scripts
38
Christoph Stö:ner -‐ a stoeps
Backup / Restore Security Roles
• In former IBM Connec)ons Releases oHen – Security roles reset to default on fixpack installa)ons – Closed Environment are open when you forget to fix it
• Backup security roles before installing Updates • Restore security roles aHer that
39
Christoph Stö:ner -‐ a stoeps
Se`ng Security Roles
• 3-‐5 set Security Roles on ibmcnx.proper)es basis
• 6-‐9 configures different roles through all applica)ons – You mustn't remember all roles to ac)vate Social Mail, Metrics
40
Christoph Stö:ner -‐ a stoeps
TROUBLESHOOTING
41
Christoph Stö:ner -‐ a stoeps
Check Tasks
42
Christoph Stö:ner -‐ a stoeps
Check if all installed apps are running
• Fast way to check running apps on console
43
Christoph Stö:ner -‐ a stoeps
Check Database connec)ons
• Easy way to check if Dmgr and Nodes can access the databases
44
Christoph Stö:ner -‐ a stoeps
Troubleshoo)ng Profiles
• Some)mes User GUID within applica)ons get out of sync • You can check the GUID in each applica)on through wsadmin
– Ac)vi)esMemberService.getMemberExtIdByLogin( "mailaddress" ) – BlogsMemberService.getMemberExtIdByLogin( "mailaddress" ) – ...
• Some of them need case sensi=v mailaddress to return the GUID – Domino default: Christoph.Stoe:[email protected]
45
Christoph Stö:ner -‐ a stoeps
Check GUID on Apps and LDAP
• Script uses JDBC to get the right spelling from peopleDB • Check the GUID in each Applica)on and returns the values
46
Christoph Stö:ner -‐ a stoeps
Solving Login issues and GUID mismatch
• Deac)vate and ac)vate are appropriate tools to solve these mismatches
• Deac)vate removes mailaddress from profile, ac)vate needs mailadress parameter – So scripts holds old
value in memory, deac)vate and reac)vate in one step
47
Christoph Stö:ner -‐ a stoeps
Synchronize all user GUIDs
• AHer bigger changes (LDAP migra)on) you should synchronize – GUIDs – all applica)ons (12)
• applica&onMemberService.syncAllMembersByExtId( {"updateOnEmailLoginMatch": true} )
• SyncAllByExID.py (false will only log)
48
Christoph Stö:ner -‐ a stoeps
CONNECTIONS SCRIPTS
49
Christoph Stö:ner -‐ a stoeps
Library Sizes • Default:
– Communi)es: 500 MB Files Library – Users: 500 MB Files Library
• Define Policies on wsadmin console – FilesPolicyService.edit("2d93497d-‐065a-‐4022ae25-‐a4b52598d11a", "My
Policy", 2147483648L) • add policies to users and communi)es
– used Parameter UUID – FilesLibraryService.assignPolicy("f0d01111-‐9b21-‐4dd8-‐
b8be-‐8825631cb84b","2d93497d-‐065a-‐4022ae25-‐a4b52598d11a")
50
Christoph Stö:ner -‐ a stoeps
List of available policies
• Get a list of available policies • FilesLibraryService.browswCommunity(...)
51
Christoph Stö:ner -‐ a stoeps
Script to create and list policies
52
Christoph Stö:ner -‐ a stoeps
Add Policy to Community or Person
53
Christoph Stö:ner -‐ a stoeps
Libraries with UsedSpace > 80%
• You should proac)ve check if your users or communi)es will reach their policy limits – be:er )me management
54
Christoph Stö:ner -‐ a stoeps
Libraries with UsedSpace > 80%
• You should proac)ve check if your users or communi)es will reach their policy limits – be:er )me management
55
Christoph Stö:ner -‐ a stoeps
Communi)es reparen)ng
• Through pure wsadmin complicated, because you need to search UUIDs
• Klaus Bild (h:p://kbild.ch) wrote ini)al version • Script let search you the Community name and
– move Communi)es to Subcommuni)es – make Communi)es of Subcommuni)es
56
Christoph Stö:ner -‐ a stoeps
Communi)es reparen)ng
57
Christoph Stö:ner -‐ a stoeps
DOCUMENTATION
IMPORTANT!!!!!
58
Christoph Stö:ner -‐ a stoeps
Security Roles
59
Christoph Stö:ner -‐ a stoeps
Ports
60
Christoph Stö:ner -‐ a stoeps
WebSphere Variables
61
Christoph Stö:ner -‐ a stoeps
JVM Se`ngs
62
Christoph Stö:ner -‐ a stoeps
JVM Heap
63
Christoph Stö:ner -‐ a stoeps
Data Sources
64
Christoph Stö:ner -‐ a stoeps
Create a documenta)on file • You can't call it from the menu • ./wsadmin.sh -lang jython -username wasadmin -
password password -f ibmcnx/doc/documentation.py • Documenta)on file contains following informa)ons:
– j2ee roles of all applica)ons in your environment – JVM Se`ngs of all applia)on servers, nodes and the dmgr – Used Ports of all servers – Se`ngs (rota)on, size, history count) and path of all SystemOut and SystemErr
logs – All WebSphere variables of your Cell – DataSources and parameters
65
Christoph Stö:ner -‐ a stoeps
RESOURCES
66
Christoph Stö:ner -‐ a stoeps
Online Resources Blogs • h:p://www.stoeps.de • h:p://www.kbild.ch • h:p://socialshazza.com • h:p://wannesrams.wordpress.com
• h:p://github.com/stoeps13
Documenta=on • h:p://scrip)ng101.org • h:p://jython.org
67
Download / Bugs
Christoph Stö:ner -‐ a stoeps
Skype Chats
68
69
Christoph Stö:ner IBM SoHware Consultant Fritz & Macziol GmbH www.fum.de cstoe:[email protected]
christophstoe:ner www.stoeps.de scrip)ng101.org github.com/stoeps13 christoph.stoe:[email protected] twi:er.com/stoeps facebook.com/christoph.stoe:ner www.stoeps.de/+ slideshare.net/ChristophStoe:ner linkedin.com/pub/christoph-‐stoe:ner/13/30a/2b3/ xing.com/profile/Christoph_Stoe:ner about.me/stoeps
y y ab c8jl