Commit Graph

80 Commits

Author SHA1 Message Date
Clark Boylan a4162cfb80 Retire this repo
The opendev project has been moving away from puppet and this is one of
the puppet modules that is no longer used. To simplify things for us we
are taking the extra step of retiring this repo.

Change-Id: I050a5fa329c4925940b93a162bb54901555f4b47
2022-02-17 11:26:53 -08:00
Monty Taylor 6a54303968 Stop using python::virtualenv
The virtualenv v20 release broke the version parsing.

Change-Id: I61acd33ded961dc1a861f729f9c2486970304ce5
2020-02-12 12:46:37 +11:00
Ian Wienand e66b8a82cd Remove ::'s that linter now complians about
Avoid issues from linter:

 WARNING: class included by absolute name (::$class) on line ...

Change-Id: Ia25bea4693acd44d3541500698e7fa978613f459
2020-02-12 11:12:18 +11:00
Zuul e263ff92e3 Merge "Move redis definition" 2019-05-20 05:43:08 +00:00
Ian Wienand f401a80fc5 Move redis definition
It seems this package name conflicts; I guess testing must not enable
redis because this wasn't picked up in CI tests.

Move it into the redis section and disambiguate package names

Change-Id: Ibc616346b12c4699652702778755695c0bf9f7c2
2019-05-20 14:21:49 +10:00
Zuul bfbef3279b Merge "Install redis 2.10.3" 2019-05-20 00:16:25 +00:00
Zuul 57438900ad Merge "Move to apache 2.4 access always" 2019-05-20 00:15:15 +00:00
Ian Wienand c651274a3d Install redis 2.10.3
This seems to be the only version that works; and is the version on
the current ask.o.o server.  Ensure it doesn't upgrade to something
later.

Change-Id: I32a887b014aed376c61ce9f5dcf14668c2d357ce
2019-05-17 11:01:55 +10:00
Ian Wienand b7ec30a9de Move to apache 2.4 access always
Because this only matches trusty, it installs the old access list on
xenial and beyond.  Just use the 2.4 format.

Change-Id: I62a54e1c886efea9f1377967e8e4716068c53b4a
2019-05-16 15:08:35 +10:00
OpenDev Sysadmins 1278d4d71e 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:03 +00:00
Ian Wienand 1ddaaf168d 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: I174b328472581c9811b19b2d3572d02307b6d88d
2019-03-24 20:35:36 +00:00
Clark Boylan 0356069e08 Be more forgiving in module deps list
As time has moved on we've updated module versions making the pins in
this module's metadata.json inaccurate. Relax the rules so that we can
continue to update global module versions as necessary without raising
warnings.

Change-Id: Iaac15934b31a427370608ba439937f73ad5f64c7
2019-03-07 08:59:07 -08:00
Colleen Murphy 14b0bb1606 Fix template variable
I forgot that on puppet 3, scope.lookupvar returns :undef instead of nil
when it looks up a variable set to 'undef'. Since we're not setting the
chain file in our beaker tests, this causes an invalid apache config to
be rendered. This patch ensures the file explicitly checks for both nil
and :undef. On puppet 4, checking for just nil will be sufficient.

Change-Id: I7fd806c65f1aef95618a4549b24c6fa21aa3fe29
2018-07-24 11:51:52 +02:00
Zuul b7daee3f9d Merge "Use earlier six release" 2018-07-23 07:25:03 +00:00
Zuul 6003fc90e5 Merge "Don't run syncdb or migrate until after install" 2018-07-21 15:00:54 +00:00
Zuul 03f98dff41 Merge "Restart apache and celeryd on upgrade" 2018-07-21 15:00:53 +00:00
Zuul 8a9bd43a1e Merge "Use pip instead of setup.py when installing Askbot" 2018-07-21 15:00:52 +00:00
Zuul e4201cfb07 Merge "Pin stopforumspam" 2018-07-21 14:54:28 +00:00
Zuul fa98599f70 Merge "Ensure more correct ordering" 2018-07-21 14:54:27 +00:00
Zuul a8b2642d98 Merge "Don't require virtualenv package" 2018-07-21 14:54:26 +00:00
Zuul 6d8f4c5f1c Merge "Add systemd support" 2018-07-21 14:54:26 +00:00
Zuul d393c62f1e Merge "Pin captcha version" 2018-07-21 14:54:25 +00:00
Zuul 1e6692b11b Merge "Update settings" 2018-07-21 14:54:25 +00:00
Zuul 88756aa94e Merge "Remove old apache logs" 2018-07-21 14:54:24 +00:00
Colleen Murphy f4ddcabc87 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: Ib5f25bad8e5be39530113bf19ea2951cc9344961
2018-07-12 09:57:43 +02:00
Zuul 4e0849c92c Merge "Fix scope of vhost template variables" 2018-06-12 22:40:14 +00:00
Ian Wienand d617cd1777 Use earlier six release
As described, the code is incompatible with the latest six.  Pin this
till we can update the underlying django, etc.

Change-Id: Ic13b80ba53331f5375cbb35ddf86880313415332
2018-06-06 17:39:21 +10:00
Ian Wienand d5c4854709 Pin stopforumspam
Later versions of this became incompatible with the django used with
askbot.  Pin it.

Change-Id: Ic409a368d31728428f215db89a0c605967fe5cbf
2018-06-06 17:39:21 +10:00
Ian Wienand 361721d8fb Ensure more correct ordering
There were a few parts of this that could get out of order; ensure
more correct ordering.

Change-Id: Ic010bb70915d37ce55e9f5531a2c5baa15808595
2018-06-06 17:39:21 +10:00
Ian Wienand dc2958f424 Don't require virtualenv package
Use puppet-python's checks to ensure presence of python packages.
This way we don't create conflicting Package['virtualenv'] entries.

Change-Id: I3435a2527f4712d068c5a3c43728bed6011e1ebd
2018-06-06 17:39:21 +10:00
Ian Wienand adfb969dcf Add systemd support
This adds a basic service file for celeryd and associated bits to
install it on Xenial and beyond.

Change-Id: I58ab956832acabf9e5af5f815e37ed1eb365a649
2018-06-06 17:39:19 +10:00
Ian Wienand a80352f938 Pin captcha version
Pin to the version currently deployed in production while we work
through Xenial upgrade.  We can unpin when we try to update the askbot
version.

Change-Id: I991c503f9f4a7e01be7ee58ba496f8c4f671c1a1
2018-06-06 05:53:50 +10:00
Ian Wienand e429c06c30 Update settings
The askbot production settings are deployed from system-config, and
this version has become out of sync with what's actually required to
start-up askbot.  Update it.

Change-Id: I66da411a8c000d2be5e0676d536441b5f03bfdd2
2018-06-06 05:53:50 +10:00
Ian Wienand 0e4ca66c44 Remove old apache logs
Just keep one month worth

Change-Id: I69903d494d117ff0c8e1ac48dadc8d1619e724b6
2018-06-06 05:53:50 +10:00
Ian Wienand a9dc8aa01e Add clean_session.log for rotation
This file is growing unbounded; let's rotate it

 root@ask:/srv/askbot-site/log# ls -lh
 -rw-r--r-- 1 root root     1.7G Apr  5 01:10 clean_session.log

Change-Id: I051cd5868591bae021b61ab68f91ad9af16d6896
2018-06-06 05:53:43 +10:00
Colleen Murphy e0f2afc800 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 the manifests 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: I344be46a2e69d0eadda9148e1b7dd1f73c7a1edd
2018-04-27 21:12:02 +02:00
Jeremy Stanley 9201b62276 Don't run syncdb or migrate until after install
The syncdb and migrate execs need an upgraded Askbot package
installed in the venv before they're run, so indicate this
dependency relationship accordingly.

Change-Id: Ibf191682e238fcf5dcebc5a5c2c50d8b63913153
2017-09-21 14:46:44 +00:00
Colleen Murphy 7abbdafc62 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: I1bfeb46bb500bff1cefb581b0bf1e2fa7df7b0e8
2017-08-18 10:41:43 +02:00
Colleen Murphy 81bcbd3755 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: I3dda607634933beb67688fd419f8fdc03373e3e6
2017-06-11 20:36:31 +02:00
Paul Belanger 55db529db4
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: Ie17420ba20d60358f9378077d58593f2a3ac13a5
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-01 21:04:59 -04:00
Jeremy Stanley bf2ac102e2 Restart apache and celeryd on upgrade
When upgrading, after the migrate exec completes, notify the apache2
and askbot-celeryd services so they will be restarted.

Change-Id: I0a7f3987d782c52e85aa2f87186d2beb367d5b6b
2017-01-04 16:32:16 +00:00
Jeremy Stanley 9898406b14 Use pip instead of setup.py when installing Askbot
Calling python setup.py install seems to not properly uninstall the
old version of Askbot, but using pip install upgrades correctly and
is more in line with our usual pattern in other modules.

Change-Id: Iec6aef76a2ddf155dba26f37cefa94439c47e829
2017-01-04 16:14:25 +00:00
Ian Wienand b458291e8e Compress and remove old jetty logs
We are seeing disk space filling up regularly on ask.openstack.org and
mostly it comes from Jetty logs.  Right now, nobody really seems to
know how to turn these logs down or redirect them to something smarter
than can compress and rotate (that actually appears to be harder than
it sounds, and involves importing log4j stuff into the classpath,
etc).

In the mean time, compress the previous days jobs in a cron job.
Since we're also renaming the files, jetty's very simple rotate won't
remove the old ones, so add another job to keep just a weeks worth.

Change-Id: Ib78039f0b6764408ba5ce5111d92560f1b8ef6f6
2016-12-05 15:55:22 +11:00
Jeremy Stanley 8f84e57f53 Add explicit configuration support for Akismet
The Akismet spam detection feature can be configured through a
settings page, but in order to be able to keep the API key private
(in hiera) we need to be able to set it through configuration
management instead.

Change-Id: Ie64ece3e84af407b5e4124c874f59dad5ab23d4e
2016-08-18 19:54:58 +00:00
Spencer Krum 237495f0a4 Use new infra_spec_helper for gem dependencies
Change-Id: I2c2816688c6eec1f4bac617448613e0df38949a6
2016-06-21 18:37:39 -07:00
Spencer Krum afb337c784 Pin google-api-client; sanitize Gemfile
Change-Id: I2fcb6ade3867d39cc48989652c1915727bb8d847
2016-04-14 15:16:53 -07:00
Andrey Nikitin ea321de151 Order of the classes parameters is refactored
Order of those parameters is 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: If49d32d7e0beef5dc5c19b085be48659d3882f5f
2016-03-20 01:51:50 +03:00
Spencer Krum ec11c36753 Add captcha to the askbot venv
Currently I am getting spam from the clean_sessions cron about import
errors because we don't have this library available.

Change-Id: I6e9e18e8b2e6de7bceedfbf261eb73cb46d9e7e8
2016-03-05 09:17:39 -08:00
Marton Kiss 97416de469 Add missing venv python to cron scripts
Cron scripts are using the /usr/askbot-env environment.

Change-Id: Iad4d0bf886cf62747d5e51383d89b1af3fe8edc7
2016-03-03 16:37:34 +01:00
Marton Kiss ba6be8bb7d Fix broken Pillow pip dependency
The python Pillow dependency was not defined explicitly in askbot's
askbot_requirements.txt, so pip install always try to deploy the latest
version. Since 3.x Pillow also depends on libjpeg, so for a
successfull installation libjpeg-dev must be present.

Change-Id: Ia547034f128f46253ce857fed254531be71769b4
2016-01-08 13:18:05 +01:00