Commit Graph

16 Commits

Author SHA1 Message Date
Gabriel Cocenza 1c9e662d78 Add support for HAProxy L7 checks
This change adds the haproxy options if defined by the
charm class to enable HTTP checks to the HAProxy
configuration, instead of the default TCP connection
checks.

options.ssl check if the environment is using http or
https mode. We disable certificate verification because
we are only interested in the health of the service.

Fix for tox4 compability

Closes-Bug: #1880610
Change-Id: Ie091fdfe560b6a060f0c29c6b92a99f5e564eddf
2023-02-03 18:19:20 -03:00
Aurelien Lourot 4793ceba5f Wrap pip to force pip<20.3 and setuptools<50.0.0
Osci runs the CI jobs on Bionic, this version of tox (2.5) will
automatically upgrade the packages at virtualenv creation and any
pinning won't have effect since the virtualenv created is upgraded to
the latest versions of pip and setuptools. This behavior was changed in
tox 3.10 with the addition of the 'download' directive[0]

Setuptools 58.0 dropped the support for use_2to3=true which is needed to
install blessings (an indirect dependency of charm-tools) since then
the gate got broken.

This is similar to:
https://github.com/openstack-charmers/release-tools/pull/156
https://github.com/openstack-charmers/release-tools/pull/157

Change-Id: I7f22cd744a7aa5747cca49f094a5efd041481a80
Co-authored-by: Felipe Reyes <felipe.reyes@canonical.com>
2021-10-13 10:15:47 +02:00
Frode Nordahl ba152d41b4
Publish releases packages map to opt-in endpoints
For principal - subordinate plugin type relations where the
principal Python payload imports code from packages managed by a
subordinate, upgrades can be problematic.

This change will allow a subordinate charm that have opted into the
feature to inform its principal about all implemented release -
packages combinations ahead of time. With this information in place
the principal can do the upgrade in one operation without risk of
charm relation RPC type processing at a critical moment.

Related-Bug: #1806111
Change-Id: I2df0abed25825448569581273aee4e79a6003dad
2021-03-22 13:49:32 +01:00
Ghanshyam Mann 117ca6b979 [ussuri][goal] Updates for python 2.7 drop
OpenStack is dropping the py2.7 support in ussuri cycle.

charm repos need few updates on either py2 drop or updating
ussuri python template, tox.ini etc.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: Iff776d6f2cc57d7c37021e7e6966e65a96f1ba9e
2020-02-27 22:30:27 -06:00
Camille Rodriguez 72b4ea469e Avoid pollution and false positives with tox.ini
- removing sitepackages in tox.ini to avoid test env pollution
- skip_missing_interpreters in tox.ini set to False to avoid false
positives by skipping missing interpreters.

Change-Id: I370fbffa06544c66fcae7a24b15f37b01cbd7d7a
2019-08-27 09:56:57 -04:00
Frode Nordahl aa5bc57aea
Update layer wheelhouse with common dependencies
Add empty series list to metadata.yaml to get around charm-tools
now mandating a series list to be present.

This list will always be overridden by charms but building the
layer is part of our gate and we need to unblock it.

Update tox basepython, the build will no longer succeed in the gate
with py27.

Change-Id: If81441d5fb0ed3b8819c4a2814dc20c5e47a8eff
2019-08-21 16:11:42 +02:00
Frode Nordahl 15c2ae30bb
Use ``uri`` property
Move workdir to avoid charm build error in gate test.  Move built
artifact back so CI can inspect it. (The layer build-only job in
CI should get an update to cope with this itself)

Change-Id: Icee40b83e6924a6adc9ee1f97eff04522121d5fa
Closes-Bug: #1823729
2019-04-08 20:15:17 +02:00
Doug Hellmann 9a3807eeb3 fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I360fc2d49b9e737fd36442ac291a1f532f98b3e7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:39:32 -04:00
Liam Young 7fa96de883 Add generic action code.
Add generic action code that utilises charms_openstack.bus.discover()
so that the top level charm does not need to make any changes to
inherit generic actions.

Change-Id: I8b3422b915e2477d936e5cdd2d883c6815487577
2018-09-20 13:00:04 +00:00
Nguyen Van Duc 4185336cf6 Add py36 testenv
Python 3.6 is installed by default in Ubuntu 18.04 LTS.
Therefore, according to Transition Plan [1],
it'll be handy to have py36 testenv.

For more details, please check Python2 Deprecation Timeline [2]
and Python3-first Goal - Completion Criteria [3].

[1] https://wiki.ubuntu.com/Python/Python36Transition
[2] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html
[3] https://review.openstack.org/#/c/575933/8/goals/stein/python3-first.rst@42

Change-Id: I9ef19ce60935999b386165f51a83b6be9714266e
2018-07-12 16:15:21 +07:00
Liam Young eb2f28539e Tidy/Fix Apache template
Remove old template for apache pre-2.4 and update
openstack_https_frontend.conf to match adapter parameters

Add tox targets to placate CI

Change-Id: I03acf7e3e524b2a15756a07e0a2d13ed88eaefac
2016-07-13 08:29:24 +00:00
James Page 767b6d2595 Add basic tox targets 2016-07-01 10:29:08 +01:00
Alex Kavanagh 0d8a4f07d4 Remove code from layer-openstack
The code has shifted to the charm.openstack (at the time of writing)
module that will be included in the built charm, rather than being in
the layer.  The idea is to make it easier to test/stub out openstack
charms.
2016-05-17 20:54:56 +00:00
Alex Kavanagh 20d3c49893 Add tests to the layer-openstack
Add unit tests to the adapters, charm and ip parts of the lib to ensure
that the API to the classes remains stable with no unplanned regessions
over time.
2016-05-10 09:46:58 +00:00
James Page ea9961094a Tidy lint 2016-03-10 10:30:39 +00:00
James Page c2b6c46c5e Add tox configuration for lint and testing 2015-12-04 14:23:24 +00:00