Skip to content

Setup the agent for development

DWService edited this page Jun 28, 2020 · 9 revisions

This document explain all steps in order to set up IDE and start the agent for development.

Install python2.7

Linux

Usually in Linux it is already present or you can download it from the software repository. In alternative you can compile it by source.

Windows an Mac

Download from python website the last version of python2.7. Follow step of installer.

Install g++/make

Linux

You can download it from software repository. The command to execute can change by linux distro:

Debian: apt-get -y install build-essential
Centos: yum groupinstall 'Development Tools'
Mac

If g++/make are not If g++/make are not already present, install xcode.

Window
  • Download Mingw-w64 version 64bit or 32bit.
  • Extract file on your filesystem (e.g. C:\mingw64).
  • Adding C:\mingw64\bin on PATH Environment Variable in Windows.

Install Eclipse

  • Download and install Java jdk11.
  • Download and install from Eclipse web site the Eclipse IDE 2018/12 for Enterprise Java Developers.
  • Open Eclipse and create a new Workspace (e.g. c:\dwservice).

Eclipse Create Workspace

  • Configure Eclipse Workspace

Eclipse Config Workspace

Eclipse Config Workspace

  • Open Eclipse Marketplace.

Eclipse Open Marketplace

  • Install PyDev package.

Eclipse Install PyDev

  • Install CDT package.

Eclipse Install CDT

  • Open prospective PyDev, C/C++ and Git.

Eclipse Open Prospective

  • Configure Python interpreter.

Eclipse Open Prospective

  • Choose python execute from installation path of python2.7, then click "Apply and Close".

Eclipse Open Prospective

Set up the sources

  • From Git prospective click "Clone a Git Repository".

Eclipse Git Prospective

Eclipse Git Clone 1

  • On last step set destination directory, then click "Finish".

Eclipse Git Clone 2

  • Import projects from agent repository.

Eclipse Git Import 1

  • Select all eclipse project (unselect first item "agent") then click "Finish".

Eclipse Git Import 2

Set up the Agent

In order to set up the agent you need to create an agent from your DWService account to getting installation code. Then you can proceed with the following steps:

  • Select PyDev prospective.

Eclipse Git Import 2

  • Compile all c++ libraries. Run script "compile_all.py" from "make" project.

Eclipse PyDev Compile All 1

  • If compilation was complete correctly, you will see in the console something like:

Eclipse PyDev Compile All 2

  • Create config.json. Run script "create_config.py" from "make" project.

Eclipse PyDev Create Config 1

  • If config.json was generated, you will see the file in "core" project.

Eclipse PyDev Create Config 2

  • Now you are ready to start the agent. Run script "agent.py" from "core" project.

Eclipse PyDev Run Agent 1

  • If agent is connected to DWService, you will see in the console something like:

Eclipse PyDev Run Agent 2

Congratulation, you are ready to develop DWService agent.