Commit Graph

38 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
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
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
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
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 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
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
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
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 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
Marton Kiss 46a421e013 Refactor vcsrepo to git resource to resolve refresh trigger issues
This patchset will replace the vcsrepo with puppet-community's
git_resource and resolve the resource change notification issues.

Change-Id: I4b0fc715f89062047ed32f4f89880ced76e54f9b
2015-10-15 18:28:18 +02:00
Marton Kiss b94e39588e Allow custom settings.py template
The $template_settings parameter allows to specifiy a custom
template of settings.py. It helps to define different
configuration for staging and production deployments.

Change-Id: Ic88b584cb60ab7f96c17e17b904c89200e10055d
2015-09-28 18:52:19 +02:00
Marton Kiss 77dae9ef2e Fix vcsrepo refresh trigger on non-branch repository
Introduce $askbot_ensure class parameter that defaults to
'present'. This change prevents retriggering of refresh event
by vcsrepo resource when the repo is tied to a specific commit
instead of a branch.

Change-Id: I49ce766c0e085a48a50d41d39b3e57e3e8014979
2015-09-11 16:58:40 +02:00
Marton Kiss b8bc16bd5b Fix smtp port and host assignment in config.pp
The smtp port and host resources were replaced, this patch
fixing that typo.

Change-Id: I5b1c70f45ad04d93082951bf08c0d2e3b900eafc
2015-08-13 20:16:52 +02:00
Marton Kiss 5d4ae39165 Resolve SSL certificate dependency issue
Refactor resource dependencies of askbot SSL configuration.

Change-Id: Ia4d656f2ef37b81975a2e2bdf0b8267a08ce7fef
2015-08-05 19:43:48 +02:00
Paul Belanger fd7f94b2ef 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: Ie3d818d172ada2132a0116ce4ce2ed6d231cc005
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-07-21 14:41:37 -04:00
Marton Kiss 2ab8bfa972 Add virtualenv support
The python environment including askbot requirements moved under
/usr/askbot-env to provide proper pip dependency resolution. The
change affects the python manage calls, celeryd daemon upstart
script and mod wsgi exec env.

Change-Id: Id2031e4c51fd71c0e4630b2f1e71845223833bba
2015-07-18 22:28:31 +02:00
Colleen Murphy e449a2ce34 Enable arrow alignment lint check
Discussion following https://review.openstack.org/#/c/199792/ confirmed
that we do want to enforce this check. This patch re-enables the check
and fixes lint errors that fail the check.

Change-Id: Id9e8086ba1636d158547a5fc8b2b6d24de511a12
2015-07-14 19:17:00 -07:00
Colleen Murphy 9dee51a91b Enable puppet-lint-empty_string-check & fix errors
This patch changes the default values of params whose values were '' to
undef, except for $askbot::site::ssl::site_ssl_cert_file and
$askbot::site::ssl::site_ssl_key_file which were changed to use the
same default provided in the askbot and askbot::config class. Also
updated conditionals to look for the new undef value instead of the
empty string.

Change-Id: Ia3cabb5760f940cbf9c39714571b2ae5eac92a2d
2015-07-09 18:20:08 -07:00
Colleen Murphy a07962ba55 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. This patch also
corrects lint errors caught by the puppet-lint-absolute_classname-check
gem.

We disable the puppet-lint-empty_string-check gem to be corrected by a
follow-up patch.

We disable the disable_arrow_alignment check in the Rakefile.
Previously, the system version of puppet-lint that was being run by
'rake lint' was too old to catch this. When using 'bundle exec rake
lint' the gem is new enough to catch this. Whether we want to actually
fix these lint errors is a different discussion, so this patch disables
it for now.

Change-Id: I2b2c8511367b2e97c30b7681125d9063b3e78a86
2015-07-09 17:37:05 -07:00
Marton Kiss ade07a70b6 Askbot module refactor
Refactor askbot module:
- deployment source from git instead of pip
- separate init / install / config code
- break site config into celeryd / cron / http / log / ssl / static parts
- support of Ubuntu Precise 12.04LTS / Trusty 14.04LTS

Notice: don't approve this patch until puppet run is enabled on ask.o.o
because it breaks the production site. (need to refactor the related
system-config ask.pp too)

Depends-On: Iaa8488a3d7ab8b121404ac1ac39bd1620a868727
Change-Id: I560c24c3b09e4a8d09b23afa619a4cf361601cbe
2015-06-02 15:48:34 +02:00
Marton Kiss 6ec0ed81c8 Added missing askbot cron jobs
Add new scheduled cron jobs, including send-email-alerts and
clean-session. Both cron jobs are executing a manage.py task
for an askbot site.

Change-Id: Idf6e378b37dc251d307c7c01d7c65ff8270fe89d
2015-03-23 16:10:19 +01:00
Marton Kiss a774dd5818 initial commit 2015-01-26 14:24:56 +01:00