22 Commits

Author SHA1 Message Date
Takashi Kajinami
f6ab996e63 Replace legacy facts and use fact hash
... because the latest lint no longer allows usage of legacy facts and
top scope fact.

Change-Id: Ib4f33d08f9415b4a8533ec6b9b0e6d7637f4e289
2023-03-02 12:46:14 +09:00
Takashi Kajinami
9667d6a166 Remove deprecated watcher::api::watcher_clients_*
... because these were deprecated during Yoga cycle[1][2][3].

[1] c507b55112d09c80f1598a28fee40c522ff26a14
[2] 3fe4b7d3a0ae0c7f76471a5c230b71caa7f242ef
[3] 16bcc44238bd018c527c87c4cd0542f5cadc5774

Change-Id: If96c5ac9016f799977218b24d9103e8efab093b7
2022-09-04 19:05:19 +09:00
Takashi Kajinami
0f8a4befef Stop hard-coding default of [api] port
... because the current hard-coded value is same as the default value
in Watcher itself.

Change-Id: I62ba8903caa91f11b265142bee12b2046d3cccf0
2022-08-15 02:19:27 +09:00
Takashi Kajinami
388e3a2dfb Stop listening at 0.0.0.0 by default
Usage of 0.0.0.0 exposes API endpoint to all networks and can cause
unexpected leakage. This change updates the default to use more
restricted address (127.0.0.1, which is the default defined in Watcher
itself) unless the address is given by a user explicitly.

Change-Id: Ibc895cf2b06d3b0c1b2073d8d6aa90d7d6f299d2
2022-08-15 02:19:13 +09:00
Takashi Kajinami
16bcc44238 Create a separate class for watcher_clients_auth parameters
This change introduces a separate class for watcher_clients_auth
parameters, which are currently managed by watcher::api, so that
we follow the best practise to create a class per config section.

Change-Id: I5fb1bb6ceca65c53c6d513db6683dc11f9b42635
2022-03-04 15:49:21 +09:00
Takashi Kajinami
c507b55112 Deprecate management of [watcher_clients_auth] auth_uri
... becaushe the auth_uri parameter is ineffective and has never been
implemented in keystoneauth.

Change-Id: Ib2fce8b7ec03b5d2a42a5ab68bcd5734f908677e
2022-03-04 10:59:18 +09:00
Takashi Kajinami
2a689b750a Refactor management of [api] parameters
Currently when api service is disabled, puppet-watcher doesn't manage
any parameters in the [api] section. However this behavior is not
required since these parameters are just unused, might leave unmanaged
parameters it once configures, and is just redundant.

This change makes the [api] parameters always managed by puppet.

Also, redundant parameter names, prefixed by 'watcher_api_`` are
renamed because it's very clear the parameters in the ``watcher::api``
class is basically for [api] stuff.

Change-Id: I37362094b2d4b13368658ef3e0b0b0b4be415af2
2022-02-10 22:41:37 +09:00
Takashi Kajinami
536c44f8cf Do not define service resource when service management is disabled
Change-Id: I30d752928e2f76efbb711cff21a85e64f09f1215
2022-02-10 22:41:33 +09:00
Tobias Urdin
5f2875f245 Convert all class usage to relative names
Change-Id: Ie5227ac581af00f445f71b2aaa05e6d1d8363324
2019-12-08 23:25:42 +01:00
ZhongShengping
5dea6e9b2a Change watcher_client_project_name default value to services
The default project in keystone is named services. In order to keep
it consistent, the default value of project_name is changed to services.

Change-Id: I615989da04d074eb948451ef8d1271f3575bd71c
2019-03-15 09:25:33 +08:00
faf3360660 Add watcher_clients_auth user_domain_name config
This parameter is required to communicate to keystone
v3.

Change-Id: Ia63846b7df96b2c063ca40dd1f56129530ec39d7
2019-03-13 14:32:00 +05:30
qiaomin
60982ee75f Replace port 35357 with 5000
Now that the v2.0 API has been removed, we don't have a reason to
include deployment instructions for two separate applications on
different ports.

Change-Id: Ic1d30e49dc878f997c4d8e0eb228b2e80da578c0
2018-05-13 00:55:35 +08:00
ZhongShengping
9d2a0fb198 Add WSGI support for `watcher-api'
Adds support to run watcher-api with mod-wsgi[0].

[0]https://review.openstack.org/#/c/450740/

Change-Id: Ie6bbde98bee19ccc4a938bba28b66b759ccd3307
Implements: blueprint wsgi-support
2017-08-15 13:56:44 +08:00
ZhongShengping
8aee1f413f Fix hooks for external install & svc management
1) Add deps to all that is needed.
2) Fix hooks for external install & svc management.
3) Update releated spec tests.

Change-Id: Id3e0594631579c316c721dd53b0579808571ee95
2016-12-02 12:19:45 +08:00
Daniel Pawlik
7a50b81581 Added new parameters only for watcher sections.
Change-Id: I74b4a184909c35881eaac021e2bc82efdaf2e2f1
2016-11-09 12:30:52 +00:00
Alex Schultz
b9651a0639 Added ability to configure workers for watcher api
By default it will use the ::os_workers fact. ::os_workers
is based on the number of processors (currently cpu/4) but is
capped at a maximum of 8 worker processors.

Change-Id: I415794daa6305d675b9341165a3722d2c0760560
2016-10-14 11:12:14 -06:00
Daniel Pawlik
531be965cb Change authtoken to class
Authtoken will be configure by a new class
instead of api class.

Change-Id: I95c8875a213057f687017779cb236ececbe6ebc1
2016-09-04 19:39:38 +00:00
Daniel Pawlik
72e2a491e6 Changed api service requirements
Watcher-api doesn't need watcher::db class in service requirements,
because it is handled by deps class.

Change-Id: I61168aa307c3e751d78c979104e38e2cf72e48d2
2016-07-13 19:44:43 +00:00
Daniel Pawlik
c5ddc31f46 Implement watcher-db-manage commands
Added DB commands: upgrade and create_schema.
Removed sync command.


Change-Id: I1c4e2c36ba675cfbbbde3b038067f73c98c150ff
2016-07-11 19:24:28 +00:00
Alex Schultz
b30e232f12 Fix authtoken options and adding the missing
This change updates the api class to pass the keystone_authtoken options
to the keystone::resource::authtoken now that those options are properly
supported.
Watcher configuration sample file doesn't include all of
keystonemiddleware parameters, but the parameters can be configured in
watcher config file.[1]

[1] - http://docs.openstack.org/developer/watcher/deploy/conf-files.html

Co-Authored-By: Daniel Pawlik <daniel.pawlik@corp.ovh.com>

Change-Id: I31f3b254b3c36fb30cf968195ee3e0520490a04f
2016-07-09 06:42:12 +00:00
Daniel Pawlik
b7d6b9947d Added watcher package ensure
Watcher package is available now for RedHat and Debian (experimental
repo).

Note: Watcher package is not available in Ubuntu repository.

Change-Id: Id805f0d3494a858ef43cb2ba396824592847d689
2016-07-01 08:17:17 +00:00
Daniel Pawlik
1dc80b3f2c Implement api.pp
Unit tests fixed.

Change-Id: I422a1f591f9d09b3db3fbb6f85fc38e6ef6eef17
2016-06-16 14:24:55 +00:00