This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into master-merge-srcpackage
- Loading branch information
Showing
24 changed files
with
236 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,9 @@ | |||
|
|||
__description__ = "Jenkins CI" | |||
__config__ = { | |||
"jenkins.http_port": dict( | |||
description = "HTTP port to listen on", | |||
default = 8080, | |||
) | |||
} | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,32 @@ | |||
|
|||
from kokki import * | |||
|
|||
if env.system.platform in ("ubuntu", "debian"): | |||
Execute("wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -", | |||
not_if = "(apt-key list | grep 'Kohsuke Kawaguchi' > /dev/null)") | |||
|
|||
|
|||
apt = "deb http://pkg.jenkins-ci.org/debian binary/" | |||
apt_list_path = '/etc/apt/sources.list.d/jenkins.list' | |||
|
|||
Execute("apt-update-jenkins", | |||
command = "apt-get update", | |||
action = "nothing") | |||
|
|||
File(apt_list_path, | |||
owner = "root", | |||
group ="root", | |||
mode = 0644, | |||
content = apt+"\n", | |||
notifies = [("run", env.resources["Execute"]["apt-update-jenkins"], True)]) | |||
|
|||
Package("jenkins") | |||
|
|||
Service("jenkins") | |||
|
|||
File("/etc/default/jenkins", | |||
owner = "root", | |||
group = "root", | |||
mode = 0644, | |||
content = Template("jenkins/default.j2"), | |||
notifies = [("restart", env.resources["Service"]["jenkins"])]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,53 @@ | |||
# defaults for jenkins continuous integration server | |||
|
|||
# pulled in from the init script; makes things easier. | |||
NAME=jenkins | |||
|
|||
# location of java | |||
JAVA=/usr/bin/java | |||
|
|||
# arguments to pass to java | |||
#JAVA_ARGS="-Xmx256m" | |||
|
|||
PIDFILE=/var/run/jenkins/jenkins.pid | |||
|
|||
# user id to be invoked as (otherwise will run as root; not wise!) | |||
JENKINS_USER=jenkins | |||
|
|||
# location of the jenkins war file | |||
JENKINS_WAR=/usr/share/jenkins/jenkins.war | |||
|
|||
# jenkins home location | |||
JENKINS_HOME=/var/lib/jenkins | |||
|
|||
# set this to false if you don't want Hudson to run by itself | |||
# in this set up, you are expected to provide a servlet containr | |||
# to host jenkins. | |||
RUN_STANDALONE=true | |||
|
|||
# log location. this may be a syslog facility.priority | |||
JENKINS_LOG=/var/log/jenkins/$NAME.log | |||
#HUDSON_LOG=daemon.info | |||
|
|||
# OS LIMITS SETUP | |||
# comment this out to observe /etc/security/limits.conf | |||
# this is on by default because http://github.com/feniix/hudson/commit/d13c08ea8f5a3fa730ba174305e6429b74853927 | |||
# reported that Ubuntu's PAM configuration doesn't include pam_limits.so, and as a result the # of file | |||
# descriptors are forced to 1024 regardless of /etc/security/limits.conf | |||
MAXOPENFILES=8192 | |||
|
|||
# port for HTTP connector (default 8080; disable with -1) | |||
HTTP_PORT={{ env.config.jenkins.http_port }} | |||
|
|||
# port for AJP connector (disabled by default) | |||
AJP_PORT=-1 | |||
|
|||
# arguments to pass to jenkins. | |||
# --javahome=$JAVA_HOME | |||
# --httpPort=$HTTP_PORT (default 8080; disable with -1) | |||
# --httpsPort=$HTTP_PORT | |||
# --ajp13Port=$AJP_PORT | |||
# --argumentsRealm.passwd.$ADMIN_USER=[password] | |||
# --argumentsRealm.$ADMIN_USER=admin | |||
# --webroot=~/.jenkins/war | |||
JENKINS_ARGS="--webroot=/var/run/jenkins/war --httpPort=$HTTP_PORT --ajp13Port=$AJP_PORT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,4 @@ | |||
[program:mongodb_{{ name }}] | |||
command=/usr/bin/mongod --config {{ mongodb.configpath }} {{ " ".join(mongodb.options) }} | |||
# autostart=true | |||
stopwaitsecs=300 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,8 @@ | |||
|
|||
__description__ = "RabbitMQ Messaging Server" | |||
__config__ = { | |||
"rabbitmq.path": dict( | |||
description = "Install path for rabbitmq", | |||
default = "/usr/local/rabbitmq", | |||
) | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,10 @@ | |||
|
|||
from kokki import * | |||
|
|||
Package("erlang") | |||
|
|||
if env.system.platform in ("ubuntu", "debian"): | |||
pkg_url = "http://www.rabbitmq.com/releases/rabbitmq-server/v2.3.1/rabbitmq-server_2.3.1-1_all.deb" | |||
Execute("cd /tmp ; wget %s ; dpkg -i %s ; rm rabbitmq*deb" % (pkg_url, pkg_url.rsplit('/', 1)[-1]), | |||
not_if = "dpkg-query -c rabbitmq-server > /dev/null") | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,12 +1,13 @@ | |||
|
|
||
import os | |||
from kokki import * | from kokki import * | ||
|
|
||
def config(name, content): | def configuration(name, content): | ||
env = Environment.get_instance() | env = Environment.get_instance() | ||
return File("supervisor-%s" % name, | return File("supervisor-%s" % name, | ||
content = content, | content = content, | ||
owner = "root", | owner = "root", | ||
group = "root", | group = "root", | ||
mode = 0644, | mode = 0644, | ||
path = "%s/supervisor.d/%s" % (env.config.supervisor.config_path, name), | path = os.path.join(env.config.supervisor.custom_config_path, name) + ".conf", | ||
notifies = [("restart", env.resources["Service"]["supervisor"])]) | notifies = [("reload", env.resources["Service"]["supervisor"])]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,20 +1,27 @@ | |||
|
|
||
import os | |||
from kokki import * | from kokki import * | ||
|
|
||
env.include_recipe("monit") | # env.include_recipe("monit") | ||
|
|
||
Package("supervisor", | Package("supervisor") | ||
provider = "kokki.providers.package.easy_install.EasyInstallProvider") | # provider = "kokki.providers.package.easy_install.EasyInstallProvider") | ||
|
|
||
File("supervisord.conf", | File("supervisord.conf", | ||
path = "%s/supervisord.conf" % env.config.supervisor.config_path, | path = env.config.supervisor.config_path, | ||
content = Template("supervisor/supervisord.conf.j2")) | content = Template("supervisor/supervisord.conf.j2")) | ||
|
|
||
Directory("supervisor.d", | Directory("supervisor.d", | ||
path = "%s/supervisor.d" % env.config.supervisor.config_path) | path = env.config.supervisor.custom_config_path) | ||
|
|
||
env.cookbooks.monit.rc("supervisord", | supervisorctl = os.path.join(env.config.supervisor.binary_path, "supervisorctl") | ||
content = Template("supervisor/monit.conf.j2")) | Service("supervisor", | ||
restart_command = "%s reload" % supervisorctl, | |||
reload_command = "%s update" % supervisorctl, | |||
subscribes = [("reload", env.resources["File"]["supervisord.conf"])]) | |||
|
|
||
env.cookbooks.monit.MonitService("supervisord", | #env.cookbooks.monit.rc("supervisord", | ||
subscribes = [("restart", env.resources["File"]["supervisord.conf"])]) | # content = Template("supervisor/monit.conf.j2")) | ||
|
|||
#env.cookbooks.monit.MonitService("supervisord", | |||
# subscribes = [("restart", env.resources["File"]["supervisord.conf"])]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,8 +1,8 @@ | |||
|
|
||
__description__ = "Manage user accounts and sysadmins" | __description__ = "Manage user accounts and sysadmins" | ||
__config__ = { | __config__ = { | ||
"sysadmins": dict( | "users": dict( | ||
description = "List of sysadmins (id,username,sshkey_id,sshkey_type,sshkey)", | description = "Disctionary of sysadmins with username as the key and value as a dictionary of (id,sshkey_id,sshkey_type,sshkey)", | ||
default = [], | default = {}, | ||
) | ) | ||
} | } |
Oops, something went wrong.