24 May 2023 08:49 AM - last edited on 24 May 2023 10:43 AM by MaciejNeumann
Hi all
With Monaco 1.x we were downloading many environments with a single command-line.
Now, with Monaco 2.0, I can see the "-e" flag is mandatory in the command-line, thus we can download only a single environment at a time. I have to repeat the command for each environment in the manifest file.
Do you have a solution to download many environments at a time ?
Thanks
Franck
Solved! Go to Solution.
24 May 2023 01:03 PM - edited 24 May 2023 01:04 PM
Hi,
You can create a environments.yaml with your all your environments:
env1:
- name: "env1"
- env-url: "https://{environmentid}.live.dynatrace.com"
- env-token-name: "ENV1_API_TOKEN"
env2:
- name: "env2"
- env-url: "https://{environmentid}.live.dynatrace.com"
- env-token-name: "ENV2_API_TOKEN"
Then, you can download configuration using "monaco download -e environments.yaml".
Or only some specific environment using "monaco download -e environments.yaml -s env1".
You have more details/combinations here.
Best regards
30 May 2023 10:53 AM
I don't agree. This syntax applies only for Monaco 1.x but not Monaco 2.x.
I need the same for Monaco 2.x
30 May 2023 12:25 PM
It seems not possible according to docs https://www.dynatrace.com/support/help/shortlink/configuration-as-code-commands#download.
You have to write script which executes download against each env in manifest file separately.
30 May 2023 02:16 PM
Hi @Franck,
I have just re-read it and @rastislav_danis is right.
I understand now you want to make a bulk download for all environments configured. That is not possible using a single command using Monaco v2.
I normally make a loop for all environments in a shell script or powershell executing "monaco download --environment "env1" --output-folder "env1"...
Best regards