Setup¶
This will be relatively painless, we promise!
Integrations¶
You will need to clone integrations-core and/or integrations-extras depending on which integrations you intend to work on.
Python¶
To work on any integration you must install Python 3.12.
After installation, restart your terminal and ensure that your newly installed Python comes first in your PATH
.
First update the formulae and Homebrew itself:
brew update
then install Python:
brew install python@3.12
After it completes, check the output to see if it asked you to run any extra commands and if so, execute them.
Verify successful PATH
modification:
which -a python
Windows users have it the easiest.
Download the Python 3.12 64-bit executable installer and run it. When prompted, be sure to select the option to add to your PATH
. Also, it is recommended that you choose the per-user installation method.
Verify successful PATH
modification:
where python
pipx¶
To install certain command line tools, you'll need pipx.
Run:
brew install pipx
After it completes, check the output to see if it asked you to run any extra commands and if so, execute them.
Verify successful PATH
modification:
which -a pipx
Run:
python -m pip install pipx
Verify successful PATH
modification:
where pipx
Run:
python -m pip install --user pipx
Verify successful PATH
modification:
which -a pipx
ddev¶
Installation¶
You have 4 options to install the CLI.
Installers¶
- In your browser, download the
.pkg
file: ddev-10.4.0.pkg - Run your downloaded file and follow the on-screen instructions.
- Restart your terminal.
-
To verify that the shell can find and run the
ddev
command in yourPATH
, use the following command.$ ddev --version 10.4.0
-
Download the file using the
curl
command. The-o
option specifies the file name that the downloaded package is written to. In this example, the file is written toddev-10.4.0.pkg
in the current directory.curl -L -o ddev-10.4.0.pkg https://github.com/DataDog/integrations-core/releases/download/ddev-v10.4.0/ddev-10.4.0.pkg
-
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.4.0.pkg -target /
-
Restart your terminal.
-
To verify that the shell can find and run the
ddev
command in yourPATH
, use the following command.$ ddev --version 10.4.0
- In your browser, download one the
.msi
files: - Run your downloaded file and follow the on-screen instructions.
- Restart your terminal.
-
To verify that the shell can find and run the
ddev
command in yourPATH
, use the following command.$ ddev --version 10.4.0
-
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.msiexec /passive /i https://github.com/DataDog/integrations-core/releases/download/ddev-v10.4.0/ddev-10.4.0-x64.msi
msiexec /passive /i https://github.com/DataDog/integrations-core/releases/download/ddev-v10.4.0/ddev-10.4.0-x86.msi
-
Restart your terminal.
-
To verify that the shell can find and run the
ddev
command in yourPATH
, use the following command.$ ddev --version 10.4.0
Standalone binaries¶
After downloading the archive corresponding to your platform and architecture, extract the binary to a directory that is on your PATH and rename to ddev
.
PyPI¶
Remove any executables shown in the output of which -a ddev
and make sure that there is no active virtual environment, then run:
pipx install ddev --python /opt/homebrew/bin/python3.11
pipx install ddev --python /usr/local/bin/python3.11
Warning
Do not use sudo
as it may result in a broken installation!
Run:
pipx install ddev
Run:
pipx install ddev
Warning
Do not use sudo
as it may result in a broken installation!
Upgrade at any time by running:
pipx upgrade ddev
Development¶
This is if you cloned integrations-core and want to always use the version based on the current branch.
Remove any executables shown in the output of which -a ddev
and make sure that there is no active virtual environment, then run:
pipx install -e /path/to/integrations-core/ddev --python /opt/homebrew/opt/python@3.12/bin/python3.12
pipx install -e /path/to/integrations-core/ddev --python /usr/local/opt/python@3.12/bin/python3.12
Warning
Do not use sudo
as it may result in a broken installation!
Run:
pipx install -e /path/to/integrations-core/ddev
Run:
pipx install -e /path/to/integrations-core/ddev
Warning
Do not use sudo
as it may result in a broken installation!
Re-sync dependencies at any time by running:
pipx upgrade ddev
Note
Be aware that this method does not keep track of dependencies so you will need to re-run the command if/when the required dependencies are changed.
Note
Also be aware that this method does not get any changes from datadog_checks_dev
, so if you have unreleased changes from datadog_checks_dev
that may affect ddev
, you will need to run the following to get the most recent changes from datadog_checks_dev
to your ddev
:
pipx inject -e ddev "/path/to/datadog_checks_dev"
Configuration¶
Upon the first invocation, ddev
will create its config file if it does not yet exist.
You will need to set the location of each cloned repository:
ddev config set <REPO> /path/to/integrations-<REPO>
The <REPO>
may be either core
or extras
.
By default, the repo core
will be the target of all commands. If you want to switch to integrations-extras
, run:
ddev config set repo extras
Docker¶
Docker is used in nearly every integration's test suite therefore we simply require it to avoid confusion.
- Install Docker Desktop for Mac.
- Right-click the Docker taskbar item and update Preferences > File Sharing with any locations you need to open.
- Install Docker Desktop for Windows.
- Right-click the Docker taskbar item and update Settings > Shared Drives with any locations you need to open e.g.
C:\
.
-
Install Docker Engine for your distribution:
-
Add your user to the
docker
group:sudo usermod -aG docker $USER
-
Sign out and then back in again so your changes take effect.
After installation, restart your terminal one last time.