Install Portefaix

Instructions for deploying Portefaix on AWS

Setup

Create an admin user. Then API Keys, and configure Portefaix environment file ${HOME}/.config/portefaix/portefaix.sh:

# AWS
export AWS_ACCESS_KEY_ID="....."
export AWS_SECRET_ACCESS_KEY="....."
export AWS_DEFAULT_REGION="..."
export AWS_REGION="...."

And load environment :

❯ . ./portefaix.sh aws

Storage for Terraform

Create a S3 bucket for Terraform states:

❯ make -f hack/build/aws.mk aws-s3-bucket ENV=staging

Create a DynamoDB table :

❯ make -f hack/build/aws.mk aws-dynamodb-create-table ENV=staging

Terraform

VPC / Internet Gateway

Create an Elastic IP for Internet Gateway:

❯ make terraform-apply SERVICE=iac/aws/elastic_ips/internet-gateway ENV=staging

Create the VPC and Internet Gateway :

❯ make terraform-apply SERVICE=iac/aws/vpc ENV=staging

EKS

❯ make terraform-apply SERVICE=iac/aws/eks ENV=staging

Kubernetes components

Sops

❯ make terraform-apply SERVICE=iac/aws/sops ENV=staging

Outputs:
kms_arn = arn:aws:kms:eu-west-3:447241706233:key/cf77f24a-00db-4d6a-8b4b-a8dec3976ff2
role_arn_eks = arn:aws:iam::447241706233:role/portefaix-staging-eks-sops-eks
role_arn_users = arn:aws:iam::447241706233:role/portefaix-staging-eks-sops-users

Observability

❯ make terraform-apply SERVICE=iac/aws/observability ENV=staging

Outputs:

loki_role_arn = arn:aws:iam::xxxxxxxxxxxxx:role/portefaix-staging-eks-loki
prometheus_role_arn = arn:aws:iam::xxxxxxxxxxxxx:role/portefaix-staging-eks-loki
tempo_role_arn = arn:aws:iam::xxxxxxxxxxxxx:role/portefaix-staging-eks-tempo
thanos_role_arn = arn:aws:iam::xxxxxxxxxxxxx:role/portefaix-staging-eks-thanos

External DNS

❯ make terraform-apply SERVICE=iac/aws/external-dns ENV=staging

Outputs:

role_arn = arn:aws:iam::xxxxxxxxxxx:role/portefaix-staging-eks-external-dns

Velero

❯ make terraform-apply SERVICE=iac/aws/velero ENV=staging

Outputs:

role_arn = arn:aws:iam::xxxxxxxxxxxxxxxxx:role/portefaix-staging-eks-velero

Vector

❯ make terraform-apply SERVICE=iac/aws/vector ENV=staging

Outputs:

role_arn = arn:aws:iam::xxxxxxxxxxxxxxxxx:role/portefaix-staging-eks-vector

Cert-Manager

❯ make terraform-apply SERVICE=iac/aws/cert-manager ENV=staging

Outputs:

role_arn = arn:aws:iam::xxxxxxxxxxxxxxxxx:role/portefaix-staging-eks-cert-manager
Last modified 07.10.2021: Fix: makefiles path (031a3b9)