58 lines
2.0 KiB
Markdown
58 lines
2.0 KiB
Markdown
# 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 ssh://git@git.bmwgroup.net:7999/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:
|
|
python ./onboarding.py -A CD_<app_name> -C <compass_id>
|
|
5. Review created files:
|
|
git status
|
|
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:
|
|
1. Management zones: https://registry.terraform.io/providers/dynatrace-oss/dynatrace/latest/docs/resources/management_zone
|
|
2. Alerting profiles: https://registry.terraform.io/providers/dynatrace-oss/dynatrace/latest/docs/resources/alerting
|
|
3. Dashboards: https://registry.terraform.io/providers/dynatrace-oss/dynatrace/latest/docs/resources/dashboard
|
|
|
|
# Usage
|
|
usage: onboarding.py [-h] -A APPNAME -C COMPASSID
|
|
|
|
Generate predefined Dynatrace configuration via Terraform
|
|
|
|
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)
|
|
|
|
# Files
|
|
|
|
## onboarding.py
|
|
|
|
This scripts generates predefined configuration basing on your app_name and compass ids
|
|
|
|
## requirements.txt
|
|
|
|
File containing required python packages
|