Commit Graph

109 Commits

Author SHA1 Message Date
Jeremy Stanley d3a34d0989 Upgrade to latest EtherCalc (0.20200505.0)
We're four years behind on EtherCalc releases, and suddenly hitting
a crash exception which was fixed in a newer release three years
ago. According to the current readme we're running plenty new enough
dependencies, so this should be a drop-in replacement. Of course
we'll make an extra database backup immediately before hand, just to
be safe.

Change-Id: Iec59692fea0a1e31e1bd7b8e03145f7384d9e59b
2020-08-21 12:14:35 -07:00
OpenDev Sysadmins d887384c9c 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:01 +00:00
Ian Wienand a8b3acd854 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: I2b03578180d2afc582438d1dc1b8cfbf8547df3f
2019-03-24 20:35:38 +00:00
Colleen Murphy 65eab03783 Use versioncmp function
Without this patch, puppet uses lexicographic ordering to compare the
version string in the operatingsystemrelease fact to the string '14.04',
which works fine on puppet 4 since it is comparing two strings but it is
more correct to use the versioncmp function.

Change-Id: I56d989d22229db3d606e4ac7f788925c216721a0
2018-08-13 17:35:42 +02:00
Colleen Murphy 3baf809e4e Add test for ethercalc::apache
Add the ethercalc::apache class to the test fixture and ensure the
service is accessible over port 80. This also corrects a minor
idempotency issue in this class due to the way the ssl-cert package and
the /etc/ssl/private file resources were ordered.

Change-Id: I4cdba5b1881c3e9891ca9f8c2c4dd50ca5662d4e
2018-08-13 17:35:37 +02:00
Colleen Murphy bc771d07c8 Add idempotency test
Add a test to ensure the module is idempotent. By doing this extra work,
the ethercalc service has enough time to figure things out and get
started, so we can also enable the checks to ensure the service is
responding.

Change-Id: Iede6db9dda0814bee9072c6dcc554ccc1aa89af1
2018-08-13 12:01:05 +02:00
Colleen Murphy 23a6360c25 Add workaround for ethercalc bug
There is a bug with global npm installs[1] which causes node to be
unable to find the SocialCalc.js module. We can work around it by
symlinking the socialcalc module into the location that node expects to
find it[2].

[1] https://github.com/audreyt/ethercalc/issues/542
[2] https://github.com/audreyt/ethercalc/issues/542#issuecomment-330039410

Change-Id: I6f751c19c772cda74f5a7b601238b4519039d257
2018-08-13 12:00:57 +02:00
Colleen Murphy fe5d375e4a Turn off binary symlink in nodejs module
On Xenial, the nodejs puppet module tries to create a symlink from
/usr/bin/node to /usr/bin/nodejs. Depending on the resource ordering,
this might happen before or after the nodejs package creates its own
/usr/bin/node. If puppet has the chance to make the symlink itself, it
breaks node by creating a broken link cycle. This patch uses the
legacy_debian_symlinks parameter to prevent the puppet module from doing
that. This problem was fixed and the option was deprecated and removed
in later versions of the nodejs puppet module, so we will have to remove
the parameter if we update the nodejs module.

Change-Id: I61e591dbeabe4c043f87b04a7c56c0539120f8a5
2018-08-09 20:56:27 +02:00
Ian Wienand 15c133270b Add basic rspec test
Add a basic apply test

Change-Id: Iff4d74806c67c9480e3679fcca56d8470b9fd29e
2018-08-09 20:56:27 +02:00
Jens Harbott 05b1414b9b Update ethercalc to work with Ubuntu Xenial
- Set up service via systemd instead of upstart.
 - defupalt to using nodejs v6.x because of library issues.
 - upstream nodejs puppet knows how to do legacy symlinks on required
   platforms.

Depends-On: I2355cf58c899bf5f78173b2ed9da26548a9592d0
Depends-On: Ia7966fb9578d0d79f3a7f9480e3a956555737dc8
Change-Id: Ia3f4d3bbacbbe1a42a33a4f934173fb54a582a8e
2018-08-09 20:56:27 +02:00
Colleen Murphy 785e18decb 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: I186e6963cd028354676c4e1240d0971adcd9b476
2018-07-12 09:57:44 +02:00
Zuul 4832918302 Merge "Fix scope of vhost template variables" 2018-06-19 22:45:03 +00:00
Colleen Murphy 281acd62ab 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: I8d2b351537ad8fc0a06c58e1dd23d8423f38a328
2018-05-09 15:00:33 -07:00
Colleen Murphy 7a3b3c6f81 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 same way the
resource declaration is already.

