Commit Graph

30 Commits

Author SHA1 Message Date
Takashi Kajinami 3021cd9daf replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in
v9.0.0 from puppetlabs-stdlib.

Depends-on: https://review.opendev.org/c/openstack/puppet-openstacklib/+/885996
Change-Id: I144468b4f5536a48702e457f2a5db879f3ca217a
2023-06-23 09:26:59 +09:00
Takashi Kajinami da45ce8a21 Replace legacy facts and use fact hash
... because the latest lint no longer allows usage of legacy facts and
top scope fact.

Change-Id: Ib395d70d0d528adfef6600f67f9cd6bb238f8206
2023-03-02 11:31:36 +09:00
Takashi Kajinami 15c5b7148c CentOS: Remove workaround for missing selinux rule
This removes the workaround to add missing selinux rule. The bug in
openstack-sexlinux[1] was already fixed and we no longer need to
add the rule additionally.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1396553

Change-Id: I979d2c30fb0a0c7f456dff6376bf91ef141e86a2
2023-02-05 00:54:53 +09:00
Takashi Kajinami 3a8ae230cc Use standard parameter description format for wsgi::apache
Currently parameter description of the <module>::wsgi::apache classes
are formatted differently in individual modules, and this is making
the maintenance effort quite difficult.

This change updates the description format following the standard one
we are globally using in our modules to reduce undesired differences
between modules.

Change-Id: Icec870fce75185f2ca902c565dd94c467b9f6638
2022-08-29 15:11:28 +00:00
Takashi Kajinami bd92c63d41 Add Apache WSGI logging parameters for pipe/syslog
Add parameters for advanced logging configurations in Apache to
support piped logging and support for syslog (via mod_syslog
available in Apache >= 2.5.0)

Co-Authored-By: Andy Botting <andy@andybotting.com>
Change-Id: Idb3d73309588a7436cd2e067121119c5878eee18
2022-08-26 16:49:56 +09:00
Takashi Kajinami 1516806fc5 Adapt to new type validation in puppetlabs-apache
The puppetlabs-apache module is enforcing more strict data type
validation[1].

This change updates the default values to adapt to that change.

[1] f41251e336

Closes-Bug: #1983300
Depends-on: https://review.opendev.org/851652
Change-Id: I2df44be85cb73144ce45b8f5bea2ccba64d0be86
2022-08-02 16:54:29 +09:00
Zuul 73c888a69b Merge "Expose headers option of apache::vhost" 2022-07-30 17:38:13 +00:00
Takashi Kajinami 51cfa30945 Expose headers option of apache::vhost
The headers option in apache::vhost is required in some case, for
example when adding the X-XSS-Protection header. This change allows
customizing the option for the api vhost.

Change-Id: I2c527b5511db04f9daa7f605b565a567599b5431
2022-07-30 23:06:04 +09:00
Rajesh Tailor 82809e9095 Fix typos in parameter descriptions and tests
Change-Id: I4b368e030e207beabb1d69b9c5079d34aa494856
2022-06-27 16:11:37 +05:30
Takashi Kajinami 0585656937 apache+mod_wsgi: Disable SSL by default
During the previous cycle, a warning message was added to inform users
of this change.

Now the default value is updated so that SSL is disabled by default.

Change-Id: I6bd11a340b8623b45da7284e52ee505ea6870562
2022-05-06 20:46:39 +09:00
Takashi Kajinami e5cc108c00 Avoid hard-coding OS user/group in each manifest
and replace hard-codes by definition in params.pp .

Change-Id: I4fc49eab447ef2b7e4f0d6cbd75f193cff7719b9
2022-02-20 19:39:47 +09:00
Zuul 0961b98387 Merge "Fix dependency to purge default vhost config" 2022-01-12 17:50:03 +00:00
Takashi Kajinami fdaced52dc Fix dependency to purge default vhost config
It turned out defining dependency for openstacklib::wsgi::apache
doesn't properly enforce resource order and the default vhost file
is not purged properly.
This change adds the more explicit dependency to enforce the order
properly.

Change-Id: I3f8346d8df6c60b36e2abe281e87163b1e2837e6
2022-01-11 18:43:42 +09:00
Takashi Kajinami 213b30a43f Remove usage of custom os_package_type fact
Currently we support usage of distro packages only, and this custom
fact can be simply replaced by the default fact.

Change-Id: I11bac6405b94e6616e45dd511b842a4ad358148a
2022-01-05 22:32:32 +09:00
Takashi Kajinami 43105f3130 Clean up direct dependencies on puppetlabs-apache
This change removes direct reference to some classes in
puppetlabs-apache. Details are explained below.

- The api class doesn't need access to anything defined in
  apache::params

- The following classes are included by the openstacklib::wsgi::apache
  resource type, and current inclusions are just redundant.

Change-Id: I88684f7f246b226844dc724a35d1cec95742704e
2021-12-09 10:21:14 +09:00
Takashi Kajinami a06217b838 Use native support to define RequestHeader statement
... instead of injecting it by vhost_custom_fragment.

Depends-on: https://review.opendev.org/821082
Change-Id: I684e077d03b318cef01688c1b11ea37d7fc2f664
2021-12-09 00:24:40 +09:00
Takashi Kajinami 603f545cbc Prepare to update default of <service>::wsgi::apache::ssl
Currently the <service>::wsgi::apache::ssl parameters have inconsistent
default values. Some parameters default to true while the other default
to false.

