Commit Graph

36 Commits

Author SHA1 Message Date
Sergiy Markin 37ba567da5 Airflow stable 2.6.2
This PS updates python modules and code to match Airflow 2.6.2:

- bionic py36 gates  were removed
- python code corrected to match new modules versions
- selection of python modules versions was perfrmed based on
  airflow-2.6.2 constraints
- airskiff deploy pipeline was aligned with latest in treasuremap v1.9
- postgresql image updated to 14.8

Change-Id: I65a1b86473ee3e988aae353b59fb5473d75851f9
2023-08-29 17:09:37 +00:00
Sergiy Markin 06b1631d8a Restored ubuntu_bionic image build
This PS restores image build for ubuntu_bionic and adds appropriate
gates to keep it tested by appropriate functional and integrational
tests.

Also the latest osh-infra commit was used with kubernetes 1.27.1 for
integration tests.

Change-Id: Ia2c951f27b96774b553e7c0c7c6809172312f753
2023-05-20 05:27:20 +00:00
Sergiy Markin dc3445030a Sync requirements with shipyard
This PS adjusts list of dependences needed to get syncronized with Shipyard project.

Change-Id: I9235702aa34b9f0bf6634229a24e5f1847ac9a7d
2023-04-25 13:11:36 +00:00
Sergiy Markin ac4edb0c64 [focal] Deckhand project updates
- adjusted .gitignore to keep fresh egg-info and omit build artifacts
- fresh egg-info data is needed for promenade that depends on Deckhand
- restored deckhand-functional-uwsgi-py38 gate
- restored deckhand-integration-uwsgi-py38 gate
- made deckhand-airskiff-deployment gate voting ( treasuremap project
  has been updated)
- removed bionic gates
- updated focal dockerfile
- added more binary deps into bindep.txt
- updated deckhand chart values to latest images - focal and wallaby
- fixed python code to compy with CVE's found by fresh version of bandit
- implemented pip freeze approach
- added tox -e freeze profile to manage it
- requirements-frozen.txt is now main file with requirements
- requirements-direct.txt is the file to control deps
- updated setup.cfg to adjust to newer version of setuptools
- fixed airskiff-deploy gate
- fixed docker-image-build playbook to restore Quay repo image publish
- updated other playbooks to include roles from zuul/base-jobs in order
  to setup build hosts properly
- removed workaround with hardcoded dns resolver ip 10.96.0.10 as it
  became obsolette due to recent fix in openstack-helm-infra
- adjusted tools/whitespace-linter.sh script
- tox.ini has been brought to compliance with tox4 requirements
- replaced str() calls with six.text_type() according to D325 Deckhand specific
  commandment from Hacking.rst
- locked python-barbicanclient version with 5.2.0 because of breaking
  changes in the upper versions

Change-Id: I1cd3c97e83569c4db7e958b3400bdd4b7ea5e668
2023-04-20 19:39:43 +00:00
Wahlstedt, Walter (ww229g) 70aa35a396 update to focal and python 3.8
update dockerfile for python deckhand install
add deckhand version to chart 1.0
add chart version 0.2.0
update all packages to latest in requirements.txt
update zuul jobs for focal and python 3.8
remove zuul job functional-uwsgi-py38 in favor of functional-docker-py38
update tox config
typecast to string in re.sub() function
add stestr to test-requirements.txt
add SQLAlchemy jsonpickle sphinx-rtd-theme stestr to requirements.txt
deprecated function: BarbicanException -> BarbicanClientException
fix mock import using unittest
fix import collections to collections.abc
fix for collections modules for older than python 3.10 versions.
deprecated function: json -> to_json
deprecated function:  werkzeug.contrib.profiler ->
    werkzeug.middleware.profiler
deprecated function: falcon.AIP -> falcon.App
deprecation warning: switch from resp.body to resp.text
rename fixtures to dh_fixtures because there is an imported module
    fixtures
