Install the Datadog Agent Integration Developer Tool

This document covers how to setup a Python environment to work on Agent-based Integrations, including installing the interpreter and developer tool.

Install Python

Many operating systems come with a pre-installed version of Python. However, the version of Python installed by default may not be the same as the one used by the latest Agent. To ensure that you have everything you need to get an integration running, install a dedicated Python interpreter.

Install Python 3.12 using Homebrew:

  1. Update Homebrew:

    brew update
    
  2. Install Python:

    brew install python@3.12
    
  3. Check the Homebrew installation output and run any additional commands recommended by the installation script.

  4. Verify that the Python binary is installed in your PATH and that have installed the correct version:

    which python3.12
    

    You should see the following output depending on your Mac architecture:

    • ARM (M1+) machines:
      /opt/homebrew/bin/python3.12
      
    • MacOS on Intel machines:
      /usr/local/bin/python3.12
      
  1. Download the Python 3.12 64-bit executable installer and run it.
  2. Select the option to add Python to your PATH.
  3. Click Install Now.
  4. After the installation has completed, restart your machine.
  5. Verify that the Python binary is installed in your PATH:
    > where python
    
    C:\Users\<USER>\AppData\Local\Programs\Python\Python39\python.exe
    

For Linux installations, avoid modifying your system Python. Datadog recommends installing Python 3.12 using pyenv or miniconda.

Install developer tooling

You have 2 options to install the ddev CLI.

Install using a GUI

  1. In your browser, download the .pkg file: ddev-10.2.0.pkg
  2. Run your downloaded file and follow the on-screen instructions.
  3. Restart your terminal.
  4. To verify that the ddev command has been added to your PATH, run the following command to retrieve the ddev version:
    ddev --version
    10.2.0
    
  1. In your browser, download one of the following .msi files:
  2. Run your downloaded file and follow the on-screen instructions.
  3. Restart your terminal.
  4. To verify that the ddev command has been added to your PATH, run the following command to retrieve the ddev version:
    ddev --version
    10.2.0
    

Install from the command line

  1. Download the file using the curl command. The -L option allows for redirects, and the -o option specifies the file name to which the downloaded package is written. In this example, the file is written to ddev-10.2.0.pkg in the current directory.
    curl -L -o ddev-10.2.0.pkg https://github.com/DataDog/integrations-core/releases/download/ddev-v10.2.0/ddev-10.2.0.pkg
    
  2. Run the standard macOS installer program, specifying the downloaded .pkg file as the source. Use the -pkg parameter to specify the name of the package to install, and the -target / parameter for the drive in which to install the package. The files are installed to /usr/local/ddev, and an entry is created at /etc/paths.d/ddev that instructs shells to add the /usr/local/ddev directory to. You must include sudo on the command to grant write permissions to those folders.
    sudo installer -pkg ./ddev-10.2.0.pkg -target /
    
  3. Restart your terminal.
  4. To verify that the shell can find and run the ddev command in your PATH, use the following command.
    ddev --version
    10.2.0
    
  1. Download and run the installer using the standard Windows msiexec program, specifying one of the .msi files as the source. Use the /passive and /i parameters to request an unattended, normal installation.
    • x64:
      msiexec /passive /i https://github.com/DataDog/integrations-core/releases/download/ddev-v10.2.0/ddev-10.2.0-x64.msi
      
    • x86:
      msiexec /passive /i https://github.com/DataDog/integrations-core/releases/download/ddev-v10.2.0/ddev-10.2.0-x86.msi
      
  2. Restart your terminal.
  3. To verify that the shell can find and run the ddev command in your PATH, use the following command.
    ddev --version
    10.2.0
    

Install from a standalone binary

After downloading the archive corresponding to your platform and architecture, extract the binary to a directory that is on your PATH and rename the binary to ddev.

PREVIEWING: Cyril-Bouchiat/add-vm-package-explorer-doc