cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to generate environment.yaml file for downloading config using Monaco

Tanveer
Visitor

I am fairly new to DT and need help on API token mentioned in environment.yaml file, I am trying to configure Monaco and would like to know how to generate this please

7 REPLIES 7

AntonPineiro
DynaMight Guru
DynaMight Guru

Hi,

You have more than one way to do it but one example would be:

---------------------------------------------------------------

name_environment:
    - name: "name"
    - env-url: "https://{environmentid}.live.dynatrace.com "
    - env-token-name: "API_TOKEN"

---------------------------------------------------------------

And you can execute "monaco download -e environments.yaml" to download entire environment configuration or "monaco download -e environments.yaml --specific-api some_api" to download specific API.

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

Mizső
DynaMight Leader
DynaMight Leader

Hi @Tanveer,

For token generation, yellow roles are the minimum, red is a wider sope.

Mizs_0-1680025590383.png

Some documentaiton about the required token roles:

Deploy your first configuration | Dynatrace Docs

Configuration types and token permissions | Monaco (dynatrace.github.io)

I hope it helps.

Best regards,

Mizső

 

Dynatrace Community RockStar 2024, Certified Dynatrace Professional

Many thanks Mizso, this is what I was looking for

Tanveer
Visitor

I have followed this https://www.dynatrace.com/support/help/manage/configuration-as-code/installation#tabgroup--configura... and getting below error while running monaco.exe 

Tanveer_0-1680041015523.png

 

manisundaram
Participant

@Tanveer I am not sure if you referred this documentation
https://dynatrace.github.io/dynatrace-configuration-as-code/commands/downloading-configuration

  1. Enable CLI 2.0 by adding an environment variable called NEW_CLI with a non-empty value other than 0.

export NEW_CLI=1

I think this should solve your problem

Hi,

Or "$env:NEW_CLI=1" if you are in powershell / Windows.

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

Mizső
DynaMight Leader
DynaMight Leader

Hi @Tanveer,

Instead v1 use the v2 and you do not need to deal with CLI configuration. (and v2 has an official support comapared v1).

Then you can run this command: 

monaco download manifest manifest.yaml your_environment

I hope it helps.

Best regards,

Mizső 

Dynatrace Community RockStar 2024, Certified Dynatrace Professional

Featured Posts