apollon 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gemspec +35 -0
- data/.gitignore +5 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +87 -0
- data/LICENSE +21 -0
- data/README.md +100 -0
- data/Rakefile +20 -0
- data/TODO.md +22 -0
- data/Vagrantfile +92 -0
- data/WHATS_IN.md +55 -0
- data/artifacts/.gitkeepme +1 -0
- data/clean.sh +3 -0
- data/lib/apollon/app/app.rb +1 -0
- data/lib/apollon/core/core.rb +8 -0
- data/lib/apollon/helpers/helpers.rb +28 -0
- data/lib/{lib.rb → apollon/lib.rb} +0 -0
- data/lib/apollon/provisions/provisions.rb +8 -0
- data/lib/apollon/provisions/puppet.rb +1 -0
- data/lib/apollon/version.rb +5 -0
- data/lib/apollon.rb +1 -0
- data/packs/README.md +15 -0
- data/packs/core/README.md +3 -0
- data/packs/core/pack-digitalocean.sh +8 -0
- data/packs/core/pack-vagrant.sh +16 -0
- data/packs/core/packer.json +82 -0
- data/packs/core/provision.sh +9 -0
- data/packs/core/scripts/provision-digitalocean.sh +11 -0
- data/packs/examples/aws/pack.sh +6 -0
- data/packs/examples/aws/packer.json +18 -0
- data/packs/examples/digitalocean/data/images.json +344 -0
- data/packs/examples/digitalocean/data/regions.json +22 -0
- data/packs/examples/digitalocean/data/sizes.json +92 -0
- data/packs/examples/digitalocean/pack.sh +4 -0
- data/packs/examples/digitalocean/packer.json +18 -0
- data/packs/examples/virtualbox-iso/pack.sh +15 -0
- data/packs/examples/virtualbox-iso/packer.json +49 -0
- data/packs/examples/virtualbox-iso/provision.sh +3 -0
- data/puppet/environment.conf +7 -0
- data/puppet/manifests/all.pp +10 -0
- data/puppet/manifests/core.pp +3 -0
- data/puppet/manifests/db.pp +3 -0
- data/puppet/manifests/default.pp +3 -0
- data/puppet/manifests/dev.pp +3 -0
- data/puppet/manifests/ops.pp +3 -0
- data/puppet/manifests/sites/apollocrawler.com.pp +5 -0
- data/puppet/manifests/web.pp +5 -0
- data/puppet/modules/apache2/files/apache2.conf +221 -0
- data/puppet/modules/apache2/files/envvars +47 -0
- data/puppet/modules/apache2/files/magic +935 -0
- data/puppet/modules/apache2/files/ports.conf +15 -0
- data/puppet/modules/apache2/manifests/init.pp +46 -0
- data/puppet/modules/clang/manifests/init.pp +11 -0
- data/puppet/modules/cmake/manifests/init.pp +11 -0
- data/puppet/modules/core/files/sources.list +62 -0
- data/puppet/modules/core/manifests/init.pp +63 -0
- data/puppet/modules/couchdb/files/local.ini +98 -0
- data/puppet/modules/couchdb/manifests/init.pp +25 -0
- data/puppet/modules/db/manifests/init.pp +13 -0
- data/puppet/modules/dev/manifests/init.pp +20 -0
- data/puppet/modules/elasticsearch/files/elasticsearch.yml +377 -0
- data/puppet/modules/elasticsearch/files/logging.yml +56 -0
- data/puppet/modules/elasticsearch/manifests/init.pp +45 -0
- data/puppet/modules/erlang/manifests/init.pp +11 -0
- data/puppet/modules/ghc/manifests/init.pp +11 -0
- data/puppet/modules/git/manifests/init.pp +11 -0
- data/puppet/modules/golang/manifests/init.pp +11 -0
- data/puppet/modules/htop/manifests/init.pp +11 -0
- data/puppet/modules/java/files/accept-java-license.sh +4 -0
- data/puppet/modules/java/files/install-java7.sh +7 -0
- data/puppet/modules/java/files/install-java8.sh +7 -0
- data/puppet/modules/java/manifests/init.pp +86 -0
- data/puppet/modules/links/manifests/init.pp +11 -0
- data/puppet/modules/llvm/manifests/init.pp +11 -0
- data/puppet/modules/lynx/manifests/init.pp +11 -0
- data/puppet/modules/mc/manifests/init.pp +11 -0
- data/puppet/modules/memcache/files/memcached.conf +47 -0
- data/puppet/modules/memcache/manifests/init.pp +24 -0
- data/puppet/modules/mongodb/files/mongodb.conf +102 -0
- data/puppet/modules/mongodb/manifests/init.pp +24 -0
- data/puppet/modules/mosh/manifests/init.pp +11 -0
- data/puppet/modules/mysql/files/conf.d/mysqld_safe_syslog.cnf +2 -0
- data/puppet/modules/mysql/files/debian.cnf +12 -0
- data/puppet/modules/mysql/files/my.cnf +127 -0
- data/puppet/modules/mysql/manifests/init.pp +45 -0
- data/puppet/modules/nginx/manifests/init.pp +16 -0
- data/puppet/modules/nodejs/manifests/init.pp +41 -0
- data/puppet/modules/octave/manifests/init.pp +11 -0
- data/puppet/modules/ops/manifests/init.pp +12 -0
- data/puppet/modules/php5/manifests/init.pp +11 -0
- data/puppet/modules/postgresql/files/9.3/main/environment +7 -0
- data/puppet/modules/postgresql/files/9.3/main/pg_ctl.conf +5 -0
- data/puppet/modules/postgresql/files/9.3/main/pg_hba.conf +99 -0
- data/puppet/modules/postgresql/files/9.3/main/pg_ident.conf +42 -0
- data/puppet/modules/postgresql/files/9.3/main/postgresql.conf +598 -0
- data/puppet/modules/postgresql/files/9.3/main/start.conf +9 -0
- data/puppet/modules/postgresql/files/create-postgresql-user.sh +4 -0
- data/puppet/modules/postgresql/files/sql/bootstrap.sh +1 -0
- data/puppet/modules/postgresql/files/sql/create-extension-adminpack.sql +1 -0
- data/puppet/modules/postgresql/files/sql/create-extension-postgis.sql +11 -0
- data/puppet/modules/postgresql/manifests/init.pp +145 -0
- data/puppet/modules/python/manifests/init.pp +11 -0
- data/puppet/modules/r/manifests/init.pp +11 -0
- data/puppet/modules/rabbitmq/files/enable-user-management.sh +3 -0
- data/puppet/modules/rabbitmq/manifests/init.pp +36 -0
- data/puppet/modules/redis/files/memcached.conf +47 -0
- data/puppet/modules/redis/manifests/init.pp +19 -0
- data/puppet/modules/ruby/manifests/init.pp +11 -0
- data/puppet/modules/rvm/manifests/init.pp +33 -0
- data/puppet/modules/science/manifests/init.pp +8 -0
- data/puppet/modules/squid/manifests/init.pp +16 -0
- data/puppet/modules/svn/manifests/init.pp +11 -0
- data/puppet/modules/tomcat7/files/tomcat-users.xml +6 -0
- data/puppet/modules/tomcat7/manifests/init.pp +24 -0
- data/puppet/modules/varnish/manifests/init.pp +11 -0
- data/puppet/modules/web/manifests/init.pp +10 -0
- data/puppet/modules/zookeeper/files/conf/configuration.xsl +24 -0
- data/puppet/modules/zookeeper/files/conf/environment +20 -0
- data/puppet/modules/zookeeper/files/conf/log4j.properties +51 -0
- data/puppet/modules/zookeeper/files/conf/zoo.cfg +51 -0
- data/puppet/modules/zookeeper/manifests/init.pp +27 -0
- data/tmp/.gitkeepme +1 -0
- data/vagrant/profiles/default.json +53 -0
- metadata +156 -35
@@ -0,0 +1,145 @@
|
|
1
|
+
# == Class: postgresql
|
2
|
+
#
|
3
|
+
# Installs PostgreSQL and sets config file.
|
4
|
+
#
|
5
|
+
class postgresql {
|
6
|
+
require core
|
7
|
+
|
8
|
+
package { 'postgresql':
|
9
|
+
ensure => present;
|
10
|
+
}
|
11
|
+
|
12
|
+
package { 'postgresql-contrib':
|
13
|
+
require => Package['postgresql'],
|
14
|
+
ensure => present;
|
15
|
+
}
|
16
|
+
|
17
|
+
package { 'postgresql-9.3-postgis-scripts':
|
18
|
+
ensure => present;
|
19
|
+
}
|
20
|
+
|
21
|
+
file { '/etc/postgresql/9.3/main/environment':
|
22
|
+
owner => postgres,
|
23
|
+
group => postgres,
|
24
|
+
source => 'puppet:///modules/postgresql/9.3/main/environment',
|
25
|
+
require => Package['postgresql'],
|
26
|
+
notify => Service['postgresql'];
|
27
|
+
}
|
28
|
+
|
29
|
+
file { '/etc/postgresql/9.3/main/pg_ctl.conf':
|
30
|
+
owner => postgres,
|
31
|
+
group => postgres,
|
32
|
+
source => 'puppet:///modules/postgresql/9.3/main/pg_ctl.conf',
|
33
|
+
require => Package['postgresql'],
|
34
|
+
notify => Service['postgresql'];
|
35
|
+
}
|
36
|
+
|
37
|
+
file { '/etc/postgresql/9.3/main/pg_hba.conf':
|
38
|
+
owner => postgres,
|
39
|
+
group => postgres,
|
40
|
+
mode => 0640,
|
41
|
+
source => 'puppet:///modules/postgresql/9.3/main/pg_hba.conf',
|
42
|
+
require => Package['postgresql'],
|
43
|
+
notify => Service['postgresql'];
|
44
|
+
}
|
45
|
+
|
46
|
+
file { '/etc/postgresql/9.3/main/pg_ident.conf':
|
47
|
+
owner => postgres,
|
48
|
+
group => postgres,
|
49
|
+
mode => 0640,
|
50
|
+
source => 'puppet:///modules/postgresql/9.3/main/pg_ident.conf',
|
51
|
+
require => Package['postgresql'],
|
52
|
+
notify => Service['postgresql'];
|
53
|
+
}
|
54
|
+
|
55
|
+
file { '/etc/postgresql/9.3/main/postgresql.conf':
|
56
|
+
owner => postgres,
|
57
|
+
group => postgres,
|
58
|
+
source => 'puppet:///modules/postgresql/9.3/main/postgresql.conf',
|
59
|
+
require => Package['postgresql'],
|
60
|
+
notify => Service['postgresql'];
|
61
|
+
}
|
62
|
+
|
63
|
+
file { '/etc/postgresql/9.3/main/start.conf':
|
64
|
+
owner => postgres,
|
65
|
+
group => postgres,
|
66
|
+
source => 'puppet:///modules/postgresql/9.3/main/start.conf',
|
67
|
+
require => Package['postgresql'],
|
68
|
+
notify => Service['postgresql'];
|
69
|
+
}
|
70
|
+
|
71
|
+
service { 'postgresql':
|
72
|
+
ensure => running,
|
73
|
+
require => [
|
74
|
+
Package['postgresql'],
|
75
|
+
Package['postgresql-9.3-postgis-scripts'],
|
76
|
+
File['/etc/postgresql/9.3/main/environment'],
|
77
|
+
File['/etc/postgresql/9.3/main/pg_ctl.conf'],
|
78
|
+
File['/etc/postgresql/9.3/main/pg_hba.conf'],
|
79
|
+
File['/etc/postgresql/9.3/main/pg_ident.conf'],
|
80
|
+
File['/etc/postgresql/9.3/main/postgresql.conf'],
|
81
|
+
File['/etc/postgresql/9.3/main/start.conf'],
|
82
|
+
];
|
83
|
+
}
|
84
|
+
|
85
|
+
file { '/home/vagrant/scripts/create-postgresql-user.sh':
|
86
|
+
owner => postgres,
|
87
|
+
group => postgres,
|
88
|
+
mode => 0755,
|
89
|
+
source => 'puppet:///modules/postgresql/create-postgresql-user.sh',
|
90
|
+
require => Package['postgresql']
|
91
|
+
}
|
92
|
+
|
93
|
+
file { '/home/vagrant/scripts/create-extension-adminpack.sql':
|
94
|
+
owner => postgres,
|
95
|
+
group => postgres,
|
96
|
+
source => 'puppet:///modules/postgresql/sql/create-extension-adminpack.sql',
|
97
|
+
require => Package['postgresql']
|
98
|
+
}
|
99
|
+
|
100
|
+
file { '/home/vagrant/scripts/create-extension-postgis.sql':
|
101
|
+
owner => postgres,
|
102
|
+
group => postgres,
|
103
|
+
source => 'puppet:///modules/postgresql/sql/create-extension-postgis.sql',
|
104
|
+
require => Package['postgresql']
|
105
|
+
}
|
106
|
+
|
107
|
+
exec { 'create-extension-postgis':
|
108
|
+
user => 'postgres',
|
109
|
+
require => [
|
110
|
+
File['/home/vagrant/scripts/create-extension-postgis.sql'],
|
111
|
+
Service['postgresql']
|
112
|
+
],
|
113
|
+
command => '/usr/bin/psql -f /home/vagrant/scripts/create-extension-postgis.sql'
|
114
|
+
}
|
115
|
+
|
116
|
+
exec { 'add-vagrant-postgresql-user':
|
117
|
+
user => 'postgres',
|
118
|
+
require => Service['postgresql'],
|
119
|
+
command => '/home/vagrant/scripts/create-postgresql-user.sh'
|
120
|
+
}
|
121
|
+
|
122
|
+
exec { 'restart-postgresql-after-adding-vagrant-user':
|
123
|
+
require => Exec['add-vagrant-postgresql-user'],
|
124
|
+
command => '/usr/sbin/service postgresql restart'
|
125
|
+
}
|
126
|
+
|
127
|
+
exec { 'updatedb':
|
128
|
+
user => 'root',
|
129
|
+
require => [
|
130
|
+
Package['postgresql-contrib'],
|
131
|
+
Service['postgresql'],
|
132
|
+
],
|
133
|
+
command => '/usr/bin/updatedb'
|
134
|
+
}
|
135
|
+
|
136
|
+
exec { 'create-extension-adminpack':
|
137
|
+
user => 'postgres',
|
138
|
+
require => [
|
139
|
+
File['/home/vagrant/scripts/create-extension-adminpack.sql'],
|
140
|
+
Service['postgresql'],
|
141
|
+
Exec['updatedb']
|
142
|
+
],
|
143
|
+
command => '/usr/bin/psql -f /home/vagrant/scripts/create-extension-adminpack.sql'
|
144
|
+
}
|
145
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# == Class: rabbitmq
|
2
|
+
#
|
3
|
+
# Installs RabbitMQ server.
|
4
|
+
#
|
5
|
+
class rabbitmq {
|
6
|
+
require core
|
7
|
+
|
8
|
+
# create a directory for temporary files scripts
|
9
|
+
file { "/home/vagrant/scripts/rabbitmq":
|
10
|
+
ensure => "directory",
|
11
|
+
}
|
12
|
+
|
13
|
+
file { "/home/vagrant/scripts/rabbitmq/enable-user-management.sh":
|
14
|
+
owner => root,
|
15
|
+
group => root,
|
16
|
+
mode => 0755,
|
17
|
+
source => 'puppet:///modules/rabbitmq/enable-user-management.sh';
|
18
|
+
}
|
19
|
+
|
20
|
+
package { 'rabbitmq-server':
|
21
|
+
ensure => present;
|
22
|
+
}
|
23
|
+
|
24
|
+
service { 'rabbitmq-server':
|
25
|
+
require => Package['rabbitmq-server'],
|
26
|
+
ensure => running,
|
27
|
+
}
|
28
|
+
|
29
|
+
exec { 'enable-user-management':
|
30
|
+
require => [
|
31
|
+
File['/home/vagrant/scripts/rabbitmq/enable-user-management.sh'],
|
32
|
+
Service['rabbitmq-server']
|
33
|
+
],
|
34
|
+
command => '/home/vagrant/scripts/rabbitmq/enable-user-management.sh'
|
35
|
+
}
|
36
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# memcached default config file
|
2
|
+
# 2003 - Jay Bonci <jaybonci@debian.org>
|
3
|
+
# This configuration file is read by the start-memcached script provided as
|
4
|
+
# part of the Debian GNU/Linux distribution.
|
5
|
+
|
6
|
+
# Run memcached as a daemon. This command is implied, and is not needed for the
|
7
|
+
# daemon to run. See the README.Debian that comes with this package for more
|
8
|
+
# information.
|
9
|
+
-d
|
10
|
+
|
11
|
+
# Log memcached's output to /var/log/memcached
|
12
|
+
logfile /var/log/memcached.log
|
13
|
+
|
14
|
+
# Be verbose
|
15
|
+
# -v
|
16
|
+
|
17
|
+
# Be even more verbose (print client commands as well)
|
18
|
+
# -vv
|
19
|
+
|
20
|
+
# Start with a cap of 64 megs of memory. It's reasonable, and the daemon default
|
21
|
+
# Note that the daemon will grow to this size, but does not start out holding this much
|
22
|
+
# memory
|
23
|
+
-m 64
|
24
|
+
|
25
|
+
# Default connection port is 11211
|
26
|
+
-p 11211
|
27
|
+
|
28
|
+
# Run the daemon as root. The start-memcached will default to running as root if no
|
29
|
+
# -u command is present in this config file
|
30
|
+
-u memcache
|
31
|
+
|
32
|
+
# Specify which IP address to listen on. The default is to listen on all IP addresses
|
33
|
+
# This parameter is one of the only security measures that memcached has, so make sure
|
34
|
+
# it's listening on a firewalled interface.
|
35
|
+
# -l 127.0.0.1
|
36
|
+
|
37
|
+
# Limit the number of simultaneous incoming connections. The daemon default is 1024
|
38
|
+
# -c 1024
|
39
|
+
|
40
|
+
# Lock down all paged memory. Consult with the README and homepage before you do this
|
41
|
+
# -k
|
42
|
+
|
43
|
+
# Return error when memory is exhausted (rather than removing items)
|
44
|
+
# -M
|
45
|
+
|
46
|
+
# Maximize core file limit
|
47
|
+
# -r
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# == Class: memcache
|
2
|
+
#
|
3
|
+
# Installs Memcached and sets config file.
|
4
|
+
#
|
5
|
+
class redis {
|
6
|
+
require core
|
7
|
+
|
8
|
+
package { 'redis-server':
|
9
|
+
ensure => present;
|
10
|
+
}
|
11
|
+
|
12
|
+
# service { 'redis':
|
13
|
+
# ensure => running,
|
14
|
+
# enable => true,
|
15
|
+
# hasrestart => true,
|
16
|
+
# hasstatus => true,
|
17
|
+
# require => Package['redis-server'];
|
18
|
+
# }
|
19
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# == Class: rvm
|
2
|
+
#
|
3
|
+
# Installs rvm package
|
4
|
+
#
|
5
|
+
class rvm {
|
6
|
+
require core
|
7
|
+
|
8
|
+
$rvm_user = "root"
|
9
|
+
|
10
|
+
exec { "rvm-install":
|
11
|
+
user => $rvm_user,
|
12
|
+
command => "/usr/bin/curl -sSL https://get.rvm.io | bash",
|
13
|
+
}
|
14
|
+
|
15
|
+
exec { "rvm-install-2.0":
|
16
|
+
require => Exec['rvm-install'],
|
17
|
+
user => $rvm_user,
|
18
|
+
command => '/usr/local/rvm/bin/rvm install 2.0',
|
19
|
+
timeout => 3600
|
20
|
+
}
|
21
|
+
|
22
|
+
exec { "rvm-use-2.0":
|
23
|
+
require => Exec['rvm-install-2.0'],
|
24
|
+
user => $rvm_user,
|
25
|
+
command => '/usr/local/rvm/bin/rvm use --default 2.0'
|
26
|
+
}
|
27
|
+
|
28
|
+
exec { "rvm-install-bundler":
|
29
|
+
require => Exec["rvm-use-2.0"],
|
30
|
+
user => $rvm_user,
|
31
|
+
command => '/usr/bin/gem install bundler'
|
32
|
+
}
|
33
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# == Class: tomcat7
|
2
|
+
#
|
3
|
+
# Installs Tomcat7.
|
4
|
+
#
|
5
|
+
class tomcat7 {
|
6
|
+
require core
|
7
|
+
require java
|
8
|
+
|
9
|
+
package { 'tomcat7':
|
10
|
+
ensure => present;
|
11
|
+
}
|
12
|
+
|
13
|
+
package { 'tomcat7-admin':
|
14
|
+
ensure => present,
|
15
|
+
require => Package['tomcat7'];
|
16
|
+
}
|
17
|
+
|
18
|
+
file { "/etc/tomcat7/tomcat-users.xml":
|
19
|
+
require => Package['tomcat7-admin'];
|
20
|
+
owner => root,
|
21
|
+
group => tomcat7,
|
22
|
+
source => 'puppet:///modules/tomcat7/tomcat-users.xml';
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
?xml version="1.0"?>
|
2
|
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
3
|
+
<xsl:output method="html"/>
|
4
|
+
<xsl:template match="configuration">
|
5
|
+
<html>
|
6
|
+
<body>
|
7
|
+
<table border="1">
|
8
|
+
<tr>
|
9
|
+
<td>name</td>
|
10
|
+
<td>value</td>
|
11
|
+
<td>description</td>
|
12
|
+
</tr>
|
13
|
+
<xsl:for-each select="property">
|
14
|
+
<tr>
|
15
|
+
<td><a name="{name}"><xsl:value-of select="name"/></a></td>
|
16
|
+
<td><xsl:value-of select="value"/></td>
|
17
|
+
<td><xsl:value-of select="description"/></td>
|
18
|
+
</tr>
|
19
|
+
</xsl:for-each>
|
20
|
+
</table>
|
21
|
+
</body>
|
22
|
+
</html>
|
23
|
+
</xsl:template>
|
24
|
+
</xsl:stylesheet>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
NAME=zookeeper
|
2
|
+
ZOOCFGDIR=/etc/$NAME/conf
|
3
|
+
|
4
|
+
# TODO this is really ugly
|
5
|
+
# How to find out, which jars are needed?
|
6
|
+
# seems, that log4j requires the log4j.properties file to be in the classpath
|
7
|
+
CLASSPATH="$ZOOCFGDIR:/usr/share/java/jline.jar:/usr/share/java/log4j-1.2.jar:/usr/share/java/xercesImpl.jar:/usr/share/java/xmlParserAPIs.jar:/usr/share/java/netty.jar:/usr/share/java/slf4j-api.jar:/usr/share/java/slf4j-log4j12.jar:/usr/share/java/zookeeper.jar"
|
8
|
+
|
9
|
+
ZOOCFG="$ZOOCFGDIR/zoo.cfg"
|
10
|
+
ZOO_LOG_DIR=/var/log/$NAME
|
11
|
+
USER=$NAME
|
12
|
+
GROUP=$NAME
|
13
|
+
PIDDIR=/var/run/$NAME
|
14
|
+
PIDFILE=$PIDDIR/$NAME.pid
|
15
|
+
SCRIPTNAME=/etc/init.d/$NAME
|
16
|
+
JAVA=/usr/bin/java
|
17
|
+
ZOOMAIN="org.apache.zookeeper.server.quorum.QuorumPeerMain"
|
18
|
+
ZOO_LOG4J_PROP="INFO,ROLLINGFILE"
|
19
|
+
JMXLOCALONLY=false
|
20
|
+
JAVA_OPTS=""
|
@@ -0,0 +1,51 @@
|
|
1
|
+
#
|
2
|
+
# ZooKeeper Logging Configuration
|
3
|
+
#
|
4
|
+
|
5
|
+
# Format is "<default threshold> (, <appender>)+
|
6
|
+
|
7
|
+
log4j.rootLogger=${zookeeper.root.logger}
|
8
|
+
|
9
|
+
# Example: console appender only
|
10
|
+
# log4j.rootLogger=INFO, CONSOLE
|
11
|
+
|
12
|
+
# Example with rolling log file
|
13
|
+
#log4j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE
|
14
|
+
|
15
|
+
# Example with rolling log file and tracing
|
16
|
+
#log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE
|
17
|
+
|
18
|
+
#
|
19
|
+
# Log INFO level and above messages to the console
|
20
|
+
#
|
21
|
+
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
|
22
|
+
log4j.appender.CONSOLE.Threshold=INFO
|
23
|
+
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
|
24
|
+
log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n
|
25
|
+
|
26
|
+
#
|
27
|
+
# Add ROLLINGFILE to rootLogger to get log file output
|
28
|
+
# Log DEBUG level and above messages to a log file
|
29
|
+
log4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender
|
30
|
+
log4j.appender.ROLLINGFILE.Threshold=DEBUG
|
31
|
+
log4j.appender.ROLLINGFILE.File=${zookeeper.log.dir}/zookeeper.log
|
32
|
+
|
33
|
+
# Max log file size of 10MB
|
34
|
+
log4j.appender.ROLLINGFILE.MaxFileSize=10MB
|
35
|
+
# uncomment the next line to limit number of backup files
|
36
|
+
#log4j.appender.ROLLINGFILE.MaxBackupIndex=10
|
37
|
+
|
38
|
+
log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout
|
39
|
+
log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n
|
40
|
+
|
41
|
+
|
42
|
+
#
|
43
|
+
# Add TRACEFILE to rootLogger to get log file output
|
44
|
+
# Log DEBUG level and above messages to a log file
|
45
|
+
log4j.appender.TRACEFILE=org.apache.log4j.FileAppender
|
46
|
+
log4j.appender.TRACEFILE.Threshold=TRACE
|
47
|
+
log4j.appender.TRACEFILE.File=${zookeeper.log.dir}/zookeeper_trace.log
|
48
|
+
|
49
|
+
log4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout
|
50
|
+
### Notice we are including log4j's NDC here (%x)
|
51
|
+
log4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L][%x] - %m%n
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# http://hadoop.apache.org/zookeeper/docs/current/zookeeperAdmin.html
|
2
|
+
|
3
|
+
# The number of milliseconds of each tick
|
4
|
+
tickTime=2000
|
5
|
+
# The number of ticks that the initial
|
6
|
+
# synchronization phase can take
|
7
|
+
initLimit=10
|
8
|
+
# The number of ticks that can pass between
|
9
|
+
# sending a request and getting an acknowledgement
|
10
|
+
syncLimit=5
|
11
|
+
# the directory where the snapshot is stored.
|
12
|
+
dataDir=/var/lib/zookeeper
|
13
|
+
# Place the dataLogDir to a separate physical disc for better performance
|
14
|
+
# dataLogDir=/disk2/zookeeper
|
15
|
+
|
16
|
+
# the port at which the clients will connect
|
17
|
+
clientPort=2181
|
18
|
+
|
19
|
+
# specify all zookeeper servers
|
20
|
+
# The fist port is used by followers to connect to the leader
|
21
|
+
# The second one is used for leader election
|
22
|
+
#server.1=zookeeper1:2888:3888
|
23
|
+
#server.2=zookeeper2:2888:3888
|
24
|
+
#server.3=zookeeper3:2888:3888
|
25
|
+
|
26
|
+
|
27
|
+
# To avoid seeks ZooKeeper allocates space in the transaction log file in
|
28
|
+
# blocks of preAllocSize kilobytes. The default block size is 64M. One reason
|
29
|
+
# for changing the size of the blocks is to reduce the block size if snapshots
|
30
|
+
# are taken more often. (Also, see snapCount).
|
31
|
+
#preAllocSize=65536
|
32
|
+
|
33
|
+
# Clients can submit requests faster than ZooKeeper can process them,
|
34
|
+
# especially if there are a lot of clients. To prevent ZooKeeper from running
|
35
|
+
# out of memory due to queued requests, ZooKeeper will throttle clients so that
|
36
|
+
# there is no more than globalOutstandingLimit outstanding requests in the
|
37
|
+
# system. The default limit is 1,000.ZooKeeper logs transactions to a
|
38
|
+
# transaction log. After snapCount transactions are written to a log file a
|
39
|
+
# snapshot is started and a new transaction log file is started. The default
|
40
|
+
# snapCount is 10,000.
|
41
|
+
#snapCount=1000
|
42
|
+
|
43
|
+
# If this option is defined, requests will be will logged to a trace file named
|
44
|
+
# traceFile.year.month.day.
|
45
|
+
#traceFile=
|
46
|
+
|
47
|
+
# Leader accepts client connections. Default value is "yes". The leader machine
|
48
|
+
# coordinates updates. For higher update throughput at thes slight expense of
|
49
|
+
# read throughput the leader can be configured to not accept clients and focus
|
50
|
+
# on coordination.
|
51
|
+
#leaderServes=yes
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# == Class: zookeeper
|
2
|
+
#
|
3
|
+
# Installs Zookeeper.
|
4
|
+
#
|
5
|
+
class zookeeper {
|
6
|
+
require core
|
7
|
+
require java
|
8
|
+
|
9
|
+
package { 'zookeeper':
|
10
|
+
ensure => present;
|
11
|
+
}
|
12
|
+
|
13
|
+
package { 'zookeeper-bin':
|
14
|
+
require => Package['zookeeper'],
|
15
|
+
ensure => present;
|
16
|
+
}
|
17
|
+
|
18
|
+
package { 'zookeeperd':
|
19
|
+
require => Package['zookeeper'],
|
20
|
+
ensure => present;
|
21
|
+
}
|
22
|
+
|
23
|
+
service { 'zookeeper':
|
24
|
+
require => Package['zookeeperd'],
|
25
|
+
ensure => running,
|
26
|
+
}
|
27
|
+
}
|
data/tmp/.gitkeepme
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# Keep this file to keep this folder under the git ...
|
@@ -0,0 +1,53 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"hostname": "apollo-fat-box-packer",
|
4
|
+
"box": "apollo-fat-box-packer",
|
5
|
+
"box_url": "artifacts/vagrant.box",
|
6
|
+
|
7
|
+
"network": {
|
8
|
+
"ports": [
|
9
|
+
{
|
10
|
+
"guest": 5432,
|
11
|
+
"host": 5433
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"guest": 5672,
|
15
|
+
"host": 5673
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"guest": 5984,
|
19
|
+
"host": 5985
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"guest": 9200,
|
23
|
+
"host": 9201
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"guest": 11211,
|
27
|
+
"host": 11212
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"guest": 15672,
|
31
|
+
"host": 15673
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"guest": 27017,
|
35
|
+
"host": 27018
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"guest": 28017,
|
39
|
+
"host": 28018
|
40
|
+
}
|
41
|
+
]
|
42
|
+
},
|
43
|
+
|
44
|
+
"provisions": [
|
45
|
+
{
|
46
|
+
"name": "puppet",
|
47
|
+
"manifests_path": "puppet/manifests",
|
48
|
+
"manifest_file": "all.pp",
|
49
|
+
"module_path": "puppet/modules"
|
50
|
+
}
|
51
|
+
]
|
52
|
+
}
|
53
|
+
]
|