Commit Graph

36 Commits

Author SHA1 Message Date
Clark Boylan 8f55da407f 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: Ibbd66faf35447c5e8587c6996cd5011fcede688a
2022-02-17 11:42:09 -08:00
Clark Boylan c5003bfd36 Reduce retention of stats.timers
These stats.timers make up the bulk of our graphite data and are filling
the disk of the server. Reduce retention for them specifically to cut
back on disk demands.

Change-Id: Iba85c361fd70a8511c6fbb9da5123c650b11dec1
2019-10-24 10:56:47 -07:00
Ian Wienand d6368cf248 Add a httpd SSL template
If passed the new ssl file parameters, configure and install a SSL
version of the apache config.

For graphite.opendev.org it is intended to use the letsencrypt
certificates provisioned by the base ansible run for this.

Change-Id: Ic133e3abc09343541210c061af544f7b37480f27
2019-04-12 08:00:16 +10:00
Ian Wienand 977f065a3f graphite.wsgi : update for django 1.7
Django 1.8 in Xenial hits changes to the app loading made in 1.7 [1].
On Xenail and above, ship a slightly different wsgi loader that uses
the new-style loading.

[1] https://docs.djangoproject.com/en/dev/releases/1.7/#app-loading-changes

Change-Id: Ia741af25391603fe81c0185b586b5841910f714a
2019-03-01 09:19:32 +11:00
Ian Wienand 2aa06a80e1 Fix pip ordering and build requirements
When bootstrapping a new server it's noticed that pip wasn't installed
before trying to use it.  Add it as a dependency of the pip installs.

It was installed by the time the whisper install ran, but there no gcc
required for some of the dependencies.  Add build-essential.

Change-Id: I29af4665a1ef7c6f78d9fae29db066ea64743d70
2019-02-28 15:07:54 +11:00
Ian Wienand fb26d09101 Have statsd listen on ipv6 by default
By default we're not listening on an ipv6 address; so any stats sent
there just go missing.  Set up by default to listen to '::' (and add
required ipv6 argument) which, thanks to dual-stack, means ipv4 & 6
packets are all accounted for.

Change-Id: I1fec03b32441a1962190f9bd8e24e8bec2318ab5
2018-09-14 14:29:45 +10:00
Ian Wienand dfc94e4fd9 Fix up log rotation
Turns out this is a bit of a pain, and we found out via a full disk.

Firstly, carbon wants to rotate it's own log files, but doesn't
compress or cleanup.  Disable this with ENABLE_LOGROTATION=False,
which has been around for a while.  This is copied from the upstream
example config.

Secondly, we were missing the console.log file.  Change the rotate to
just one for "*.log", and also add "sharedscripts" so the post-rotate
is only run once per rotation of all files.

Thirdly, copytruncate doesn't work [2].  It needs to be "nocreate";
the file is moved and carbon starts a new one (as suggested by the
config comment).  This is updated in the combined rotate section.

[1] https://github.com/graphite-project/carbon/pull/68
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733856

Change-Id: I946bb728971db79a2f4d08f2787c0768b958fb53
2018-02-07 14:15:59 +11:00
Andrey Nikitin 4bf656f4a8 Order of the class 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: I80c9ab9dc4b305d6ad800cc58cc94e9648b940b0
2016-03-21 11:57:03 +03:00
John Warren 1cbe0c8fa6 Add python-tz package
Version 0.9.15 requires the python-tz package.

Change-Id: I1bd04aceb0c7b5a5ce269dcd0d857c229ff6bf27
2015-12-07 11:35:59 -05:00
John Warren a25d50cfb7 Add support for django >= 1.4
The python-django package for Ubuntu 14.04 is installing version 1.6.1
whereas the graphite version running on the existing precise servers only
works with django<1.3.  This update conditionally sets the graphite
version to 0.9.15 which requires at least django 1.4.

Change-Id: I348f15ab200b57d3cd9018eb5ba9ebd9e68d56d5
2015-12-03 15:11:05 -05:00
John Warren c9091c5dbd Copy content to vhost document root
The directory /var/lib/graphite/webapp/content is not created in the manifest,
requiring it to be copied manually from /opt/graphite-web/webapp/content when
setting up a new graphite node.

