|
|
||
|---|---|---|
| CN_PREPROD | ||
| CN_PROD | ||
| EMEA_PREPROD | ||
| EMEA_PROD | ||
| NA_PREPROD | ||
| NA_PROD | ||
| _templates | ||
| .gitignore | ||
| environment.yaml | ||
| onboarding.py | ||
| readme.md | ||
| requirements.txt | ||
readme.md
Dynatrace onboarding repo / Terreform config
This repository holds the Dynatrace configuration for onboarding purposes
Prerequisites
Python packages
Before executing scripts, python requirements have to be satisfied. To do so, execute following command: pip install -r requirements.txt
Instructions
1. Clone template:
git clone --branch template https://atc.bmwgroup.net/bitbucket/scm/opapm/coco_apm_terraform_onboarding.git
2. Change directory:
cd coco_apm_terraform_onboarding
3. Create branch:
git checkout -b CD_<appname>
4.Install python dependencies:
pip install -r requirements.txt
5.Run onboarding script:
4.1 Default implementation (Management zone, Alerting profile and predefined dashboard)
python ./onboarding.py -A CD_<app_name> -C <compass_id>
4.2 Additional features (see Usage section):
python ./onboarding.py -A CD_<app_name> -C <compass_id> -F <features>
6. Review created files:
git status
5.1 Adjust additional feature files (if generated with "-F" option). See "Adjusting tf files" section
7. Commit your changes:
git add <changes>
git commit -m "<OPMAAS-XXX> - Add initial configuration of application <app_name> to Dynatrace"
git push -u origin CD_<app_name>
8. Create pull request from CD_<app_name> to master
Adjusting tf files
For more information about adjusting tf files to your need please follow:
- Management zones: https://registry.terraform.io/providers/dynatrace-oss/dynatrace/latest/docs/resources/management_zone
- Alerting profiles: https://registry.terraform.io/providers/dynatrace-oss/dynatrace/latest/docs/resources/alerting
- Dashboards: https://registry.terraform.io/providers/dynatrace-oss/dynatrace/latest/docs/resources/dashboard
- Custom service: https://registry.terraform.io/providers/dynatrace-oss/dynatrace/latest/docs/resources/custom_service
- Notification: https://registry.terraform.io/providers/dynatrace-oss/dynatrace/latest/docs/resources/notification
- Process group naming: https://registry.terraform.io/providers/dynatrace-oss/dynatrace/latest/docs/resources/processgroup_naming
- Service naming: https://registry.terraform.io/providers/dynatrace-oss/dynatrace/latest/docs/resources/service_naming
Usage
usage: onboarding.py [-h] -A APPNAME -C COMPASSID -F FEATURES
Generate predefined Dynatrace configuration via Terraform. Default features are Management zone, Alerting profile and predefined dashboard. For more see
options below
options:
-h, --help show this help message and exit
-A APPNAME, --appname APPNAME
Your app_name (default: None)
-C COMPASSID, --compassid COMPASSID
Your compass_id (default: None)
-F FEATURES, --features FEATURES
Comma separated additional features. Possible options are: custom_service,processgroup_naming,service_naming (default: None)
Files
_templates folder
Please do not change template files inside this folder. If any of this files will be changed, your pull request will be rejected.
onboarding.py
This scripts generates predefined configuration basing on your app_name and compass ids
requirements.txt
File containing required python packages