Giter Club home page Giter Club logo

terraform-heroku-girder4's Introduction

terraform-heroku-girder4

A Terraform module to provision Girder4 infrastructure on Heroku + AWS.

This facilitates deployment of Django applications created from the Girder4 cookiecutter. It creates a Heroku app with addons for PostgreSQL, CloudAMQP, and Papertrail. It also creates AWS S3 storage, outgoing SMTP credentials, and an optional AWS EC2 worker.

See full usage documentation at Terraform Registry.

Note on AWS Email Sending

Every AWS account must explicitly apply to send real emails, once per Simple Email Service (SES) region.

Approvals seem to be granted liberally and to take about 24 hours.

Note on initial creation of Heroku apps

When first creating an instance of this module, provisioning of the Heroku app (specifically the heroku_formation resources) will likely fail with a "Couldn't find that process type" error message. To resolve this, the Heroku app code must be deployed at least once.

Typically, this can be done by connecting a GitHub repo to the Heroku app and then triggering a manual deploy. Finally, run terraform apply again, which should succeed.

Afterwards, it's advisable to also set up automatic deploys.

Note on EC2 Worker AMIs

Newly launched EC2 worker instances will use the latest AMI at the time of launch, but existing instances will not be replaced when a newer AMI is available. Thus, incrementally scaling up the ec2_worker_instance_quantity variable may result in multiple instances with slightly different AMIs.

Likewise, setting or changing the optional variable ec2_worker_launch_ami_id will only affect newly launched instances, but will also not trigger the replacement of any existing instances with a different AMI.

Use the -replace option with the module.<girder4>.module.ec2_worker[0].aws_instance.ec2_worker[*] target (where <girder4> is the local name of this module) to force the replacement of all existing instances.

terraform-heroku-girder4's People

Contributors

brianhelba avatar zachmullen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

zachmullen

terraform-heroku-girder4's Issues

Provide Heroku IAM user ARN as an output

Currently the Heroku IAM user ID is provided as an output. I have had instances where I needed the user's ARN, which I had to write as arn:aws:iam::${data.aws_caller_identity.account.account_id}:user/${module.api.heroku_iam_user_id}. It would be nice if the ARN were also provided as an output.

Heroku does not allow dynos to have different sizes

Currently, it is possible to configure the web and worker dyno sizes separately. When you try to apply those changes, you get an error like this one:

Error: Patch "https://api.heroku.com/apps/dandi-api/formation/worker": Cannot use the following dyno types in the same app: Hobby, Standard-1X, and Standard-2X

  on .terraform/modules/api/modules/heroku/main.tf line 32, in resource "heroku_formation" "heroku_worker":
  32: resource "heroku_formation" "heroku_worker" {

heroku_worker_dyno_size and heroku_worker_dyno_size should be consolidated into heroku_dyno_size so that this is not possible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.