Commit Graph

55 Commits

Author SHA1 Message Date
Sergiy Markin b3b8d05fe7 Airflow stable 2.8.1
Change-Id: I46c97108d50304fd4e3417f6057d999c891b0661
2024-02-21 22:24:46 +00:00
Sergiy Markin 4be7fa44a7 Armada timeout adjustment
This PS set read/connection timeout to None for http requests.

Change-Id: Ic874485bb82a9c386224f5adc530e366b01ae24e
2023-05-11 21:15:22 +00:00
SPEARS, DUSTIN (ds443n) 0e9d828fe6 Update armada to focal
Update kubernetes client to v26.1.0
Updating armada to focal base image
Remove xenial and opensuse dockerfiles
Update tox python from py35 to py38
Add apparmor for docker build
Uplift HTK chart version 0.2.52
Bumping up some python dependencies to get in sync with shipyard
Added clear-firewall role for airskiff-deploy playbook

Change-Id: If06a3f60466702d05a21c24a7cb8041bed41507a
2023-03-20 11:30:37 -04: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
Drew Walters 7bf1423752 Add documentation to docs.airshipit.org
This change adds publishing to docs.airshipit.org and updates the theme
to match the other Airship projects on the site. This change also
updates orphaned links and removes the Read the Docs jobs.

The documentation can be found at docs.airshipit.org/armada when this
change merges.

Change-Id: I9641753f6084f911e3286c623d0c2de7b3f6040a
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-08-03 10:33:13 +00:00
Sphicas, Phil (ps3910) 4e76d15eda Allow proxy_server use for chart tarball downloads
Currently the chart `source` schema allows for a proxy server to be
specified, but it is only used for git repos. This patchset allows
the `proxy_server` to also be used for tarball url sources.

Change-Id: I6f90d056fa46f596b1fb248b6c596c58b6513d64
2019-09-17 14:56:08 -07: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 8a50591dbf Introduce v2 docs
This introduces v2 docs in order to allow users to opt in to
breaking changes, while still supporting v1 docs for a time
so folks can migrate. At some point v1 doc support will be
removed.

This initial version of v2 docs is experimental. Further
breaking changes will be made before v2 docs are finalized.

A v1-v2 migration guide is included in the documentation.

This also refactors the internal data model to include the full
document structure, such as `metadata` and `schema`, so that
different behavior can be acheived for v1, v2, etc.

Change-Id: Ia0d44ff4276ef4c27f78706ab02c88aa421a307f
2019-04-16 10:15:21 -05:00
Sean Eagan 8cf71c0c6d Don't log unsupported document type messages
In the full airship use case, shipyard sends a deckhand url to
armada which returns all site documents, so this leads to many
many of these unwanted messages which make the logs difficult to
use. Hence this removes these messages.

Change-Id: I297df16d180b9ed6fae6bb8f8a0d96c3533766ae
2019-02-28 15:57:18 -06:00
Sean Eagan c31a961bf1 Automate deletion of test pods
When running helm tests for a chart release multiple times in a site,
if the previous test pod is not deleted, then the test pod creation
can fail due to a name conflict. Armada/helm support immediate test pod
cleanup, but using this means that upon test failure, the test pod logs will
not be available for debugging purposes. Due to this, the recommended approach
for deleting test pods in Armada has been using `upgrade.pre.delete` actions.
So chart authors can accomplish test pod deletion using this
feature, however, it often takes awhile, usually not until they test upgrading
the chart for chart authors to realize that this is necessary and to get it
implemented.

This patchset automates deletion of test pods directly before running tests by
using the `wait.labels` field in the chart doc when they exist to find all pods
in the release and then using their annotations to determine if they are test
pods and deleting them if so.

A later patchset is planned to implement defaulting of the wait labels when
they are not defined.

Change-Id: I2092f448acb88b5ade3b31b397f9c874c0061668
2019-01-28 13:19:09 -06:00
Sean Eagan 2310ddbc2c Remediate releases stuck in non-DEPLOYED statuses
Armada remediates releases stuck in FAILED status, if not protected,
by purging and re-installing them. This implements the same for other
non-DEPLOYED statuses. For these statuses it guards this with a best
effort determination of whether a previous deployment of the release,
either through armada or the helm CLI, is likely still pending based
on whether it was last deployed within the chart's wait timeout. If
it is deemed likely pending an error is raised, however this
condition will eventually expire on future runs allowing for
eventual remediation.

