Commit Graph

153 Commits

Author SHA1 Message Date
Michal Arbet 47ddac4131 Bump ansible-lint version
The version that we were capping to is no longer compatible with latest
upper-constraints.txt, so let us free float again.

The resulting linting errors are included for now to unblock the gate,
these will still need to be discussed or fixed later.

NOTE(kevko): Temporarily disabling horizon deployment, as it's not
possible to unblock gates without it

Co-Authored-By: Michal Arbet <michal.arbet@ultimum.io>
Change-Id: Ib7f72b2663199ef80844a412bc436c6ef09322cc
2024-01-22 22:49:46 +01:00
Dr. Jens Harbott 0b1a59dd8c podman: install "rich" dependency
This dependency was added to podman-py in version 4.8.0, but not added
properly to their requirements. Install it explicitly for our tox
and integration testing as a workaround.

[0] https://github.com/containers/podman-py/issues/350

Change-Id: I61a5fdfc4e505f2577185f0c0f1297cf2709be2c
2023-11-29 17:04:06 +00:00
Ivan Halomi 9a3f463345 Add support of podman deployment
This change adds basic deployment based on Podman
container manager as an alternative to Docker.

Signed-off-by: Ivan Halomi <i.halomi@partner.samsung.com>
Signed-off-by: Martin Hiner <m.hiner@partner.samsung.com>
Signed-off-by: Petr Tuma <p.tuma@partner.samsung.com>
Change-Id: I2b52964906ba8b19b8b1098717b9423ab954fa3d
Depends-On: Ie4b4c1cf8fe6e7ce41eaa703b423dedcb41e3afc
2023-10-20 17:51:52 +02:00
Zuul 38ccebb8cb Merge "Add systemd container control" 2023-01-25 18:43:47 +00:00
Michal Nasiadka 84be732361 CI: show coverage report in job
Change-Id: I67bc12cb0a9b9d27c51d9c69a689dc16cd37c757
2023-01-23 14:14:17 +01:00
Martin Hiner 4866017e52 Add systemd container control
This commit adds SystemdWorker class to kolla_docker ansible module.
It is used to manage container state via systemd calls.

Change-Id: I20e65a6771ebeee462a3aaaabaa5f0596bdd0581
Signed-off-by: Ivan Halomi <i.halomi@partner.samsung.com>
Signed-off-by: Martin Hiner <m.hiner@partner.samsung.com>
2023-01-19 10:38:41 +01:00
Michal Nasiadka 1f71aa563e CI: Support tox4
Depends-On: https://review.opendev.org/866943
Change-Id: Ib3caf7378c1d5e2e9cfe04e36797bd827e99d6c5
2022-12-28 10:13:03 +00:00
Radosław Piliszek dc9ab52d0d [tox] Fix installation of requirements
Both venv and linters (and its children) environments install
kolla-ansible and thus also install the requirements.
However, they were doing this post-factum and thus without the
constraints pin.
This patch also removes the installation of test-requirements
in venv as it is meant to be used for running the software and
we already have environments for unit tests.
The doc requirements are left in place because docs mention
that ``tox -e venv -- reno`` should work. They should be harmless
but I am open to removing them as well.

Change-Id: I15f1ecc216c9ba81dad740c372d297adf279a945
2022-09-29 16:37:39 +02:00
Dr. Jens Harbott 4cfaadec59 Move lint requirements to dedicated file
These are not needed for unit tests and we want to avoid conflicts when
running with older python versions that we still test against.

We intentionally duplicate ansible and reno as requirements in order to
avoid having to install more items than necessary.

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I0ec83c3e4ae38f911b922a3bade65429d91169eb
2022-04-12 08:45:16 +02:00
Martin a9fbcb1855 Refactor of kolla_docker into module_utils
Moved the DockerWorker class from module file into its separate file
in module_utils directory for future extension.
Unit tests changed accordingly.

Signed-off-by: Ivan Halomi <ivan.halomi@tietoevry.com>
Co-authored-by: Martin Hiner <martin.hiner@tietoevry.com>
Change-Id: Ia2a471a9a2805e13b2c20dbf8a7297c23231aae3
2022-01-06 11:59:50 +01:00
Radosław Piliszek 24e48d4dae [tox] Add docs-iterative command
This is useful for iterative work with docs as it avoids trashing
results from previous builds and thus saves time.

