Commit Graph

58 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
OpenDev Sysadmins 14dfee04e2 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:26:10 +00:00
Ian Wienand 189af17368 Replace openstack.org git:// URLs with https://
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.

This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.

This update should result in no functional change.

For more information see the thread at

 http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html

Change-Id: I11be0b9c0e53d7730e82d845bc9d3bc2e5ff6420
2019-03-24 20:35:37 +00:00
Clark Boylan 5f7d13495c Be more forgiving about module dep versions
As time has gone on we've updated module versions in our global module
list making the pinned versions in this module inaccurate. Be more
forgiving so that we can update modules as needed without raising
warnings.

Change-Id: I77f0b9a541710236bcfed3b3c78b94d101152bc1
2019-03-07 09:01:11 -08:00
Colleen Murphy fa22ff35e3 Monkey-patch drush module for puppet 4
The puppet-drush module that the puppet-drupal module depends on has
some quirks on puppet 4. First, with the new ordering algorithm, it's
not guaranteed that the drush repo and the composer installation will
happen in the same order as before. We can fix that without touching the
drush module itself by creating resource orderings from the
drupal::drush class. Second, on puppet 3 the empty string '' was
interpreted as falsey, so you could expect `if '' {}` to evaluate as
false. On puppet 4, it's interpreted as truthy, and for the drush module
using '' as the default for the git_tag parameter causes the drush
$git_ref variable to be set to the empty string which causes the module
to stay on the master branch instead of checking out the 6.x branch.
There's no semantic difference between the git_branch and git_tag
parameter, so we'll just set git_tag to the same as git_branch.

Change-Id: I3acbda4edd546b4f145c9991f18ca80bb3e2171e
2018-07-23 11:58:39 -07: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 a7d33ab524 Update Gemfile for Zuulv3
The logic in the Gemfile was relying on Zuulv2 variables to find out
whether the spec helper gem was already available on disk, and since
Zuulv3 has changed things it was failing to find it and downloading the
master version instead. This patch ensures the Gemfile looks for the gem
in the right place when running in CI.

Change-Id: Ifa3b018bf367540dd25d732b2fb5a561df47ce46
2018-07-12 09:57:44 +02:00
Zuul 65619c9583 Merge "Fix scope of vhost template variables" 2018-06-12 22:39:23 +00:00
Zuul 26bb0c054b Merge "Fix defined type namespacing" 2018-05-01 12:20:43 +00: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
Colleen Murphy de8af9fbf2 Fix defined type namespacing
Without this patch, puppet 4 apply tests can't find the drush defined type
and fail with:

  Evaluation Error: Resource type not found: Drush at /etc/puppetlabs/code/modules/drupal/manifests/init.pp:241:38

This patch ensures the resource reference is namespaced properly.

Change-Id: Ibd1972c681085344a36c51951f32aa3e93e501c8
2018-04-26 20:30:26 +02:00
Colleen Murphy 3b835cf7ee Use versioncmp function
Puppet 4 is more strict about data types and doesn't tolerate using
arithmetic operators on strings. The operatingsystemrelease fact is a
string. Switch the arithmetic comparison to a native function that knows
how to deal with version numbers.

Change-Id: I4dd58b28ad5b4bd64ba0b6eed6e2b8c312bdb5fa
2018-04-20 22:03:57 +02:00
Colleen Murphy e4901f6217 Depend on helper gem for spec_helper_acceptance
Instead of keeping a local copy of spec_helper_acceptance.rb and
requiring updates to all modules for any change, we can move it into the
common helper gem and require it from there. This will make it easier to
create and review changes that affect all puppet modules. Also change
the Gemfile to look for the gem in the local workspace if running in a
zuul environment.

Change-Id: Iac4b8137c8a8621083ced76879e9f4fbe1ce70a0
2017-08-18 10:41:43 +02:00
Colleen Murphy 11ecf5b7ab Fix beaker on xenial
Add a xenial nodeset and update the spec helper to install puppet 3 from
the Ubuntu repos instead of from puppetlabs.

Change-Id: I0a23589cc782e5689087aea53dbe364e9faa83ad
2017-06-24 15:37:29 +02:00
Paul Belanger f95b72dd97
Add bindep.txt file
Bindep is a tool for checking the presence of binary packages needed
to use an application / library. It started life as a way to make it
easier to set up a development environment for OpenStack projects.

