This document provides an overview of the configuration options for the Fawkes Internal Developer Platform. It explains how to set up and manage environment variables, secrets, and other configuration files to customize the platform for your needs.
- Environment Variables
- Secrets Management
- Configuration Files
- Cloud Provider Configuration
- Kubernetes Configuration
- Best Practices
Environment variables are used to configure various aspects of the platform. These variables can be set in a .env file or directly in your CI/CD pipeline.
# General settings
ENVIRONMENT=dev
REGION=us-east-1
# AWS-specific settings
AWS_ACCESS_KEY_ID=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-key
# Kubernetes settings
KUBECONFIG=/path/to/kubeconfig- Copy the provided
.env.examplefile to.envand update the values as needed. - Load the environment variables using a script or your CI/CD pipeline.
Secrets should never be committed to version control. Use a secrets management tool to securely store and inject secrets at runtime.
- AWS Secrets Manager (for AWS deployments)
- Azure Key Vault (for Azure deployments)
- GCP Secret Manager (for GCP deployments)
- Kubernetes Secrets (for cluster-specific secrets)
apiVersion: v1
kind: Secret
metadata:
name: my-secret
namespace: default
type: Opaque
data:
username: bXktdXNlcm5hbWU= # Base64 encoded
password: cGFzc3dvcmQ= # Base64 encodedConfiguration files are used to define infrastructure, platform services, and application settings. These files are located in the infra/ and platform/ directories.
- Terraform Variables: Located in
infra/terraform/variables.tf. - Helm Values: Located in
platform/helm/values.yaml. - Kubernetes Manifests: Located in
platform/k8s/.
replicaCount: 2
image:
repository: nginx
tag: "1.21.0"
pullPolicy: IfNotPresentEach cloud provider requires specific configuration for authentication and resource provisioning.
- Set
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYin your environment. - Configure the region using
AWS_DEFAULT_REGION.
- Use the Azure CLI to authenticate:
az login
- Set the subscription ID:
az account set --subscription <subscription-id>
- Authenticate using a service account key:
gcloud auth activate-service-account --key-file=/path/to/key.json
- Set the project ID:
gcloud config set project <project-id>
Kubernetes clusters require a valid kubeconfig file for authentication and management.
-
Use your cloud provider CLI to generate the
kubeconfigfile:- AWS:
aws eks update-kubeconfig --name <cluster-name> - Azure:
az aks get-credentials --resource-group <resource-group> --name <cluster-name> - GCP:
gcloud container clusters get-credentials <cluster-name>
- AWS:
-
Export the
KUBECONFIGenvironment variable:export KUBECONFIG=/path/to/kubeconfig
- Do Not Hardcode Secrets: Always use a secrets management tool.
- Use Separate Environments: Maintain separate configurations for
dev,staging, andprod. - Version Control Configuration Files: Track non-sensitive configuration files in version control.
- Validate Configurations: Use tools like
kubevalorterraform validateto ensure configurations are valid. - Automate Configuration Management: Use CI/CD pipelines to manage and apply configurations.
For more details, refer to the specific documentation in the infra/ and platform/ directories.