Intro Links 2

Build Rails from the Bitnami upstream

Building our own Rails from RVM seems daunting, so we may choose to follow an example:

  • This page from Bitnami (VMware) provides a basic entry-level deployment into Kubernetes with Helm workflow for creating a modern, Hello World in Rails.

Docker Images

Here I have orchestrated several CI builds in the public cloud, using free infrastructure from Docker Hub/Docker Cloud

Docker Cloud - Automated Builds

Each of these published repositories is fed new images, generated by changes to an upstream Git repository, 

This demonstrates a clever feature of Docker Hub, a downstream's release cycle can be automated to track against its upstream. When a new image is pushed to the tag kingdonb/rails:postgresql, the downstream build is automatically triggered by the Build Automation at Docker Hub to create a new tag for kingdonb/demorailsapp:master.

Automated Builds - Building from SemVer Tags

This strategy can also be applied in a manually gated way, with tags and semver. The fully-pipelined approach can trigger awkward failures when a Ruby app depends on a particular version of Ruby, but the upstream has changed and no longer provides the required or specified version.

An example of this can be easily demonstrated by upgrading "postgresql" tag, eg from Ruby 2.6.3 to Ruby 2.6.4, which causes an automated build to trigger and fail. In practice, this is fine and those failed builds can act as an async signal to an operator, who can take a look and figure out what needs to be upgraded. Because build and deploy are separate steps which do not depend on each other, there is never any danger of a failed build having an impact on production.

(For a more resilient and less magical approach using RVM, which is less prone to build failures and with the capability of having multiple Ruby versions made available together in each build image, see the RVM sample from Intro Links 1 which can be found in the same Wiki Pad alongside of this article.)

Back to top