- Add molecule support to test ansible roles.
- Also fix flake8 failures.
- Also drop python36 from the templates
Change-Id: Ib647d93144a02a6be7340991c31f65842fdf3f29
Signed-off-by: Charles Short <chucks@redhat.com>
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>
- Fix ansible-lint tox environment to run on python3.
- Ignore '306' lint check
- Remove python36, python35, only test on python37 (standard)
Change-Id: I75000b21dc4562d443e41ac93473a152acb53fe4
Signed-off-by: Charles Short <chucks@redhat.com>
Builds the source and wheel distribution as part of linting job to
assure we can build the package.
Adds packaging temp files to .gitignore to avoid poluting the
repository.
Adds a publish tox environment which can be used for manual publishing
on pypi (exceptional cases).
Change-Id: If9176b33cc13904a516d8e64d53170f52f2baf55
Updated ansible-lint to run via pre-commit only on ansible files.
Moved config file to its standard location, repository root, which
simplifies syncronization and usage.
Contains bumping ansible-lint to current version which also required
adding few more rule excludes. These excludes are going to be removed
one by one in follow-up changes. This gradual approach allow us to
improve code style without endless merge conflicts.
Config settings mostly based on those used by tripleo repos.
Bumping linters can now be done by running 'pre-commit autoupdate'.
Pro-commit always locks versions so there is no chance that a newer
linter (ansible-lint) would break CI.
Some documentation can be found at https://github.com/openstack/tripleo-quickstart/blob/master/doc/source/contributing.rst
and applies mostly to any project using pre-commit.
Co-Authored-By: Sorin Sbarnea <ssbarnea@redhat.com>
Change-Id: I05eb561c4e353b5fe0bc7c6d3ab2f8ea6c6ea2f4
Temporarily skipping rules 201,204,405,504,601 and 602.
This is to clear the gate and allow for merges.
Change-Id: I140dad80b61014a5b9ef43dbaa7d6ddd99b813d7
Python3.7 finally removed relative imports so we adopt the correct
syntax and also making py37 job voting to avoid regressions.
Change-Id: I16e01344e8ae1c732c31264c50d6dd57143ea799
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: I4cfa741310c5e55fb88eb4f24f5a2ed3baa2b88c
Closes-Bug: #1801695
Move numpy out of requirements into extras, as it's not required
for running browbeat, but only used for insights like compare
results.
So to install with insights, pip install .[insights], to perform
the CLI operations such as compare.
Added a tox test to ensure no dep conflict arises.
Change-Id: Id8aafcd479003ae79ab8c2d0f1fa378ea38d60d2
Closes-Bug: #1799690
Quotes around {posargs} cause the entire string to be combined into one
arg that gets passed to stestr. This prevents passing multiple args
(e.g. '--concurrency=16 some-regex')
Change-Id: If225be953bf78e9f52a3f41797b7746ac823e5cc
Adds descriptions and avoid twine check failure when the sdist package
was build via python3. It seems that sdist command produce different
packages in this unique case where Description field becomes False
instead of UNKNOWN.
This also adds new dist tox targets that tests that packaging works
well. On CI we have diffent job that does almost the same thing.
Change-Id: I93300e49b80fc170c1b73ffb5540cd42754e6a21
This fixes several flake8 failures and integrates flake8 into linters
tox environment.
Rule W504 is disabled because at this moment there is no known way
to avoid flapping between W504 and W503.
This allows us to retire openstack-tox-pep8 job because the more
beneric openstack-tox-linters includes it. Still, developers will
be able to coveniently run only pep8 if they want.
Change-Id: I7da0f6f09a533dd1c4dc303029e8c587bc200f66
linters fail because ANSIBLE0019 has been enabled
link: https://github.com/willthames/ansible-lint/pull/262
This is a temporary merge until we reenable ANSIBLE0019
Change-Id: I335c4ed7a591da06b884da13ec89037aea8cd934
Rally uses yaml to run the workloads so ignore the directory
when we run linter tests.
Change-Id: If9bbfe4d7cbd703e85e6555581fbc228e86c06b0
Signed-off-by: Chuck Short <chucks@redhat.com>
Enable ANSIBLE0010, package installs should
not use latest. Package installs should use state=present with
or without a version.
Change-Id: Id9868d0170fcf715be473d121f9db809f6c7d528
Signed-off-by: Chuck Short <chucks@redhat.com>
Use shell only shell functionality is required.
The shell functionality should only be used when piping, redirecting or
chaining commands.
Change-Id: Icb9b1dd5ea22a2af895a87a9fa2cc1b9a488ac0c
Signed-off-by: Chuck Short <chucks@redhat.com>
py36 testnv was introduced in
https://review.openstack.org/#/c/578313
However, py36 wasn't added to envlist and this fails tox .when run
locally as it's not defined
Change-Id: I7ddf464161d1f2b38f653adb3d632151a1659cec
* Mix and Match Workloads
* rerun_type - ['iteration', 'complete'] - allows you to rerun complete
browbeat workload or iteratively
* browbeat/config.py for loading and validating config schema
* tests/test_config.py to test config.py
Change-Id: I99ea87c01c17d5d06cf7f8d1eec3299aa8d483a5
* Use the built-in pykwalify cli validator
* Use set -e on loop inside tox.ini to ensure invalid configs fail CI
Change-Id: I251f7ead8393b97e93de03dc3b6accbdd9670092
So turns out that E111 is the multiple of four indentation check
it's my fault that ended up in the tox.ini last time I was messing
with it and it seems to have come back to bite only me, as Yoda and
Tools functions, also for Yoda are the only victims of bad indentation.
After a strong recomendation by a friend I'm giving autopep8 a try.
Change-Id: Ia067bc60fad1200f577624aac2e979dfc26ec05d
So up until recently the 'linters' CI run ran both
the pep8 and the Ansible linters, after some review
I can only conclude that it actually was not supposed
to do that and I should have seperate Python and Ansible
linters jobs.
Anyways because of this the pep linters where out for a
few days an we got exactly two minor pep errors into our
repo.
Change-Id: I66f82021c71f89a775e05c411ee1af2dba3a1c7b
flake8 doesn't actually have any issues if you do and
adding exclusions deletes flake8's rather comprehensive
list of exceptions enabled by default.
Change-Id: I2097a4ad095e60064c16d6e1948996f4b11d7af8
Remove old and unused constraints environments from tox.ini. Those
have never been used. Use standard environments as default list.
Note that the standard jobs - as run in OpenStack CI - did not use
constraints previouly and do not use them now. So, this keep the status
quo for CI.
For more information about constraints see:
http://lists.openstack.org/pipermail/openstack-dev/2016-August/101474.html
Change-Id: If99dc4a9398988da769d49a57e22f58b7d83ae74
This commit enanbles Ansible linting and does some
minor refactoring to make existing Ansible roles
compatible with the new rules.
Several Ansible linting rules have been excluded to keep the number
of changes from being too onerous.
Also a new script in ci-scripts is used to check very config file
included in the Browbeat repo for validity using the template
Browbeat uses when it runs.
Here's a list of the new linting rules
* Ansible tasks must have names
* When you use shell you must use become not sudo
* Using become_user without using become is not allowed
* If a repo is pulled it must be a pinned version of commit, not latest
* Always_run is deprecated don't use it
* Variables without {{}} and not in when statements are deprecated don't use them
* No Trailing whitepaces
* YAML checking, catches big syntax errors but not less obvious ones
Change-Id: Ic531c91c408996d4e7d8899afe8b21d364998680
This change should disable the Ansible Linters in tox.ini
so that we can make the existing pep8 tests voting.
Linting should be re-enabled in tox once Ansible playbooks
have their errors corrected.
This commit also corrects some python errors that snuck into
Shaker.py
Change-Id: I5d64985849b9e31b91c9000dba7238cc79bd2009
This is the entry point for openstack gate jobs.
Change-Id: Icbebabf5ea439ef0ef20cdbda41fb9adc82965d1
Signed-off-by: Paul Belanger <pabelanger@redhat.com>