Save 37% off PRO during our Black Friday Sale! »

Custom Installation Scripts for Alfresco

Custom Installation Scripts for Alfresco

The binary installers for Alfresco are convenient packages for getting an evaluation or test system up and running, and may be suitable for some production installations. But the packaged installers are not right for everyone. Large scale or business critical deployments of Alfresco often have complexities such as installations from dev to prod, clustering, integrations, virtualization, cloud deployments, and adaptation to the nuances of infrastructure. It is easy to see why an administrator may want to script his or her own installation process. In this conversation, I will share strategies I have used in rigorously managed environments.

You can find more information about this presentation including the video here.


Rich McKnight

August 08, 2013


  1. Alfresco ! Tech Talk Live Custom Installation Scripts

  2. Overview ! ¤ Introduction ¤ The user stories around home grown installers.

    ¤ A walk through one implementation of a custom install script ¤ Question and Answer
  3. Introduction ! Who am I?! Richard McKnight Principal Consultant @rmknightstar

    | | Experience! ¤  30 Years Professional Technology Experience ¤  20 Years Building and Deploying Applications for Enterprise users including, Content Management, Financial and Computer Aided Engineering Software. ¤  15 Years of Content Management Experience ¤  7 Years of Experience with Alfresco
  4. Disclaimer ! ¤ This is not a polished or complete system.

    ¤ This is one of many valid approaches to deploying Alfresco. ¤ The opinions contained in this talk are mine and there are many who disagree with me. ¤ I am not a system admin or operations person, but I have worked closely with many operations teams.
  5. Who Installs Alfresco ! 1.  Prospects Evaluating Alfresco 2.  System

    Administrators Installing a single Alfresco Instance 3.  System Administrators Installing multiple Alfresco Instances 4.  System Administrators applying a service pack to or upgrading an existing instance of Alfresco. 5.  Casual Alfresco Developers needing a sandbox instance of Alfresco 6.  Developers focused on Alfresco who need multiple sandbox instances to support multiple projects.
  6. What Happens When You Use the Installer ! ¤ Create a

    Virtual machine from a previously created server image (which should have all of the appropriate third party apps installed). ¤ Download the Alfresco installer. ¤ Click through the install answering a number of questions. ¤ Review the tuning and configuration needs and edit the necessary files. This requires that the person performing the install be very familiar with Alfresco or have very detailed instructions on how to tune and configure Alfresco properly.
  7. What Happens in a Manual Install ! ¤ Create a Virtual

    machine from a previously created server image (which should have all of the appropriate third party apps installed) ¤ Download the alfresco packages ¤ Follow the instructions (15 to 25 steps) to install your application server and deploy Afresco and Share to the server. ¤ Review the tuning and configuration needs and edit the necessary files. This requires that the person performing the install be very familiar with Alfreco or have very detailed instructions on how to tune and configure Alfresco properly.
  8. Benefits of the Installer ! ¤ Lays out all of the

    necessary bits for a running instance of alfresco ¤ Really good at laying down the bits related to SOLR ¤ Good for trial installs ¤ Good for customers who have only one repository (well maybe) ¤ Good for standard Tomcat Installs The installer hides all of the complexity
  9. Limitations of the Installer ! ¤ Only good for Tomcat ¤ Only

    good for 64 bit windows or 64 Bit Linux ¤ Not good for complex installs (such as share in a separate container). ¤ The installers are ginormous. The installer hides all of the complexity
  10. Wouldn't it be Nice If You Could ! ¤ Create a

    Virtual machine from a previously created server image (which should have all of the appropriate third party apps installed) ¤ Create a 3-5 line config file ¤ Select from a set of pre-defined installation profiles ¤ Run the install ¤ Avoid having to edit a bunch of files post install This requires that the person (or persons) creating the install profile be very familiar with Alfresco, while only requiring that the person performing the install know a few key installation parameters.
  11. Demo ! In this demo, I will create a new

    Dev Alfresco Install in less than 2 minutes, and have the repository up and running within 5 minutes. In this demo I will do the following ¤  Create the install folder ¤  Create the database ¤  Create the install config file ¤  Run the installation script ¤  Start the repository The under 2 minutes and under 5 minutes should get your attention.
  12. Why I Built a Custom Installer ! ¤ I needed an

    alternative to the old tomcat bundle. ¤ I needed a way to have a highly automated process to build multiple repos quickly. ¤ I had a client who needed a repeatable process, a custom install script allowed me to lock down all of the parameters that did not need to be fiddled with. ¤ At the time (circa Alfresco 3.x), the installer would have required too much post installation fiddling to create a process that was easy to repeat.
  13. Benefits of a Custom Install ! ¤ Custom installs can be

    tailored to the standards of your environment. ¤ Configuration settings that are standard across the enterprise can be pre-set and hidden. ¤ A minimal set of settings can be exposed as appropriate. ¤ This can be a key component in creating repeatable and predictable alfresco installations. ¤ By templatizing the entire install, all of the configurable settings can be placed in one file. This is no longer an issue, but in the past the installers were a bit difficult to use. Even with better installers, there are still many instances in which a custom installer is appropriate.
  14. Custom Installs are not Free ! ¤ An Infrastructure architect, who

    is familiar with Alfresco must: ­  Analyze the requirements for a custom install ­  Build the appropriate scripts ­  Put in process a place for managing the Assets that the install is dependent on. ­  Document the process ­  Test, test and test again. ¤ A custom install will require ongoing maintenance to ensure that it remains compatible with new releases. ¤ The custom install may have a diverse set of users (developers and operations staff). In an environment that contains many installations, it is beneficial to do this analysis in a big picture fashion.
  15. Features of The Installer ! þ  Templatized installation" þ  Minimal

    set of install parameters" þ  Default Values" þ  Profiles for different installs" þ  Compatible with multiple versions of Alfresco" Assets Profile Config Installer Alfresco Instance Enterprise Infrastructure
  16. How it Works ! ¤  User provides the following ­ 

    Config file with installation parameters ­  Name of an install template/profile ¤  The installer does the following ­  Checks to see that the Target Directories and Databases exist ­  Makes sure that you are not overriding an existing install ­  Copies all the necessary OOTB assets into the install folder (tomcat, jdbc driver, war files) ­  Overlays any overridden assets into the install folder ­  Creates the extensions folder (configuration) from a template, substituting in various parameters.
  17. A quick look under the hood ! The Scripts ¤ ¤ ¤  Install.awk The Resources ¤  Configs ¤  Profiles ¤  ASSETS Alternate install Scripts
  18. Things Deliberately Left Out ! ¤ No GUI. This is completely

    command line based and is in keeping with the notion that many administrators will want to script things ¤ Puppet and Chef. I decided to take the easiest path to get what I need. But that said, this would be a natural evolution of things and I would welcome any input from the community. ¤ Creating of target folders and databases. Just a personal preference to take the step of creating the infrastructure resources prior to running the install.
  19. Things I Would Love to Add ! ¤ Sed-like post processing

    feature ¤ A diff utility to get a list of post install changes. ¤ Make this cross platform. ¤ The ability to pre-populate the installation with some AMPs (like the JavaScript console) ¤ Looking at integrating this with a framework such as puppet or chef. ¤ Adding the option of streamlining applying patches and performing upgrades by adding a “clone existing install” switch
  20. Tips and Hints ! ¤  Test, test and test again.

    ¤  Keep track of post installation changes made ¤  This is not for one off installs ¤  If you are going to use this process, use it for Prod, QA, Test and Development installations. ¤  Consider making this a part of a larger Alfresco packaging process which might include things like the developer environment and a curated list of bug fixes etc… ¤  Be pragmatic about polishing the process, more installs should translate to more polishing and refining. ¤  Keep in mind that there are alternate ways to do this. Anything that you do should be focused on the needs of your organization.
  21. Questions ! Thank you for attending! Richard McKnight