31 Commits

Author SHA1 Message Date
Jeremy Stanley
a7956cd41d Switch from PHP5 to default PHP (PHP7 on Xenial)
In working out upgrading our Mediawiki deployment to Ubuntu 16.04
LTS (Xenial Xerus), it became apparent that libapache2-mod-php5 is
not available there because the distro has moved on to
libapache2-mod-php7.0 instead. By using the libapache2-mod-php
virtual package name instead, we can support both and also future
version bumps as well.

Change-Id: I5d1a5e51beb09a1cb26b1de6dba1b7d05781ee03
2019-03-14 22:09:53 +00:00
Jeremy Stanley
dc007b3473 Optionally alias to a favicon.ico file if provided
Make it possible for calling manifests to pass in the path to a
static favicon.ico shortcut icon file on the filesystem, and if
there is one then alias /favicon.ico to it in the Apache vhost
configuration.

Change-Id: Iba36d169335b2b8ee278f3f4500893a1641e4b28
2017-02-28 23:03:16 +00:00
Jeremy Stanley
d79c672d41 Support disallowing robots
Add a disallow_robots parameter which can be used to disallow
indexing of all site content by robots. This is particularly useful
for test deployments where you don't want extra (often stale) copies
of your content to show up in search engines.

Change-Id: Ic62a72555315bd344db338809920a3605f17c8c6
2016-09-07 20:45:25 +00:00
Jeremy Stanley
ea9b6df992 Clean up OpenStack references and genericize
To make this module more downstream-friendly, abstract out any
references to OpenStack and turn them into classvars.

Change-Id: Ie005d5629623a14f4ebd8aef21294f222249232f
2016-08-24 18:18:20 +00:00
Jeremy Stanley
0af7e6addd Clean up old recaptcha parameters
Now that the openstack_project::wiki class no longer sets the old,
unused recaptcha parameters, remove them from the module.

Change-Id: I468b4936582701cf308be269bfc06801276efd18
Depends-On: I9f9ba63399a8885e3694cef37ec987f223ff6dca
2016-08-23 18:23:26 +00:00
Jeremy Stanley
28767a5486 Switch from old recaptcha to recaptcha-nocaptcha
The newer recaptcha-nocaptcha implementation is a little better at
thwarting script-driven spammers and vandals, so switch to it. Leave
the parameter names for the old recaptcha implementation in place
until our consumer in the openstack_project::wiki class no longer
attempts to set it.

Change-Id: I435484cd65a028d774dfd920ca19f3077d4e03fb
2016-08-23 18:23:26 +00:00
Jeremy Stanley
e91131f664 Parameterize database connection settings
So that we can have non-local (e.g., Trove based) databases, and for
general downstream flexibility, allow the database server hostname,
database name and database username to be passed into this module by
the caller.

Change-Id: I26a03e2ce9a6bf8bcd6acbad9e8eaaa98e0f26ab
2016-08-23 18:23:21 +00:00
Jeremy Stanley
4cbe39375c Standardize HTTPS and vhost configuration
Adjust the SSL/TLS X.509 file handling to match our flexible
standard, which allows the deployer to choose between managing the
contents in or outside Puppet while still providing for a sane
snakeoil fallback to ease testing and development. Also tune the SSL
configuration to our typical stricter defaults, unconditionally
redirect all HTTP requests to HTTPS, and reformat the vhost
configuration for consistency and ease of future maintenance.

Change-Id: Id5241377665845f8c453cbb833bc40d3a5915d76
2016-08-22 23:21:51 +00:00
Jeremy Stanley
670312c04a Drop Ubuntu Precise compatibility
Since we've already manually upgraded production to Ubuntu Trusty,
let's start with a clean slate for now and just target latest
Mediawiki on a fresh Trusty deployment. This simplifies or removes
some of the conditional logic in this module.

Change-Id: Ia8e74c85667719178c2f50b1458a9719582e8502
2016-08-20 00:36:23 +00:00
Alex Monk
bde91940c6 Puppetise extension repositories
Most of this list is based on the require/include lines in the
Settings.php.erb template.

