Skip to content

Latest commit

 

History

History
116 lines (63 loc) · 2.52 KB

File metadata and controls

116 lines (63 loc) · 2.52 KB

Development guide

This software is pre-production and should not be deployed to production servers.

Please follow rules from contributing guide .

  1. Install epel-release repository and basic developer tools:
yum install make git which

Note: that on production system, you should use Python 3.6 as describe here.

  1. Install Python 3.6:
yum install python3
  1. Clone WCA repository:
git clone https://github.com/intel/workload-collocation-agent
  1. Further commands should be run from wca root directory:
cd workload-collocation-agent
  1. Prepare virtual environment for WCA:
make venv
  1. Start using newly created virtualenv:
source env/bin/activate

If you need to deactivate virtual environment simply use command:

deactivate

Those command should be run from virtual environment:

make unit

You can use make to check code style, or build packages:

make flake8
make wca_package

You can run without building a distribution like this(venv must exist prior to running following commands):

source env/bin/activate
sudo env PYTHONPATH=. `which python` wca/main.py --root -c $PWD/configs/extra/static_measurements.yaml

Using example allocator:

source env/bin/activate
sudo env PYTHONPATH=. `which python` wca/main.py --root -c configs/extra/static_allocator.yaml

When rebuilding you can use existing PEX build cache, to speedup building process (cache TTL set to 7 days):

PEX_OPTIONS='--no-index --cache-ttl=604800' make wca_package

It will try to find an ipdb or use internal built-in pdb module before running main() function to enter debug mode.

PEX_MODULE=wca.main:debug ./dist/wca.pex