Files
strapi-elb/todo.md
2020-04-29 17:54:07 +01:00

2.6 KiB

To Do

Finish S3 config for env vars Deploy to AWS and ensure vars are working

Use cloudformation to deploy bucket instead of tieing it to the RDS instance. Use https://strapi.io/documentation/3.0.0-beta.x/deployment/amazon-aws.html#_2-create-the-bucket for bucket options for the template.

Strapi documentation - build and host

RDS Cloudformation

Use http://blog.blackninjadojo.com/aws/elastic-beanstalk/2019/01/28/adding-a-database-to-your-rails-application-on-elastic-beanstalk-using-rds.html to create an RDS for ELB.

  • RDS cloudformation template
  • Use the GUI to go through options and create cloudformation template
  • Create an RDS db before deployment
    • Configure Strapi to use this RDS db
    • VPC + Security Group needs creating in template

Compare the --database option to without and make sure you create everything in the Cloudformation template.

Look at how to have multiple environments in the same elb app

Deploy strapi as load balanced rather than single instance

Deploy strapi with a custom domain with HTTPS as a single instance + load balanced.

Combine ELB Documentations (strapi, ELB etc)

Use codebuild to update strapi

Use circle CI instead

Finish the backgrounds for the demo website

Cloudformation template to deploy an S3 bucket

Decouple an exisitng RDS instance from ELB to RDS: https://aws.amazon.com/premiumsupport/knowledge-center/decouple-rds-from-beanstalk/

Deploy the ELB environment referencing the VPC + Subnets created with Cloudformation. Use https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/vpc-rds.html as a reference.

This works! Create all the VPC + Subnet resources using Cloudformation and specify them in option settings:

option_settings:
  aws:ec2:vpc:
    VPCId: "vpc-003597eb63a0a3efe"
    Subnets: "subnet-02cd8f7981ddfe345,subnet-02d9e1338e8d92d09,subnet-0e07d4d35394db524"
    DBSubnets: "subnet-02cd8f7981ddfe345,subnet-02d9e1338e8d92d09,subnet-0e07d4d35394db524"

Recreate env with database, check the DB subnets - are they the same as the EC2 subnets? If so we can reference them in https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html#command-options-general-ec2vpc with ELBSubnets

Can we use cloudformation functions (imports) in .config files under option_settings? (reference a VPC that already exists?) (https://www.reddit.com/r/aws/comments/a2uoae/is_there_a_way_to_reference_an_elastic_beanstalk/) Yes? Yes but only certain functions: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions-functions.html#ebextensions-functions-getatt. You cannot use FN::ImportValue to reference a resource in another Cloudformation stack.