39 Commits

Author SHA1 Message Date
James Page
df8393ddd3
Sync src/test-requirements.txt
Installation of flake8 in the tox environment is done via tox.ini.

Sync with global requirements files for charms.

Change-Id: I30e68b0abf9d621b8198b61e244f49f3f026c294
2025-02-28 15:47:15 +00:00
James Page
653cd00152
Sync/rebuild for Dalmatian/Epoxy updates
Refresh and rebuild charm for awareness of Dalmatian and Epoxy
Cloud Archive releases.

Change-Id: I4f74a466755ce161c4c765016b1d7e77f300a4e1
2024-11-15 12:20:02 +00:00
James Page
ad80985213
Use section configuration for database
Older style sql_connection in the DEFAULT section is not supported
at caracal; use sectional configuration instead.

Change-Id: Ia9ed91f550ce0c761c82151aa03e5c448b57a7b0
2024-10-03 13:00:27 +01:00
Myles Penner
e1418aee6f Add charmcraft 3 support
Summary of changes:
- Update the charmcraft.yaml file to use base and platforms, only
  allowing noble support.
- Update config to default to caracal.
- Update osci.yaml to use the charmcraft 3.x/beta
- Drop non-noble tests
- Update constraints file from -2024.1.txt to -noble.txt
- Add charmbuild to .zuul.yaml

Change-Id: I4f09f3a4549d35f3fb57235aaddee2ff997a2a49
2024-09-03 20:55:37 +00:00
Myles Penner
6c06aa702d Fix issues related to py312 compatibility
Summary of changes:
- Bump flake8 from 3.9.2 to 7.1.1
- Remove pinning for setuptools
- Add py312 section to tox.ini [testenv]

Change-Id: I2261074718e3b4473f54f4bb3fec2cd6d822616b
2024-08-21 19:05:45 +00:00
James Page
3367d7f563 Align test requirements
Ensure test requirements are aligned with other reactive charms.

Change-Id: I5e0d04e415fb47e060de24dd8674b6c8c6c05ed9
2024-08-02 15:51:31 +00:00
Zuul
ac66f3b8ba Merge "Updates for caracal testing support" 2024-03-14 16:30:41 +00:00
Alex Kavanagh
bbce8b1289 Updates for caracal testing support
These updates, on the master branch, are to support testing the caracal
packages and support of the charms for caracal.  They do NOT lock the charms
down, and don't change the testing branches to stable branches.

Change-Id: Icee2b7a7f37e6ec1f0371ea3ee1e235fa1ce10ac
2024-02-24 19:52:33 +00:00
Billy Olsen
1945138f8c Set cpu-mode and cpu-model in overlay
Tests sporadically fail the live-migration portion when the compute
nodes have different processor families. Set the cpu-mode and cpu-model
to the lowest denominator in the CI to prevent this.

Change-Id: Ie5010ad306295835f963022cb53e601d47db7f03
2024-02-17 00:05:46 +00:00
Felipe Reyes
4cb98debf5 Add SSL to testing bundle
Relate API services to vault over the certificates interface to
configure them with HTTPS.

Change-Id: I925a3d1719dd1ea96ebfd2ae8dbd96e965f44644
2023-10-19 17:00:32 -03:00
Corey Bryant
0cc95866bd Add 23.10 run-on to charmcraft.yaml
This should have been included in the "Add 2023.2 Bobcat support"
commit to enable mantic.

Change-Id: I3b116a36269d7ed1920d5c4b8a4c46d68c38af3d
2023-10-03 10:46:03 -04:00
Felipe Reyes
26c00ab083 Add testing overlay to configure hacluster
This change deployed hacluster related to watcher to test the
configuration of API services in HA

Change-Id: I27ce9e6adb78d2f226c7c6d9738532974a54eb04
2023-09-05 11:50:50 -03:00
Felipe Reyes
91b14c0a1f Bind API service on 0.0.0.0
The API service needs to listen on all IP addresses to allow different
haproxy frontends reach it out.

By default the service binds to 127.0.0.1, and binding it to
options.service_listen_info.watcher_api.ip prevents the assess_status()
code to succeed, this is a common pattern[0]

[0] d073130639/templates/stein/neutron.conf (L14)

Change-Id: I3e7b43d0208e251a6b6ab59d0383c989310f2b3b
2023-09-05 11:50:50 -03:00
Felipe Reyes
8d512bb7f7 Skip init_db() and cluster_connected() on update-status
Change-Id: I617b8e4a16129b2023f15b0b841ab263cc5d3589
2023-09-05 11:50:43 -03:00
Felipe Reyes
a2e1f8431a Allow to pass OS_*and TEST_* env variables in tox targets
Change-Id: I2d2b0fe6429a9ecdcb0f8d71c9b36cb3fcd3b31f
2023-09-05 11:29:35 -03:00
Felipe Reyes
27c563dd5e Add zaza-openstack-tests testing.
This change expands the testing bundles to deploy a fully functional
cloud and run the testing class WatcherTests which uses the
vm_workload_consolidation strategy[0].

[0] https://docs.openstack.org/watcher/latest/strategies/basic-server-consolidation.html

Func-Test-Pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1101
Change-Id: I5a1d9ef50ce16d553a06382e0825fcbb2d12e887
2023-09-04 12:25:04 +00:00
Corey Bryant
15a58b3177 Add 2023.2 Bobcat support
* sync charm-helpers to classic charms
* change openstack-origin/source default to bobcat
* add mantic to metadata series
* align testing with bobcat
* add new bobcat bundles
* add bobcat bundles to tests.yaml
* add bobcat tests to osci.yaml
* update build-on and run-on bases
* update charmcraft_channel to 2.x/stable

Change-Id: Ia9fe580c751d80d5a6909ffc4e9b463447d5d643
2023-08-02 14:24:07 -04:00
Felipe Reyes
631f0034a1 Migrate charm to charmhub
Summary of changes:

- Add charmcraft.yaml to build the charm using charmcraft-2.2
- Add osci.yaml to run CI jobs on zosci
- Align tox.ini and src/tox.ini with the rest of the charms
- Add testing bundles jammy-zed, jammy-antelope and lunar-antelope. The
  other bundles are dropped
- Clean up requirements.txt removing unneeded dependencies
- Update metadata.yaml to declare jammy and lunar only
- Use generic zuul job templates
- Add src/wheelhouse.txt
- Install python3-apt instead of python-apt
- Drop pip.sh
- Drop unneeded pining from test-requirements.txt

Change-Id: I28df31910c869f813682c3b436e5481dc607772e
2023-05-24 14:55:09 -04:00
Hervé Beraud
7b62f18eb6 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: Idcd1e9db466ec4d1ffd302dee97c453b1b822323
2021-12-16 10:20:23 +00:00
Zuul
d002cda47e Merge "Add /builds to the charm-build directory" 2021-12-08 21:50:23 +00:00
James Troup
130399ec04 Replace reference to 'juju set' with 'juju config'.
Change-Id: I109cb91f4d05cb4c57653edf294e0c47cfc43a99
2021-08-06 18:37:47 +01:00
Alex Kavanagh
2db56ea678 Add /builds to the charm-build directory
The default for charm-build changed, which means the the CI looks in the
wrong place to find the built charm to upload it to the charm-store.
this patch fixes that.

Change-Id: I4e93296a5ba1c635e42fea7197d2c17aa079fc00
2021-07-20 12:37:05 +01:00
Ghanshyam Mann
6e8a1f07ee Moving IRC network reference to OFTC
Change-Id: Ic97d794bac2136277f8404e85bc5717ff715e8a6
2021-07-07 19:36:06 -05:00
Stamatis Katsaounis
f55c13932e Add support for Victoria
This patch adds support for Victoria and adds relevant testcases
as well.

Change-Id: Id358d8c7d7e73d9035fa12db00a421bf715b0c55
Signed-off-by: Stamatis Katsaounis <skatsaounis@admin.grnet.gr>
2020-11-22 08:38:36 +00:00
Stamatis Katsaounis
27f3386fe9 Fix response to non action_managed_upgrades
This patch adds a new handler to make charm react to non
action_managed_upgrades.

