cancel
Showing results for 
Search instead for 
Did you mean: 
kevinr1
Star Contributor
Star Contributor

A powerful new feature in Alfresco Enterprise 4.2 is the addition of a user friendly Repository Administration Console. This post describes some of the features present in the console and how it can be easily extended.

Introduction

It is common knowledge that configuring features such as directory management (e.g. LDAP) or for instance tweaking the correct inbound email server settings is tricky in Alfresco due to the number of scattered, complex XML and property file changes that may be required. Previous versions of Alfresco have some admin tools available in Alfresco Explorer and in Alfresco Share but not much that helps with initial server set-up.

A JMX interface to many beans has been available in Alfresco Enterprise for a while and is accessible via something like JConsole. Although this is great for run-time changes compared to XML/properties file edits (which require a server restart, JMX does not), it is still a rather mysterious interface with little help or documentation available.

The Repository Admin Console goes a long way to improving this situation. A graphical interface with in-line help text and links directly to the appropriate on-line Alfresco documentation.

Under the covers, the JMX interface is used to retrieve and persist configuration changes made via the console. This means changes are persisted to the DB and will take precedence over XML and property file settings, it will also mirror changes still made via JMX interfaces.

It should also be noted that the console is an 'in process' application, part of the /alfresco web-app context. This means set-up of a remote application like Share is not needed to use it. Also it has complete access to the rich set of internal Alfresco APIs beyond what would be possible via a REST interface back to Alfresco. It also removes a point of failure - no longer having to ensure a remote application is working and can be authenticated before the system can be managed and configured.

System Summary

When you first enter the admin console a System Summary screen is presented that displays a quick overview of the status of the various sub-systems in Alfresco. Including information on clustering, AMPs applied and the current authentication chain. It also displays instance data such as the memory usage, content store disk space, Java and OS version information. The current host-name and IP is always displayed in the header area for all pages.

System Summary

General

There are a number of other general information pages, including information on the current license details and what server features are enabled on the license, plus meta like the unique repository ID and the installed/current DB schema numbers.

The License page allows you to upload and apply a new Alfresco license instance immediately without having to restart the server.


Directory Management

One of the most featured areas of the Admin Console is the ability to configure and test connections to various directory services. The Directory Management page provides an interface to create, configure and manage internal Alfresco directories, OpenLDAP, Active Directory and configure authentication chain options for services such as CIFS and browser SSO. Connections to various services can be tested before activating them in the authentication chain and common user synchronization settings are also managed here. It is a powerful new mechanism to set up directory services for Alfresco that anyone who had previously configured LDAP or similar before via property files with far-too-many server restarts should be much happier with.

Directory Management

Repository Services

Many of the important sub-systems in Alfresco have a page in the new Admin Console. Features such as Activities, Clustering, Process Engines (workflow) and Transformation services can all be configured via the interface. There is very rich Search Service page with lots of in-line help for the advanced options for Lucene and SOLR and settings for the new Transactional Query feature in 4.2. Finally there are pages for inbound and outbound email server plus File Servers such as CIFS and IMAP.

Extending the Admin Console

Each page of the Admin Console is a simple WebScript component. There are no new client-side JavaScript libraries to learn and no new REST API. Each page is built from a library of useful functions and macros imported into each Admin Console WebScript.

The JS library functions are responsible for doing the hard work, retrieving the JMX MBean properties and then handing over to flexible FreeMarker macros which automatically render the appropriate control for a JMX property in a consistent way. Assuming no additional processing logic is required, the WebScript library functions will automatically persist them back to the correct property. If you are building simple JMX Form style pages then it really is extremely simple to do. The Alfresco Support team have already been building new pages that they will make available as needed, including; Thread Dump, Active Sessions, Log4J settings and Test Transforms.

A sample commented page is included as a starting point for creating new pages.

Example controller code from admin-example.get.js:

<import resource='classpath:alfresco/enterprise/webscripts/.../admin-common.lib.js'>

/* Repository Admin Console - Example GET method */

Admin.initModel(

   'Alfresco:Name=License',

   ['Subject', 'Issued', 'RemainingDays'],

   'admin-example'

);

This will retrieve the 'Subject', 'Issued' and 'RemainingDays' properties from the 'License' JMX bean.

Example template code from admin-example.get.html.ftl:

<#include 'admin-template.ftl' />

<@page title='Example Page'>

   <div class='column-left'>

      <@section label='Some Values' />

      <@control attribute=attributes['Subject'] />

   </div>

   <div class='column-right'>

      <@section label='More Values' />

      <@control attribute=attributes['Issued'] />

      <@control attribute=attributes['RemainingDays'] />

   </div>

</@page>

Example output from admin-example WebScript:

admin-example

The values from the License JMX bean are read-only and the template macros are smart enough to know this and display read-only text. However, if they were editable or you wanted to show a different form field a simple change to the template is all that's needed:

      <@attrtext attribute=attributes['Subject'] />

Example output:

admin-example

Final Words

You can still use XML/properties files to set-up Alfresco if that's your preference - we haven't removed anything related to this, just added the new interface over the top.

Already we've had suggestions from Alfresco partners on how to improve it going forward, and we will certainly be looking at features in the future such as:

    • Import/export of data, allowing a server set-up via the console to be replicated across multiple instances.
    • Read-only mode for Admin Console - to ensure an instance can be examined in detail but no accidental changes made.


If you have any further suggestions, feel free to raise an Improvement request on JIRA or post a comment here. We hope you find it useful!

5 Comments