Set up development requirements¶
Tooling¶
The dda
CLI is required in all aspects of development and must be available on PATH
.
Package managers¶
Homebrew¶
Install the dda
cask using Homebrew.
You can upgrade to the latest version by running the following command.
Installers¶
- In your browser, download the
.pkg
file: dda-universal.pkg - Run your downloaded file and follow the on-screen instructions.
- Restart your terminal.
- To verify that the shell can find and run the
dda
command in yourPATH
, use the following command.
- 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 todda-universal.pkg
in the current directory. - 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/dda
, and an entry is created at/etc/paths.d/dda
that instructs shells to add the/usr/local/dda
directory to. You must include sudo on the command to grant write permissions to those folders. - Restart your terminal.
- To verify that the shell can find and run the
dda
command in yourPATH
, use the following command.
- 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
dda
command in yourPATH
, use the following command.
-
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. -
Restart your terminal.
- To verify that the shell can find and run the
dda
command in yourPATH
, use the following command.
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 dda
.
Upgrade¶
You can upgrade to the latest version by running the following command.
If you installed dda
using a package manager, prefer its native upgrade mechanism.
Docker¶
Docker is required for both running the developer environment and building images containing the Agent.
- 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 Desktop for your distribution:
SSH¶
Accessing and contributing to the Datadog Agent repositories requires using SSH. Your local SSH agent must be configured with a key that is added to your GitHub account.
If these requirements are met, you can skip this section.
Key generation¶
Run the following command to generate a new SSH key, replacing <EMAIL_ADDRESS>
with one of the email addresses associated with your GitHub account. This email will be used for every Git commit you make to the Datadog Agent repositories.
It should then ask you for the path in which to save the key. It's recommended to name the key dda
and save it in the same directory as the default location.
Finally, you will be asked to enter an optional passphrase.
Key awareness¶
Add the key from the previous step to your local SSH agent.
Running the following command should now display the key.
Follow GitHub's guide for adding the key to your GitHub account and test that it works. The path to the public key is the path to the key from the previous step with a .pub
file extension e.g. /root/.ssh/dda.pub
.
Next steps¶
Follow the developer environment tutorial to get started.