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.
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
- GitHub Actions
- GitLab CI
- Azure DevOps
- Bitbucket Pipelines
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'
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! ✨
1. In the main branch you will edit the YAML file named .gitlab-ci.yml
2. In the .gitlab-ci.yml 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, homologacion'
# Dynamics Enviroments Approvals
shamanopsApprovalsDynamicEnvs: 'true'
shamanopsBusinessApproversMinimalDynamicEnvs: '1'
shamanopsTechnicalApproversMinimalDynamicEnvs: '1'
4. Commit and enjoy! ✨
1. In your Azure Repo's main branch you will edit the YAML file named azdevops-ci.yml
2. In the azdevops-ci.yml 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:
# Application Internal Port
- name: appInternalPort
value: '80'
# Enable Dynamics Enviroments
- name: shamanopsDynamicEnvsEnabled
value: 'true'
# Dynamics Enviroments list
- name: shamanopsDynamicEnvs
value: 'qa, homologacion'
# Dynamics Enviroments Approvals
- name: shamanopsApprovalsDynamicEnvs
value: 'true'
- name: shamanopsBusinessApproversMinimalDynamicEnvs
value: '1'
- name: shamanopsTechnicalApproversMinimalDynamicEnvs
value: '1'
4. Commit and enjoy! ✨
1. In the main branch you will edit the YAML file named .bitbucket/envs.yaml
2. In the .bitbucket/envs.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, homologacion'
# Dynamics Enviroments Approvals
shamanopsApprovalsDynamicEnvs='true'
shamanopsBusinessApproversMinimalDynamicEnvs='1'
shamanopsTechnicalApproversMinimalDynamicEnvs='1'
4. Commit and enjoy! ✨