Skip to main content

Dynamic Environments

In order to allow customers to use environments that are not included in the default offered by ShamanOps, we offer the possibility of adding environments according to the needs of each user.
This pages explains you how.

info

For example: You have to give the audit team an environment equal to production so they can review, but logically you can't give them production, so they can create a dynamic environment for this purpose.

Pre-requisites

  • Have installed the ShamanOps toolkit in the cluster you will use for DynamicEnvs

  • Add the following secret as a variable in your CI platform:

shamanops_argocd_dynenv_token *
This value refers to the password of the ArgoCD cluster that you will use for your Dynamic Envs.

  • Add the following variables in your CI platform:

shamanops_argocd_dynenv_user *
This value refers to the user of the ArgoCD cluster that you will use for your Dynamic Envs.

shamanops_argocd_dynenv_url *
This value refers to the url of the ArgoCD cluster that you will use for your Dynamic Envs.

With this feature you will be able to:

  • Deploy apps or services in your custom environments
  • Generate a specific approvals flow for this custom environments
  • Update the Databases schemas structures on the Databases that are in the custom environments

Usage

1. In the main branch you will edit the YAML file named .github/workflows/github-ci.yaml

2. In the github-ci.yaml file search for the Features section, you will find it like this:


## Features -------------------------------------------------------------------------------------#

3. Bellow the section title, add the following configuration and change the values as you need:

    # Enable Dynamics Enviroments
shamanopsDynamicEnvsEnabled: 'true'
# Dynamics Enviroments list
shamanopsDynamicEnvs: 'qa, audit'
# Dynamics Enviroments Approvals
shamanopsApprovalsDynamicEnvs: 'true'
shamanopsBusinessApproversMinimalDynamicEnvs: '1'
shamanopsTechnicalApproversMinimalDynamicEnvs: '1'

ATENTION

By default, the maximum amount of dynamic environments you can create is 5, in case you need to create more, you can add in the yaml in the Features section shamanopsDynamicEnviromentsMax and increase that amount.

4. In the github-ci.yaml file search for the secrets: section, you will find it like this:

#-------------------------------------------------------------------------------------------------#
secrets:

5. Bellow the section title, add the following configuration:

      shamanops_argocd_dynenv_token: ${{ secrets.shamanops_argocd_dynenv_token }}

6. Commit and enjoy! ✨