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

[research] multicloud support #27

Open
urbien opened this issue Dec 28, 2021 · 0 comments
Open

[research] multicloud support #27

urbien opened this issue Dec 28, 2021 · 0 comments
Assignees

Comments

@urbien
Copy link
Member

urbien commented Dec 28, 2021

Problem

Our current toolchain for Infrastructure as Code (IaC) is serverless-framework.
Serverless is not ideal and we have been struggling with it for years. We have also created a number of forks and are sitting on an older version of serverless framework.
As we begin our research for adding multicloud support (adding Azure and Google Cloud and its own native Linux environment for Cloudpal), we should consider Terraform, which seems to have become more popular than serverless-framework.

Things to consider

Initial migration from serverless yml to Terraform HCL language (they also support json, should we choose to use it) can probably be automated. See for starters:
https://stackoverflow.com/questions/60905099/best-way-to-convert-cloudformation-serverless-template-into-terraform

Converting multi-template serverless into Terraform

We use multiple interconnected yml templates, so need to figure out how to import multi-template serverless info Terraform format

Use open source Terraform modules

Modules group complex resources and there is a ton of open source modules. Let's not reinvent the wheel. Specific example: could use it for Lambda in VPC, see for starters:
https://transcend.io/blog/opinion-a-case-for-using-terraform-open-source
Other potential use case for TF modules Is adding the Application Firewall.

Migrate customer resources

we have a number of functions performed by so called custom resources in serverless-framework. Need to map them to Terraform.

Redo imported terraform for ease of maintenance and best practices

Good best practices talk:
https://youtu.be/WkPIrfW7JWA

Build for multi-cloud

Here is one example how to do it, perhaps on the higher complexity side:
https://www.silect.is/blog/multi-cloud-vpn-terraform/

Localstack

We use serverless in conjunction with localstack for development on dev machines with full AWS simulation (only for the services we use). We will need to research how this will work with Terraform for example, see this for starters:
https://dev.to/mrwormhole/localstack-with-terraform-and-docker-for-running-aws-locally-3a6d

Alternatives to Terraform

Terraform may be a leader in declarative IaC, but a new movement has emerged, where IaC is defined in a imperative language like Typescript.
Examples are:

  1. CDK for Cloudformation - product by AWS, supports half a dozen languages
  2. CDK for Terraform - also supports half a dozen languages
    see this talk: https://youtu.be/7h8UXqPoOcY
    Perhaps for the multi-cloud configs CDK could be easier to manage than the declarative HCL
  3. Pulumi
  4. SST
@urbien urbien changed the title [research] multicloud support, possible migration with Terraform [research] multicloud support Apr 26, 2022
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

No branches or pull requests

2 participants