Reasons why a release may get stuck in statuses other than DEPLOYED
or FAILED include:

1. tiller crashed mid-deployment
2. tiller could not reach kubernetes to update the release state
3. running `helm delete <rel>` (without --purge) (DELETED status)

Change-Id: Ia89cd59f056103dde47980a149c07a2984c4bbb4
2019-01-18 23:06:01 +00:00
Drew Walters adfe3ae505 test: Refactor test handler
While authoring [0], it was discovered that Armada has duplicate logic
for deciding if Helm test cleanup should be enabled as well as the tests
themselves. Because of this, changes to test logic (e.g. adding pre-test
actions), requires changing all traces of the repeated logic, which can
lead to inconsistent behavior if not properly addressed. This change
moves all test decision logic to a singular Test handler, implemented by
the `Test` class. This change does NOT change the expected behavior of
testing during upgrades; however, tests initiated from the API and CLI
will not execute when testing a manifest if they are disabled in a
chart, unless using the `--enable-all` flag.

[0] https://review.openstack.org/617834

Change-Id: I1530d7637b0eb6a83f048895053a5db80d033046
2018-11-29 17:30:57 +00:00
Zuul d35896537b Merge "Add caching and cleanup of chart tarballs" 2018-11-05 19:08:25 +00:00
Sean Eagan 69b43983e9 Run wait/test even if chart not updated
Previously if a chart is not updated, it would simply be skipped over.
Now, the wait/tests are run in this case to ensure the chart success
criteria is/was actually satisfied. It does still skip tests if there
is a last test result recorded as successful already, as an
optimization.

Change-Id: I5dc95fe0f16fe0989761e771c77d2c4fa8f6e7ea
2018-10-31 09:53:12 -05:00
Sean Eagan cbb8ed33e1 Add caching and cleanup of chart tarballs
Caching and cleanup of git repository chart sources was previously
implemented. This adds these features for tarball sources as well.

This also implements transitive chart dependency sourcing. Previously
only a single level of dependencies were being downloaded, which
would lead to an error when multiple dependency levels exist.

Change-Id: I988e473a6ea29331e036d26c3ec7269374e0188f
2018-10-29 16:02:44 -05:00
Sean Eagan 6b96bbf28d Correctly identify latest release
This fixes the following issues with listing releases from tiller,
which could cause Armada to be confused about the state of the
latest release, and do the wrong thing.

- Was not filtering out old releases, so we could find both a
  FAILED and DEPLOYED release for the same chart. When this is the
  case it likely means the FAILED release is the latest, since
  otherwise armada would have purged the release (and all its
  history) upon seeing the FAILED release in a previous run.
  The issue is that after the purge it would try to upgrade
  rather than re-install, since it also sees the old DEPLOYED
  release. Also if a release gets manually fixed (DEPLOYED)
  outside of armada, armada still sees the old FAILED release,
  and will purge the fixed release.
- Was only fetching DEPLOYED and FAILED releases from tiller, so if
  the latest release has another status Armada won't see it at all.

This changes to:

- Fetch releases with all statuses.
- Filter out old releases.
- Raise an error if latest release has status other than DEPLOYED
  or FAILED, since it's not clear what other action to take in
  this scenario.

Change-Id: I84712c1486c19d2bba302bf3420df916265ba70c
2018-10-19 09:14:15 -05:00
Zuul c4982fb500 Merge "Fix: various documentation and URL fixes" 2018-09-24 14:13:15 +00:00
Roman Gorshunov 09f099e5b2 Fix: various documentation and URL fixes
1) UCP -> Airship
2) readthedocs.org -> readthedocs.io (there is redirect)
3) http -> https
4) attcomdev -> airshipit (repo on quay.io)
5) att-comdev -> openstack/airship-* (repo on github/openstack git)
6) many URLs have been verified and adjusted to be current
7) no need for 'en/latest/' path in URL of the RTD
8) added more info to some setup.cfg and setup.py files
9) ucp-integration docs are now in airship-in-a-bottle
10) various other minor fixes

