Skip to content

Commit

Permalink
#59 - Update exported-environment-variables.md. Change AWS account ID…
Browse files Browse the repository at this point in the history
… to a dummy value.
  • Loading branch information
anovikov-el committed Jan 25, 2025
1 parent 186089e commit b7dd2e4
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 44 deletions.
Original file line number Diff line number Diff line change
@@ -1,67 +1,103 @@
# Exported environment variables

By default, RMK exports the following environment variables to each launch of the `rmk release` category's commands:

[//]: # ( TODO ACTUALIZE)
By default, RMK exports the following environment variables to each execution of commands within the `rmk release` category:

```shell
# AWS credentials are automatically generated by RMK during the configuration initialization
AWS_PROFILE=<project_name>-<project_branch>
AWS_CONFIG_FILE=${HOME}/.aws/config_<project_name>-<project_branch>
AWS_SHARED_CREDENTIALS_FILE=${HOME}/.aws/credentials_<project_name>-<project_branch>
# Tenant name, which is equivalent to the project name.
# For example:
# AWS_PROFILE=rmk-test-develop
# AWS_CONFIG_FILE=${HOME}/.aws/config_rmk-test-develop
# AWS_SHARED_CREDENTIALS_FILE=${HOME}/.aws/credentials_rmk-test-develop
# TENANT=rmk-test
TENANT=<project_name>

# GitHub Personal Access Token
GITHUB_TOKEN=<github_personal_access_token>
# RMK configuration name for the current project (tenant) and environment.
# For example:
# NAME=rmk-test-develop
NAME=<project_name>-<project_branch>

# Root domain name for target applications in the cluster.
# For example:
# ROOT_DOMAIN=rmk-test-develop.example.com
ROOT_DOMAIN=<project_name>-<project_branch>.<domain>

# The path to the directory of the specific version of hooks required for the inherited upstream project
HELMFILE_<upstream_project_name>_HOOKS_DIR=${PWD}/.PROJECT/inventory/hooks/<hooks_repo_name>-<version>
# Path to the file containing the merged private SOPS Age keys.
# For example:
# HELMFILE_DEPS_HOOKS_DIR=${PWD}/.PROJECT/inventory/hooks/helmfile.hooks.infra-v1.18.0
# SOPS_AGE_KEY_FILE=/home/user/.rmk/sops-age-keys/rmk-test/.keys.txt
SOPS_AGE_KEY_FILE=${HOME}/.rmk/sops-age-keys/<project_name>/.keys.txt

# The path to the directory of the specific version of hooks required for the downstream project
HELMFILE_<downstream_project_name>_HOOKS_DIR=${PWD}/.PROJECT/inventory/hooks/<hooks_repo_name>-<version>
# GitHub Personal Access Token (PAT).
# https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
# For example:
# HELMFILE_RMK_TEST_HOOKS_DIR=${PWD}/.PROJECT/inventory/hooks/helmfile.hooks.infra-v1.18.0
# GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
GITHUB_TOKEN=<github_personal_access_token>

# The paths to the directories of the listed inherited upstream projects in the JSON format.
HELMFILE_<project_name>_PATHS='[{"path":"${PWD}/.PROJECT/dependencies/<upstream_repo_name>-<upstream_repo_version>/helmfile.yaml.gotmpl"}]'
# Path to the directory containing the specific version of hooks required by the downstream (current) project.
# For example:
# HELMFILE_RMK_TEST_PATHS=[{"path":"${PWD}/.PROJECT/dependencies/deps.bootstrap.infra-v2.18.0/helmfile.yaml.gotmpl"}]
# HELMFILE_RMK_TEST_HOOKS_DIR=/home/user/rmk-test/.PROJECT/inventory/hooks/helmfile.hooks.infra-v1.29.1
HELMFILE_<project_name>_HOOKS_DIR=${PWD}/.PROJECT/inventory/hooks/<project_hooks_repo_name>-<project_hooks_version>

# The version of the inherited upstream project
HELMFILE_<project_repo_name>_VERSION=vN.N.N
# Paths to the directories of the inherited upstream projects required by the downstream (current) project (in JSON format).
# For example:
# HELMFILE_DEPS_BOOTSTRAP_INFRA_VERSION=v2.18.0
# HELMFILE_RMK_TEST_PATHS=[{"path":"/home/user/rmk-test/.PROJECT/dependencies/rmk-test.bootstrap.infra-v0.1.0/helmfile.yaml.gotmpl"}]
HELMFILE_<project_name>_PATHS='[{"path":"${PWD}/.PROJECT/dependencies/<upstream_project_name>-<upstream_project_version>/helmfile.yaml.gotmpl"}]'

# The configuration RMK name for the current project and environment
NAME=<project_name>-<project_branch>
# Path to the directory containing the specific version of hooks required by the inherited upstream project.
# For example:
# NAME=rmk-test-develop
# HELMFILE_CLUSTER_DEPS_HOOKS_DIR=/home/user/rmk-test/.PROJECT/inventory/hooks/helmfile.hooks.infra-v1.29.1
HELMFILE_<upstream_project_name>_HOOKS_DIR=${PWD}/.PROJECT/inventory/hooks/<upstream_project_hooks_repo_name>-<upstream_project_hooks_version>

# The root domain name for target applications in the cluster
ROOT_DOMAIN=<project_name>-<project_branch>.example.com
# Version of the inherited upstream project.
# For example:
# ROOT_DOMAIN=rmk-test-develop.example.com
# HELMFILE_CLUSTER_DEPS_BOOTSTRAP_INFRA_VERSION=v0.1.0
HELMFILE_<upstream_project_name>_VERSION=vN.N.N

# Flag indicating whether the cluster is K3D (Cluster API management cluster).
# The variable can be used to override values in the releases.
CAPI_CLUSTER=false
# The flag that indicates whether the cluster is K3D (local cluster).
# The variable can be used to override values in the releases.
K3D_CLUSTER=false

# The path to the file with the merged private Age keys
SOPS_AGE_KEY_FILE=${HOME}/.rmk/sops-age-keys/<project_name>-sops-age-keys-<short_AWS_account_id>/.keys.txt
# Only for Kubernetes Cluster API Provider AWS:
# AWS cluster provider configuration
# Note: An AWS access key must be created in advance:
# https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html
# AWS config and credentials files will be automatically generated by RMK during the configuration initialization
# For example:
# SOPS_AGE_KEY_FILE=${HOME}/.rmk/sops-age-keys/rmk-test-sops-age-keys-28804/.keys.txt
# AWS_ACCOUNT_ID=123456789012
# AWS_REGION=us-east-1
# AWS_PROFILE=rmk-test-develop
# AWS_CONFIG_FILE=/home/user/.aws/config_rmk-test-develop
# AWS_SHARED_CREDENTIALS_FILE=/home/user/.aws/credentials_rmk-test-develop
AWS_ACCOUNT_ID=<aws_account_id>
AWS_REGION=<aws_region>
AWS_PROFILE=<project_name>-<project_branch>
AWS_CONFIG_FILE=/HOME/.aws/config_<project_name>-<project_branch>
AWS_SHARED_CREDENTIALS_FILE=${HOME}/.aws/credentials_<project_name>-<project_branch>

# The tenant name, which is an equivalent to the project name
TENANT=<project_name>
# Only for Kubernetes Cluster API Provider Azure:
# Azure cluster provider configuration
# Note: Azure service principal must be created in advance:
# https://learn.microsoft.com/en-us/entra/identity-platform/app-objects-and-service-principals
# For example:
# NAME=rmk-test
# AZURE_LOCATION=eastus
# AZURE_SUBSCRIPTION_ID=abcdef12-3456-7890-abcd-ef1234567890
AZURE_LOCATION=<azure_location>
AZURE_SUBSCRIPTION_ID=<azure_subscription_id>

# The flag that indicates whether the cluster is currently based on K3D. The variable can be used for overriding values in the releases.
K3D_CLUSTER=true
# Only for Kubernetes Cluster API Provider GCP:
# Google Cloud cluster provider configuration
# Note: Google Cloud application credentials must be created in advance:
# https://cloud.google.com/docs/authentication/application-default-credentials
# For example:
# GCP_PROJECT_ID=rmk-test
# GCP_REGION=us-east1
# GOOGLE_APPLICATION_CREDENTIALS=/home/user/.config/gcloud/gcp-credentials-rmk-test-develop.json
GCP_PROJECT_ID=<google_cloud_project_id>
GCP_REGION=<google_cloud_region>
GOOGLE_APPLICATION_CREDENTIALS=${HOME}/.config/gcloud/gcp-credentials-<project_name>-<project_branch>.json
```

> All exported variables and their values of the `rmk release command` category can be viewed by running all these commands in the debug mode:
> To view the complete list of all possible exported variables and their values for the `rmk release` command category,
> run the following command in `debug` mode:
> ```shell
> rmk --log-level=debug release list
> rmk --log-level=debug release list --skip-context-switch
> ```
4 changes: 2 additions & 2 deletions docs/configuration/configuration-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ environment: develop # Environment name.
root-domain: rmk-test-develop.edenlab.dev # Root domain name used across the cluster.
aws:
profile: rmk-test-develop # AWS profile name.
region: eu-north-1 # AWS region of the current Kubernetes cluster.
account_id: "123456789"
region: us-east-1 # AWS region of the current Kubernetes cluster.
account_id: "123456789012"
# ...
```

Expand Down
4 changes: 2 additions & 2 deletions docs/configuration/release-management/release-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,12 @@ An example of the `releases.yaml` file:
foo:
enabled: true
image:
repository: 123456789.dkr.ecr.us-east-1.amazonaws.com/app.foo
repository: 123456789012.dkr.ecr.us-east-1.amazonaws.com/app.foo
tag: v0.11.1
bar:
enabled: true
image:
repository: 123456789.dkr.ecr.us-east-1.amazonaws.com/app.bar
repository: 123456789012.dkr.ecr.us-east-1.amazonaws.com/app.bar
tag: v0.16.0
# ...
```
Expand Down

0 comments on commit b7dd2e4

Please sign in to comment.