Change-Id: If8a4e19ca03d4b4570f2e20edee36cf64df70da9
Signed-off-by: Stamatis Katsaounis <skatsaounis@admin.grnet.gr>
2020-11-22 10:37:32 +02:00
Stamatis Katsaounis
343828b309 Configure TLS
This patch updates charms.openstack which, among other things, it
configures TLS in config_changed [1] which is essential since without
it, the ssl-* config options are ignored.

[1] https://github.com/openstack/charms.openstack/blob/master/charms_openstack/charm/classes.py#L431

Change-Id: I8efb8ed0bed83c5676a836db9d63cfb44d75e851
Closes-bug: #1903583
Signed-off-by: Stamatis Katsaounis <skatsaounis@admin.grnet.gr>
2020-11-13 10:06:15 +02:00
Stamatis Katsaounis
8c573aeb8a Add support for Ussuri
Add support for Ussuri to be able to able to upgrade via config
automatically and also fix CI tests

Change-Id: Idb5491fad04756d782c4f0cc1979e8857da1c3b8
Signed-off-by: Stamatis Katsaounis <skatsaounis@admin.grnet.gr>
2020-11-09 22:40:53 +02:00
Zuul
78bba1c5b4 Merge "Ensure that the charm expects python3" 2020-07-16 11:33:14 +00:00
Hervé Beraud
628ec6b449 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: Ie8a7acebd0e0192a676b440d9479c0f64f5e8a9a
2020-06-02 20:05:46 +02:00
Alex Kavanagh
03957f784a Enable focal and ussuri in the charm testing
Change-Id: Ifadd43b3b96adc93b46abe57200a8fdacb54447d
2020-05-07 19:54:14 +01:00
Chris MacNaughton
9f8538fdfe Ensure that the charm expects python3
Change-Id: I6128fb64e4f1b2b4eb62ee70aef2de458cb37a4b
2020-05-04 17:38:34 +02:00
Stamatis Katsaounis
698f97fb1e Fix configuration template rendering
Add planner_ prexix to relevant configuration values in order to be
correctly filled inside templated configuration file.

Change-Id: I5afdacb1f5b33f79c3e83d39a43a056e01aa682f
Signed-off-by: Stamatis Katsaounis <skatsaounis@admin.grnet.gr>
2020-02-26 23:30:23 +02:00
Stamatis Katsaounis
c6df61e4db Change Docs and URLs
This patch changes the initial information to point to upstream after
the official release of charm-watcher.

Change-Id: I2dc7b1777c70fa5aa4eb28aa7a24bb4638ecf94e
Signed-off-by: Stamatis Katsaounis <skatsaounis@admin.grnet.gr>
2020-02-05 13:16:37 +02:00
Stamatis Katsaounis
48027a822a Basic functional test for bionic train
This patch adds a bare minimum bundle.yaml for deploying watcher
charm and running a noop basic test.

Change-Id: Id09cbce851dcc6be9e452b5c0ea82c24673404d8
Signed-off-by: Stamatis Katsaounis <skatsaounis@admin.grnet.gr>
2020-01-18 22:29:53 +02:00
Stamatis Katsaounis
663fad7552 Add gerrit and zuul config to enable CI
Change-Id: I85a113c21f756a614509fb7916f14065c23870b1
Signed-off-by: Stamatis Katsaounis <katsaouniss@gmail.com>
2020-01-16 14:06:24 +02:00
Stamatis Katsaounis
28166b25ce Fix minor issues for publishing the charm to Charms Store
Signed-off-by: Stamatis Katsaounis <skatsaounis@admin.grnet.gr>
2020-01-02 15:40:06 +02:00
Stamatis Katsaounis
18b2a2029e Fix src/README
Signed-off-by: Stamatis Katsaounis <skatsaounis@admin.grnet.gr>
2020-01-02 14:42:22 +02:00
Stamatis Katsaounis
8b517ce5d0 Add README
Signed-off-by: Stamatis Katsaounis <skatsaounis@admin.grnet.gr>
2020-01-02 14:27:47 +02:00
Stamatis Katsaounis
f5a7653cf0 First commit of watcher charm
Signed-off-by: Stamatis Katsaounis <skatsaounis@admin.grnet.gr>
2020-01-02 14:09:39 +02:00