Commit Graph

15 Commits

Author SHA1 Message Date
Andreas Jaeger 44ab5c9a1b Retire repo
Depends-On: https://review.opendev.org/731947
Change-Id: I47e59c5adc4bb2998d786a671282a989db754eb6
2020-06-05 16:20:51 +02:00
Colleen Murphy 5870b57528 Fix template variable
Since the chain file contents parameter defaults to undef, on puppet 3
the ERB template evaluates that to the symbol :undef which is not
falsey, so if it is left unset it creates an invalid apache config
pointing to /etc/apache2/undef. To be safe, explicitly check for any
emptyish values. This is only an issue for tests on puppet 3, on puppet
4 undef is correctly evaluated as nil.

Change-Id: I380d69f3928e342562c3c63e35a07555163733e8
2018-07-23 11:58:39 -07:00
Colleen Murphy 3f34fa54c6 Fix template variables
When serveraliases is not defined it should evaluate to nil, not ''.
Check for both to cover our bases.

Change-Id: Iad51146400443fce963889d77eae3c6e4759d08c
2018-07-23 11:58:39 -07:00
Colleen Murphy 1de34a782d Fix scope of vhost template variables
Dynamic scoping for variables in ERB templates was removed in puppet
4[1] which means that the variables defined in the
manifest cannot be found when it is referenced in
the httpd::vhost defined type and will be evaluated as nil when
puppet runs. Use scope.lookupvar instead to be explicit about the
variable's source.

[1] https://puppet.com/docs/puppet/4.10/lang_updating_manifests.html#dynamic-scoping-in-erb

Change-Id: Ifc1db7851d2a0cd39af9f05b55ec9a546a12f567
2018-04-27 22:44:03 +02:00
Marton Kiss 4086fbe21c Support Apache 2.4
Apache version 2.4 changes the Order Allow,Deny security configuration options.
This patch modifies the vhost template in order to support it and provide
trusty compatibility.

Change-Id: I1514ab788f8bfd9198ae020ea1fab745cee6f305
2016-03-29 15:22:02 +02:00
Colleen Murphy 601a5cf31f Fix $site_root and $site_docroot parameters
The $site_root parameter must be set in order for the file resource
ensuring it to work. However, the best default for it depends on the
$site_name and $site_vhosts_root parameter. Class parameter defaults
behave strangely if they depend on another class parameter: they take
on the value of whatever the user has set, not the default value. So if
we want the default value of $site_root to be
"${site_vhosts_root}/${site_name}", and we want it to be acceptable to
use the default value of 'www.example.com' as the site name, then we
have to set the default in the body of the class, not in the parameters
list. The same is true for the $site_docroot parameter.

This patch leaves the official default of $site_root as undef but
conditionally sets a preferred default of "${site_vhosts_root}/${site_name}" in
the body of the class. Since variables in puppet are immutable we need
to assign this value to a new variable and fix the references to this
variable throughout hte module.

This patch changes the official default of $site_docroot from
"${site_root}/w" to undef, because that default would have different
behavior depending on whether the user had set $site_root or not. We
then conditionally set it to the right default in the body of the class
and update references to that variable. Also changed the Directory key
for the docroot in the vhost template to refer to the $docroot
parameter passed in to the httpd::vhost type rather than the
$_site_docroot value from the class, which evaluates to the same value
but makes the Directory tag consistent with the Docroot declaration
above it.

Change-Id: Iaed65b20816c0b4f6fd34f7e0ef07f906bb9750e
2015-10-19 08:45:22 -07:00
Marton Kiss 0d8c23c4f7 Decouple configuration variables from settings.php
The conf_xxxx class paramters of drupal class refactored now
to conf variable that can hold the key-value pairs. So it
will allow the define additional parameters without any change
required in the drupal:: class.

The conf_xxx parameters kept only for compatibility reason, will be
removed in a future release.

