Commit Graph

26 Commits

Author SHA1 Message Date
Corey Bryant 0b7d041279 Add Kinetic and Zed support
* sync charm-helpers to classic charms
* change openstack-origin/source default to zed
* align testing with zed
* add new zed bundles
* add zed bundles to tests.yaml
* add zed tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases
* add bindep.txt for py310
* sync tox.ini and requirements.txt for ruamel
* use charmcraft_channel 2.0/stable
* drop reactive plugin overrides
* move interface/layer env vars to charmcraft.yaml

Change-Id: I577fff942606ded9885e9ba6f29040ba3fc7fb27
2022-08-26 18:40:45 +00:00
Samuel Walladge 68fecd9ba8 Update hvac library to latest version
Update deprecated method calls where possible,
and use new methods instead of lower level read/write calls.

Change-Id: I991435cdf8d36016e75c46823ec47f3290a42fe4
2022-07-04 09:34:33 +09:30
Alex Kavanagh b797fcfcbf Update to build using charmcraft
Due to a build problem with the reactive plugin, this change falls back
on overriding the steps and doing a manual build, but it also ensures
the CI system builds the charm using charmcraft.  Changes:

- add a build-requirements.txt
- modify charmcraft.yaml
- modify osci.yaml
    -> indicate build with charmcraft
- modify tox.ini
    -> tox -e build does charmcraft build/rename
    -> tox -e build-reactive does the reactive build
- modify bundles to use the <charm>.charm artifact in tests.
  and fix deprecation warning re: prefix
- tox inception to enable tox -e func-test in the CI

Change-Id: Icb73919f247c60a9e18cc2e563f0fda9c620cb14
Co-authored-by: Aurelien Lourot <aurelien.lourot@canonical.com>
2022-02-03 14:58:43 +01:00
Hervé Beraud 1de27bc18f Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.

Note that https://github.com/openstack/charms.openstack is used during tests
and he need `mock`, unfortunatelly it doesn't declare `mock` in its
requirements so it retrieve mock from other charm project (cross dependency).
So we depend on charms.openstack first and when
Ib1ed5b598a52375e29e247db9ab4786df5b6d142 will be merged then CI
will pass without errors.

Depends-On: Ib1ed5b598a52375e29e247db9ab4786df5b6d142
Change-Id: I1d7de2bd4d704ffc331fdeacea725e903890f296
2021-12-15 11:38:28 +00:00
Corey Bryant e8174abd75 Add yoga bundles and release-tool syncs
* charm-helpers sync for classic charms
* pin pyparsing for aodhclient
* pin cffi for py35
* add non-voting focal-yoga bundle
* add non-voting jammy-yoga bundle
* add series metadata for jammy
* switch xena bundles to voting
* run focal-ussuri as smoke tests
* remove trusty, xenial, and groovy metadata and tests

Change-Id: I8a26d0f2e116cfde9047da8d264739d9a0b623f8
2021-11-12 11:23:57 -05:00
Andy Wu 5151d01ee2 Report 'Missing CA' if certs relation exist but CA not configured
If vault/leader has certificate relationship with other apps but
root CA is either not configured or cleared by action 'disable-pki',
the status should be set to 'Blocked, Missing CA'

Also add unit test for checking 'missing-CA' status

Closes-Bug: #1940451
Change-Id: I2f0093c0ae6949693f2ad1ea4729b690c932b4b1
2021-11-05 13:40:22 +00:00
Andy Wu fbf6cc5494 Improve root CA handling for action 'disable-pki'
Clear old root CA stored in vault/leader when action 'disable-pki'
is called

Closes-Bug: #1948989
Change-Id: I6d6a0eba53e197993b223ce6a736444d6c12d647
2021-11-03 13:32:07 +00:00
Aurelien Lourot c7cc2d4b94 Sync release-tools
In order to fix ResolutionImpossible on tox invocation.

https://github.com/openstack-charmers/release-tools/issues/151
https://github.com/openstack-charmers/release-tools/pull/152

