百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

aws-rails-provisioner

> 编程语言
开源

在 AWS 上定义和部署容器化的 Ruby on Rails 应用程序

200 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

在 AWS 上定义和部署容器化的 Ruby on Rails 应用程序

This tool is deprecated

This tool is deprecated. We cannot guarantee that it will work.

This documentation will remain for historical purposes.

aws-rails-provisioner

A tool for defining and deploying containerized Ruby on Rails applications on AWS.

aws-rails-provisioner is a command line tool using your configurations defined in aws-rails-provisioner.yml file to generate AWS CDK stacks on your behalf, provisioning required AWS resources for running your containerized Ruby on Rails applications on AWS (current supported platform: AWS Fargate) within a few commands.


This tool is under developer preview (beta) stage, with active development, releases might lack features and might have future breaking changes.


Links of Interest

  • Change Log
  • Issues
  • License
  • Documentation

Getting Started

Prerequisites

Before using the aws-rails-provisioner gem, you need to have:

  • a Ruby on Rails application with a Dockerfile

  • install or update the [AWS CDK Toolkit] from npm (requires Node.js ≥ 8.11.x):

    $ npm i -g aws-cdk
    
  • docker daemon vailable for building images

Install aws-rails-provisioner

aws-rails-provisioner gem is available from RubyGems, currently with preview versions.

gem install aws-rails-provisioner --pre

Define aws-rails-provisioner.yml

aws-rails-provisioner.yml is a configuration file defining how aws-rails-provisioner bootstraps required AWS resources for your Ruby on Rails applications.

version: '0'

vpc:
  max_az: 2
  enable_dns: true
services:
  my_rails_foo:
    source_path: ./path/to/my_rails_foo # relative path from `aws-rails-provisioner.yml`
    fargate:
      desired_count: 3
      memory: 512
      cpu: 256
      envs:
        PORT: 80
        RAILS_LOG_TO_STDOUT: true
      public: true
    db_cluster:
      engine: aurora-postgresql
      db_name: app_development
    scaling:
      max_capacity: 5
      on_cpu:
        target_util_percent: 80
        scale_in_cool_down: 300
      on_requests:
        requests_per_target: 1000
  my_another_rails:
    ...

See ./examples for more aws-rails-provisioner examples (see tiny.yml for a minimal aws-rails-provisioner.yml configuration example). The full configuration options are documented here.

Build and Deploy

Once aws-rails-provisioner.yml is defined, run the build command. This will boostrap AWS CDK stacks and define all required AWS resources and connections in CDK code.

aws-rails-provisioner build

By default, it defines a VPC with public and private subnets, an Amazon RDS Database Cluster, an ECS cluster with AWS Fargate services containing application images. When building with --with-cicd option a CICD stack will be defined automatically (including a Rails data migration step).

aws-rails-provisioner build --with-cicd

After the build completes, run the deploy command to run CDK code that deploys all defined AWS resources:

aws-rails-provisioner deploy

Instead of deploying everything all at once, you can deploy stack by stack, application by application:

# only deploys the stack creates VPC and ECS cluster
aws-rails-provisioner deploy --init

# deploys fargate service and database cluster when defined
aws-rails-provisioner deploy --fargate

# deploy CICD stack
aws-rails-provisioner deploy --cicd

# deploy only :rails_foo application
aws-rails-provisioner deploy --fargate --service my_rails_foo

After the deployment completes, your applications are now running on AWS Fargate fronted with AWS Application LoadBalancer. You can view your website using the public IP address of the network interface's load balancer.

Note: for applications with databases, rails db migration is needed; the CICD stack contains a migration phase by default, running DB migration commands insides private subnets, connected to the DB Cluster.

CICD

When --with-cicd is enabled at build, a CICD stack is created. Once deployment completes, an AWS CodePipeline is available with source, build, migration, and deploy phases for your Rails application. You need to commit your Rails application to the CodeCommit source repository in the pipeline with buildspec files to activate the pipeline. Sample buildspecs are availble under ./buildspecs handling application image builds and rails migrations.

Full aws-rails-provisioner command line options see:

aws-rails-provisioner -h

Contributing

We welcome community contributions and pull requests. See CONTRIBUTING for details.

Getting Help

Please use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests.

  • Ask a question on Stack Overflow and tag it with aws-rails-provisioner
  • If it turns out that you may have found a bug, or want to submit a feature request, please open an issue

License

The aws-rails-provisioner is distributed under Apache License, Version 2.0. See LICENSE for more information.

Issues· 10 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言