Environment Changes

Steps to configure changes in the environment for deploying the tools

Step-1: Update the domain name

Step-2: Modify the role attribute path for Grafana access

Step-3: Modify the retention, storage size, cluster name and targets based on the specific requirements

Step-4: Adjust the volume size and update the retention period accordingly

Optional: S3 bucket configuraation(Recommended for prod)

Caution: Use the sub claim instead of aud when setting up Web Identity (OIDC) IAM roles to ensure correct identity matching.

Step-4a: Create an AWS Web Identity (OIDC) IAM role with the following policy.

Step-4b: Update S3 details & role ARN in the below config.

Note: Refer to the official docs for detailed configuration.

Step-5: Make the required changes in the env-secrets file

Changes to the Alertmanager configuration in the env-secrets.yaml file.

Step-6: OAuth app configuration

Step-7: Authentication configuration for Grafana in env-secrets.yaml

Sample Env-Secrets File

Create KMS Key & Configure SOPs

Follow the below steps to create a KMS key and configure SOPs for encryption and decryption.

1. Create IAM User & Attach Policies

  • Go to AWS Management Console.

  • Go to IAM and click Policies on the left-hand side of the toolbar.

  • Click Create Policy and then press Next. Click on JSON add the below policy and click Next.

  • Give the name to the policy and Create Policy.

  • Now click on Users in the console on the left side.

  • Click Add User, provide the name of the specific user and click Next.

  • In permission options click Attach Policies directly. Select Administration Access, AWSKeyManagementServicePoweruser and also attach the policy which you have created in the previous steps and then click Next.

  • Verify the name of the user and the 3 policies attached or not and then click Create User.

2. Create KMS Key

  • Go to AWS Management Console.

  • Go to KMS and Custom Managed Keys. Click Create Key.

  • In Configure Key, use the default options and then click Next. Provide Name in alias and the give the administrator access to the IAM user created in the previous step. Select the users to give permissions to encrypt and decrypt using this key and then click Next.

  • Attach the below policy in the key policy and then click finish. Make sure to provide the IAM user you created in the below-highlighted placeholder.

  • Copy the arn value after creating the KMS Key.

3. Placing the KMS arn value in the deployment manifest file

  • Go to the below code and add the arn key in .sops.yaml file.

  • Next, cd to deploy-as-code and run the below command.

  • Now to see the encrypted secrets. We can decrypt the secrets using the below command.

Last updated

Was this helpful?