Change-Id: I9856b8c1043051832dd4b3be165b4e022376b683
2021-07-27 07:53:00 +00:00
Alex Kavanagh 1bd5e9c851 Updates to flip all libraries back to master
This patchset updates all the requirements for charms.openstack,
charm-helpers, charms.ceph, zaza and zaza-openstack-tests back
to master branch.

Change-Id: Ife3649d0fae29680ec3c355daace23905e1deccf
2021-05-03 16:11:54 +01:00
Alex Kavanagh d8e7e4644d 21.04 libraries freeze for charms on master branch
* charm-helpers sync for classic charms
* build.lock file for reactive charms
* ensure tox.ini is from release-tools
* ensure requirements.txt files are from release-tools
* On reactive charms:
  - ensure stable/21.04 branch for charms.openstack
  - ensure stable/21.04 branch for charm-helpers

Change-Id: I531088a70f1281ba7f2f066c383e234fb7a8164f
2021-04-03 20:35:18 +01:00
Alex Kavanagh 67f503e078 Updates for testing period for 20.01 release
* charm-helpers sync for classic charms
* rebuild for reactive charms
* ensure tox.ini is from release-tools
* ensure requirements.txt files are from release-tools
* On reactive charms:
  - ensure master branch for charms.openstack
  - ensure master branch for charm-helpers

Change-Id: I418135c6409d0b8c5a786cac907257d2aecbc860
2021-01-15 14:46:37 +00:00
Aurelien Lourot 19138d2ec5 Sync release-tools
Sync release-tools boilerplate containing these changes
in order to pin pip < 20.3:
https://github.com/openstack-charmers/release-tools/pull/125
https://github.com/openstack-charmers/release-tools/pull/126

Change-Id: Iff422570e783282df0efb0ffb001e59546087937
2020-12-11 14:06:22 +01:00
Alex Kavanagh 7c419725bc Sync libraries & common files prior to freeze
* charm-helpers sync for classic charms
* charms.ceph sync for ceph charms
* rebuild for reactive charms
* sync tox.ini files as needed
* sync requirements.txt files to sync to standard

Change-Id: I82c35d13e7cbb4586a29c70ebccb4f687a17a496
2020-09-26 18:41:25 +01:00
Alex Kavanagh 8352f7ba54 Release sync for 20.08
- Classic charms: sync charm-helpers.
- Classic ceph based charms:  also sync charms.ceph
- Reactive charms: trigger a rebuild
- sync tox.ini
- sync requirements.txt and test-requirements.txt

Change-Id: I3ada82412445ab91cead3ed1b48cda798d279068
2020-07-27 21:01:05 +01:00
David Ames 3f94a10cbf If VIP is set, wait until ha.available
The charm was sending an individual unit's address even when the VIP
configuration value was set. If VIP is set and we have not yet reached
the ha.available state, wait on publishing the vault url.

Change-Id: I3de05b5e771dc4b7c43996d99ccc4b5d8668737d
Closes-Bug: #1878035
2020-05-18 12:04:36 -07:00
Ryan Beisner 9189405efd
Sync charm/ceph helpers, tox, and requirements
Change-Id: Id7b86f0fc64e7ee25aab8d8de09fd5b8b0da89c0
2019-09-30 20:59:41 -05:00
Frode Nordahl 7a9dac9209
Update series metadata
Ensure that EOL releases are removed from metadata
and tests, and that the current dev release is enabled
in metadata.  Dev release tests are enabled separately
because of chickens and eggs.

Update test-requirements to reflect upstream name change for
``psycopg2`` package.

Change-Id: Ia59cea09bf9946b8ccf0c7363c9171bbbcf5a5bc
2019-04-05 15:34:57 +02:00
Pete Vander Giessen dadb8f916d Replace ostestr with stestr in testing framework.
A system upgrade broke ostestr. We can fix it by just calling stestr
directly.

