Skip to content

Instantly share code, notes, and snippets.

@leapar
Created November 23, 2016 06:57
Show Gist options
  • Save leapar/a598c4603feeb5c619b694e5f59137cb to your computer and use it in GitHub Desktop.
Save leapar/a598c4603feeb5c619b694e5f59137cb to your computer and use it in GitHub Desktop.
Windows packing dd-agent

Windows

Currently tested with 32-bits python and other tools

  • install windows
  • install git
  • clone sts-agent
  • run in administrator powershell: Set-ExecutionPolicy -ExecutionPolicy Unrestricted
  • python 2.7
    • I used the 32-bit version
    • Add it to the PATH: in the Control Panel, search for 'environment'
  • install ruby 2.2.5 (32-bit) with http://rubyinstaller.org/
  • in cmd.exe:
    • c:\Ruby22\bin\gem install bunder
    • c:\Ruby22\bin\bundle install
    • c:\Ruby22\bin\rake setup_env (this doesn't work yet, might not be a problem)
  • python -m pip install -r requirements.txt
  • install py2exe from https://sourceforge.net/projects/py2exe/files/
    • make sure it's the same architecture as your python installation, so 32 bits
  • install MSVC++ 9.0 for Python (from aka.ms/vcpython27)
  • install pywin32 from http://sourceforge.net/projects/pywin32
  • put a copy of gohai.exe (built as described at https://github.com/DataDog/gohai) in gohai/
  • install wix from wixtoolset.org
    • also add this to the PATH
  • create C:\Python27\redist
  • python -m pip install pysnmp_mibs wmi pycurl pymongo psutils paramiko scandir
  • remove the dependency on 'winrandom' from setup.py
  • run .\packaging\datadog-agent\win32\build.ps1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment