Commit Graph

119 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
OpenDev Sysadmins 14a49a862e 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:05 +00:00
Ian Wienand 88ccce2f6e 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: I1b4a72c71210d0de601ded22320f223f701cbe62
2019-03-24 20:35:38 +00:00
Zuul 97245cd023 Merge "Bump eplite version in rspec tests" 2019-03-01 19:55:14 +00: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 4f77feacf5 Bump eplite version in rspec tests
This updates the tests to test installation for the same version of
etherpad that we are running in production.

Change-Id: I3624b79a8bb2c9c362037d1b025a3df9bf7c701f
2018-10-16 07:46:49 -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 db668928a9 Merge "Fix httpd mod defined types for puppet 4" 2018-08-13 20:06:28 +00:00
Zuul b042a539bf Merge "Turn off binary symlink in nodejs module" 2018-08-13 20:02:22 +00:00
Zuul cd65ecbeb3 Merge "Add basic rspec test" 2018-08-11 08:57:05 +00:00
Colleen Murphy 6a1197f952 Fix httpd mod defined types for puppet 4
Fix the namespacing of the references to the Httpd::Mod defined resource
type so that it can be found in puppet 4.

Change-Id: I3746af60035899121a26928ae9574b3f6e3b3753
2018-08-08 22:15:23 +02:00
Colleen Murphy 3d01bab8bf 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.

In this case, on puppet 3 a quirk of the resource ordering was causing
the module not to be idempotent since the second puppet run would change
the file to a symlink, so this patch has the side benefit of also
allowing us to add a test for idempotency. With that second puppet run,
the etherpad service now has enough time to fully start up and we can
uncomment the curl test.

Change-Id: Ic834ad6f0828cc2d20810e48bb053f9b14659c4a
2018-08-08 21:52:29 +02:00
Ian Wienand 0025643f9f Add basic rspec test
Add a basic deployment test

Change-Id: I3ebec9b0c82a228f9d3a4e3d865ca44a233ec83e
2018-08-08 21:45:37 +02:00
Colleen Murphy 0d4b91a2c3 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: I677a2ca36099e3d1157e41bae72d71ec56f1adc1
2018-07-12 09:57:44 +02:00
Zuul 0715943aef Merge "Fix scope of vhost template variables" 2018-06-19 22:44:15 +00:00
Zuul a167059234 Merge "Fix defined type namespacing" 2018-06-05 22:32:13 +00:00
Colleen Murphy cec0248653 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 the scope object instead to be explicit about the
variable's source. The scope object and scope.lookupvar return :undef
instead of nil if the variable is undefined, and we expect it to
sometimes be undefined, so handle that too.

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

Change-Id: Ie9d943424aafa5d1d09586dc2cb61441c6d2628b
2018-04-28 00:55:00 +02: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
Jeremy Stanley 5b9395aea1 Refuse external connections to the API
The Etherpad API is only useful for authenticated access via the
secret API key, which resides on the server's filesystem. It can
already be accessed from localhost over the nodejs listener socket,
so doesn't need to be reachable through the external Apache proxy.
Refuse connections to it through Apache in an effort to reduce
exposure to future unauthenticated or authentication bypass bugs in
the API implementation.

Change-Id: Ia5cf2f15c21eb397eeb878c81cd3c7a29f5aecbd
2018-04-11 16:45:15 +00: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
Colleen Murphy 1740cb5c04 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: I2d36dbc5790dbd97509f52210f313c7e2e5be8df
2017-08-18 10:41:43 +02:00
Colleen Murphy a30b1b349d Update beaker setup for xenial
Add a xenial nodeset and update the spec helper to install puppet 3 from
the Ubuntu repos instead of from puppetlabs.

Change-Id: I62fd4d69358dfb31ec5f328e116e9fd06e743d5b
2017-06-11 20:35:42 +02:00
Paul Belanger 026472a29d
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: Ib9d30644be02d083959aa75cda8e617598214861
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-01 21:07:32 -04: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