Change-Id: Ic4f0a6b810aef1b121fb595fb9f9b67a9e5af485
2016-08-10 18:45:13 +01:00
Alex Monk
db94513b69 Puppetise LocalSettings.php -> ../Settings.php symlink
Change-Id: Ida5d01f7bc33e122f69bf8d9a2e6f8b45ace695a
2016-08-10 18:44:49 +01:00
Jeremy Stanley
f821afdf7d Clean up unused questy captcha variable
Once the dependency for this merges to system-config, remove the
unused wg_captchaquestions variable.

Change-Id: If3ac86edc27bda317fe3a29f984dc9a2acd79e31
Depends-On: I0f184c9bfa2bdaaca2478500d8f3b418c9bf77ae
2016-07-15 17:29:12 +00:00
JP Maxwell
d1f42c7518 Setup ReCaptcha in Wiki to Prevent Spam
Modified settings file to remove questy captcha and add recaptcha.
Setup two new variables to hold public and private recaptcha keys
wg_recaptchapublickey and wg_recaptchaprivatekey.

Change-Id: Idfa2c01fb9d31f06643d6c82438c33db1ff33009
2016-07-15 12:12:23 -05:00
Andrey Nikitin
a52a06b1af 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: Ifdd5e7de4b4dc9fbd30535720d5674c211985913
2016-03-21 13:19:16 +03:00
Paul Belanger
ffe475ba99 Allow user to pass a hash of captcha questions
Change-Id: I102ff6991831901c578dab4107b0c23245da9d4b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-02-24 23:56:54 +00:00
Paul Belanger
bd415b1503 Create mediawiki configuration
These settings are currently running on wiki.o.o, all we are doing is
adding them into puppet.

Change-Id: I1ad6da353c25aed8976806f00cc39d6c3c93e7ae
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-02-24 12:28:15 -05:00
Colleen Murphy
0e00b2e644 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. Also fix lint
errors caught by the puppet-lint-absolute_classname-check gem.

Change-Id: I362a59e1bb7fd57baf4714c6155db530eef652ea
2015-08-04 15:53:03 -07:00
Colleen Murphy
670beecdef Fix parameter defaults
This patch aims to avoid defaulting parameters to the empty string and
to provide more reasonable default values where possible.

We set the default of $mediawiki::role to 'all' since that is what
Infra uses and is the most reasonable default between 'all', 'app', and
'image-scaler'.

We set the default of $mediawiki::site_hostname to $::fqdn instead of
empty string.

We set the default path of $mediawiki::mediawiki_location and
mediawiki::mediawiki_images_location to have base paths of
/srv/mediawiki since '/srv/mediawiki/w' is the hard-coded directory
path for the mediawiki repo.

We change the $mediawiki::ssl_cert_file and $mediawiki::ssl_key_file to
use the default snakeoil files so that a new user can easily set this
up without having to generate certs. This follows the pattern set by
the puppet-askbot and other modules.

We change the default values of the rest of the parameters from empty
string to undef and fix the logic involving those values.

Change-Id: Ic5271a952659896c75137b546c4b315c53c7511c
2015-08-04 15:52:54 -07:00
Colleen Murphy
3bd7b5030c Make sure mods are in place before starting httpd
If the httpd server is started after the vhosts are in place but before
the mods are enabled, it will fail because of the mod_rewrite
directives. This patch ensures the mods are enabled first.

Change-Id: I6c7f0dfaf1507382d281615e102eaaf247504bb0
2015-08-04 15:52:24 -07:00
Paul Belanger
aa6920461a 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: I2f7206bf1b222643a9c1144c821f3d16a84e75d1
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-07-21 10:11:43 -04:00
Marton Kiss
28709a561b 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. Fix puppet
lint compliance.

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

Change-Id: I92480816910b312de8b05e740147b2e5d627a018
2015-01-29 09:16:10 +01:00
James E. Blair
5a5a2553be Drop apache::dev in wiki
The version in puppetlabs-apache 0.0.4 is not puppet3 compat.

Change-Id: I1ad9053fa9da374f57767079138b0c0063052795
2014-09-12 14:15:16 -07:00
K Jonathan Harker
3532a0fd5e Revert "Revert "Downgrade puppetlabs-apache to version 0.0.4.""
This reverts commit 3afc75132aa3a7d3cae911ae5e7166383b9ee4ba.

The new apache module has started managing /etc/httpd/conf/httpd.conf
with a template that has some significant differences than our template
in the cgit module.

Change-Id: I99795d35596f35dfc34e89891155dd2b83e465fe
2014-07-01 17:38:58 -07:00
K Jonathan Harker
225759f8a1 Revert "Downgrade puppetlabs-apache to version 0.0.4."
This reverts commit 7b9ea298cf4ae941af74381925b17a4b29337eb9.

Upgrading puppetlabs-apache to version 0.4.0 will give us important
variables in apache::params (specifically $conf_dir and $vdir) which
will allow us to modify the cgit module to run on both Debuntu and RHEL
systems -- which is useful because test.sh should be testing all modules
on both systems.

Of the two issues that 7b9ea298 addresses, I believe that our Oneiric
hosts have all gone the way of the dinosaur and we can work around the
docroot check by replacing 'MEANINGLESS ARGUMENT' with
'/tmp/meaningless_docroot'.

Conflicts:
	install_modules.sh

Change-Id: I7c08f85db6810ab28fa044f1923833359271e8ec
2014-06-27 15:29:03 -07:00
Ryan Lane
d9f6324b88 Add dependencies for lua and openid for mediawiki
We have OpenID and Scribunto installed, but their deps aren't
puppetized.

Change-Id: Iff3209ce0fd5bf811bd3b931e4a83518448e43c0
Reviewed-on: https://review.openstack.org/27862
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-05-01 17:49:12 +00:00
Ryan Lane
52e19f5476 Set image location explicitly
It's ideal for the image location in mediawiki to be outside of
its path. This allows you to have multiple copies of the software
while having the uploads in a shared spot.

Change-Id: Iae0ac3e13213353d6f101c62f5e150cf844b5694
Reviewed-on: https://review.openstack.org/17575
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2013-01-14 12:48:37 +00:00
James E. Blair
785018cf96 Add ssl cert to wiki.o.o.
Change-Id: I6c6ad0ddd000e3f140cb08faef7dce2cb9ae7079
Reviewed-on: https://review.openstack.org/18349
Reviewed-by: Ryan Lane
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2012-12-18 23:00:55 +00:00
Matthew Wagoner
89855752e4 Cleanup mediawiki manifest lint parameter errors.
This patch aims to alleviate the 'parameterised class parameter without a default value' error that occurs in init.pp

Change-Id: Ie13e49612966c122f0253f8a6e75cde53e265754
Reviewed-on: https://review.openstack.org/15779
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2012-11-16 18:04:04 +00:00
Paul Belanger
6f3703d296 Address puppet-lint warnings for mediawiki
Also remove search.pp since this is just a place holder.

Change-Id: I2a862c84d6cb3d30abb5e9bfc5e139e9ec0b7df9
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
Reviewed-on: https://review.openstack.org/14988
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2012-10-31 09:22:28 +00:00
Matthew Wagoner
2d4723d0cf Cleanup mediawiki init.pp, image_scaler.pp, and php.pp manifest lint errors.
Change-Id: I62bd3069bc491af0cd89569a1b306c765eeee864
Reviewed-on: https://review.openstack.org/14336
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2012-10-12 16:05:00 +00:00
Ryan Lane
d2535fa3f7 Initial commit of MediaWiki module
Change-Id: I6181e0d4a717d0a11ea2d741034db99435d5e180
Reviewed-on: https://review.openstack.org/10521
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2012-08-12 18:40:54 +00:00