Install Portefaix

Instructions for deploying Portefaix on AWS


Creates an AWS Organization, and enable Service Control Policies in AWS organizations.

Now that we’ve created an organization, you’ll notice that all the policies are disabled by default.

There you need to enable AWS Service Control Policies in the AWS console by clicking on the button Enable service control policies. Do the same action for the AWS Tag Policies.

Navigate to Personal Health Dashboard service in the console. On the left side panel, expand Organizational view and choose configurations. Then, enable organizational view for AWS Health

Create an admin user, and configure account alias for IAM Users access

Then API Keys.

Configure Portefaix environment file ${HOME}/.config/portefaix/

HOME_IP=$(curl -s

function setup_aws() {
    export AWS_ACCESS_KEY_ID="....."
    export AWS_SECRET_ACCESS_KEY="....."
    export AWS_DEFAULT_REGION="..."
    export AWS_REGION="...."
    # For Terraform Cloud
    export TF_VAR_access_key="${AWS_ACCESS_KEY_ID}"
    export TF_VAR_secret_key="${AWS_SECRET_ACCESS_KEY}"
    export TF_VAR_slack_webhook_url="${SLACK_WEBHOOK_NOTIFS}"
    export TF_VAR_org_email="xxxxxx"    # for Root Account
    export TF_VAR_org_email_domain=""
    export TF_VAR_org_admin_username="xxxxxx"
    export TF_VAR_admin_ipv4="[\"${HOME_IP}/32\"]" # for WAF

Load environment :

❯ . ./ aws

Storage for Terraform

Create a S3 bucket for Terraform states:

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

Create a DynamoDB table :

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

AWS Organization Units and Accounts

Configure the AWS Organization:

❯ make terraform-apply SERVICE=terraform/aws/root ENV=main

Portefaix AWS organization

Terraform Cloud / Github Actions

❯ make terraform-apply SERVICE=terraform/aws/terraform-cloud ENV=main
Portefaix AWS deployment


Perform an AWS authentication:

❯ make -f hack/build/ ENV=staging aws-admin
source ./hack/scripts/ xxxxxx Administrator portefaix-staging-eks eu-west-1

source ./hack/scripts/ xxxxxxx Administrator portefaix-staging-eks eu-west-1

Update Kubernetes configuration file:

❯ make -f hack/build/ ENV=staging aws-kube-credentials

❯ kubectl get nodes
NAME                                        STATUS   ROLES    AGE   VERSION    Ready    <none>   81m   v1.23.9-eks-ba74326   Ready    <none>   81m   v1.23.9-eks-ba74326   Ready    <none>   81m   v1.23.9-eks-ba74326    Ready    <none>   81m   v1.23.9-eks-ba74326

Gitops for Kubernetes

Next: Gitops

Last modified February 23, 2024: feat(hugo): refactoring to fresh Hugo (cf7d6fc)