switch from stream.read to bounded_stream.read
deprecated function: falcon process_response needed additional parameter
deprecated function: falcon default_exception_handler changed parameter
    order
move from MagicMock object to falcon test generated object to fix
    incompatability with upgraded Falcon module.
Adjust gabbi tests to fix incompatability with upgraded DeepDiff module
update Makefile to execute ubuntu_focal
update HTK (helmtoolkit)
unpin barbican to pass integration tests
Use helm 3 in chart build.
    `helm serve` is removed in helm 3 so this moves
    to using local `file://` dependencies [0] instead.

Change-Id: I180416f480edea1b8968d80c993b3e1fcc95c08d
2023-02-24 10:51:57 -05:00
anthony.bellino d5babeaa86 Gate fixes
* Pin openstacksdk to stein release

* Leap 15.3 changes for opensuse image build

* airskiff gate fixes
  - Pin treasuremap to v1.9 branch
  - Pin openstack-helm-infra to master
  - Remove openstack client setup as it's not used

Change-Id: I139e5b291cde22590f0b9ad5fbbecc5a4f023c33
2021-05-18 08:05:23 -07:00
Rick Bartra 1f0c011a17 Update pip package versions in preparation of pip 20.3
When pip is upgraded to 20.3, the pip dependency resolver is much more
strict and will no longer install a combination of packages that is mutually
inconsistent[0].

These changes account for the fact that Shipyard imports Armada, Drydock,
Promenade, and Deckhand. Having said that, with pip 20.3, the pip
packages amongst those projects cannot conflict. A follow-up change may
be needed if more conflicts are found.

[0] https://pip.pypa.io/en/latest/user_guide/#changes-to-the-pip-dependency-resolver-in-20-2-2020

Change-Id: Id75acea82ddf5d915a8b8805e076dac49cab800f
2020-09-28 12:21:20 -04:00
Phil Sphicas 42fe1b85cb Accelerate YAML operations with LibYAML
Patch PyYAML (via the pylibyaml library) to automatically enable the
LibYAML parser and emitter, which are faster than the Python versions.

https://pypi.org/project/pylibyaml/

Change-Id: Iebcc50b5db87518b3b7e0fac124c712afd06da2b
2020-09-25 04:54:48 +00:00
Andrii Ostapenko 9d07671866
Fix pep8 gate running on py3.8
* Bumps hacking to 2.0.0 and addresses corresponding issues
* Bumps bandit to 1.6.2

Change-Id: I9d540acbd40700874b574687bc1fee4a9b5c0cb2
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
2020-09-24 22:35:22 -05:00
DODDA, PRATEEK b0ec40f033 [FIX] Image build checks missing setuptools
Use pip3 in event system has both pip2 and pip3 installed. 
Use apt to install setuptools for Ansible's consumption.

Change-Id: I6929ecb0cce2ec8ac70e9261acb9f87dc7031153
Co-authored-by: Alexander Hughes <Alexander.Hughes@pm.me>
2020-06-29 14:16:45 +00:00
Phil Sphicas fa15c0b582 Gate fixes: pin amqp, use barbican deploy script
tox is failing because oslo.messaging 9.1.1 installs kombu 4.6.7, which
requires amqp >=2.5.2, but it is pinned to 2.5.1. Additionally, the
deckhand-integration-docker are failing because barbican is not being
deployed correctly.

This change updated the pinned version of amqp to 2.5.2, and uses the
barbican deployment script in openstack-helm.

Depends-On: I020632ad6a33d29a657164cf0e32baef6b670d5a
Change-Id: Idafe35d1496cd880e2d6a93c96afa724fd1c2e89
2020-01-22 01:56:05 +00:00
Crank, Daniel (dc6350) eadae6d7b1 Fix Deckhand integration test gates
Fix problems with integration test zuul jobs which were made non-voting
by [0] and restore them to voting status. These jobs exercise some
secret-management functions that test integration between Deckhand and
Barbican that doesn't happen in the Airskiff jobs, so they still have
some test value.

