This site now powered by Java 8, Tomcat 7 and Wufoo Forms

I recently upgraded this site to use the latest version of Apache Roller. It was a minor release (5.0.3), but I figured I'd document the steps in case "early onset" comes soon. First of all, to download raibledesigns.com and get it running locally, I perform the following steps:

  1. Backup everything using ~/bin/backup.sh on raibledesigns.com
  2. scp backup file to local hard drive and expand
  3. Copy ROOT, skins and repository directories to local webapps
  4. Make sure activation, mail, mysql and jta JARs are in $CATALINA_HOME/lib
  5. Copy roller-custom.properties from raibledesigns.com's $CATALINA_HOME/lib
  6. Copy context files from hosted $CATALINA_HOME/conf/Catalina to local directory
  7. Import database and change roller-custom.properties to match local credentials

Next, to upgrade to the latest Roller release, I do the following:

  1. Download latest Roller release and expand
  2. Copy JARs (from WEB-INF/lib) to existing install (to upgrade dependencies)
  3. Delete any lower-versioned JARS from WEB-INF/lib directory
  4. Copy JSPs (from WEB-INF/jsps) to existing install
  5. Run database migration scripts from WEB-INF/classes/dbscripts
  6. Use a diff tool (like SmartSynchronize) to compare new vs. existing
  7. Test and troubleshoot (if there's startup errors)

This process has worked well for the last 10 years, and it's been in my head the whole time. It's bound to escape someday.

Contact Form Enhancements
In addition to upgrading Roller, I also upgraded Tomcat 6 to Tomcat 7.0.52. In doing so, I found Jakarta's Mailer Taglib doesn't work with Tomcat 7. As you can tell from the aforementioned thread, I've known this for several years. That's the only thing that's stopped me from upgrading Tomcat the past couple years.

Rather than using my own code to send email, I figured I'd explore my options. I looked into Kontactr, EmailMeForm and Wufoo. The first two allowed me to customize their colors, but Wufoo was the only one that had a transparent background feature. Because Wufoo form's are transparent, and I'd copied their CSS for AppFuse's forms in the past, I decided to use it. To make it work with both of this site's themes (light and dark), I did need to create two forms on Wufoo and do some local JavaScript modifications. You can see the results on my contact page (view-source to see the JavaScript). If you switch the theme (by clicking the little rectangles in the top-right corner), you can see how the form is redrawn with the proper color scheme.

If I'd found it sooner, I likely would've used Brace Forms for my contact form.

Theme Improvements
Ever since I switched to a new look and feel, there's been improvements I wanted to make.

The stylesheet switching doesn't happen as fast as I'd hoped (there's a flash even if using cookies), so I'll likely be converting some theme-setting logic to the server-side. The HTML5 version of the FaceBook Like Button requires you to specify the "data-colorscheme" in markup so this further supports moving to the server.

To fix this issue, I tried creating a cookie-reader plugin for Roller. This worked, but not as well as I'd hoped. The theme cookie was read the first time the page loaded, but then cached for subsequent requests. If a user changed their theme, the new value would not be read by the cached page. My solution now is putting the JavaScript set-default-theme logic right after the stylesheet to set it before the body loads.

Powered by Java 8
To make this site run on Java 8, I had to move to a new server. Keith did a bunch of work on my old server to get Java 8 working, but found Linux JDK 7 code has dependancies on the 2.6 kernel. If you're reading this post, the DNS changes have propagated. This means I have my first Java 8 app in production! ;)

Secured by SSL
The last change I made was to start using my SSL certificate on this site. You can read about the challenges I encountered on the Roller mailing list. The final solution involved changing my Absolute URL to use https and then changing my theme to use the following for its base.

<base href="$absBaseURL.replace('https:', '')" />

I also had to change a number of iframes to use src="//..." instead of src="//...". To force HTTPS for the admin pages, Keith configured Apache to do the redirect. Using Roller to redirect resulted in infinite loop errors.

This means you can now access this site using https://raibledesigns.com or http://raibledesigns.com, whichever you prefer. Speaking of SSL, you might wonder if this new server is affected by The Heartbleed Bug. According to Keith, it is not.

This server is still running openSSL 1.0.0 which was shipped with Centos 6.1, and the Heartbleed vulnerability appeared in OpenSSL 1.0.1 which shipped Centos 6.5.

Summary
This site has undergone quite a few updates this month: Roller 5.0.3, Tomcat 7.0.52, a Wufoo contact form (+ recent tweets on the same page), Java 8 and optional SSL. If you see any issues, please let me know.

May 8, 2014 Update: I decided to revert to "http" for the absolute URL instead of "https". However, I've updated all "src" attributes on <iframe> and <img> tags to use schema-less URLs (// instead of http://). This means that both secure and non-secure URLs should work.

Posted in Roller at Apr 09 2014, 07:37:59 AM MDT Add a Comment
Comments:

Post a Comment:
  • HTML Syntax: Allowed