dt-cli
pypi i dt-cli

dt-cli

Command line tool for Dynatrace

by dynatrace-oss

1.6.7 (see all)License:Apache-2.0
pypi i dt-cli
Readme

dt-cli — Dynatrace developer's toolbox

Dynatrace CLI is a command line utility that assists in signing, building and uploading extensions for Dynatrace Extension Framework 2.0.

PyPI PyPI - Python Version GitHub Workflow Status (main branch)

Features

  • Build and sign extensions from source
  • Generate development certificates for extension signing
  • Generate CA certificates for development
  • Validate and upload extension to Dynatrace Extension Framework 2.0.

Installation

pip install dt-cli

Usage

  1. Generate certificates
  dt extension gencerts
  1. Upload your ca.pem certificate to the Dynatrace credential vault

See: Add your root certificate to the Dynatrace credential vault

  1. Build and sign, then upload extension
  dt extension build
  dt extension upload

Use dt extension --help to learn more

  1. Download extension schemas
  dt extension schemas

API permissions needed: extensions.read

This script should only be needed once, whenever schema files are missing or you want to target a different version than what you already have. It does the following:

  • Downloads all the extension schema files of a specific version
  • Schemas are downloaded to schemas folder
  1. Wipes out extension from Dynatrace Cluster
  dt extension delete

Use dt extension --help to learn more

Using dt-cli from your Python code

You may want to use some commands implemented by dt-cli directly in your Python code, e.g. to automatically sign your extension in a CI environment. Here's an example of building an extension programatically, it assumes dtcli package is already installed and available in your working environment.

from dtcli import building


building.build_extension(
    extension_dir_path = './extension',
    extension_zip_path = './extension.zip',
    extension_zip_sig_path = './extension.zip.sig',
    target_dir_path = './dist',
    certificate_file_path = './developer.crt',
    private_key_file_path = './developer.key',
    dev_passphrase=None,
    keep_intermediate_files=False,
)

Development

See our CONTRIBUTING guidelines and instructions.

Contributions

You are welcome to contribute using Pull Requests to the respective repository. Before contributing, please read our Code of Conduct.

License

dt-cli is an Open Source Project. Please see LICENSE for more information.

GitHub Stars

11

LAST COMMIT

6mos ago

MAINTAINERS

1

CONTRIBUTORS

7

OPEN ISSUES

21

OPEN PRs

1
VersionTagPublished
1.6.7
13d ago
1.6.6
13d ago
1.6.5
14d ago
1.6.4
18d ago
No alternatives found
No tutorials found
Add a tutorial