- Some integration test scripts were pointing to old versions of
  openstack-helm scripts that are no longer maintained. This PS
  updates those scripts to point to current OSH scripts.

- Uplift openstack-helm-infra pin in helm_tk.sh to a recent
  version

- Add build-images to uwsgi test jobs to ensure airship_deckhand_path
  is set

[0]: https://review.opendev.org/660738

Change-Id: If83dead126307a98b44ad5d8f367a972c48a30d0
2019-10-08 15:15:58 -05:00
Michael Beaver 84661f9159 Pin back amqp version
There are failures with the gates that need the
amqp version to be pinned back for now
reference b51d1d678e

Change-Id: Ifba9fb1f5a102d6d490a32be23ac23185089774d
2019-10-02 11:57:14 -05:00
Felipe Monteiro 38c1d7a1a3 fix: Pin down Deckhand package requirements
This patch set pins down package requirements for the following
reasons:

* Inconsistencies between ranges and direct pins
* Deckhand isn't gated against requirements repo so changes to
  some packages isn't actively tested
* Other Airship components use pins, so Deckhand might break them
  when package requirements go out of sync between components
* Deckhand as of yet has no stable release so Airship relies on
  master for stability so it is better to ensure stability over
  anything else

Change-Id: I20ef4be3e01cd267771098d33447ccb61aee20b4
2018-10-18 02:36:35 +01:00
Felipe Monteiro 3353833dba Update Deckhand test-/requirements.txt
This simply updates Deckhand's package versions in
test-requirements.txt and requirements.txt using `pur -r` command
line tool.

Change-Id: If4bbd85190502c52a7f10adf6af750172b54c234
2018-06-16 18:18:28 -04:00
Charles Short aadf9ae938 Remove mox3 dependency
mox3 is not being used so remove it, apart of the community
goal for Rocky.

Change-Id: I4fd687391d83fd11665b287d1853a35fcdc1f9f9
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-06-07 09:35:10 -04:00
Felipe Monteiro 3d53d53712 Add uwsgi functional test check to .zuul.yaml
This adds a uwsgi functional test check to .zuul.yaml so that
deploying Deckhand via uwsgi (in a more standalone fashion,
sans containerization) works as intended.

Change-Id: I931ab4d11719daca7665d3a25b00e353c707237e
2018-05-29 20:25:15 +00:00
Felipe Monteiro 5c078ce81c Update releasenotes/docs tox jobs
This is to update releasenotes/docs tox jobs to remove need
to defined build_sphinx in setup.cfg and to ensure that they
both clean up prior to running via appropraite rm -rf commands
and to ensure all the requirements are being installed.

Change-Id: Iadd375dbb596151cb140fae03b82a728a64364a0
2018-04-24 22:34:49 +01:00
Felipe Monteiro ff5c66046d Bump up package requirements versions
Change-Id: I6922a4dc8c542a3168de471b2abf529b7a11cb12
2018-02-13 22:54:44 -05:00
Felipe Monteiro 2f0d5796e3 Revert fix pifpaf run postgresql failing
This reverts https://review.gerrithub.io/#/c/393980/ which was
a temporary workaround to unblock the Deckhand gate. pifpaf should
be used to run unit tests as having to install Docker just to kick
off unit tests is excessive.

However, the unit-tests.sh script is maintained in tools/ directory
as a fallback.

Change-Id: I24a10d4b3ea00006004f27d0086719fb0bf86dd9
2018-01-12 11:57:44 -04:00
Felipe Monteiro 2bfb16e44d [Gate fix] Fix pifpaf run postgresql failing.
This PS unblocks the gate by replacing pifpaf to run postgresql
for unit tests with docker, as a workaround. This is because
"pifpaf run postgresql" is failing with pifpaf not being able
to find the command "pifpaf run". Steps to reproduce:

