Jets 6.0 is a Deployment Service. Jets makes it easy to deploy and run your app on Serverless. It packages up your code and runs it on AWS Lambda. Jets can deploy Rails, Sinatra, Hanami, and any Rack app.

Rails Support

The biggest news in this release is Rails support. To deploy your Rails app, Jets uses your code to build a Docker image and deploy it to AWS Lambda.

The steps to deploy your app are minimal. Add this to your Gemfile.

Gemfile

gem "jets", ">= 6.0"
gem "jets-rails", ">= 1.0"

And run

jets init
jets deploy

That’s it.

Customization and Hooks

Though the steps above for getting started are simple, Jets is highly customizable. You can configure a plethora of options to control the build process. The settings will be in your config/jets folder. You can also hook into the Docker build process with different hooks like Heroku’s familiar release phase hook. That’s one small hook, Jets has many more powerful hooks.

Ultimately, Jets builds your app and the resources required as infrastructure-as-code. It’s all self-contained, making it easy to create extra environments on the fly. It’s a thing of beauty.

Features

There are too many features to cover in this blog post. We’ll highlight some of them.

  • Docker: Jets supports using Docker. Jets generates a managed Dockerfile to build and ship your app. You can customize the Dockefile with a plethora of options. You can use your own custom Docker if needed.
  • CloudFront CDN: Jets can automatically create CloudFront Distribution for your Lambda Functions, Assets Serving, and File Uploads. Assets are precompiled and uploaded as part of the deploy process. The file uploads CDN is configured with reasonable default settings.
  • Lambda Function URL: Jets uses the Lambda Function URL service to route web requests to your app. You can think of it as a Load Balancer that routes your requests to concurrent Lambda Functions.
  • Prewarming: Prewarm your app at regular frequencies to mitigate cold-starts.
  • Provisioned Concurrency: Use provisioned concurrency to avoid Lambda cold-starts altogether.
  • Reserved Concurrency: Jets configures reasonable defaults to prevent your app from scaling out of control. This helps to avoid a surprise Serverless bill. Ironically, with Serverless you worry about scaling too much instead of not scaling enough. The defaults are all overridable.
  • ActiveJob Support: Jets supports a jets_jobs ActiveJob adapter. Jets will deploy Serverless resources like SQS Queues and Lambda Functions to process your Rails Jobs. It allows Rails Jobs to run on Serverless resources. Jets can also take your Sidekiq jobs and scheduler and convert them to Serverless resources on-the-fly.
  • CI: Continuous Integration is baked in and supported. Jets can build a CodeBuild project dedicated to CI. It deploys on git push and also can deploy on a scheduled basis.
  • WAF: Jets supports Web Application Firewall to provide additional protection. A Jets Blanket Rate Limiter WAF Rule provides fundamental protection against DDOS attacks.
  • Remote Runner: A CodeBuild remote runner provides a consistent build environment with the necessary tooling.
  • Jets Exec REPL: A jets exec command allows you to run commands on AWS Lambda to explore and debug your app.
  • Release History and Rollback Ability: You can use jets release:history and jets rollback for this.
  • Events: Jets is a powerful glue framework that can be used to wire Serverless resources together.

Again, this is just the tip of the Jets iceberg.

Jets Account

To use Jets, you need a Jets account. You can sign up at www.rubyonjets.com and create an API token key there. There is a 2-week free usage period for your AWS account. After that, a paid plan is required. You pay a flat monthly price for each stack. Here’s the pricing.

Summary

Jets 6.0 is a game-changer. It allows you to run your existing Rails, Sinatra, Hanami, and any Rack app on AWS Lambda Serverless with minimal effort.

We’ve been running it on our production Rails apps for over a month. There’s more than a half dozen. Here’s are some live sites deployed with Jets.

Here are also video tutorials, guides, and demos:

Hope you enjoy Jets 6.