Commit Graph

23 Commits

Author SHA1 Message Date
Sergiy Markin 386a686e69 [focal] Python modules sync with Airship project
- armada-airskiff-deploy is voting gate again
- fixed falcon.API deprecation - -> falcon.App
- fixed collections.abc.defaultdict not found error
- fixed tox4 requirements
- implemented requirements-frozen.txt approach to make allike as other
  Airship projects
- uplifted docker version in the image building and publishing gate

Change-Id: I337ec07cd6d082acabd9ad65dd9eefb728a43b12
2023-04-21 23:49:14 +00:00
Sean Eagan a5730f8db8 Remove Tiller
For now we leave the tiller status enpdpoint, until
Shipyard has had a release to stop depending on it [0].

[0]: https://review.opendev.org/c/airship/shipyard/+/802718

Signed-off-by: Sean Eagan <seaneagan1@gmail.com>
Change-Id: If8a02d7118f6840fdbbe088b4086aee9a18ababb
2021-10-05 02:41:32 +00:00
Sean Eagan 68747d0815 Use helm 3 CLI as backend
Helm 3 breaking changes (likely non-exhaustive):

- crd-install hook removed and replaced with crds directory in
  chart where all CRDs defined in it will be installed before
  any rendering of the chart
- test-failure hook annotation value removed, and test-success
  deprecated. Use test instead
- `--force` no longer handles recreating resources which
  cannot be updated due to e.g. immutability [0]
- `--recreate-pods` removed, use declarative approach instead [1]

[0]: https://github.com/helm/helm/issues/7082
[1]: https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments

Signed-off-by: Sean Eagan <seaneagan1@gmail.com>
Change-Id: I20ff40ba55197de3d37e5fd647e7d2524a53248f
2021-10-04 21:40:26 -05:00
Sean Eagan 8c5e5c7d24 Remove unused commands
This removes release rollback/delete functionality. This functionality
was likely not being used and thus was likely not working.

This primary driver for this change is to ease introduction of Helm 3
support. Particularly to avoid having to make API changes related to
the namespacing of helm releases in Helm 3.

This also removes the swagger api documentation as it was not
maintained.

Change-Id: I7edb1c449d43690c87e5bb24726a9fcaf428c00b
2021-09-30 17:22:16 -05:00
Sean Eagan 4596e6c0f1 Don't log metrics HTTP data
The metrics endpoint can be scraped frequently and produces a large
response body, hence this turns off logging of this data to prevent
the drowning out of other more salient logging.

Change-Id: I399480726ae39963b010bf5b054ce26d73fb28c5
2019-08-21 11:25:20 -05:00
Sean Eagan 0721ed43aa Implement Prometheus metric integration
This implements Prometheus metric integration, including metric
definition, collection, and exportation.

End user documentation for supported metric data and exportation
interface is included.

Change-Id: Ia0837f28073d6cd8e0220ac84cdd261b32704ae4
2019-08-15 16:12:17 +00:00
HUGHES, ALEXANDER (ah8742) b787c418e3 Standardize Armada code with YAPF
From recently merged document updates in [0] there is a desire to
standardize the Airship project python codebase.  This is the effort
to do so for the Armada project.

[0] https://review.opendev.org/#/c/671291/

Change-Id: I4fe916d6e330618ea3a1fccfa4bdfdfabb9ffcb2
2019-07-31 10:16:15 -05:00
Sean Eagan ee02879ee0 Don't log health checks
Due to kubernetes liveness/readiness probes, health check logging
can make the rest of the logs difficult to use.

Change-Id: If063a291243cf5221b40dac47064cd25372dac95
2019-02-27 09:27:38 -06:00
Sean Eagan 7af22df7dc Implement tiller gRPC channel clean up
We have seen issues with dangling threads in Armada. This is likely due to
a bug [0] in the version of gRPC that we were pinned to.

This patchset:

- moves us to the latest versions of the gRPC python libraries which add
  a new `channel.close()` method to cleanup channels.
- implements the python context manager api in the tiller handler
- uses the context manager api to explicitly scope tiller channel creation
  and cleanup to each Armada API and CLI call.

This also fixes a couples issues with error handling introduced in [1].

[0]: https://github.com/grpc/grpc/issues/14338
[1]: https://review.openstack.org/#/c/610384

Change-Id: I2577a20fc76c397aa33157dc12a0e1d36f49733e
2018-11-12 13:32:52 -06:00
Felipe Monteiro 90e42b5710 Add default error handler and serializer
This patch set adds default error handler and serializer to
Armada's server.py which mirrors the Shipyard pattern [0].

Exceptions that inherit from ArmadaAPIException and
ArmadaBaseException alike will be formatted and serialized
via default_exception_handler and default_error_serializer
respectively.

[0] http://git.openstack.org/cgit/openstack/airship-shipyard/tree/src/bin/shipyard_airflow/shipyard_airflow/control/api.py#n99