Change-Id: I385e22b9b4d4ddc0afa48b1e4e2693f8e5e97fe1
2015-12-01 12:04:30 -05:00
Jenkins d69c62d46f Merge "Add support for apache >= 2.4" 2015-11-25 13:40:36 +00:00
John Warren 60cd705940 Prevent possible http_mod headers declaration conflict
Making a minor tweak that allows graphite to be deployed on a node
that also has other resources that need to use the headers http_mod,
for instance jenkins.  See:
http://git.openstack.org/cgit/openstack-infra/puppet-jenkins/tree/manifests/master.pp#n66
for an example where the same approach is used.

Change-Id: Ia7495f7640d356f130381fbb021f1cae05e72c00
2015-11-13 12:02:48 -05:00
Monty Taylor b49441ef1c Install pip data to a non-production location
If we configure pip to install data to our real data location, then
pip helpfully tries to back it up before doing an operation. Problem
is, pip isn't actually installing data to that location, and we have
a lot of data. Misdirect pip so that it thinks an empty dir is what
it should manage.

Change-Id: I28cf2b7ce69023b7d30b9faf2a88185905ecbfee
2015-11-08 09:01:37 -05:00
Yolanda Robla 3ed819160d Add support for apache >= 2.4
Graphite is failing for trusty, because of the
Require All granted need. Add that to the vhost.

Change-Id: I8b0c49929581439a3bce2b04915ee9124ec51acb
2015-11-06 09:32:25 +01:00
Jenkins b44f64e7a0 Merge "Add Gemfile and puppet 4 checks" 2015-08-09 02:58:12 +00:00
Jenkins c7bec6c4b5 Merge "Make username/email/password params required" 2015-07-28 07:48:51 +00:00
Colleen Murphy ce47a1494d 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. Also fix lint
errors caught by the puppet-lint-absolute_classname-check gem.

Change-Id: I40b3eb70669133414681ab9c9a4272d46c4e83e2
2015-07-23 18:34:36 -07:00
Colleen Murphy 5bc4dbc6c6 Make username/email/password params required
Values for the graphite_admin_username, graphite_admin_email, and
graphite_admin_password parameters must be provided by the user. The
empty string is not a sane default and will cause broken deployments if
used. This change makes these parameters required. Infra is providing
these parameters in system-config so this change will not break Infra.
If downstream users are not providing these parameters their
deployments will not be functional, so this change should be safe for
users already using this class correctly.

Change-Id: I7aed54bb09e54dc8c0827188adf971b76649f94d
2015-07-23 18:34:21 -07:00
Colleen Murphy ea59f65f75 Include mod_wsgi for graphite
If mod_wsgi is not installed, the puppet-graphite module will fail to
start apache because of the WSGI commands in the vhost template. This
patch adds the httpd::mod::wsgi class to take care of it. There is
nothing else in the graphite.openstack.org site.pp node that installs
mod_wsgi so the package resource in the class should not conflict with
anything.

Change-Id: Iaba16663c99a9a3aa6b69ac9b5af6dba22cd3fd2
2015-07-23 18:34:01 -07:00
Paul Belanger fa747a6175 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: Iba588ffb565e3c27615f444efeb5a3586cafbd82
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-07-16 15:45:33 -04:00
Monty Taylor f4213b2175 Rotate carbon-cache logs
carbon creates 3 different logs that it appends to. We should log rotate
them, so that they don't take up all the disk. Also, the carbon-cache-a
dir needs to be writable by www-data so that carbon can write the logs
in the first place.

Change-Id: I804ead080fa72053ecc6a46d962c7d30b2a165fb
2015-06-15 13:41:37 +00:00
Timothy Chavez 56cc4b39d1 Ensure the 'headers' module is enabled
Because we are adding CORS authorization to the header, we need to
ensure the apache 'headers' module is enabled.

Change-Id: I5ed0c2c413cb6ea1408d76e094ff897b8ec6a1c2
2015-04-03 13:55:44 -05:00
Yolanda Robla 0e3d87fbb3 Add ability to configure retention policy
Create new parameters on manifest, then apply
them to storage template.