Change-Id: I1e2d133a701dc2dade5bfcbdab5c0950cbe7eed5
2018-09-24 12:53:27 +02:00
anthony.bellino cb57588968 Fix for get manifest
In some use cases, some site level docs are only included in specific
manifests. This is so sites can call out what they want deployed, however
currently Armada is checking for all documents to exist and leads
to an invalid manifest exception.

This PS removes the '.build_charts_deps()' and 'build_chart_groups()' calls
in 'get_manifest()' so that only chart documents, and chart group documents
are built after finding them within 'build_armada_manfiest()' and
'build_chart_group()'. 'build_armada_manifest()' will now throw the
related 'Could not find chart group... exception' for related chart
and chart group issues.  Additional subclass exceptions were added along
with adding traceback to capture the chained exceptions.

Change-Id: Idc8a75b290ac0afb1e177203535b012d589b708f
2018-09-14 15:27:03 +00:00
anthony.bellino fbbfdef4ed Validation refactor
This PS refines the logic in override.update_manifests when validating
documents to properly deduce the correct exception
that needs to be thrown.  Added appropriate logic in armada.py to
handle the exceptions thrwon by override.update_manifests.  Also
validate_armada_documents now logs appropriate error/debug messages.
Introduced ArmadaNegativeHandlerTestCase class in test_armada.py,
along with updating/adding unit tests in test_override.py.

Change-Id: I84051ae4901011093f987479861df5f89561bb2c
2018-08-20 17:27:34 +00:00
Felipe Monteiro 1480a05b82 Ensure SSH git clone doesn't prompt for user
This patchset adds additional options to the git SSH command
to ensure that no prompt is required to perform the  clone.
This is needed for automation purposes. (For background when
first trying to clone something via SSH the client asks the
user whether they want to add the host to the hosts files --
this skips that check).

Change-Id: I752a354c5616f40eb8a0dbcb8606370654cabe14
2018-07-12 20:44:43 +01:00
Marshall Margenau 1062aaf1bf Manage temp dirs from git clone.
- In some cases armada was not cleaning up temp dirs properly

Change-Id: I567989d9ac4363fff49c95802b61a3c459074d36
2018-06-25 19:08:18 -05:00
Marshall Margenau f235512d57 Adding yapf config, plus formatted code.
- Adding yapf diff to pep8 target
- Adding yapf tox target to do actual format

** The rest of this PS contains formatted code only, no other changes

Change-Id: Idfef60f53565add2d0cf65bb8e5b91072cf0aded
2018-06-22 14:56:04 -05:00
Marshall Margenau 52bf21989f Fix release name bug
The release name was being treated as multiple different values to
mean the same thing, when paired with the 'release_prefix'.  This
commit addresses the bug, changing all instances to use the
'release' value instead of 'chart_name' or others.

Note: This is an impacting change, in the sense that it will
cause more reliable behavior in Armada's Apply processing which
could have actual impact while upgrading components installed with
a previous version of Armada.  Previuosly undeleted FAILED releases
may now be deleted, and armada test and delete actions may now
run as expected where they didn't run before.

Change-Id: I9893e506274e974cdc8826b1812becf9b89a0ab6
2018-06-15 11:21:38 -05:00
Felipe Monteiro 3e129745b4 Add missing Keystone options to registration of config
This patchset adds missing Keystone options to registration
of config, including timeout, which is causing the following
error in testing:

packages/oslo_config/cfg.py", line 3130, in _get_opt_info
2018-06-12 20:28:40.318 9 ERROR armada.api     raise NoSuchOptError(opt_name, group)
2018-06-12 20:28:40.318 9 ERROR armada.api oslo_config.cfg.NoSuchOptError: no such option timeout in group [keystone_authtoken]
2018-06-12 20:28:40.318 9 ERROR armada.api

This fix is similar to a recent Shipyard patchset [0] which
aimed to solve the same issue but expands on it by following
Nova patterns here: [1].

This also updates the sample config file which now includes
the timeout option.

[0] https://review.openstack.org/#/c/572563/
[1] http://git.openstack.org/cgit/openstack/nova/tree/nova/conf/cinder.py

