browbeat/tox.ini
Charles Short 2ba39b30ab Refresh collectd for "train"
This commit does several things at once:

- Use ansible_distribution_major_version to detect which version of the
  EPEL repository. So we dont have to hard code the URL for either epel7
  or epel 8.
- Remove "stein" workaround for colelctd-openstack role. The "stein"
  workaround has been removed in favor of running the collectd daemon
  in a podman container.
- Drop opendaylight support for collectd since it is no longer
  suupported.
- Add the collectd playbook so we can run collectd in a centos 7
  container going forward for "train". This commit still needs
  to be tested on "stein" but it will probably work anyways.
- Add browbeat-containers to tox.ini for flake8
- Simplify detection of docker or podman for older versions of OSP.
(sai)
- Fixed typo from compute_compute to collectd_compute that caused failures on computes
- clear graphite_host in install/group_vars/all.yml
- Move container DockerFiles into brwobeat tree
- Conditionally copy required Dockerfiles to node instead of git clone
- Fix up some log file paths
- Use Docker/Podman depending on release
- Provide single interface(collectd.yml) which has container and baremetal playbooks
- Introduce variable collectd_container in install/group_vars/all
- remove unneeded selinux rebaelling (already running as priveleged) when running container
- remove unneed hostfs mount
- collectd container logs to file instead of STDOUT for easier debug
- add collectd-ping package to collectd-openstack Dockerfile
- Improve docs to reflect changes
- dynamically set rabbitmq and swift paths as well for tail plugin

Co-Authored-By: Sai Sindhur Malleni <smalleni@redhat.com>

Change-Id: I627a696f6f1240d96a0e1d85c26d59bbbfae2b1b
Signed-off-by: Charles Short <chucks@redhat.com>
Signed-off-by: Sai Sindhur Malleni <smalleni@redhat.com>
2019-11-05 08:08:37 -05:00

88 lines
2.1 KiB
INI

[tox]
minversion = 3.1.1
envlist = py27,py37,linters,dist,insights
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt
commands = python setup.py test
whitelist_externals =
bash
rm
[testenv:linters]
# py3 linters are able to stop more than py2 ones
basepython = python3
extras = insights
commands =
{[testenv:pep8]commands}
python -m pre_commit run -a
pykwalify -d browbeat-config.yaml -s browbeat/schema/browbeat.yml
pykwalify -d browbeat-complete.yaml -s browbeat/schema/browbeat.yml
bash -c "set -e; for config in $(ls conf/); do \
echo conf/$config; pykwalify -d conf/$config -s browbeat/schema/browbeat.yml; done"
{[testenv:dist]commands}
[testenv:dist]
basepython = python3
# reuse linters environment to lower footprint on dev machines
envdir = {toxworkdir}/linters
# test that we can build a valid package
commands =
python setup.py sdist bdist_wheel
python -m twine check dist/*
[testenv:insights]
commands =
pip check
pip install .[insights]
pip check
[testenv:pep8]
basepython = python3
commands = flake8 {posargs}
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:py27]
basepython = python2.7
commands = pytest {posargs}
[testenv:py37]
basepython = python3.7
commands = pytest {posargs}
[testenv:cover]
commands = python setup.py test --coverage --testr-args={posargs}
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
[testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[testenv:publish]
envdir = {toxworkdir}/py27
commands =
rm -rf dist/*
rm -rf build/*
python setup.py sdist bdist_wheel
twine upload dist/*
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125,E226,E302,E41,E231,E203,H233,H306,H238,H236,H404,H405,W504
max-line-length = 100
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,ansible/*,.browbeat-venv,.perfkit-venv,.rally-venv,.shaker-venv,browbeat-containers/*