Change-Id: I891572c245f878a198f972e33e7ddbff74a5a731
2018-04-27 17:22:49 +02:00
Clark Boylan 31e44bbcb0 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: Icd0c652ff2f522ce2ea9086965f53e1a03f0d4fd
2017-08-24 13:46:04 -07:00
Colleen Murphy 4b1adec999 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: I2d36cc46c473598a8a66259554b454b73ae98b83
2017-08-18 10:41:43 +02:00
Colleen Murphy 84d7a8e2b0 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: Ie8a5537579c40ce443489967100134eb9ee60e94
2017-06-24 15:39:05 +02:00
Paul Belanger d59ad1c018
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: I541c13ea91f007a63ef8f96e40d2047d5f34616a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-01 21:07:23 -04:00
Clark Boylan 4034168e71 Don't use npm list --parseable
Turns out we lose version info with --parseable (so not sure in what
world this is parseable output) so stop using the --parseable flag. This
corrects behavior where we reinstall ethercalc every puppet run which
can upgrade unpinned dep libs in ways that break them on older node (we
are using the ethercalc prescribed node but its a little old).

Change-Id: Ib9aebecf3a0c36c50e5069b1a871886e4ddb1a42
2017-02-13 17:44:43 -08:00
Clark Boylan 521672bc35 Convert from etherpad to ethercalc
This begins the conversion process. We keep the bulk of the nodejs and
apache configuration. Remove mysql and replace with redis and so on.

This is not a complete conversion, future work should include
authenticated redis configuration and systemd support. However, this
should be able to get the service running with a basic set of
features and functionality.

Change-Id: Id10247211d9643e81bb1b6e8fb67377ba6de873a
2017-01-20 12:44:41 -08:00
Clark Boylan f8d123d2ba Fix a couple openid parameters
This needs to be a proper url, also our attempt at looking up the var
was not working, just use the same lookup of vhost_name that is used
elsewhere and known to work.

Change-Id: If906f69688bf4412f50fcfafc05861b957ce42a8
2017-01-06 10:30:49 -08: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
Spencer Krum 1348e723d2 Use new infra_spec_helper for gem dependencies
Change-Id: I1a5743fa780b55f15dae0d2867d1eb65cfd666a7
2016-06-21 23:52:59 -07:00
Spencer Krum 036f800233 Pin google-api-client; sanitize Gemfile
Change-Id: I79a14dbd21cb54e7d064d87f46a75f60bd991708
2016-04-14 15:18:31 -07: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
Jenkins 872d388f6a Merge "Add mysql class to etherpad to optionally configure db" 2015-11-12 16:37:06 +00:00
Clark Boylan 6e9a5f5ef9 Bump connection limits to handle websockets
Websockets mean we make more connections to apache. Bump the connection
limits to 4096 connections total as this appears to handle summit load.

Change-Id: I87b6d06b5b730bde48d60fcbd6c025de5581b672
2015-10-29 17:04:15 -07:00
Clark Boylan a22fd5a2a9 Set higher nofile limit for node in init script
You must build additional pylons ... I mean we need more file
descriptors. Set that in upstart directly since it does not respect
limits.conf.

This rewrites the upstart job to be more upstarty so that the limits can
be applied without su undoing the work.

Change-Id: Ibf670f07d75c4ffcf333c971d03c620f839b04d3
2015-10-27 00:13:29 -07: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
Jeremy Stanley 72177180db Use the correct event module name
In the connection tuning configuration, use the correct name for
mpm_event_module so that the parameters will be applied when that
module is in use.

Change-Id: Icc8c84cec5a78d96805ed7a991e2ef4b1b53d9d8
2015-09-10 16:05:36 +00:00
James E. Blair 9babba139e Support apache /server-status
Change-Id: I554cd3a219c20f80b45bc9a45c793a0642ad17e6
2015-09-08 10:43:56 -07: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
Jenkins 021bc83b28 Merge "Allow system nodejs install" 2015-08-21 13:58:33 +00: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
Spencer Krum e9dc09a9b3 Fix target path for regular git clone during tests
Use same target directory for zuul-cloner and
the regular git command.

Change-Id: I57e34c58760f1571f79649f85d739b192476f834
Co-Authored-By: Fabien Boucher <fabien.boucher@enovance.com>
2015-08-19 16:35:21 -07:00
James E. Blair cc8e0cbad8 Switch to proxypass with retry=0 for etherpad
We think Apache may be caching 503 responses (possibly themselves
a result of [1]).  Set retry=0 so that we do not cache any failures
and switch to proxypass so that we can set that option.

[1] https://bz.apache.org/bugzilla/show_bug.cgi?id=37770

Change-Id: Ibd1087bc8feb288bfb8f66f4e6de61ebe8414233
2015-08-19 11:19:13 -07:00
Jenkins 59dd1713ce Merge "Fix warning about httpd module" 2015-08-06 03:34:44 +00:00
Spencer Krum 32b048bfbc Boilerplate beaker-rspec files
Change-Id: I3ae18482462b90826452059f51223c5c5000e87e
2015-07-28 02:04:13 -07:00