Change-Id: Ic4f710725cbc2d85c28ca4e00c3a32a00a72c2da
2021-08-31 18:32:40 +00:00
Radosław Piliszek 4e473a7848 [tox] Optimise docs actions
Streamline all actions to behave the same (start with clean
env).

Additionally:

- doc envs do not require k-a to be (re)installed (skip_install)

- this change turns on nitpicky mode to catch reference issues
  early

Change-Id: I8ae8a1ca5f6f77ea498573e343889611559b5c97
2021-08-31 18:23:44 +00:00
Zuul de8f9e0ded Merge "tox: Add find command to allowlist_externals list" 2021-06-17 08:43:30 +00:00
wu.chunyang 13965f40c7 tox: Add find command to allowlist_externals list
whitelist_externals is deprecated now, use allowlist_externals
instead. see[0]
Add find command to allowlist_externals list to fix a warning.[1]

[0]: https://tox.readthedocs.io/en/latest/config.html
[1]: https://zuul.opendev.org/t/openstack/build/9ac7f205080343f29d7e2b519abbdb73/log/job-output.txt#945

Change-Id: I67e9c892a945d04eff59427a0161aafceb136560
2021-05-25 09:43:01 +00:00
likui 9e9293c5ce Indented two spaces to match the other things in this block
Change-Id: I87bd1cba830bd4c1de0136dd1f6b3636e74d12de
2021-05-19 11:50:59 +08:00
Michal Nasiadka a00fec8cc6 CI: Initial jinja2 templates syntax checks
Change-Id: If42b7324b58851a4f0beb3a80c70ca2c9dd729af
2021-02-20 09:37:48 +01:00
Zuul f00cd7b55f Merge "Lint and fix renos" 2021-02-17 17:31:10 +00:00
Mark Goddard 3dd6834a61 CI: fix kolla-ansible installation after cryptography 3.4 release
Installing kolla-ansible system-wide on CentOS 8 fails with:

    ModuleNotFoundError: No module named 'setuptools_rust'

This error appeared following the release of cryptography 3.4, which now
includes Rust code. It can be installed without Rust using a Python
wheel, but only with more recent pip than version 9.0.3 available as RPM
on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1.

This change switches to using pip --user when installing kolla-ansible.

Also fixes an issue with ansible-lint which was failing on
etc/kolla/globals.yml due to a missing space before comments.

[1] https://github.com/pyca/cryptography/issues/5753

Change-Id: Ifaf1948ed5d42eebaa62d7bad375bbfc12b134d5
Closes-Bug: #1915141
2021-02-10 22:01:40 +01:00
Radosław Piliszek 223c67935c Lint and fix renos
One of the renos was causing issues due to a duplicated id.
This change makes tox doc8 env lint renos and fixes
the offending reno.

Change-Id: Id3ae6e144b4261c97726cdec172ea9bef093de9e
2021-02-10 15:39:11 +00:00
Radosław Piliszek 604d85b6d2 Drop lower-constraints
Per our PTG resolution [1] and general OpenStack resolution [2], lower-constraints
are not worth the extra work and confusion they introduce.
This patch drops them along with all mentions.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-October/018445.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019521.html

Change-Id: I4c65a428facdf6d4ce28d97a868589aeae4c856e
2020-12-18 20:05:27 +01:00
Zuul 8e765f8007 Merge "docs: add scaffolding for redirects" 2020-11-24 15:52:13 +00:00
likui 3da5cd15bd Use TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated
This allows to use lower-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

  -https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file

Change-Id: Ia33b5dcaddee1414b4c79a50595970745d31c8db
2020-11-02 17:41:14 +08:00
likui 8b1967fbb8 Update TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated
-https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file
This allows to use lower-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

[1] https://review.opendev.org/#/c/722814/

Change-Id: I10cf355191f4060eda95c6a8ee3abaaf28d16a74
2020-10-30 09:55:45 +08:00
Mark Goddard 1f71b5f0d9 docs: add scaffolding for redirects
This allows us to move pages around without breaking links.

Change-Id: Id2be1e6aba9fba376cf217b558ca922d8db1da28
2020-09-17 17:47:55 +01:00
wu.chunyang abff64bbda bump py37 to py38 in tox.ini
in 'victoria' cycle, we should test py38 by default.

Change-Id: Ic0bfb7f6a8b2123f609e0be0be9945bbf4d73520
2020-09-17 19:31:33 +08:00
zhoulinhui 010a1f9219 Stop install unnecessary packages when run tox -e releasenotes
requirements.txt is unnecessary when run tox -e releasenotes,
releasenotes relative stuffs is in doc/requirements.txt, this ps to
remove the requirements.txt from tox.ini and reuse [docs] deps