Change-Id: I2c35bcfe9cacbc3a443f7f0975ad2ab43c7ca7c2
2018-06-13 13:18:04 +00:00
Gage Hugo 65ce95f3a4 Remove validate_manifest_filepath
This change removes validate_manifest_filepath and its related
test since it appears to only wrap around os.path.isfile() and
isn't used anywhere else within armada[0].

[0] https://github.com/openstack/airship-armada/search?utf8=%E2%9C%93&q=validate_manifest_filepath

Change-Id: I014045e4e4d4087780cf99ece1a2049148db8c5d
2018-06-04 17:53:42 -05:00
Tin Lam 26fa3181fe refactor(keystone): reduce keystoneauth usage complexity
This patch set refactors and fixes the use of the keystoneauth to load
the session from cfg.CONF. This removes the unnecessary wrapping of
utility function into a class, but also allows the code to use other
accepted plugins to form the keystoneauth object.

The need to read environment variables should be handled only in the CLI
and should be accounted for by the CLI framework, not in a server utility
function.

Change-Id: Ib086f103bbb1e27fe8228ccf5f0d40526796e1e5
Signed-off-by: Tin Lam <tin@irrational.io>
2018-06-02 18:20:30 +00:00
Marshall Margenau d770640b95 Revise wait timeouts plus dry-run.
- revise wait on namespace+label, only wait on ns+label for
  charts we've touched in the current apply loop
- skipping any actions that would change system during dry-run
- skip 'test' and 'wait' during dry-run
- tweaking some logs for insight and readability

Change-Id: I1223f01690832c26ce2faa96e7e64620cf413ac9
2018-05-30 16:19:35 -05:00
Sean Eagan fe310b194e Remove references to old git repos
This removes references to the old att-comdev git repos, either updating
to the openstack github mirror or deleting as appropriate. Old project
name (UCP) references are left alone for now.

Change-Id: I53b294a3c574fa0bca4037e5e00ad31d92f26977
2018-05-29 10:15:13 -05:00
Tin Lam 8d1521e96c style(pep8): remove E722 exclusion
This patch set removes E722 pep8 exclusion that allows for "bare"
except: statement.

Change-Id: Icdce885366541b88aabbef35166cf196a588676b
Signed-off-by: Tin Lam <tin@irrational.io>
2018-05-08 23:11:18 -05:00
Marshall Margenau 964aed2973 feat(validation) Validation messaging
- Validation messaging to match UCP convention
- Adding some missing fields to Chart validation schema
- Minor update: Adding debug logging to each CLI call
- Fixing some typos and exception messages

Change-Id: I7dc1165432c8b3d138cabe6fd5f3a6e1878810ae
2018-03-15 21:19:43 -04: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
gardlt 3b879fc846 Improved document validation
BREAKING CHANGE: Armada will no longer support
recursive monolithic documents such that a Manifest
fully defines ChartGroups inline and ChartGroups
fully define Charts inline. Only name-based references
to other documents is supported.

- Author document schemas in standalone
  JSON schema files
- Update validation to return all failures available
- Removed unit tests for support of recursive monolithic
  documents

Change-Id: Idb91fa552d3d7a3d7d525609d505fe7380443238
2018-02-23 11:11:09 -05:00
drewwalters96 5b75f0a9b4 feat(source): Add support for SSH key authentication
- Add support for SSH key auth using existing config file value
- Add authentication exceptions
- Remove redundant git error handling from Armada handler

Closes #169

Change-Id: Ia0f61e0b74893289bb90560a743a243393d89c56
2018-02-13 16:10:34 -05:00
Marshall Margenau e1b64d200b style(armada): quality of life and cleanup
- adding .editorconfig file
- minor cleanup in various files related to .editorconfig
- typos, whitespace, etc.
- other general housekeeping items on the codebase

Change-Id: I104f8dcb06aafb180da12f7ee4c0ded41fc07b9d
2018-02-12 10:27:11 -05:00
Marshall Margenau c117b945ad feat(proxy): add proxy support to armada/Chart/v1 for git clone
Support proxy for installing armada/Chart/v1, as data.source.proxy_server when data.source.type = 'git'.

Closes #191

