SIMPLYTEST.ME

Empowering community-led development of Open Source software

7 minute read

Tugboat helped ease the burden of maintaining SimplyTest.me by standardizing the entire solution and removing highly customized legacy components. Doing so allows me to focus my time on serving the community and adding value through features and stability fixes. Given the significant reliance on volunteers, this time is invaluable to offering a quality service that Tugboat now affords.

Adam Bergstein, Project Lead of SimplyTest.me and Director of Engineering at Acquia

SimplyTest.me is a website where Drupal developers can go to evaluate Drupal projects, such as modules, themes, or distributions. Site visitors can launch a sandbox - a live, working version of a Drupal website - featuring the modules they want to evaluate. SimplyTest.me also offers one-click demos of popular applications and themes, such as the Drupal Commerce e-commerce web app and the Drupal Umami magazine website theme. SimplyTest.me maintainers were struggling with aging infrastructure and technical debt and wanted to adopt new back-end technologies to power the future of the project.

The challenge

Reduce maintenance overhead

SimplyTest.me’s Project Lead Adam Bergstein - nerdstein in the Drupal community - detailed challenges the project maintainers were having with the site’s infrastructure. Adam cites issues like:

  • A bulky, monolithic server running a LAMP stack and concurrent virtual hosts/databases/etc.
  • A system with no viable backup, no load-balanced failovers, and no affordable replacement.
  • A backend system that had accreted over a decade of technical debt, that was getting more and more difficult to maintain without the help of experts.

Ultimately, SimplyTest.me was concerned about the sustainability and maintainability of the underlying infrastructure. Change management was a key factor given the monolithic nature of this project. Adam cited issues with the backend system repeatedly going down, and things like the divergence of Drupal 7 to Drupal 8, as well as ongoing changes to things like Drush and Composer, creating more complex failures. The fragility of the system made it difficult and painful to maintain.

It was time to replace the backend system. Community conversations were held to explore solutions like Docker or Kubernetes running on a cloud-based provider. Cost was a consideration; rough calculations showed that tiny spot instances through AWS would still cost at least a few thousand dollars monthly. This was a deal-breaker for a free-to-use community project that had very limited donations.

Screenshot of an issue on Drupal.org discussing leveraging a container-based infrastructure for SimplyTest.me's backend

The solution

A new SimplyTest.me, with Tugboat as the back end

While SimplyTest.me and the Drupal community struggled to find an open-source solution for the backend replacement, Tugboat was quietly evolving a more robust build process to solve complex client needs. In 2019, conversations began in earnest about replacing the SimplyTest.me backend with Tugboat. After some initial discovery, the teams concluded that SimplyTest.me could use the Tugboat CLI tool to create Preview builds, and that Tugboat was flexible enough to do this outside of a conventional pull-request-based workflow.

The next step was to look at big picture usage and cost factors to determine if the project was viable. The SimplyTest.me team concluded that Tugboat was a viable replacement for its existing back-end infrastructure because each Preview is ephemeral. This is drastically different from running a multi-tenant infrastructure, from a resource requirement and cost perspective.

The teams traded usage statistics and worked on estimating costs. In the end, it was determined that SimplyTest.me could comfortably operate on a Premium plan, offering plenty of storage, CPU, and build-time and run-time RAM. The cost? $899 monthly, compared to the thousands of dollars estimated to run a custom solution on AWS.

Replacing SimplyTest.me’s existing backend with Tugboat entailed:

  • Removing the old backend server
  • Removing legacy cruft in the form of reducing supporting code and logic by 30%
  • Centralizing the development into Drupal beyond complicated bash scripts
  • Refactoring the web app to replace bash scripts by using Tugboat directly

This new backend removed maintenance headaches and offered improved stability, as well as providing the potential for rapid changes and community contribution.

The implementation

Migrating a back end, in phases

The SimplyTest.me project replaced its backend with Tugboat in a phased approach; first, a proof-of-concept to illustrate that Tugboat could functionally replace the existing custom backend, and a second phase to speed up Preview builds so site visitors could get their sandboxes started faster.

CREATING A PROOF-OF-CONCEPT FOR WEBSITE DEMOS USING DYNAMIC PREVIEW DEFINITIONS

Phase one in switching to Tugboat as the back-end for SimplyTest.me involved figuring out the best way to leverage Tugboat’s YAML-based build process to create previews for SimplyTest users. SimplyTest.me used PHPTemplate to create dynamic preview definitions in YAML. This YAML could change based on what the SimplyTest.me user wanted to explore; for example, creating a Preview running a specific version of Drupal, which could then pull down projects, load patches, and perform installations - all based on the dynamic YAML generated. This YAML file would then be pushed to Tugboat through APIs.

This first pass at architecture provided scaffolding for different Drupal versions, projects, patches, and installation logic. This was the proof-of-concept that demonstrated Tugboat was a viable backend for SimplyTest.me’s website demo engine. From here, the next challenge was improving performance.

IMPROVING PERFORMANCE WITH BASE PREVIEWS

Every Preview sandbox that SimplyTest.me created performed similar preliminary steps to build the environments. Each Preview would clone Drupal, install Drush, and load things like PHP-APC and PHP extensions while spinning up the containers. However, these were common — and time-consuming — steps across all Previews, making Tugboat’s Base Preview functionality a ready-made fix to boost performance.

Using Base Previews, Tugboat was able to create a “starting point” Preview that contained all of these common, time-consuming build steps. Then, new Preview sandboxes could build on these Base Previews; subsequent builds taking only the time required to install specific modules or themes. This dramatically boosted build speed performance, making it feasible for site visitors to access sandboxes in seconds or minutes, versus the much longer load time in the initial proof-of-concept.

The result

Modernizing a custom web application with a cleaner, decoupled approach to reduce maintenance and facilitate contribution

With Tugboat as the new backend for SimplyTest.me, project maintainers enjoy:

  • Removal of legacy supporting code and highly-customized systems and workflows that broke often and required experts to maintain
  • Removal of an aging, monolithic, single-point-of-failure backend server
  • Modernizing a custom web application with a cleaner, decoupled approach, making it easier for community contributors to participate in the project
  • Reduced infrastructure costs; saving $1,200 or more monthly based on estimated AWS costs with a custom Docker or Kubernetes solution
  • Reduced Support needs; Tugboat manages back-end uptime, and its engineers collaborate with SimplyTest.me to facilitate issue resolution

Ultimately, this creative use of Tugboat’s robust build capabilities to support a demo website’s backend made it possible for SimplyTest.me to save money, simplify maintenance needs, and open the door for future project growth.

Need More Info on Tugboat?

Tell us about your project, schedule a demo, or consult with a Tugboat Technical Account Executive.

Your request has been sent.
Oops! Something went wrong while submitting the form.