Change-Id: Ia6c51f9ffe1257f16e9bd55fe21cc832b634cbf3
2020-09-10 09:43:38 +00:00
Michal Nasiadka d8f31e0a5e CI: Add ansible-lint to tox
* Reworked tox pep8 into linters job, that runs:
  - pep8
  - bandit
  - bashate
  - doc8
  - yamllint
  - ansible-lint (validate-all-files.py + ansible-lint)

* Skip E701 - missing galaxy_info in meta and E602 see [1].
* Skip E301 and E503 - followup later in a separate change
* Added ansible-role-jobs to zuul.d/project.yaml which will run
  openstack-tox-linters job in check queue
* Fixed remaining style issue
* Made tox and docs reference the new env for linters
* Dropped pype environment (not supported)

[1]: https://github.com/ansible/ansible-lint/issues/457

Change-Id: I494b4b151804aac8173120e6c6e42bc2fdb00234
2020-05-17 17:02:38 +02:00
gugug 22f7aecbd9 Enable W503 for flake8 check
W503 and W504 are incompatible and we need to choose one of them.
Existing codes follows W503, so we disable W504.

Change-Id: Ic745e956dd332eb0fa49b93c1e6acb12f8a7f26c
2020-05-17 18:21:39 +08:00
Radosław Piliszek 234272eb64 Cleanup py27 support
Removes and/or replaces all mentions of py27.

Cleans up obsolete requirements and their lower-constraints.

Separates test-requirements.

Makes lower-constraints pass outside of CI (MarkupSafe).

Adds FIXMEs about some hacky Mocks that may misbehave.

Change-Id: Ifc090bf3c1db17d8542ee591c91e8225a597bfe2
2020-04-26 12:16:44 +02:00
Andreas Jaeger 454489762c Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found by updated hacking version.

Remove hacking and friends from lower-constraints, they are not needed
during installation.

Change-Id: I7ef5ac8a89e94f5da97780198619b6facc86ecfe
2020-04-04 17:00:17 +02:00
Ghanshyam Mann 2dbaaf569f [ussuri][goal] More cleanup for python 2.7 drop
Cleanup requirement and set ignore_basepython_conflict = True
in tox to avoid python version conflict warning which going
to be error in future.

Change-Id: Iae7e0bb9e8af52ec3aafba7508305d8692d3c762
2020-02-29 15:23:28 -06:00
Michal Nasiadka 328993d8b3 CI: Add doc8 linting of release notes
Change-Id: I1439aa923a9129b752abb4acfb88559930b2178a
2020-02-28 12:12:31 +00:00
Radosław Piliszek 2564b391ed CI: Fix deploy guide jobs
This fixes files relevant for them because k-a uses common files
for both docs and deploy guide.
We need this to finally get rid of Rocky mentions despite our
recent fixes to docs.

Change-Id: I46c564f3d3e53c54148186fbadfd7380c4f2fd30
2020-02-10 14:07:53 +00:00
Marcin Juszkiewicz bf9c8b5af1 Get rid of Python 2 support
2020 is coming, everyone should be using Python 3 now.

As per the official python support timeline set forth by the OpenStack
TC [1], OpenStack Train (in our case, kolla-ansible 9.x) is the last
release that will support python2.7.

[1] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html

Implements: blueprint drop-py2-support

Change-Id: Ibb3b12a779ecfd424053d0b3e98dac2f21d909bc
2019-12-11 16:07:44 +00:00
Radosław Piliszek a2fc684164 CI: Refactor a lot
Separate upgrade logic to is_upgrade job var and rename
scenarios to match.

Rename "ACTION" to "SCENARIO" (as it is a scenario).

Separate testing of dashboard (aka Horizon) and increase
its timeout to 5 minutes (CentOS 7 slow as always).

Separate initialization of core OpenStack.

Use gate setup script from ./tests/

Remove useless tox setupenv.

Do not deploy Heat when not really necessary.

Change-Id: I4fca319ccc3de7188f8b7b44c9c71321e3899467
2019-11-26 17:30:14 +01:00
jacky06 cde22bdddb tox: Keeping going with docs
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Change-Id: I405812a0039274139e055c54ab7b451dc753c842
2019-10-14 18:20:35 +08:00
Mark Goddard ef3abc455f Build pdf doc
The is one of community goals that each project should produce a
single PDF file. The pdf should be in the output of openstack-tox-docs
job.

