Successfully reported this slideshow.

OpenCms Days 2012 - How to manage an OpenCms project using Agile and continuous build


Published on

Do you want to run a successful OpenCms implementation while maintain flexibility of requirements throughout the project? Deliver high quality implementations; reduce bugs, QA cycles and deliver high quality on time projects?

Richard will discuss the ins and outs of Agile development as it pertains to an OpenCms project as well as how to build and develop deploy scripts and continuous builds to keep multiple teams working in parallel on a project.

Published in: Technology
  • Be the first to comment

OpenCms Days 2012 - How to manage an OpenCms project using Agile and continuous build

  1. 1. September 25, 2012
  2. 2. INTRODUCTIONAbout me and NorthPoint…+ NorthPoint is a USA-based organization with offices in New York and Boston+ Specializing in Open Source technologies for web applications+ 130+ on-staff technologists focusing on Digital Strategy, Content Management and Enterprise Digital Architectures+ Areas of focus in Media, Publishing, Finance, Healthcare, Education, and Not-for-Profit markets
  3. 3. WHAT WE WILL DISCUSS TODAY Running a successful OpenCms project leveraging Agile  Maintain flexibility of requirements  Deliver high-quality OpenCms implementations through use of TDD & Continuous Build Agile Development  Overview  How we run Agile with OpenCms Development of Deploy Scripts and Continuous Build
  4. 4. RUNNING A SUCCESSFULOPENCMS PROJECTLEVERAGING AGILE Agile Development Process  Why use Agile?  Everyone has their own take on Agile – “Part of the Issues”  Review of “True Agile” development  Tying in Agile with Extreme Programming Techniques  Agile approach for OpenCms projects
  5. 5. WHY CHANGE? WHY AGILE? Why should we change from traditional project management and development methods?  The traditional method breaks down during the lifecycle of the project  Change Request  Changes in business  The applications winds up being different from what was originally documented and envisioned  Feedback from the customer is at the end of the process
  6. 6. TRADITIONAL SOFTWARE DEVELOPMENT Business Analysis and Systems Analysis and the Design has been signed off by the customer Development begins  Change Requests begin  More functionality changes and tweaks later and things are not looking good  The schedule begins lagging  Client’s first BETA and even more changes are requested  Chances are, its a mess of coding and comments without proper notes and testing and by now every little change here breaks something there
  7. 7. CURRENT APPROACH –WHY IT FAILS? The Methodology didn’t The Solution didn’t work work
  9. 9. WHAT CAN WE DO? New techniques are being used to break this familiar mold of software development They are known as Extreme and/or Agile development Developing OpenCms custom modules with Agile is the way to go
  10. 10. AGILE – A QUICK OVERVIEW Scrum – an iterative, incremental process All work is done in Sprints Sprints last for 30 days Every day the team gets together for a daily Scrum that lasts 15 minutes Incremental, potentially shippable product functionality every 30 days
  11. 11. HOW IT WORKS WITH OPENCMS Although following Agile to the letter sounds good, in practice we have made some slight variations Upfront Analysis and Definition of Scope Source Control, Continuous Build and Continuous Integration Full QA at the end Planning ahead for next phases
  12. 12. TEAMS AND CODE MANAGEMENT Creating Epics, Stories and Tasks Using the Stories to create test cases – the beginning of TDD Leveraging JUnit for custom code We use Jira to help run things Multiple teams need a good solution  Continuous is the only way
  13. 13. TEAMS AND CODE MANAGEMENTThe tools we use Jira – Greenhopper, Crucible, Fisheye and Hudson along with custom Scripts Greenhopper – used for bringing things together  Estimating, Velocity, Burn downs, etc. Crucible is a web-based tool that we use for in-line commenting, code reviews (allows for collaboration between author and reviewer)  We feel this is a better approach than paired programming Fisheye for continuous build along with Hudson. Fisheye helps when trying to connect SVN commits through hooks in the code review process leveraging Crucible and Fisheye, in conjunction with automated quality test through sonar
  14. 14. ISSUES WITH AUTOMATIONAND OPENCMS The issues with integrated testing and automated builds with OpenCms is the way things work in OpenCms  Much of the code is in context sensitive situations where part of the code is in Java, part in JSP’s and the rest in OpenCms core To create an automated process you need to be able to test across these different types of code What we created is a combined integration and test server where code is automatically compiled and deployed Once it’s deployed, tests can be triggered against the code through Selenium scripts for front-end testing
  15. 15. MAKE IT WORK Commitment to change Leveraging Test Driven Development (TDD)  adding a test, then making it work Develop the backlog Creating the right team mix
  16. 16. WHAT’S NEEDED WITH OPENCMS Maintain a Code Repository  SVN, Github Automate the Build Process  Maven Make the build Self Testing  Test Driven Development (JUnit for Java Classes)  JSP’s require a different approach Automate Scheduling and Deployment  Hudson
  17. 17. CONTINUOUS BUILD PROBLEMS  Modules and source code are deployed to the VFS  VFS is located in the Database  Modules need to be packaged (zipped) into OpenCms module format in order to be imported  What about importing non module code into the VFS system folder?  What if we did not want to import an entire module but only parts of it?
  18. 18. OUR ANSWERCreate Scripts Create a script that packages source code into OpenCms-ready module Create a script which will prepare source code to be synchronized in OpenCms using the workplace synchronization tool
  19. 19. Sync System andMake Modules ScriptsTwo shell scripts which preparesource code to be imported and synchronized with OpenCms
  20. 20. NEED TO SET ENVIRONMENT VARIABLES+ export TOMCAT_HOME=/usr/local/tomcat + Location of app server where OpenCms is running+ export DIR_SVN=/usr/local/src/svn/trunk/opencms + Location of your subversion directory and src code+ export OPENCMS_HOME=/usr/local/tomcat/webapps/opencms + Location of the OpenCms deployed web site running inside of AppServer+ export SYNC_DIR=/usr/local/src/opencms/sync + Directory which will be used to sync content between the file system and OpenCms Virtual File System (VFS)Environment variables need to be set in order to execute the shell scripts. Scripts will use the environment variables making it easier to move scripts in between different environments with little effort*Environment variables can commonly be set in a users .bash_profile file
  21. 21. WHERE ARE SCRIPTS? Scripts live in the bin directory in your source code home directory (DIR_SVN) Module source code lives in the modules_src directorySubversion Home Directory
  22. 22. MakeModule.shThis script will take source code fromSubversion repository and zip up the codeand deploy it to the OpenCms server. Userwill then be able to login to the admin andupload the module via the modulemanager.
  23. 23. Executing the Script + Pass in the environment (dev) + Used if there are multiple instances (dev, test prod) of OpenCms running on one machine + Pass in the module name (edu.chop.migration)
  24. 24. MAKE RESULTS+ Module code copied from the modules_src directory and zipped up and ready for deployment+ Module code copied and deployed to the OpenCms package directory /WEB-INF/packages/modules/
  25. 25. LAST STEPLog into OpenCms admin and deploy the module
  26. 26. SECOND SCRIPT This script will sync source code to OpenCms by copying code to a sync directory (SYNC_DIR) and then using OpenCms to import the files from that directory using the OpenCms synchronization tool
  27. 27. syncSystem.shStep 1 – Configure synchronization settings in OpenCms+ Synchronization setting will need to be configured to point to your file system sync directory. Also we need to specify which folders in the VFS we want to sync
  28. 28. syncSystem.shStep 2 + Sync Down + Before we sync files from the file system into the VFS we first take files out of the VFS and put them on the file system + We want to tell the script which folders we want to sync + Gives the sync folder an up-to-date snapshot of the current source code in the VFS + Synchronizing will overwrite files and does not create new ones
  29. 29. syncSystem.shStep 2 cont... – Click on the sync button on the top right of screen
  30. 30. syncSystem.shStep 3 Run Sync Module Script Go to your Subversion home directory Run the script
  31. 31. RESULTSSync Folder updated
  32. 32. synsSystem.shStep 4 Sync Up - Running the synchronization again will push the files from the file system up to the VFS
  33. 33. Sync is complete!
  34. 34. RECAP OF AN OPENCMS PROJECTUSING AGILE AND CONTINUOUSBUILD Agile process for better management of requirements and working with the end user Jira and third-party tools for:  Managing Code  Automated Testing  Keeping Multiple Teams in Sync Custom Scripts for Continuous Build  Supported by tools such as Hudson and possibly Gradle in the future
  35. 35. RICH COOLEY TALK TO US. CHALLENGE US. CALL US at 212.819.1700 VISIT US at FOLLOW US @northps© NorthPoint and NorthPoint Solutions LLC