Change-Id: I31189da2c56d98db1ed9dcf44c9938289812d8fa
2019-03-07 17:13:28 -05:00
James Page b5afdc3817 vault-kv: Add functional test and use KV v1
Add ceph-mon and ceph-osd charms to smoke testing bundle
to ensure coverage of vault-kv relation and associated
secrets storage functionality.

Revert default KV backend to v1; v2 has a slightly different
API so revert default KV backend version to v1.

This resolve and issue with vaultlocker access to stored
keys.

Also pin hvac version to < 0.7.0.

Change-Id: I8ed197aba3f9a42399fd4304b21e2a36e3dd6dca
2018-11-13 17:16:54 +00:00
Ryan Beisner 6990332bd9 Update requirements
Resolve existing lint.

Also remove tests/charm-helpers if present, in favor
of the pip-installed charm-helpers.

Change-Id: Ibfa428c1a9f2d881faec6c1193fcf33612693f12
2018-10-04 16:10:30 -05:00
Liam Young ebb0334905 Add support for tls-certificates interface
To use the tls-certificates interface clients relate to the vault
charm. If the charms CA is not ready yet the charm will not update
the relation data. To prepare the CA an operator needs to run the
get_csr action to retrieve the csr for the intermediate ca the charm
has prepared. The operator should sign the csr with the root CA and
then upload the root CA cert and signed csr to the vault charm via
the upload-signed-csr action. Running this action will trigger the
vault charm to process any outstanding certificate requests and to
update the relation data accordingly.

The update includes:

* New action get_csr to retrieve a csr for the intermediate ca for
  the charm pki
* New action upload-signed-csr to upload a signed intermediate csr
* Charm now provides tls-certificates interface
* Update vault access acl to allow charm full access to charm-pki-*.
  Currently the only pki mount point the charm uses is
  charm-pki-local
* Various generic helpers to lib.charm.vault
* New module lib.charm.vault_pki which handles interactions between
  the charm and the vault pki api
* Add handler to reactive.vault_handlers for reacting to certificate
  requests

Depends-On: I6222e5eb9c8a0a5f079ecc2e5e5c97abc1c39515
Change-Id: I1681b9f2defcfbf7c06ede83c88c507dcf92a7ce
2018-06-06 08:18:30 +00:00
James Page 68068c64d8 Refactor status assessment
Perform a number of new checks to assess the status of the
local unit:

 - Presence and completeness of relations
 - Status of vault (initialized, sealed)
 - Configuration of memory locking

This review also switches a number of 'status_set' calls to
be 'log' calls to avoid continually polluting the Juju status
display with non-pertinent information during update-status
executions.

Change-Id: I4e467a76bb0951deda8a88c609f4c79f4b0b33f4
2018-04-19 11:46:31 +01:00
Liam Young 7850184802 Add support for HA deployments using etcd
Add support for relating vault to etcd to support HA deployments
of vault.

Depends-On: Iebb2415077b682dfdf590b4b5f35a3c593ed3d69
Depends-On: I05a04bdc237b2a698b2f2d29e18c5a33510a2513
Change-Id: I161db8296031776652425f563a11de3ee8f7f86e
2018-04-16 14:37:00 +00:00
Liam Young e40a910cd9 Add .gitreview
Add .gitreview file to point at openStack gerrit

Bring tox.ini and requirements mostly inline with other
reactive charms. tox.ini has to deviate slightly as
charm currently has no src dir.

Change-Id: I9184847409a884699d3b51641e19cbd9d30634fa
2018-02-19 09:24:02 +00:00
Liam Young 5fd4513e76 Add simple unit tests 2018-02-03 09:01:32 +00:00
Liam Young b8b4f43092 Add tox.ini for building and flake8 tests
Add a tox.ini for creating virtualenvs and then executing builds,
flake8, unit tests and charm proof in those venvs. Example:

tox -e pep8
tox -e build
tox -e charm-proof
tox -e unit-tests

Partial-Bug: #1745966
2018-02-02 11:24:45 +00:00