TeX packages are required to build PDF locally, following is
recommended:

* inkscape
* texlive-latex-base
* texlive-latex-extra
* texlive-fonts-recommended

More about the goal:
https://governance.openstack.org/tc/goals/train/pdf-doc-generation.html
https://etherpad.openstack.org/p/train-pdf-support-goal
https://etherpad.openstack.org/p/pdf-goal-train-common-problems

Change-Id: Ia0f8b73bcbda6295319f5c8de1aa02a40844207b
2019-09-17 14:14:18 +01:00
Corey Bryant 09b5738168 Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: Ic5f9c5c666e08bc34127d97f9540033536c5b08f
Story: #2005924
Task: #34216
2019-07-05 11:44:23 -04:00
gujin f41531851f Update the UPPER_CONSTRAINTS_FILE to releases.openstack.org
1. Update the UPPER_CONSTRAINTS_FILE to releases.openstack.org[1]
2. Blacklist sphinx 2.1.0[2]

[1]: http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html
[2]: https://github.com/sphinx-doc/sphinx/issues/6440

Change-Id: Ie5f9ae1bd5c45617c6b7fde0e490d471e172c24e
2019-07-03 15:30:44 +00:00
Doug Szumski 9a402018fc Include cron_generator script in coverage report
Change-Id: Ic011c25c491d7d2e1d1d656d8d1653e14bb2d1f1
2019-06-07 15:01:03 +00:00
Zuul 9ceb058d20 Merge "Update the min version of tox" 2019-04-24 16:02:47 +00:00
ZhongShengping 41f3a817ac Move to opendev
1.Use opendev.org instead of git.openstack.org.
2.Use review.opendev.org instead of review.openstack.org.

You can see the discussion below:
http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html

Change-Id: Ice4509204df788a1a44a06fb89fb44cfe6b54b94
2019-04-23 13:28:39 +08:00
confi-surya 11c18f83e8 Update the min version of tox
In Train, we will use python3.6 and 3.7 for which
the minimum tox version required is 2.5[1]

[1]https://tox.readthedocs.io/en/latest/changelog.html#v2-6-0-2017-02-04

Change-Id: I9b3dec141bd9e62739be00b69d033807cc2a2bd7
2019-04-22 16:11:07 +05:30
confi-surya db052b7d18 Drop py35 jobs
Python 3.5 was the target runtime for the Rocky release. The current
target py3 runtime for Stein is Python 3.6, so there is no reason to
keep testing against the older version.

https://governance.openstack.org/tc/reference/runtimes/stein.html#python-runtime-for-stein

Change-Id: I0db6c9cbf2af9ed9c701755a26f721aeac97d4cd
2019-02-27 08:57:24 +00:00
Michal Nasiadka 189af13ba6 Fix py35/py36 and k-a-ubuntu-source gate jobs
- py35/py36 jobs are failing
python 3.6 pycache also includes links - so those also
need to be removed by tox testenv

- kolla-ansible-ubuntu-source job is failing
Without basedir set in galera.cnf - mysql_install_db looks for resolveip
in /usr/sbin, instead of /usr/bin, thus complains about cannot resolving
neither $HOSTNAME, nor localhost.

Change-Id: I40514c0a7c43ae01c7680aac81123942be1cdef9
2019-02-14 09:11:54 +01:00
Zuul 0ad1b64c6d Merge "Update min tox version to 2.0" 2018-11-12 13:43:13 +00:00
Mark Goddard c9c7f3dc89 Add action plugins and modules to coverage report
Currently, the coverage report only includes the kolla_ansible python
module, which only includes the kolla-genpwd command, and that is not
tested.

Change-Id: I16f0e9e0f47914b7ce24bbb515d59e4750228821
2018-11-07 10:02:44 +00:00
Nguyen Hai Truong aae1b1d0a0 Add python 3.6 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.6 as part of the python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I51f9d000469a6d92f72cc2c732b8763f35cb0c2c
2018-11-06 01:56:15 -08:00
Nguyen Hai Truong ac6615543e Update min tox version to 2.0
The commands used by constraints need at least tox 2.0.
Update to reflect reality, which should help with local running of
constraints targets.

Change-Id: I426cebf26d4c386355fb0052ed12bda39d67fc49
2018-11-02 00:00:49 -07:00
Zuul fed5b71b64 Merge "Ignore doc build path" 2018-10-22 13:28:09 +00:00