Some more clean up

Reformatted the puppet manifests
Removed two uneeded cron jobs
This commit is contained in:
Alexander Trost
2015-10-24 15:31:38 +02:00
parent 1134d69e2f
commit 2823936f95
11 changed files with 178 additions and 219 deletions

View File

@@ -11,7 +11,6 @@ RUN apt-get -qq update -q && \
wget -q -O /root/zulip-ppa.asc https://zulip.com/dist/keys/zulip-ppa.asc && \
apt-key add /root/zulip-ppa.asc && \
echo "deb http://ppa.launchpad.net/tabbott/zulip/ubuntu trusty main" > /etc/apt/sources.list.d/zulip.list && \
echo "deb-src http://ppa.launchpad.net/tabbott/zulip/ubuntu trusty main" >> /etc/apt/sources.list.d/zulip.list && \
apt-get -qq update && \
apt-get -qq dist-upgrade -y && \
mkdir -p "/root/zulip" "/etc/zulip" "$DATA_DIR" && \

View File

@@ -1,25 +0,0 @@
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
SHELL=/bin/bash
* * * * * root /home/zulip/deployments/current/bots/check-rabbitmq-queue &> /var/lib/nagios_state/check-rabbitmq-results-tmp; mv /var/lib/nagios_state/check-rabbitmq-results-tmp /var/lib/nagios_state/check-rabbitmq-results

View File

@@ -1,5 +0,0 @@
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
USER=zulip
0 6 * * 7 zulip supervisorctl restart all

View File

@@ -3,7 +3,8 @@ class zulip::app_frontend {
include zulip::nginx
include zulip::supervisor
$web_packages = [ # Needed for memcached usage
$web_packages = [
# Needed for memcached usage
"python-pylibmc",
# Fast JSON parser
"python-ujson",

View File

@@ -1,11 +1,11 @@
class zulip::base {
include apt
$base_packages = [ # Dependencies of our API
$base_packages = [
# Dependencies of our API
"python-requests",
"python-simplejson",
]
package { $base_packages: ensure => "installed" }
group { 'zulip':
ensure => present,
}

View File

@@ -1,5 +1,6 @@
class zulip::nginx {
$web_packages = [# Needed to run nginx with the modules we use
$web_packages = [
# Needed to run nginx with the modules we use
"nginx-full",
]
package { $web_packages: ensure => "installed" }

View File

@@ -2,7 +2,8 @@ class zulip::postgres_appdb {
include zulip::postgres_common
include zulip::supervisor
$appdb_packages = [# Needed to run process_fts_updates
$appdb_packages = [
# Needed to run process_fts_updates
"python-psycopg2",
# Needed for our full text search system
"postgresql-9.3-tsearch-extras",

View File

@@ -1,5 +1,6 @@
class zulip::postgres_common {
$postgres_packages = [# Python modules used in our monitoring/worker threads
$postgres_packages = [
# Python modules used in our monitoring/worker threads
"python-gevent",
"python-tz",
"python-dateutil",

View File

@@ -1,19 +1,11 @@
class zulip::rabbit {
$rabbit_packages = [# Needed to run rabbitmq
$rabbit_packages = [
# Needed to run rabbitmq
"erlang-base",
"rabbitmq-server",
]
package { $rabbit_packages: ensure => "installed" }
file { "/etc/cron.d/rabbitmq-queuesize":
require => Package[rabbitmq-server],
ensure => file,
owner => "root",
group => "root",
mode => 644,
source => "puppet:///modules/zulip/cron.d/rabbitmq-queuesize",
}
file { "/etc/cron.d/rabbitmq-numconsumers":
require => Package[rabbitmq-server],
ensure => file,

View File

@@ -1,5 +1,6 @@
class zulip::supervisor {
$supervisor_packages = [# Needed to run supervisor
$supervisor_packages = [
# Needed to run supervisor
"supervisor",
]
package { $supervisor_packages: ensure => "installed" }

View File

@@ -21,6 +21,7 @@ class zulip::voyager {
mode => 644,
source => "puppet:///modules/zulip/nginx/sites-available/zulip-enterprise",
}
file { '/etc/nginx/sites-enabled/zulip-enterprise':
require => Package["nginx-full"],
ensure => 'link',
@@ -33,14 +34,6 @@ class zulip::voyager {
group => 'zulip',
}
file { "/etc/cron.d/restart-zulip":
ensure => file,
owner => "root",
group => "root",
mode => 644,
source => "puppet:///modules/zulip/cron.d/restart-zulip",
}
file { "/etc/supervisor/conf.d/zulip_postsetup.conf":
require => Package[supervisor],
ensure => file,