Tag: Hack-a-Thon

Upgrading from Alfresco SDK 3.0 to 4.0

Alfresco recently announced the beta release of SDK 4.0. The release is long-overdue. Developers had become frustrated that Alfresco published generally-available releases of the platform while seemingly ignoring the fact that there was no compatible SDK that could be used to customize and extend version 6.x of the platform. At DevCon this week, Alfresco said they recognize that was not handled as best as it could have been and pushed hard to get the new release out.

Version 4.0 of the SDK uses the same familiar structure that developers used in previous versions and continues to use Maven for dependency management and packaging. But there are some significant changes happening under-the-covers.

Prior releases of the SDK used an embedded version of Tomcat and an in-memory database to allow devs to launch and run Alfresco, along with their customizations, without having to separately download and install the platform. Adding in a tool that does hot Java class reloading such as JRebel or Hotswap Agent adds a greater productivity boost because changes to things like actions, behaviors, and web scripts can be run immediately, with no restart in most cases.

From a developer’s perspective, your “flow” doesn’t change–the SDK still bootstraps your project into a familiar structure and runs Alfresco with your changes, along with hot-swapping, if you want. The SDK no longer uses embedded Tomcat and H2. Instead, it relies on Docker and Docker Compose. When developers run an SDK project, images from Docker Hub (Community Edition) or Quay.io (Enterprise Edition) are downloaded, overlayed with the developer’s customizations, and launched.

If that sounds painful, relax, it’s not that bad. And the SDK 4.0 docs have everything you need to get productive quickly.

If you’re like me, though, you have many projects, open source and otherwise, that you must now upgrade so you can test them against 6.x. Doing it manually isn’t terrible but it is a bit mind-numbing and can be error-prone. Never fear, though; for help, read on!

Lots of projects to upgrade? DevCon hackers have you covered!

I had the pleasure of participating in the Hack-a-Thon at DevCon again this year, organized, as usual, by community icon, Axel Faust. I wasn’t sure what project I would work on when I woke up that morning, but when I saw there was a group of folks interested in working with SDK 4.0, I joined the team.

First, the group of eight fellow hackers started testing the SDK. For many it was their first time working with SDK 4.0. Windows, MacOS, and Linux were all represented and the group covered the various types of archetypes (all-in-one, repo-only, share-only). Every developer was successful bootstrapping a project and launching the Docker containers using the script that ships with the SDK.

JRebel has worked fine for me in SDK 4.0 for both Community Edition and Enterprise Edition, but no one in the group could get HotSwap Agent, the free alternative to JRebel, working. Filip promised to file a issue on Github, so hopefully it is easy to fix.

While the crew of testers were hammering away, I documented the steps needed to upgrade from 3.0 to 4.0 and filed a pull request to add that to the already-helpful SDK 4.0 documentation. Ole has already merged it. Thanks, Ole!

With the upgrade steps documented and the rest of the team familiar with the tool, we moved on to the next phase: Automating the upgrade. The result is a new Github project called alfresco-sdk-upgrader that you can leverage to upgrade your own SDK projects. It isn’t as full-featured as we wanted. For example, if you’ve customized your SDK pom files you’ll need to manually merge those changes. But I think it is still useful in its current state.

Here’s a video of the script in action:

You can see that I start out with a project based on SDK 3.0.1. The alfresco-sdk-upgrader script does everything needed to convert it from SDK 3.0.1 to 4.0. After it runs, the video shows the new project structure and then you can see that the run script fires up the Docker containers.

Mitch and Omar did a lot of work on the script. I don’t think any of us were planning on writing bash when we arrived that morning, but they happily rolled up their sleeves and knocked it out. We’d love it if you’d test it out on your projects and, if you feel so inclined, make it better by filing a pull request.

Even if you don’t want to use the script, you should give SDK 4.0 a try while it is still in beta so you can provide your feedback. And, if you’re curious about what other fun stuff got cranked out a the Hack-a-Thon, take a look here.

Photo Credit: Upgrade in Progress by Ged Carroll, CC-by-2.0

Alfresco Tech Talk Live Re-Cap: Content hashes, cloud dashlets, & MongoDB

If you didn’t catch Alfresco Tech Talk Live today you missed one heck of a session. We had a motley crew of panelists showing off their creations from November’s Alfresco Summit Hack-a-Thon. Here’s the recording:

Three of the hack-a-thon teams gave demos. We heard from:

  • Axel Faust (Prodyna) and Martin Cosgrave. They showed us a solution they created for a hash-based content store. Content is given a hash as it is added to the repository, then if subsequent content is added, it simply points to that file on disk rather than duplicating it. They also used a hash to create a cache for Alfresco Share. Axel and Martin’s project is hosted on GitHub.
  • Will Abson (Alfresco) showed us a couple of cool things. One was an integration between on-premise Alfresco Share and Alfresco in the cloud. It included, a dashlet like My Sites that lists your sites on Alfresco in the Cloud as well as a search modification that allows you to do a single search against on-premise and Alfresco in the cloud. The project is on GitHub. He also showed an admin console add-on called the Alfresco Cloud API Explorer that lets you run HTTP GETs against the public Alfresco API.
  • Derek Hulley (Alfresco) showed a proof-of-concept he’s been working on. His POC is aimed at replacing the relational back-end that Alfresco uses to store metadata with MongoDB. It isn’t complete yet, but he was able to show that you could add aspects to a node and those aspects and property values were persisted in MongoDB.Derek’s project is on GitHub.

Nathan McMinn (Alfresco), Richard McKnight (Alfresco), Ben Kahn (Red Hat), and Alexey Ermakov (VIDEL) were also on our panel and participated in the discussion but we ran out of time for their demos. We’ll circle back with them another time.

We also have three brief announcements:

Thanks to all panelists and viewers who participated!

Reminder: Sign Up for Alfresco Summit Hack-a-Thon

Don’t forget, folks. If you DevCon 2012 San Jose Hack-a-Thonare planning on arriving in time for Day 0 of Alfresco Summit in either Barcelona (Nov 4) or Boston (Nov 12) so that you can participate in the hack-a-thon, you need to let us know so we can plan for food. Space is limited, so people who sign-up ahead of time using of these forms will be given priority (Barcelona, Boston).

 

DevCon Hack-a-Thon & Activiti Day

Just a quick note about recent DevCon goings-on in case you’ve missed this via other channels…

Early-Bird Registration Ends 10 September!

Just a friendly reminder: You can save some money if you sign up before 10 September, so do not wait to sign-up.

DevCon 2012 Promo Video

Includes a few quotes from the Alfresco community’s colorful cast of characters.

http://youtu.be/-bL1wZ1k22k

DevCon 2012 Hack-a-Thon

We’re going to be doing a Hack-a-Thon the day before the main conference starts in both Berlin and San Jose. This will run concurrently with the optional Fundamentals and Advanced Training classes. So if you are an Alfresco old-timer who doesn’t need Fundamentals or Advanced training, show up a day early and join us in the hack-a-thon. We’re still deciding which projects we’re going to work on that day. More info will be posted on the DevCon Hack-a-Thon page as it develops.

Activiti Day Berlin

If you are attending DevCon Berlin and you have any interest in Activiti, you should plan on staying an extra day and joining us for an Activiti Community reception the night of 7 November and then an all day Activiti Community event on 8 November. See the DevCon blog for more details.

DevCon Lightning Talks Debut

We’re planning on having two lightning talk sessions, one on each day of the main conference, at both DevCon events this year. We are planning on using the Ignite format, but if that is holding a significant number of people back, we may decide to relax that requirement. If you want to give a 5-minute talk at DevCon, sign up now.