Change-Id: I81dc96c1338e912969ae7a99eaaa1886eb6d6412
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-01 21:06:55 -04:00
Spencer Krum 1e9d2496ce Use new infra_spec_helper for gem dependencies
Change-Id: I89d50087e93c50d0c7f82fa84abd572e9f344dac
2016-06-21 18:38:00 -07:00
Spencer Krum ce5d54d91b Pin google-api-client; sanitize Gemfile
Change-Id: I8e5cd7d2d9290209c5d0afcbf0a7ce642ff730ec
2016-04-14 15:18:11 -07:00
Jenkins 7a48402870 Merge "Refactor drush deployment" 2016-03-30 15:10:17 +00: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
Marton Kiss f453dff737 Refactor drush deployment
As the Pear Drush deployment model is deprecated now, the Drupal puppet
will use the standard puppet-drupal module for drush cli installation.

Change-Id: I9d6afacc3ca9241bf1419102be01d44409ded8da
Depends-On: I71e4356d0b6861dd648d069d5e31f002b3b0cc83
2016-03-22 11:47:18 +01:00
Andrey Nikitin aa45388477 Order of the classes parameters is refactored
Order and intendation of those parameters are changed
to follow Puppet Style Guide recommendation [0].
Moreover, it will allow to an user to find much faster
a variable in a list of variables.

[0]. https://docs.puppetlabs.com/guides/style_guide.html

Change-Id: I9cda8c74a7b69c7fd96d103b913ed51e95aa2ea8
2016-03-22 12:28:11 +03:00
Colleen Murphy 179d0f5544 Remove explicit mysql-client installation
This patch removes the explicit installation of the mysql-client package because:

 - when using the older mysql module it is unnecessary, as the
   mysql::db type requires the mysql::server class, which installs the
   mysql-server package, which installs the mysql-client package as a
   side effect. This is only true for Ubuntu, but as this module only
   works on Ubuntu currently we do not need to be concerned with how
   other operating systems behave.
 - when using a modern mysql module, the mysql::db type includes the
   mysql::client class, which installs the mysql-client package
   explicitly. This conflicts with the explicit installation in the
   drupal module.

This patch will allow the drupal module to work with an up-to-date
version of the mysql module while not causing any negative effects
while the older version is still installed.

Change-Id: Ia472dafdf60b9f1b813d4fc9a6c42f9259f1e203
2015-10-19 15:46:53 +00:00
Colleen Murphy 32eb6d3284 Fix cron setup logic
If $site_base_url and $conf are unset, catalog compilation fails
because the cron resource tries to access $conf['cron_key'] and $conf
is not a hash. If $conf is a hash but does not contain the 'cron_key'
key, a cron is created with the command

 wget -O /dev/null -q -t 1 false/cron.php?cron_key=

which is not sensible and will result in failed crons. It only makes
sense to create this cron if $site_base_url and $conf are set, so this
patch checks that they are set before creating the cron resource.

Change-Id: Ib40350e7b3c5c6261812d00a20decd8692acb4bb
2015-10-19 15:46:47 +00:00
Colleen Murphy 2b25312530 Fix mysql parameter defaults
If the user wants to create a drupal database, the username, password,
and database name must be set. This patch sets reasonable defaults for
$mysql_user and $mysql_database, and causes the catalog to fail if the
user does not provide $mysql_password, but only if
$site_create_database is set.

Change-Id: I829ebb1543d4733875dba3da5e900ae1ad6d64dc
2015-10-19 15:46:38 +00: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
Colleen Murphy c67a4231f8 Fix ssl file logic
The default values for the $ssl_*_contents parameters is undef, so
checking whether they match empty string is not sensible. Fix the
conditionals to check for the case when the user has left the value
unset.

It is reasonable to conditionally not create these certificate files
even when $site_ssl_enabled is set because the path variables may be
set to a snakeoil cert.

Change-Id: I274dbe80a0547336601c12c4e876ba9591798996
2015-10-19 15:35:00 +00:00
Colleen Murphy 9121247258 Add reasonable default for $site_name parameter
If left undefined, the drupal class will create a vhost file named
50-.conf with an empty ServerName, and httpd will fail to start. Use
$::fqdn as a default site_name instead.

This will not affect Infra as Infra specifies this value explicitly.
Any downstream users must also be specifying this value explicitly for
the module to work, so this is a safe change.

Change-Id: Ia639f05a4ba7072812a1c4d6bb3a702fce493d02
2015-10-19 08:33:12 -07:00
Colleen Murphy 2354f29bdd Remove reference to Distbuild type
The distbuild defined type doesn't exist since 9adc5fd7, so notifying
it results in a catalog compilation error.

Change-Id: I9ced1f198be5e653ee7da1837a2b93e5aad815e7
2015-10-15 10:59:24 -07:00
Spencer Krum b15dd92913 Fix target path for regular git clone during tests
Use same target directory for zuul-cloner and
the regular git command.