Change-Id: I9bfd7dbd63c86f65b24b27bd5eec547f862e2311
2018-02-01 20:49:46 -06:00
Felipe Monteiro bfff1f4ed3 tests(git): Unskip git tests and add conditional skip test.
This PS unskips the last remaining git test in test_source which
had an unconditional unittests.skip() decorator applied to it.
The source_cleanup test now issues a warning if the repo path
isn't found and the associated test (passing in a bad path)
simply asserts that the warning was called.

This also adds a conditional skip to the git clone unit tests
in the event that the user doesn't have network connectivity.

Change-Id: Ic300c48a4e0c361e37ec15cd3675415f8170a817
2018-01-22 21:09:26 -05: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
gardlt ef26f5c36e feat(source): adding tar https functionality
- updated download function
- add option for certs in config

Change-Id: Ic8dd8629fa759cd81deae5d4d94056154e71f6c1
2017-11-03 21:32:17 +00:00
gardlt a99fc4ad6c bug(wait): fixing how we wait on chart and group
- added abilty to choose labels to wait on
- created wait object

Change-Id: Ia3b6f7bd7b6ef15779b087c613d69f4f6a7b41e9
2017-11-02 19:51:18 +00:00
drewwalters96 be8e86351f feat(manifest): ability to override manifest value
- Add --set flag to override manifest values from CLI
- Add --values flag to override manifest values from values file
- Add support to override manifests values with API values option

Closes #146

Change-Id: Iefa14e4d3005aab3ee803ffb65dfe1a867507c0e
2017-11-02 00:03:41 +00:00
Mark Burnett 083ba20f50 fix(git): allow specifying git refs for sources
This allows, e.g., pointing at a particular Gerrit Patch Set using
natural configuration, e.g.:

    ---
    schema: armada/Chart/v1
    metadata:
      schema: metadata/Document/v1
      name: ceph-config
    data:
      chart_name: ceph-config
      release: ceph-config
      namespace: ucp
      timeout: 3600
      install:
        no_hooks: true
      upgrade:
        no_hooks: true
      values: {}
      source:
        type: git
        location: https://github.com/openstack/openstack-helm
        subpath: ceph
        reference: refs/changes/54/457754/73
      dependencies: []

Change-Id: Ib6af0fec2bbfa1fa4e523d839df44af047697522
2017-10-18 14:17:17 -05:00
Pete Birley 746cbd0bd8 Fix(linting): Make Armada pep8 compliant
This patch set makes Armada pep8 compliant. Note the hapi/** is
autogenerated and therefore should be excluded from linting.

Change-Id: I123eefb543f9bd9cf0bc6bd98ed95646d8d72cc3
2017-09-29 11:46:58 -04:00
gardlt 16b14169f8 feat(source): checkout via reference
- provide source tool ability to checkout commit hash

Change-Id: Ic3b101a4877fd89516df8c4814802780a15e2461
2017-09-17 00:47:58 +00:00
Alexis Rivera De La Torre d17485f8b9 [feat] adding-tox-testing
- tox commands
- docs update

Change-Id: Ie6caa498d6017822e095ee5b001124074e2755aa
2017-08-11 16:48:57 +00:00
Tim Heyer ea6ad23672 Migrate from pygit2 to GitPython
Change-Id: Ib477b945e922fd0a1767bd6643c0a45751599fad
2017-08-09 21:20:25 +00:00
Tim Heyer 4554cac0d9 [Feat] Support remote tarball as chart source
-Add functionality to download a tarball from a URL, decompress/extract
 the archive, and use as a chart source
-Compartmentalized functionality to later support extracting, but not
 downloading, local tarballs
-Refactor specific git utils to general source utils
-Small exception handling bug fix
2017-08-02 15:12:12 -05:00
Alexis Rivera De La Torre 775a284716 [bug] fixing repo delete
- remove exception for repo delete
2017-07-27 20:15:48 -05:00
drewwalters96 96661239cb [Feat] Add common error/exception handling
- Add main exception handler
- Add more detailed, individual exceptions for common Armada failure points
- Add exception documentation
2017-07-27 16:22:16 -05:00
gardlt 86846d64bf [bug] get armada object after valid document
- calling object get after vaild doc
2017-07-27 14:06:05 -05:00