Change-Id: I9e77d609bc6aaa3a5e10f065e79aa8a86cae151e
2015-02-04 21:33:47 +01:00
Clark Boylan 2b6f5cf2f6 Fix the setting of the chain file in drupal vhost
We were testing if the chain file contents var was not equal to empty
string ('') before setting the chain file path in the vhost.
Unfortunately this variable was unset so has a value of nil in the erb
file. This meant that the condition matched even though we didn't want
it to and we got a broken vhost file.

Fix this by explicitly setting this var's value to undef by default in
puppet. This results in a nil value erb side which we can test against
more simply.

Change-Id: I8016b7ab20843a6e35002bed1a79867480ddbd08
2014-11-26 12:20:47 -08:00
Marton Kiss a576be4197 Enable SSL in groups-dev.openstack.org
Extend the Drupal vhost template with ssl capability, and
groups-dev.openstack.org now accepts the following hiera variables for
ssl setup:
- groups_dev_site_ssl_cert_file_contents: x509 certificate of vhost in pem format
- groups_dev_site_ssl_key_file_contents: rsa key of x509 certificate in pem format
- groups_dev_site_ssl_chain_file_contents: trusted chain of parent certificates (optional)

This patch is required for proper openstackid/oauth2 backref communication.

Change-Id: Ia148d1db743fc80bcb675c9ca2906333ef62eff8
Implements: blueprint groups-oauth2-authentication
2014-11-25 18:32:26 +01:00
Marton Kiss e3f6a0534e Add groups portal openid url
Move the openid provider url into groups_openid_provider configuration
variable for groups portal. We are separating the productive and
staging urls, so productive is pointing to openstackid.org now.

Change-Id: Ifc7d5d41b80c3a080800d1d9d1ef394490d93b14
2014-10-29 09:32:43 +01:00
Marton Kiss e0c1fda74e Upgrade groups portal instances to use manifest based deployment
Both staging and productive groups instances will use the manifest
published at tarballs.openstack.org/groups/drupal-updates catalog.
It helps to separate the staging and prod deployment source
versions, passed in package_branch parameter. Drush dsd tool updated
to v0.9, and puppet sitedeploy and siteupdate resources were also
refactored to support drush-dl package provider parameters.

Change-Id: I8299c063ea774a85554c2406c6cb6ccb007fb182
2014-10-20 15:16:37 +02:00
Marton Kiss a25968d42e Groups portal Google Analytics code
Add optional GA tracking code variable to settings.php template and add
tracking code to groups.openstack.org site.

Change-Id: Iddf223cab9ef672178f4e2984cdacf27a8d0f16f
2014-08-06 11:26:44 +02:00
Marton Kiss 9adc5fd79b Groups portal infra code refactor
This patch removes the drush make site building function from
groups-dev instance, and now directly fetch release tarballs from
http://tarballs.openstack.org/groups repository. With an advanced
multi-slot deployment architecture it prevents the typical Drupal
WSOD issues that randomly caused site malfunction when a request
arrived during installation. It also simplifies the
deployment steps using the standard drush aliases and
drush-dsd extension and supports local configuration variables
in local_settings.php file.

Change-Id: I73976a60e080d15b6f513db79fee46bcf468e302
2014-06-11 23:12:12 +02:00
William Van Hevelingen 678a4c1dea Fix @var deprecation warnings in drupal templates
Change-Id: I603d54bc6fb002f634c2da77465ad6569c08ce0a
2014-03-23 10:13:56 -07:00
Marton Kiss 4b4ee8f272 Add groups-dev.openstack.org node
Add a groups-dev node to openstack infra, based on drupal
environment. This node checks out the repository:
https://git.openstack.org/openstack-infra/groups

Build a new deployment from scratch, including drush make
distbuild and drush si auto-installation features.

Change-Id: I71eef1c14724ceb13a896ff768923148dedcc2ef
2013-09-17 11:43:00 +02:00