Change-Id: I1966b2a107188d32fb0ce1571dc8f8579f921867
Co-Authored-By: Fabien Boucher <fabien.boucher@enovance.com>
2015-08-19 16:35:01 -07:00
Jenkins 027f5a6bb7 Merge "Add Gemfile and puppet 4 checks" 2015-08-06 03:45:38 +00:00
Spencer Krum b5b5751986 Boilerplate beaker-rspec files
Change-Id: I790b55e1fc64772c6d5941b2dc35dc12f2e8d21f
2015-07-28 02:04:05 -07:00
Colleen Murphy 16af77007c Add Gemfile and puppet 4 checks
In anticipation of puppet 4, start trying to deal with puppet 4 things
that can be helpfully predicted by puppet lint plugins. This patch also
corrects lint errors caught by the puppet-lint-absolute_classname-check
and puppet-lint-empty_string-check gems as well as arrow alignment
which wasn't being caught under the system version of puppet-lint.

Change-Id: I91cb2fdeb458edbd41e777be74d292a564bf2d58
2015-07-23 12:53:03 -07:00
Paul Belanger 21b54b74b6 Migrate to puppet-httpd module
puppet-httpd is the openstack-infra version of puppetlabs-apache
(0.0.4) release.

This patchset will remove the puppetlabs-apache namespace from -infra
allowing for possible future patchsets to use newer puppetlabs-apache
modules.

Change-Id: I341295e1969b9ff1d54ac84655c1eb340b239684
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-07-16 15:48:45 -04:00
Jeremy Stanley 157d7e7c8e Replace ci.o.o links with docs.o.o/infra
The http://ci.openstack.org/ documentation site has been deprecated,
replaced by redirects to corresponding paths within
http://docs.openstack.org/infra/ where other Project Infrastructure
documentation already resides.

Change-Id: I52ca8fefdfc9bc105b1e5045f93183119235757b
2015-05-14 21:38:17 +00:00
Ramy Asselin bf22a257de Rename openstackci to openstackinfra
Change-Id: I0fd15f6b1fd36c560232314fe4f23d56d0bde269
2015-04-20 13:43:22 -07:00
Marton Kiss 95857ebcf5 Get cron key variable from conf parameter
Remove the deprecated conf_cron_key from cron resource.

Change-Id: Ie65b88786b9cbd61b1af9657052ce57c9aaa1fd1
2015-02-26 22:29:06 +01: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
Jeremy Stanley fd00174e69 Add missing LICENSE file
The content of this project is Apache 2 licensed, but we should
include a standard LICENSE file just to be clear about that.

Change-Id: Iee6320b9d7e35fbe8d3b0a9794f3e485c18ef2c8
2015-01-29 22:56:52 +00:00
Marton Kiss 7e398c8386 Add standard puppet module files and .gitreview
This module has been split out from system-config, and additional
files are required to create a proper puppet module.

Some of the files are described in the spec:
http://specs.openstack.org/openstack-infra/infra-specs/specs/puppet-modules.html

Change-Id: I55ac7e940318f146678ebe321465e2cb9ada75c5
2015-01-28 20:04:03 +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 6c5367cdbc Update drush dsd-tool of groups portal
The v0.10 version contains an important file permission fix.
Upgrading the site into slot1 not properly set the file permissions
of the symlinked vhost directory and apache failed to serve the
entire site. This issue affected every 2nd deployments and resulted
in a WSOD.

Change-Id: Iaab38356b98e09a0738547e7984bffe9b428398d
2014-10-28 15: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
Jeremy Stanley 1089578218 Silence drupal cron job
* modules/drupal/manifests/init.pp: Since the cron URL can return
content, write it to the bitbucket so that we don't annoy sysadmins
with cronspam every five minutes.

Change-Id: I9df9510eb14e89c380dadba98cd4834a6a83fffc
2014-07-31 15:20:01 +00:00
Jenkins bb6ea2c0fa Merge "Fix groups-dev portal update sync issue" 2014-06-26 19:03:59 +00:00
Marton Kiss 605407744f Fix groups-dev portal update sync issue
Groups-dev portal failed to download the release updates from
tarball.openstack.org/groups site, meanwhile the drush dsd-status tool
reported an update available status. This patch resolves this issue
and site-deploy and site-update executed when the .md5 file downloaded
from tarball site updated. The wget --timestamping options is used
to download the .md5 file in case of remote update only.

Change-Id: Iab237567e45864835274c01c8e93363c7ea8b620
Closes-Bug: #1334707
2014-06-26 16:55:46 +02:00
Marton Kiss 2d7cd545e5 Fix settings.php permission ownership
Update the upstream version of drush dsd tool used to update
Drupal siteroot to v0.8 that fixes settings.php ownership
problem during a drush dsd-update process.

Change-Id: I3c88320905e9a65a9335d7cd78ab46bf8649e5ad
Closes-Bug: #1334625
2014-06-26 15:29:23 +02:00