python3 -m virtualenv -p python3 /tmp/venv
source /tmp/venv/bin/activate
pip install -U pip wheel devpi-client setuptools
pip install pifpaf

$pifpaf run postgresql
>> pifpaf: 'run' is not a pifpaf command. See 'pifpaf --help'.
>> Did you mean one of these?
     help

The unit test script for spinning up the docker postgresql container
and then running unit tests is very similar to the pre-existing
script for running functional tests located in tools/ directory.

Change-Id: Ib0f414ff58007037ac12161876dcd7a10e91f48c
2018-01-08 17:28:01 -04:00
Tin Lam 4dbcf5ba38 Create doc/requirements.txt
This change migrates the docs building requirements as outlined in
the Project Testing Interface[0]. One benefit of this that we no longer
load all the doc-generating modules when we run tox unittest. See [1] for
more details.

[0] https://governance.openstack.org/tc/reference/project-testing-interface.html#documentation
[1] http://lists.openstack.org/pipermail/openstack-dev/2017-November/124815.html

Change-Id: If5ac500e9e0fc99e75b98f3d55858dfc56dee6ff
Signed-off-by: Tin Lam <tin@irrational.io>
2017-12-29 00:26:33 -06:00
Felipe Monteiro c26ad42e9f Fix readthedocs document build job for Deckhand
Currently readthedocs build is failing for DH because it runs
pip install -rtest-requirements.txt [0] when test-requirements.txt
doesn't include oslo.policy. And readthedocs can't run tox -e docs
which is what is intended to be run for documentation generation.

[0] https://readthedocs.org/projects/deckhand/builds/6351568/

Change-Id: I4ad93e41b0410c547c9fec7d6d38f3b7e7f6829f
2017-12-02 16:40:04 +00:00
Felipe Monteiro bead00e23e HTML test report for Deckhand functional tests
This PS leverages pytest-html to generate an HTML report for
Deckhand functional tests. The test_gabbi.py file was updated to
use pytest as the test runner as it is compatible with pytest-html.
The report is saved in results/index.html. Test docs were updated.

Change-Id: I0b611bf124bf87d801ab93dd2a5d16f136e4801d
2017-10-25 18:18:15 -04:00
Tin Lam 2a0a8452a5 Add releasenote management
This patch set adds reno releasenote management to Deckhand.

Change-Id: I69bf6be2b2896e4b1ac917cdefac1c1c634b2ad7
2017-10-03 20:58:12 +01:00
Felipe Monteiro 8bf4f7407d Revamp document hashing
This PS revamps document hashing. Instead of relying on Python's
built-in hash function to hash the contents of a document (i.e.
metadata and data values), sha256 from hashlib is used instead,
mostly for security purposes.

Further, new parameters have been added to the document DB model:
data_hash and metadata_hash, and the old value hash has been
dropped. The data type for storing the hashes has been changed
to String from BigInt.

Finally, testing documentation was added.

Change-Id: I428ddcbce1007ea990ca0df1aa630072a050c722
2017-10-02 18:09:13 +01:00
Felipe Monteiro 0cd5d45706 Add sphinx job for auto-generating docs
Sphinx can be leveraged to auto-generate docs into feature-rich
HTML pages. Docstrings in modules and classes can be easily
auto-injected into documentation to produce high-level
documentation, yet with accompanying code blocks and
necessary docstrings.

This commit introduces the tox job for auto-generating docs,
as well as the foundational logic and documentation pages
(index, HACKING and glossary). While hacking rules are
introduced in HACKING.rst, they are not added in this
commit; that will be done in a follow-up patchset.

Additional documentation will also be included in a series
of future patchsets.

Change-Id: Iacd0e4542ebf481d66ab19dd43014b8d5bcc9e3f
2017-09-21 16:16:23 +01:00
Felipe Monteiro 8715fe3e02 [flake8] Enable extra, optional hacking checks
Update test-requirements.txt to use latest version of:
    * hacking

