More Related Content
Similar to Tips and tricks in the OSGi Web Console (20)
Tips and tricks in the OSGi Web Console
- 1. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Tips and Tricks for the OSGi Web Console
Kevin Nennig | AEM Practice Lead | Adobe Digital Learning Services
- 2. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 2
1 | Understanding the Web Console
2 | Learn about each area of the web console
3 | Demo using some of the tips and tricks
- 3. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
AEM’s Web Console
Belongs to the OSGi layer
A part of the Apache Felix project
Monitors every piece of the
architecture
Can configure applications
3
JVM
Custom Code
AEM Modules
OSGi (Apache Felix)
Apache Sling
JCR (Apache Jackrabbit Oak)
- 4. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
OSGi Web Console
You’ve heard of it
You’ve used it
You might manage it
How much do you actually know though?????
4
- 5. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
What’s in the Web Console??
Main – Product and Repository tools
OSGi – OSGi tools
Sling – Sling tools
Status – Output for all consoles
Web Console – System information
5
JVM
Custom Code
AEM Modules
OSGi
Apache Sling
JCR (Apache Jackrabbit Oak)
- 6. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Console > Main
Crypto Support
Create Crypto text for configurations
Disk Benchmark
Test r/w speeds to the hard disk
JMX
Simple JMX console for access to mbeans
MIME Types
View supported MIME types
6
- 7. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Console > Main
OSGi Installer
Find the install location of a bundle
Repository Check (based on a JCR Path)
Output repository size in bytes
Log node paths
7
- 8. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Console > OSGi
Bundle Management
What are Components?
Implementation of
Events
Schedulers
Servlets
Models
What are Services?
Interface
Runnable
Servlet
EventHandler
JobConsumer
8
Bundle
Service
Component
Configuration
Service
Component
Configuration
Service
Component
Configuration
Bundle
Bundle
- 9. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Console > OSGi
Bundle
A bundle must be Active to use the components
Newest bundles have the highest ID
Components
Click the wrench of a component to open it’s corresponding config
Package Dependencies
Use to quickly find a maven dependency to add to your project
Services
View service / implementation relationships
9
- 10. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Console > OSGi
Configuration
A checkmark indicates component’s
defaults are no longer used
10
- 11. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Console > OSGi
Configuration
Use the web config to create the
sling:OsgiConfig node
11
- 12. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Console > OSGi
OSGi Configurations
Best practice: Use an sling:OsgiConfig node
When setting via the Web Console > OSGi > Configuration
Saved in the JCR as .config files
Generally saved to /apps/system/config
Alternatively, use the CRXDE Lite Query tool
12
PID
- 13. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Console > Sling
Features
Quickly understand what features are enabled in AEM
Most are asset features
Log Support
Simple way to create adhoc loggers
Resource Resolver
View your custom sling mappings from /etc/map (Ctrl+F “Mapping Map Entries”)
Only valid mappings will show up in this console
View ALL Vanity URLs authors setup under page properties (Ctrl+F
“/content/yourSite”)
Sling Adapters
FULL list of all adaptations you can do on each java object
Ex: Node node = resource.adapTo(Node.class);
13
- 14. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Console > Sling
Features
OSGi > Configurations do a Crtl+F “Feature Flag” to find all configs
File System Class Loader
View HTL cached as Java to debug syntax
Log Support
You can create a logger for a JCR path by replacing / with .
Ex: /apps/myproject/components/ = apps.myproject.components
Resource Resolver
Use the Configuration Test to find an AEM console in /libs to customize
Ex: assets.html resolves to /libs/dam/gui/content/assets
14
- 15. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Console > Sling
Sling Health Checks
Can quickly run all health checks in one place
OSGi > Confguration
Custom composite health check
Add custom tags to health checks
Custom health check
15
OOTB Tags
bundles security production login dos sling
dispatcher cq replication csrf acl webserver
clickjacking
- 16. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Console > Status
Dump of different mechanisms within OSGi
OSGi information
Sling Information
Cached file information
JVM output
Threading info
Log files
Status output via cURL
Requests can be .html, .json, or .txt
16
$ curl http://admin:admin@localhost:4502/system/console/<console>
- 17. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Console > Status
Many status dumps have a corresponding
management console
Status consoles can be uses to quickly find
and verify a certain setting
17
Main > OSGi Installer
Main > Product Information
Main > Felix Http Whiteboard
Main > Http Service
OSGi > Bundles
OSGi > Configurations
OSGi > Components
OSGi > Services
Sling > Metrics
Sling > Resource Resolver
Sling > Sling Adapters
Sling > Topology Management
- 18. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Console > Status
Each time a status dump loads you have several downloadable options
All are buttons are based upon the timestamp
Download As Text
Single text file of the current dump
Download As Zip
Separated text files of the dump if several status are concatenated
Download Full Text
Single text file of all dumps in the Status tab
Download Full Zip
Seperated text files of all dumps in the Status tab
18
- 19. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Console > Status
Granite Replication
Use to verify correct replication agents
Product Information
See what AEM version / SP is installed
Sling Scheduler
View / verify when a scheduler will trigger next
Sling Service User Mappings
View all bundle/subservices using a service user
Sling Settings
View active AEM runmodes
View where the server is installed locally
19
- 20. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Console > Status
Configurations
Use a quick Ctrl+F to find a property value of a config
Log Files
Download log files if you don’t have access to the server
Uploaded Packages
View / verify what content packaged uploaded / installed
20
- 21. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Console > Web Console
Licenses
Every License that exists in the
Bundles
Memory Usage
Overview Console
System Information
Start level configuration
Server stats
JVM stats
21
- 22. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 22
Demo
- 23. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Resources
Felix Web Console
http://felix.apache.org/documentation/subprojects/apache-felix-web-console.html
Slideshare
https://www.slideshare.net/KevinNennig/tips-and-tricks-in-the-osgi-web-console
Github Project
https://github.com/knennigtri/Immerse-Demo
Health checks
https://docs.adobe.com/docs/en/aem/6-2/administer/operations/operations-dashboard.html
Adobe Digital Learning Services Courses
https://training.adobe.com/training/current-
courses.html#solution=adobeExperienceManager&p=1
23
- 24. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Q&A
© 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.24
Kevin Nennig
nennig@adobe.com
Github: knennigtri
Twitter: @knennigtri
LinkedIn: /in/kevinnennig
- 25. © 2017 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Editor's Notes
- Main – Product and Repository Tools
OSGi – OSGi Tools
Sling – Sling tools
Status – Output for anything
Web Console – System Information
- Features: MOSTLY ASSETS Dynamic Media, auto tagging, Asset Collections, Assets Homepage, Reporting, insights, renditions, etc