Based on the following points, false is considered to be the more
reasonable default.
 - Usage of SSL is optional and is not always required
 - There are other methods(like load-balancer) to implement SSL
   termination
 - Enabling SSL doesn't work with the default values currently
   defined, and requires additional parameters like ssl_cert.
 - false is the default value defined in the base implementation in
   puppet-openstacklib.

This change is the preparation to change the default value, and
introduces a warning message to make users aware of the future change.

Change-Id: I76516e3d0c659fabdb7736ff4a5a6621eed29371
2021-11-03 20:52:09 +09:00
Thomas Goirand 274e458478 Add support for heat_api_{cfn_,}uwsgi_config in Debian
This patch is adding the configuration of the number of workers,
threads, and the size of the listen queue in Debian, which uses
uwsgi to run Heat API and api-metadata. Therefore, this patch adds
two new heat_api_uwsgi_config and heat_api_cfn_uwsgi_config
providers as well as two new heat::wsgi::uwsgi_api and
heat::wsgi::uwsgi_api_cfn classes.

Change-Id: I0e226046f6e2d69c89681948cee8e8830c186489
2021-04-10 22:44:24 +02:00
Luke Short 0e85f1c7b0 Expose vhost_custom_fragment
It is provided by the Puppet class 'openstacklib::wsgi::apache'.
This change exposes it for the Heat CFN service.

Change-Id: If689eb5e896dba443358ac83cd7f566aacc276f1
Signed-off-by: Luke Short <ekultails@gmail.com>
2020-08-18 13:53:38 -04:00
Emilien Macchi 9fce8d211e Add vhost_custom_fragment option to wsgi/apache_api
Change-Id: I7da55899b9108daced7adb8f82bdb58fcf97aa09
2020-01-23 10:44:53 -05:00
Tobias Urdin 5f6411c3dd Convert all class usage to relative names
Change-Id: I9982b8476ca9dab8a338b66db75d6da6519f9266
2019-12-08 23:07:36 +01:00
Tobias Urdin e46b67d242 Use validate_legacy
This changes all the puppet 3 validate_* functions
to use the validate_legacy function.

The validate_legacy function has been available since
about three years but require Puppet >= 4.4.0 and since
there is Puppet 4.10.12 as latest we should assume people
are running a fairly new Puppet 4 version.

This is the first step to then remove all validate function
calls and use proper types for parameter as described in spec [1].

[1] https://review.openstack.org/#/c/568929/

Change-Id: I422be4bfb6fd6f73f0b24ae9464c5c85689594e1
2019-02-23 14:52:57 +01:00
rabi a17104c6ad Remove support for heat-api-cloudwatch service
In 6d55417f80384ead56e176beec9e2fc4eb162d61 cloudwatch api
has been removed from heat.

Change-Id: I155c92edd5d6959ac23d99804fd95dfb99c7042e
2018-02-06 09:51:36 +05:30
ZhongShengping 8befe4fb09 Add customization for wsgi process display name
Change-Id: I952b51508d5ec6ad6d0aab7e19df14f4dcd96ba3
Closes-Bug: #1626550
2017-11-01 15:54:54 +08:00
Juan Antonio Osorio Robles 248de177dd Expose allowing setting log files for apache vhost
Being able to set the log files for the apache vhost was done in a
recent commit [1]. However, that commit missed exposing the
configuration in the service-specific manifests. This adds that.

[1] Ic2ffef73f6a12d6225f87d285003c3deb7541126

Change-Id: Iae6a86cb93305cb3307e058cfd31e0fca3b1be8e
2017-10-30 07:33:38 +02:00
Juan Antonio Osorio Robles 7a137e2355 apache wsgi: Exchange defaults for workers and threads
Due to Python's GIL [1], we can't use multiple threads for running
OpenStack services without a performance penalty, since the execution
ends up serialized, which defeats the purpose.

Instead, we should use several processes, since this approach doesn't
have this limitation.

[1] https://wiki.python.org/moin/GlobalInterpreterLock

Change-Id: I116df85f259528d547a958850b9c3793d01e2a45
2017-10-13 08:49:12 +03:00
Juan Antonio Osorio Robles 781c75cebc Allow setting log files for apache vhost
This allows the setting of the error and access file logs, as well as
the access log format. This was done in a similar fashion as one can
configure these ones in the keystone wsgi manifest.

Change-Id: Ic2ffef73f6a12d6225f87d285003c3deb7541126
2017-10-06 14:23:53 +03:00
Benedikt Trefzer 10a7db8463 add parameter to overwrite/add wsgi process options
Add parameter to apache_wsgi to allow overwrite and/or
add additional wsgi process options.

This possibility was added to openstacklib
with Change-Id: I41914ce3361988d5db1695f09d21209772fdf548

Change-Id: I3df74ddc4a258083ccfe4e47180f022742655ba6
2017-09-04 18:38:40 +02:00
Thomas Herve f24b39c73a Enforce content type in CFN WSGI
This works around a bug in the config tools, not sending a type
properly.

Change-Id: I79b7b19d8c1af6cc34875fc05800dc9da5ac7cad
Related-Bug: #1641589
2017-03-04 15:39:39 +01:00
Juan Antonio Osorio Robles fe394add6f Add manifests to deploy APIs over httpd
This includes a resource that will generically create the vhost for
the specified API.

Co-Authored-By: Thomas Herve <therve@redhat.com>
Depends-On: I9a9246522810de546a7c460ab1133d6bf9081a15
Change-Id: I253f46f5ad943971dd9ea6995591c72a36953bdb
2017-03-02 14:15:18 +02:00