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.
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:
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.
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:
This new backend removed maintenance headaches and offered improved stability, as well as providing the potential for rapid changes and community contribution.
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.
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.
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.
With Tugboat as the new backend for SimplyTest.me, project maintainers enjoy:
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.
Tell us about your project, schedule a demo, or consult with a Tugboat Technical Account Executive.