This guide shows you how to download and install Dynatrace Configuration as Code via Monaco (the Dynatrace Monaco CLI).
Download the latest version of the Dynatrace Configuration as Code CLI tool.
curl -L https://github.com/Dynatrace/dynatrace-configuration-as-code/releases/latest/download/monaco-linux-amd64 -o monaco-linux-amd64
optional Verify the downloaded binary using the checksum.
To verify that the downloaded binary is valid
Download its checksum file.
curl -L https://github.com/Dynatrace/dynatrace-configuration-as-code/releases/latest/download/monaco-linux-amd64.sha256 -o monaco.sha256
Verify the downloaded binary using the checksum.
shasum -c monaco.sha256
You should see the following output.
monaco-linux-amd64: OK
This requires monaco-linux-amd64
and monaco.sha256
to be in the same directory, which they are if you followed the steps above.
Rename the specific executable to monaco
.
mv monaco-linux-amd64 monaco
Make the binary executable.
chmod +x monaco
optional Install Dynatrace Configuration as Code CLI to a central location in your PATH
.
sudo mv monaco /usr/local/bin/
This command assumes that you downloaded the binary to the current folder with the curl
command described in step 1 and that your $PATH
includes /usr/local/bin
.
Download the latest version of the Dynatrace Configuration as Code CLI tool.
curl -L https://github.com/Dynatrace/dynatrace-configuration-as-code/releases/latest/download/monaco-darwin-arm64 -o monaco-darwin-arm64
optional Verify the downloaded binary using the checksum.
To verify that the downloaded binary is valid
Download its checksum file.
curl -L https://github.com/Dynatrace/dynatrace-configuration-as-code/releases/latest/download/monaco-darwin-arm64.sha256 -o monaco.sha256
Verify the downloaded binary using the checksum.
shasum -c monaco.sha256
You should see the following output.
monaco-darwin-arm64: OK
This requires monaco-darwin-arm64
and monaco.sha256
to be in the same directory, which they are if you followed the steps above.
Rename the specific executable to monaco
.
mv monaco-darwin-arm64 monaco
Make the binary executable.
chmod +x monaco
optional Install Dynatrace Configuration as Code CLI to a central location in your PATH
.
sudo mv monaco /usr/local/bin/
This command assumes that you downloaded the binary to the current folder with the curl
command described in step 1 and that your $PATH
includes /usr/local/bin
.
Open Windows PowerShell.
Download the latest version of the Dynatrace Configuration as Code CLI tool.
Invoke-WebRequest -URI https://github.com/Dynatrace/dynatrace-configuration-as-code/releases/latest/download/monaco-windows-amd64.exe -OutFile monaco.exe
This executable is signed by Dynatrace.
optional Add Monaco to a central location in your PATH
.
PATH
.PATH
.c:\path;<your-new-path>
).A container image of the Dynatrace Monaco CLI is available to simplify usage in CI/CD pipelines.
Images are available via Docker Hub:
docker pull dynatrace/dynatrace-configuration-as-code:latest
You can use the image directly with the CLI commands or as a CI container with a monaco
executable available inside.
By default, commands run in the container image are running from a /monaco
working directory. If you map your configurations into the container as a Docker volume, it's easiest to map the volume to this directory.
In the following example, we validate a project contained in /your/path/to/project
with a manifest.yaml
reading the deployment access token from an API_TOKEN
variable.
docker run \--env API_TOKEN=XXX \--mount type=bind,src="/your/path/to/project",target=/monaco \dynatrace/dynatrace-configuration-as-code:latest deploy -d manifest.yaml
The container image uses the monaco
executable as its entrypoint, so any inputs are passed directly to it.
However, some CI/CD tools (for example, GitLab CI/CD) need a regular shell as entrypoint. To make the container image work with these tools, you need to overwrite the entrypoint with sh
.
GitLab CI/CD
For details on how to use the image with GitLab CI/CD, follow the Override the entrypoint of an image GitLab documentation.
docker run
For general information on overwriting container entrypoints when using docker run
, see the Docker documentation.
Dynatrace Monaco CLI version 2.2.0+
The container image is signed to allow you to verify its authenticity.
You can verify the signature using cosign and the cosign.pub
key that can be downloaded from the GitHub release page.
To verify the signature of a given version
Install the applicable version of cosign for your operating system, following the installation instructions.
Download the cosign.pub
public key from the GitHub release page of the version you wish to verify.
Verify the container image of the version you wish to check:
cosign verify --key cosign.pub dynatrace/dynatrace-configuration-as-code:[VERSION]
For example, to verify version 2.2.0
:
cosign verify --key cosign.pub dynatrace/dynatrace-configuration-as-code:2.2.0
Execute the monaco
command to try out the downloaded CLI.
> monacoTool used to deploy dynatrace configurations via the cliExamples:Deploy configuration defined in a manifestmonaco deploy service.yamlDeploy a specific environment within an manifestmonaco deploy service.yaml -e devUsage:monaco <command> [flags]monaco [command]Available Commands:completion Generate the autocompletion script for the specified shelldelete Delete configurations defined in delete.yaml from the environments defined in the manifestdeploy Deploy configurations to Dynatrace environmentsdownload Download configuration from Dynatracegenerate Generate offers several sub-commands to generate files - take a look at the sub-commands for usagehelp Help about any commandversion Prints out the version of the monaco cliFlags:-h, --help help for monaco--support-archive Create support archive-v, --verbose Enable debug loggingUse "monaco [command] --help" for more information about a command.