Change-Id: Ia8fc17bb970d28bdfa80ed19cee6b44364dfc9c0
2015-03-19 10:45:04 +01:00
Yolanda Robla cfa9755e5a Add missing storage subfolders
Create storage/log, storage/rrd and storage/whisper folders
and ensure ownership.

Change-Id: I61727a37ea3edb5f76bb88dc4f90a5b97ad53b7b
2015-03-05 11:53:02 +01:00
Ian Wienand 64f5f2f05d Remove old stats from whisper
Over time, graphite seems to have acquired a range of keys that are no
longer updated and can be quite confusing when trying to find data.

This small cron job (cribbed from suggestions in [1]) should remove
all old data that hasn't been updated in nine months (this should be
long-enough to cover all manner of periodic jobs)

[1] http://stackoverflow.com/questions/9587161/how-to-cleanup-the-graphite-whispers-data

Change-Id: I598b9d370a337866e9086cbe0238569da70aa471
2014-08-19 07:54:21 +10:00
K Jonathan Harker 0055a0bbc5 Use the correct name for apache
The name of the apache package and service are different on different
operating systems. Fortunately, the apache module populates a variable
with the correct name for us. This is also true of the apache ssl
package.

Change-Id: I7d93e56281f828cba9262c135b0beb43dce9748a
2014-06-04 17:33:50 -07:00
Monty Taylor d770603f02 Don't keep fetching the same graphite-web revision
The vcsrepo module doesn't really like the combo of latest and a
specific sha. It keeps grabbing it over and over again. Guess what?
The sha hasn't updated since the last time you looked for the same
sha.

Change-Id: I1a017278b83af11541794bf03644b3346e9869c2
2014-04-18 18:46:29 -07:00
Monty Taylor 7308785602 Pin graphite-web
We need to pin graphite-web to avoid this bug:

https://github.com/graphite-project/graphite-web/issues/650

Change-Id: Ic20e4fa3ab8a174b013ea9547c666cf82b0fac30
2014-03-23 12:58:31 -07:00
Monty Taylor 6fab8b1f02 Fix path to graphite db
The onlyif test is looking for a different path than the scripts
install the database file to. Adjust it so that we don't run
every time.

Change-Id: I96c8496fb678e99facc65a01a7d34ab08290416d
2014-02-09 16:22:57 -08:00
James E. Blair 6e82dbb024 Switch whisper to master branch
For some reason graphite 0.9.x now depends on unreleased changes
on whisper master (rather than whisper 0.9.x).

Switch whisper to master since that's what the instructions say.

Change-Id: Ia823fc61fe6bafde77a632d1826de9c171bcb268
2014-01-12 20:46:30 +08:00
Clark Boylan 730554d518 Install graphite-web and carbon with pip.
These were not initially switched to pip installs because they are
different. Put the necessary different pip stuff in place to deal with
graphite-web and carbon so that their installs are consistent with
everything else.

Change-Id: Ieef60a228e284c936307291c4ed44930791cc631
2013-11-26 16:20:51 -08:00
Monty Taylor db46fa2125 Use pip install instead of setup.py install
The pip vs. easy_install interactions continually get the systems
into a weird state. pip install $path_to_repo, on the other hand,
works like a charm.

Left out two graphite installs because they are doing path manipulation
and I want to do further testing before touching that.

Change-Id: I373b29aca03f1ebd20e533ebaaf5de9ef2db017e
2013-10-27 18:38:38 -04:00
James E. Blair 7887f104c3 Add statsd compatible schema to graphite.
Most of this is from the statsd README.

Change-Id: I22e4619375c10de2cb010b06071ed3b473197e92
Reviewed-on: https://review.openstack.org/18737
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2012-12-28 23:56:55 +00:00
James E. Blair af41d6d35e Correct graphite paths.
Some paths were not set correctly in graphite config files.

Fix up permissions in /var/lib/graphite.

Use 'service', but don't ensure it's running.

Change-Id: I363319473a332c16687e16887bfe83e1468c8ece
Reviewed-on: https://review.openstack.org/17617
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2012-12-18 21:44:04 +00:00
James E. Blair 469dfc8c76 Add graphite.
Change-Id: I276641d55e966cd76013cae847061c3ac7996864
Reviewed-on: https://review.openstack.org/17094
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2012-12-02 20:28:38 +00:00