3.1 KiB
3.1 KiB
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. Create branch:
git checkout -b CD_<appname>
3.Install python dependencies:
pip install -r requirements.txt
4.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>
5. Review created files:
git status
5.1 Adjust additional feature files (if generated with "-F" option). See "Adjusting tf files" section
6. 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>
7. 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
onboarding.py
This scripts generates predefined configuration basing on your app_name and compass ids
requirements.txt
File containing required python packages