Enable the following off-by-default checks:
    * [H203] Use assertIs(Not)None to check for None.
    * [H204] Use assert(Not)Equal to check for equality.
    * [H205] Use assert(Greater|Less)(Equal) for comparison.
    * [H210] Require ‘autospec’, ‘spec’, or ‘spec_set’ in
             mock.patch/mock.patch.object calls
    * [H904] Delay string interpolations at logging calls.

Made minimal code changes to comply with changes.

Change-Id: I3559ead76b5476650d7193e7023d349175234922
2017-09-21 10:43:21 -04:00
Felipe Monteiro e62e9e9f40 DECKHAND-33: Add oslo.config options for keystone auth
This commit adds oslo.config options for keystone auth and
updates Deckhand's request context to use oslo_context for
facilitating integration with keystone auth options.

Change-Id: Ifd170e1a192402a970f8538f0c06bf017fe77f88
2017-08-24 20:12:05 +01:00
Felipe Monteiro b5a7de448e Add bandit job to Deckhand
Added bandit job to Deckhand's tox.ini.

Change-Id: Iac57ee58e1eda7872091c53401c3d46d1737da78
2017-08-16 14:53:38 +01:00
Felipe Monteiro 6c70cbdbfe Add Deckhand coverage job
This commits adds a Deckhand coverage job for gauging the test
coverage of Deckhand to tox.ini.

Change-Id: If3cb7b31127dd5cd58c7a3f8dc87f1f7a4f74101
2017-08-15 16:11:35 -04:00
Felipe Monteiro 6e2238c3d8 Fix flake8 errors
This commit fixes flake8 errors and fixes a minor bug related to
a schema version being v1 rather than v1.0.

OpenStack hacking rules are used to pin down flake8 to sane
standards using [0].

[0] 06e676c461/test-requirements.txt (L5)

Change-Id: Ib236df6f5ec9505c0e635f0faa9877d3397a2e55
2017-08-14 20:48:14 +01:00
Felipe Monteiro 874026bb1a Add jsonschema validation to Deckhand
Previously Deckhand was using manual validation of YAML files.
However, schema validation is much cleaner, robust and thorough.
So, this commit adds jsonschema as a dependence in Deckhand.
Tempest already uses it as a dependence as well -- so a precedence
already exists.

This commit also updates unit tests as needed. Documentation
changes will be made in a follow-up patch.
2017-07-10 21:34:35 +01:00
Felipe Monteiro a7d1f0e2f4 Initial engine framework
This commit adds the initial engine framework for Deckhand. Included
is the logic for parsing YAML files as well as validating them and
doing forward substitution as specified by the YAML file.

This commit also includes unit tests for the framework changes.
2017-07-10 19:47:24 +01:00
Felipe Monteiro 00bb92561d DECKHAND-2: Design core Deckhand API framework
This commit implements the core Deckhand API framework.
It does not implement any real API routes. The core
framework is modeled after Drydock's [0].

This commit specifically:

  - implements the core API framework which uses falcon
  - implements errors.py for preliminary errors
  - implements base resource class from which other API
    resources will inherit to build out the API itself
  - implements base API router
  - implements entry-point for kicking off deckhand
  - updates base README.rst with instructions on
  - running and installing -- similar to Drydock's
  - implements dummy API resource for secrets, to
    be fleshed out further in a follow-up commit

[0] https://github.com/att-comdev/drydock
2017-06-27 19:26:51 +01:00
Felipe Monteiro eab524abd8 Oslo config integration (#1)
* DECKHAND-11: Add oslo.config integration to Deckhand

This commit adds oslo.config integration to Deckhand. It also
creates a lot of preliminary files/configuration settings
needed to run tox as well as lint and oslo-config-generator
jobs.

* Remove sample config file.
2017-06-26 16:57:50 -07:00