seed icon indicating copy to clipboard operation
seed copied to clipboard

env(terraform): start using Terraform to initialize cloud infrastructure

Open spy4x opened this issue 2 years ago • 0 comments

Idea

A Seed user (developer) should be able to clone Seed and run a script/command that would setup the whole infrastructure for it in the cloud.

Scope

  • Google Cloud only (for now)
  • May or may not deploy apps after the setup (just run $ yarn nx run-many --target=deploy --all=true) - should be defined if it is convenient.

Implementation options

User executes $ yarn setup:cloud that runs one of:

  • Terraform
  • Custom script (sh?) docs/how-to-init-cloud-infrastructure.md

Ideas for the future:

  • $ npx seed-startup Wizard that: 1. clones repo 2. installs deps 3. asks for ProjectID and if it should setup infrastructure now

Useful links:

  • https://www.cloudskillsboost.google/course_sessions/1861885/video/324602
  • https://www.youtube.com/watch?v=7xngnjfIlK4&list=WL&index=48&t=4847s
  • https://github.com/GoogleCloudPlatform/serverless-expeditions/tree/main/cloud-run-django-terraform

List of what to be configured

Backend:

  • Cloud Run
  • PostgreSQL
  • PGBouncer
  • Redis

Frontend:

  • Firebase Hosting

Both:

  • Firebase Authentication
  • Firebase Cloud Storage
  • Environment variables

spy4x avatar Jul 10 '21 16:07 spy4x