Change-Id: I75c5d419221d46eef0fcb9930478349280ac4e41
2018-10-14 15:48:18 +00:00
Sean Eagan 571c0b77f9 Add command to rollback release to CLI and API
This adds a command to the CLI and API to rollback a release name to a
specified version.

Change-Id: Ie1434da42ccc75c658b7bde7164b3f4c909be7c4
2018-06-06 09:40:31 -05:00
Marshall Margenau 3430283865 feat(logging): Enhance logging and update grpcio
Enhance request logging (and scrub sensitive headers)
Enhance Tiller logging
Update grpcio, unpin from 1.6.0rc1

Plus a couple typo fixes
Plus a couple unused vars

Change-Id: I8afd679f6716c6e1af234a59ac44ba1fdc73cdc8
2018-03-09 11:36:57 -05:00
Felipe Monteiro 394819c344 Add test for GET '/api/v1.0/test/{release}' endpoint
This adds falcon-based unit tests for
GET '/api/v1.0/test/{release}' endpoint.

This also renames the Test controllers into more specific names
in order to disambiguate the controller names.

Finally, the condition for returning whether a test passed
was changed to be `test_status.result[0].status == 'PASSED'`
as the default cause of 'FAILED' also passes the previous condition:
`test_status.result[0].status` which is wrong.

Change-Id: Ib84bc0b3baf5271cd7417000bbfed56b18840eed
2018-02-25 17:57:57 -05:00
Marshall Margenau ae86aeae24 fix(api): Update old endpoint to /validatedesign
- Updating old /validate endpoints to reference the new endpoint at /validatedesign.
- Update docs to reflect /validatedesign and fix error in description.

Change-Id: Ie1fa4e4584c81373fe193b2b2f83cd96ff571437
2018-01-08 16:12:02 -06:00
Roadrunner2058 d383e772fd feat(yaml): Support document references
This allows the user to apply and/or validate a manifest using
either a filepath (as before) or URL.

Addition by sh8121att:

- Create a general document resolver class to handle local paths
  and URIs
- Allow multiple filenames and combine them into a single document
  set
- Change API to allow for passing document reference URIs to be
  resolved server-side rather
- Update validation API to conform to UCP specification
- Dockerfile updates to speed up build
- Fix unit tests

Closes #96

Change-Id: I5a57779f10d1b63ffc161a14afec851a34ae9efe
2018-01-08 13:39:26 -06:00
Felipe Monteiro 1b6cee2d06 (feat): Add versions controller for UCP integration compliance,
This PS adds the versions controller to Armada for UCP integration
compliance. It's responsible for returning information about
each of Armada's API versions.

Change-Id: I0ad5f0578ab97a50b30e8322647347aa1ed962dd
2017-12-15 16:10:18 -04:00
Felipe Monteiro 4b3d843f04 bug(tests): Unskip Armada API unit tests
This PS sets the foundation for unskipping Armada API unit tests
by making necessary framework changes where necessary as well
as test refactoring so that the tests not only can be unskipped
but also execute successfully.

However, until a feature-rich testing framework is in place, it's
not possible to do end-to-end testing as mocking is currently used
to stub out Tiller API.

Negative RBAC tests will be added in a follow-up.

Included in this PS:
  - policy fixture for asserting that expected policies are enforced
  - unit tests for tiller/armada API
  - test_utils module

Change-Id: I2f454b27b014875bc35fd706f7c0d05364ce562a
2017-12-14 17:02:50 -04:00
gardlt 9318c0cf88 feat(api): adding-health-endpoint
- health endpoint

Change-Id: I0a3a31ecb6cd1c69fcfe7dd2c9b5870eaed7c639
2017-12-13 17:48:56 -04:00
gardlt 7b26e59422 feat(cli): using-click-framework
- using click framework
- added api client
- allow interactions between code and service endpoints
- documention on the command line
- updated gitignore

Change-Id: Ibe359025f5b35606d876c29fa88e04048f276cc8
2017-11-02 20:59:57 +00:00
gardlt cba78d1d03 style(armada): converting py2 to py3
- Format code to python 3.5
- using absoulute paths

Change-Id: I7414b5de915429c2c7f85b99f2ab91f395c62121
2017-10-10 19:55:20 +00:00
gardlt bb26131ce2 feat(api): policy enforcement and api standard
- enhanced logging
- created base structure
- updated docs
- PasteDeploy auth
- Oslo Policy

Closes #107

Change-Id: I805863c57f17fcfb26dac5d03efb165e4be49a4e
2017-09-20 21:54:39 +00:00
Omar Rivera 498cf6c98f Fix oslo_config and oslo_log configurations
* Ensure that configurations are done via the global `cfg` object
* Ensure that the logger is configure through the global object
* Upload a configuration sample file with DEFAULT section having
  the armada.conf and oslo_log namespace
2017-08-07 21:43:32 -05:00
drewwalters96 05818f6d00 [Feat] Add API support for core features
- Refactor API structure
- Add API support for existing CLI flags
- Add Keystone token and RBAC authentication
- Add API documentation
- Add API unit tests
2017-07-22 17:06:32 -05:00