Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: AWS CloudFormation template #34

Closed
wants to merge 1 commit into from
Closed

Conversation

Sjors
Copy link
Owner

@Sjors Sjors commented May 3, 2018

Fixes #31.

Changes compared to Ruby on Rails basic example:

  • description
  • install git and clone Matreon
    • workaround: use custom branch with MySQL for production
  • reduced number of supported instances and locations, so there's fewer tedious tables to maintain
    • supported instance types: t2.micro, t2.small and t2.medium
    • supported locations: Frankfurt (eu-central-1b)
  • hardcoded database name and user
  • bump ruby version

TODO:

  • install NVM and yarn
  • run yarn install
  • maybe switch from Amazon Linux to Ubuntu (18.04 ami-331d3bd8)
  • use Postgres (for Heroku compatibility)
  • get rid of database password prompts in template
  • use ENV instead of replacing database.yml
  • configure FROM_EMAIL, BUGS_TO, PODCAST, PODCAST_TITLE, PODCAST_IMAGE, PODCAST_URL
  • https support (using SSL certificate manager?)
  • bitcoind
  • c-lightning (open inbound port)
  • Lightning Charge
  • run crons
  • configure SMTP params
  • run Rails server in production env
  • run Rails server as normal user and forward port 80/443
  • run everything as services, with auto recovery where possible
  • setup monitoring for various components
  • backup instructions / tool (private keys, transaction metadata, Matreon database)
  • accelerate IBD by launching temporary heavy-duty instance, pruning it and then copying the data
  • upgrade commands / instructions (OS, bitcoind, c-lightning and Matreon)

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/sample-templates-appframeworks-us-west-2.html
Ruby on Rails basic

Changes:
* description
* add git and clone Matreon
  * workaround: use custom branch with MySQL for production
* reduced supported instance types to t2.micro, t2.small and t2.medium
* reduced supported locations to Frankfurt
* simplified AWSRegionArch2AMI table
* hardcoded database name and user
@Sjors Sjors force-pushed the 2018/05/aws_cloudformation branch from 2dfff1a to 7a08339 Compare May 3, 2018 10:58
@Sjors
Copy link
Owner Author

Sjors commented May 3, 2018

It might make more sense to start with a Bitcoin Core + Lightning + Charged template, since that would be useful for other projects as well. Then add the Rails stuff later.

@Sjors
Copy link
Owner Author

Sjors commented May 3, 2018

Or maybe I should consider Docker instead? That’s also a bit more portable. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html

This was referenced May 3, 2018
@Sjors
Copy link
Owner Author

Sjors commented May 4, 2018

Closing in favor of #36.

@Sjors Sjors closed this May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant