Commit Graph

75 Commits

Author SHA1 Message Date
Monty Taylor bb91e9cd68 Retire repo
Depends-On: https://review.opendev.org/720892
Change-Id: Ie5c4c64b1eb37054a6a3dcaa9bb4cb36c81e53ef
2020-04-22 10:18:55 -05:00
Clark Boylan a9286096e7 Enable mod_proxy_wstunnel
We want to use websockets. Websockets requires that mod_proxy_wstunnel
be enabled. THis wasn't enabled by default so go ahead and enable it
here.

Change-Id: I2d9a1ec7cffba461d7d36dceeef241956f6d732b
2018-11-01 15:19:33 -07:00
Clark Boylan e5a9ea6909 Actually use connection-tuning configuration
The connection tuning configuration setup relied on a symlink that was
broken. Fix the symlink by fixing the target filename. Also we update
the symlink name to have a .conf suffix since everything else has that
suffix on Xenial.

Note this removes support for precise connection tuning to simplify the
problem as precise is no longer supported by ubuntu.

Change-Id: I094a43b2395aeef17175cea6db5dc2469b67ed6d
2018-10-31 12:45:46 -07:00
Clark Boylan 2257feaa20 Ensure the custom js dir is created
This appears to be a still supported api for customizing things,
http://etherpad.org/doc/v1.7.0/#index_custom_static_files, but the repo
doesn't have a custom dir precreated for us. Ensure this directory is
created before we try to write to it.

Change-Id: I432d388cd43fc4e5dfc31115264365b15eb43215
2018-10-15 17:04:32 -07:00
Clark Boylan 51fc103d82 Fix env for plugin installs
In an earlier change we set up npm installations to happen in the eplite
user's homedir rather than in the log dir. We did this because with
systemd we no longer have a log dir on all installations. The etherpad
lite plugin installation was still attemping to use the log dir which
doesn't work on newer systems.

Update this plugin installation process to use the homedir like the
normal installation process.

Also add plugin installation to the tests we run to test this works now.

Change-Id: I5cff75c89b16d61c4902c920259b82463306833e
2018-10-15 12:59:56 -07:00
Zuul cd65ecbeb3 Merge "Add basic rspec test" 2018-08-11 08:57:05 +00:00
Ian Wienand 0025643f9f Add basic rspec test
Add a basic deployment test

Change-Id: I3ebec9b0c82a228f9d3a4e3d865ca44a233ec83e
2018-08-08 21:45:37 +02:00
Zuul a167059234 Merge "Fix defined type namespacing" 2018-06-05 22:32:13 +00:00
Colleen Murphy 76d7c03cce Fix defined type namespacing
Without this patch, puppet 4 apply tests can't find the mod defined type
and fail with:

  Evaluation Error: Resource type not found: Mod at /etc/puppetlabs/code/modules/ethercalc/manifests/apache.pp:43:15

This patch ensures the resource reference is namespaced the resource
declaration is already namespaced.

Change-Id: Iff4edae152bb1286667db5312b44c3f1d0e10add
2018-04-26 21:50:02 +02:00
Xing Zhang d9b6138cd3 Set legacy_debian_symlinks to true
After update nodejs from system to 6.x in patch[1],
ubuntu xenial nodejs related files will be link to a loop:
/usr/local/bin/node -> /usr/bin/nodejs
/usr/bin/node -> /usr/bin/nodejs
/usr/bin/nodejs -> /etc/alternatives/nodejs
/etc/alternatives/nodejs -> /usr/bin/node

Also, in openstack-infra/system-config, the code we have for
etherpad node can't bringup one, we should remove the node
'Node-OS: xenial' that may misslead others

This patch is aimed to help etherpad node's system upgrade
to xenial.

[1] Ied9e5bd7ffa16f1832d3e1e26d0886de67f98f72

Change-Id: I6f7d50bed470916f7b150785ef68d34f336cb0ce
2018-04-14 16:57:53 +08:00
Ian Wienand e44d991eae Update default version of nodejs
Current versions depend on node 6.x; we need the depends-on for a
puppet-nodejs that will install that successfully.

Depends-On: Ia7966fb9578d0d79f3a7f9480e3a956555737dc8
Change-Id: I94c5c34201cbbe6f06a75f210b48ddea7da1a18a
2017-12-20 14:57:00 +11:00
Ian Wienand 7cf08e1e39 Xenial: add a service file
Add a service file for later Ubuntu versions.  Centralise the logging
into init.pp as it's not as easy to get logs to file from stdout/err
via systemd.  Fix up the logrotation while we're there

Change-Id: I43ea764d070fb44502bda0c845485769dace6ff3
2017-12-20 14:57:00 +11:00
Ian Wienand ad5cc1f357 Don't install npm dependencies in /var/log
The ${epuser} home directory is being set to ${base_log_dir} which
results in the npm dependencies being installed into /var/log.

Create a regular homedir for the user (it's not put under
${base_install_dir} because we want that owned by the user, which is a
race).

Change-Id: I0020468ec275c7f12f038f5a152fe9adab64a3e8
2017-12-20 14:56:18 +11:00
Ian Wienand 0b7f9dcd33 Fix up log rotation
The path to the logs is wrong and they're not being rotated.

I think the rotation might have ended up in site.pp as it was relying
on the service defined there.  This doesn't really seem necessary so
I've moved it back with the main configuration, and fixed the paths.

Change-Id: I99b71481e222e6f83b6be72261fa14b7a10dc62c
2017-12-18 15:22:24 +11:00
Clark Boylan 5aae261ebf Allow multiple places to install curl
Curl is an important package that we end up needing in a few places. To
avoid puppet unique name conflicts with the package "curl" only define
the curl package resource if it isn't already defined.

This allows us to define it in multiple places that may or may not
overlap depending on how hosts are constructed.

Change-Id: I8b346cbfb908c5d2094c5e46ff008ef735b0e903
2017-08-24 13:49:33 -07:00
Clark Boylan 9816851524 Support openid authentication
Whether to thwart spam or to make more private pads add support for very
simple auth mechanism using mod_auth_openid.

Change-Id: Ife0daf670a20afde46516c60f877e1da8026758a
2016-11-15 14:05:18 -08:00
Clark Boylan cbe2ba8724 Use nodejs class to install nodejs
This is a backward incompatible change. Sorry. But now we can rely on a
much better portable system for installing nodejs using the nodesource
packages instaed of building it ourselves. This is important because the
system packages on some distros (like Ubuntu Trusty) can no longer talk
to npm resulting in a failed etherpad install.

You can continue to use the system packages if you desire using the same
old config. But you now need to provide the nodejs class'
repo_url_suffix as your nodejs_version parameter should you not want to
use the system packages.

Note that transitioning from system to the nodesource packaged nodejs is
not currently supported by this change. Basically this means that if you
have an existing system setup which uses old npm you may want to just
redeploy your server from scratch using the nodesource packages to move
forward.

Change-Id: Ia686f9eba15e0a3dfa81d08aecc212853b3f7189
2016-11-15 14:04:18 -08:00
Clark Boylan 411f392c14 Put /usr/local/bin at front of path
If things get installed by something other than the system package
manager they often end up in /usr/local/bin and they often shadow things
that the system package manager may have installed. By putting this at
the end of the path we don't get the benefit of that shadowing and
instead get whatever the system package manager installed.

This is particularly unhelpful when attempting to use an npm updated by
npm itself which ends up in the local dir.

Change-Id: Ifb58c98162f0064a2ae70868921eea507306ad7e
2016-11-14 18:46:21 -08:00
Clark Boylan 88d20d9a0f Install curl as dep for etherpad dep install
Etherpads dependency install process requires curl, ensure that it is
installed before we need it.

Change-Id: I711e43f0dd9c8287c26e2861498eb3ebb191e878
2016-11-14 18:46:07 -08:00
Clark Boylan d157f7c1a8 Fix utf8 4 byte collation method
The default collate method used by the mysql puppet module is not
compatbile with our 4 byte encoding. Update the collate method to match
the 4 byte encoding.

Change-Id: I8f65316ba609ecf30c9797d631bdeb4a083b16ce
2016-11-14 17:48:59 -08:00
Andrey Nikitin cd6889a359 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: If012896a95088ae836d5dfa35aa3cad553aee516
2016-03-21 12:07:49 +03:00
Jenkins 9b833810f5 Merge "Add missing Gemfile to the project" 2016-03-18 00:04:26 +00:00
Jenkins 9cf9c2ed1d Merge "Fix races in httpd install and config" 2016-03-11 19:12:04 +00:00
Yolanda Robla 939595bedc Add missing Gemfile to the project
All our puppet projects rely on a Gemfile for tests
to run. This was missing, so add here as well.

Also fix the linter errors that this new Gemfile
addition is causing.

Change-Id: I24143df44c313ea76472649bb9a6fa0ce4536307
2016-03-11 13:50:36 +01:00
Yolanda Robla d63ca9a3b6 fix module to work with latest mysql version
Change-Id: I14328be9f00a94a6eb18670f85ee0b61b434833c
2016-02-02 15:57:26 +01:00
Spencer Krum 2a78b958c7 Etherpad requires 4byte utf8 charset
Change-Id: I284f7dca1a71ebe2065253822aeaea268e316712
2015-11-12 08:50:04 -08:00
Yolanda Robla e13b488671 Add mysql class to etherpad to optionally configure db
Change-Id: Ib97188f3597fccf3d0a7b6f6e394ae6bacb12f65
2015-10-13 20:08:10 +02:00
Jeremy Stanley 86d9628a5a Fix races in httpd install and config
Add necessary dependency/ordering hints to the etherpad_lite::apache
class so that configuration parent directories are created before
they're needed rather than later through package installation, and
so that vhost configuration won't be loaded until Apache module
dependencies are in place.

Change-Id: Iaeafd30b19276ff438bd9e2708031c1064a2314d
2015-10-09 17:52:55 +02:00
Samuel de Medeiros Queiroz 957ecb6cef Ensure abiword package is always present
Change I9831526581a5fc1f2014c9985637664c79b937bf
moved the required packages list statement into a
conditional block, making it to be ensured only
in the case nodejs_version was set to 'system'.

This was causing the abiword library to not be
installed and then etherpad.o.o was appending the
following error message to new pads:

  Error: Abiword does not exist at this path,
  check your settings file -- To suppress these
  warning messages change suppressErrorsInPadText
  to true in your settings.json

This patch makes the abiword library to always be
installed by moving it out of that conditional
statement.

Change-Id: I50f55e4408d850b2bf449b121b9014d511518481
2015-09-16 12:19:08 -03:00
James E. Blair c98efc9c7d Fix connection tuning on >= trusty
The tuning config file needs a .conf extension.  Also, trusty
uses mpm_worker_event by default, so support that as well.

Change-Id: Ica3a7ceab29f120a24ca93cc5491f5fe8ce9e54a
2015-09-08 10:43:52 -07:00
James E. Blair 605ec41b30 Fix websocket configuration
Enable the proxy_websocket module.

Correct the ProxyPass directives in use with websockets.  The
current versions result in 404 on socket.io.js because they strip
the socket.io component of the path.

Change-Id: I3505b4e9693602ec04baec2487871ce57a6dc7a6
2015-09-02 10:15:11 -07:00
Clark Boylan 6a254faec5 Allow system nodejs install
Allow setting the nodejs_version to 'system' which will tell the
module to install the nodejs and npm packages from their system
package manager rather than building the specified version from
source, and symlink the expected interpreter name.

Change-Id: I9831526581a5fc1f2014c9985637664c79b937bf
2015-08-20 15:17:04 +00:00
Paul Belanger 98f0ab2373 Fix warning about httpd module
Change-Id: I5a75b1488b587ff6fd564afabf9f707199d2a184
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-07-16 15:51:51 -04:00
Paul Belanger 61b6b1f69d 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: I45be21c08d5ccdccbf0a8c386b794e2d75cdff45
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-07-09 16:29:40 -04:00
Clark Boylan e0ecfcd1f7 Don't host robots.txt from etherpad repo install
Updating the robots.txt in the etherpad vcsrepo makes it hard to manage
that repo properly. Solve this by serving the static robots.txt file
directly from apache rather than via etherpad service. Use a mod_rewrite
since we are already using that to set up the proxying.

Change-Id: Iccccf1ef194060490512e6550c22bdb9d3478ba8
2015-03-16 09:45:34 -07:00
K Jonathan Harker ac6b7c3ead Add parameter to tune vcsrepo ensure for eplite
If the vcsrepo is set to 'ensure => present' then local changes will
prevent the repo from updating, but if we 'ensure => latest' then local
changes will be overwritten when updating to the latest revision.

Change-Id: Ie560a00e70e428b46ac431975caa74d7d05fcad4
2015-03-09 12:03:49 -07:00
Jenkins 1fcff4d473 Merge "Add connection-tuning file to new Apache 2.4 conf folder structure" 2015-02-06 21:50:15 +00:00
Ricardo Carrillo Cruz 88dd268c4a Add connection-tuning file to new Apache 2.4 conf folder structure
This change enables this manifest on Ubuntu Trusty, as it comes
with Apache 2.4 by default and there's no longer conf.d folder, it
is split on conf.available/conf.enable.

Change-Id: I7986e3f3be97f3448b743789a2c4fdacd07a20a8
2015-01-30 18:43:49 +00:00
Ricardo Carrillo Cruz 2a4a032c0d Change /sbin/nologin to /usr/sbin/nologin for Ubuntu
This change fixes Puppet on Ubuntu/Debian platforms, as /sbin/nologin
does not exist

Change-Id: Ia91ef6a6fcba6cbf323c7aece895181b3f5470a7
2015-01-30 14:33:43 +00:00
Clark Boylan 371e87eb55 Add etherpadlite server admin variable
The etherpad lite vhost template expects a server admin variable in the
etherpad_lite::apache manifest. Add one with a default of
webmaster@$fqdn.

Change-Id: Id974496ec330fa1453bc60d65518f4264f107da7
2014-09-12 09:02:21 -07:00
K Jonathan Harker 4cc98b149c 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 447d8e5f14 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
Monty Taylor 012ad84af6 Allow for etherpad title to be parameterized
The general etherpad_lite module should not contain OpenStack as
a hardcoded title. Parameterize it.

Change-Id: I473720d9566233ab4c8d2081c9835b42ddfcb94e
2014-02-10 15:07:40 -08:00
Clark Boylan 3f3cfa02e0 Upgrade the version of node for etherpad-lite.
* modules/etherpad_lite/manifests/init.pp: Bump node to 0.10.21.

Change-Id: I29ddc3800482ed5da64ccb76fdf39ad1e91bc228
2013-10-18 17:16:45 -07:00
Clark Boylan a2a3d04b32 Tune apache for etherpad lite.
* modules/etherpad_lite/manifests/apache.pp: Install apache etherpad
lite connection tuning config file.

* modules/etherpad_lite/files/apache-connection-tuning: Configure the
Apache MPM Worker module to run up to 64 processes with 32 threads each
for a grand total of 2048 client connections maximum. This should be
relatively safe as etherpad connections are not very heavy. Most
connections come from users that lurk, they don't provide any input
that creates writes to the database. For example at a design summit we
may have 8 design room seach with an etherpad open, in each room there
may be 20 people connected to the etherpad but only 2-4 writing to it.

Change-Id: I3f406af1204b993d2b083180f17cafcf4f62f5bc
2013-10-09 16:53:27 -07:00
Clark Boylan 88bb5cd21c Update etherpad and etherpad puppet manifests.
* manifests/site.pp: Pass new mysql DB variables to
openstack::etherpad*.

* modules/etherpad_lite/manifests/apache.pp: Fix broken /etc/ssl/certs
permissions (0700 -> 0755).

* modules/etherpad_lite/manifests/init.pp: Update default nodejs and
etherpad versions. Remove ep_headings plugin install. New plugin define
should be used for this instead. Stop making the etherpad-lite ref to
checkout optional (defaults to develop). Note these changes are probably
not going to be backward compat.

* modules/etherpad_lite/manifests/plugin.pp: Define to install etherpad
lite plugins.

* modules/etherpad_lite/manifests/site.pp: Simplify DB support and
remove support for the dirty DB type.

* modules/etherpad_lite/templates/etherpad-lite_settings.json.erb: Bring
settings erb up to par with latest template.

* modules/etherpad_lite/templates/etherpadlite.vhost.erb: Update rewrite
rules for new etherpad. Instead of allowing nice pad urls rooted at /
redirect these url to /p/padname. Etherpad does not deal well with a
change in root path as /p/ is hardcoded in many places.

* modules/openstack_project/manifests/etherpad.pp
* modules/openstack_project/manifests/etherpad_dev.pp:
Update to use new etherpad module setup. MySQL DBs are now externally
managed, pass in needed connection info.

* modules/mysql_backup/manifests/backup_remote.pp: New define to backup
remote DB servers.

* modules/mysql_backup/templates/my.cnf.erb: Template for a my.cnf to be
used by the cron in backup_remote.pp. Allows for easy connectivity from
server using MySQL DB as root.

Change-Id: I1250297674b91e81d59cd28c07c52e09967ca548
2013-10-09 16:53:06 -07:00
Sean Dague 3c814faa76 add ep_fintest, needed by ep_headings to etherpad
Make it possible to optionally install ep_headings on an etherpad
environment. This makes it easy to enable this on some environments,
but not all. Default to 'false', but set 'true' for etherpad_dev.

on my environment I also had the installation of ep_fintest, because
plugins didn't seem to work until I did this. Testing that.

Change-Id: Ia1ee0fd7b51e88f639de5350f124f1a95405cabf
Reviewed-on: https://review.openstack.org/26422
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-04-09 17:19:51 +00:00
Sean Dague 6d69f50d5c add ep_headings option to etherpad install
Make it possible to optionally install ep_headings on an etherpad
environment. This makes it easy to enable this on some environments,
but not all. Default to 'false', but set 'true' for etherpad_dev.

With summit coming up, it would be nice to have ep_headings in the
etherpads, makes them a lot easier to read.

fix puppet lint issue with all the equals signs not lining up.

Change-Id: I8cfa12480aed0b351012161c2cdbc406c0f52e7a
Reviewed-on: https://review.openstack.org/26380
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-04-08 19:00:46 +00:00
Clark Boylan 06cad61e13 Cleanup puppet parser warnings.
Cleanup warnings for missing '$' in class parameter definitions and for
non upper cased requirements.

Change-Id: I5fe04a304b084f4c6d09cfb23a9dfae2548a8e22
Reviewed-on: https://review.openstack.org/18704
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2012-12-28 16:52:17 +00:00
Clark Boylan 33366f58a8 Use new etherpad-lite upstream.
etherpad-lite moved their upstream git repo to
https://github.com/ether/etherpad-lite.git. Update the vcsrepo source
for etherpad-lite when giving vcsrepo a specific version of
etherpad-lite. Do not update the source for the versionless vcsrepo
resource.

This allows us to leave etherpad.o.o alone while we install
etherpad-dev.o.o. Once etherpad-dev.o.o is working and we have tested an
upgrade to latest eplite and new node we can flip etherpad.o.o to the
new source.

Change-Id: I7cb9aaa5211f57c84698887500f519f92c514e91
Reviewed-on: https://review.openstack.org/17566
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2012-12-06 18:13:26 +00:00