All Projects → ewilde → Terraform Aws Openfaas Fargate

ewilde / Terraform Aws Openfaas Fargate

Create an OpenFaaS platform for AWS Fargate using Terraform

Labels

Projects that are alternatives of or similar to Terraform Aws Openfaas Fargate

Tack
Terraform module for creating Kubernetes cluster running on Container Linux by CoreOS in an AWS VPC
Stars: ✭ 734 (+2958.33%)
Mutual labels:  hcl
Terraform Google Gitlab Runner
Terraform module for provisioning a GitLab CI Runner in a GCP project using the docker+machine executor.
Stars: ✭ 17 (-29.17%)
Mutual labels:  hcl
Terraform Aks Autoscaler
AKS cluster with node autoscaler and horizontal pod autoscaler.
Stars: ✭ 19 (-20.83%)
Mutual labels:  hcl
Ecs loadbalancing demo
Demo Terraform scripts to create an ECS + Load Balancer setup
Stars: ✭ 7 (-70.83%)
Mutual labels:  hcl
Terraform Aws Ecs
Terraform AWS ECS stack
Stars: ✭ 16 (-33.33%)
Mutual labels:  hcl
Terraform Aws Vpc Peering
A Terraform module to configure a VPC Peering connection in AWS.
Stars: ✭ 17 (-29.17%)
Mutual labels:  hcl
Peladonerd
Repo con los archivos que uso para mi videos en youtube
Stars: ✭ 716 (+2883.33%)
Mutual labels:  hcl
Hashiconf 2018
Stars: ✭ 23 (-4.17%)
Mutual labels:  hcl
Kallewheel
A custom color wheel extension for Adobe Photoshop
Stars: ✭ 16 (-33.33%)
Mutual labels:  hcl
Terraform Ecs Fargate Service Discovery
Stars: ✭ 19 (-20.83%)
Mutual labels:  hcl
Terraform Aws Openvpn
Terraform AWS OpenVPN Stack
Stars: ✭ 7 (-70.83%)
Mutual labels:  hcl
Gcp Terraform Samples
Stars: ✭ 16 (-33.33%)
Mutual labels:  hcl
Rancher Flocker
Packaging and deploying Flocker on top of Rancher
Stars: ✭ 17 (-29.17%)
Mutual labels:  hcl
Terraform Aws Demo
Stars: ✭ 6 (-75%)
Mutual labels:  hcl
Jenkins Fargate
Stars: ✭ 22 (-8.33%)
Mutual labels:  hcl
Okd
The self-managing, auto-upgrading, Kubernetes distribution for everyone
Stars: ✭ 729 (+2937.5%)
Mutual labels:  hcl
Terraform Google Jenkins
This module handles the creation of a GCE instance running Jenkins, configured to run builds on Google Cloud.
Stars: ✭ 17 (-29.17%)
Mutual labels:  hcl
Fdb Cloud Test
Packer + Terraform setup to experiment with FDB clusters in the cloud.
Stars: ✭ 23 (-4.17%)
Mutual labels:  hcl
Terraform Openstack Rke
Terraform Openstack RKE
Stars: ✭ 23 (-4.17%)
Mutual labels:  hcl
Gitlab Ecs Terraform
Installing GitLab on Amazon ECS by Terraform
Stars: ✭ 18 (-25%)
Mutual labels:  hcl

Overview

Openfaas for fargate overview

Installing

  1. Install terraform

Mac: brew install terraform

Linux:

wget https://releases.hashicorp.com/terraform/0.11.7/terraform_0.11.7_linux_amd64.zip
unzip terraform_0.11.7_linux_amd64.zip
sudo mv terraform /usr/local/bin
terraform --version
  1. Create terraform.tfvars

You will need to create a new file in the root of this repo called terraform.tfvars which configures variables used to install faas-ecs

Name Description
acme_enabled (Recommend)1 to use the official acme terraform provider to create TLS certificates. Defaults to 0
acme_email_address (Recommend) Email address used to register TLS account, used in conjunction with acme_enabled
aws_region (Required) The aws region to create the openfaas ecs cluster in
alb_logs_bucket (Required) S3 bucket to store alb logs
debug (Optional) 1 to create an ec2 bastion in the external subnet and a test instance in the internal subnet. Defaults to 0
developer_ip your ip address, used to whitelist incoming ssh to the bastion, debug is enabled
route53_zone_name (Recommended) a route 53 zone to create DNS records for the OpenFaaS gateway, i.e. openfaas.example.com, requires acme_enabled
self_signed_enabled (Not recommended) Use a self-signed TLS certificate for the OpenFaaS gateway if not using acme_enabled. Defaults to 0

Example file

cat > ./terraform.tfvars <<EOF
acme_enabled           = "1"
acme_email_address     = "[email protected]"
alb_logs_bucket        = "ewilde-logs"
aws_region             = "eu-west-1"
debug                  = "1"
developer_ip           = "31.53.195.58"
route53_zone_name      = "openfaas.edwardwilde.com"
self_signed_enabled    = "0"
EOF
  1. Create a public key for ssh

Ssh access is only required if debug = "1", however the ssh key is still required for the install to work even if debug disabled. To create the key run:

make keys

  1. Create bucket for alb logs If you don't already have a bucket, please create the bucket you listed in your terraform.tfvars in the variable alb_logs_bucket

i.e. aws s3api create-bucket --bucket ewilde-logs --region eu-west-1 --create-bucket-configuration LocationConstraint=eu-west-1

  1. Run terraform

make

Known issue

If you get the following error:

Error: Error applying plan:

2 error(s) occurred:

* module.ecs_provider.aws_ecs_service.main: 1 error(s) occurred:

* aws_ecs_service.main: InvalidParameterException: Unable to assume the service linked role. Please verify that the ECS service linked role exists.
	status code: 400, request id: d967b493-82f9-11e8-9d63-f5180ba0fbef "ecs-provider"
* module.nats.aws_ecs_service.main: 1 error(s) occurred:

* aws_ecs_service.main: InvalidParameterException: Unable to assume the service linked role. Please verify that the ECS service linked role exists.
	status code: 400, request id: dab962b7-82f9-11e8-8cc5-29d47e720a04 "nats"

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

Please just re-run make, this is an eventual consistency problem see #4

Uninstalling

  1. Run make uninstall
  2. Patiently wait about 5-10 minutes

Known issue


1 error(s) occurred:

* aws_service_discovery_private_dns_namespace.openfaas (destroy): 1 error(s) occurred:

To resolve this problem manually delete all the service registrations

aws servicediscovery list-services | jq '.Services[].Id' -r | xargs -L 1 aws servicediscovery delete-service --id

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].