Yuvipanda has uploaded a new change for review.
https://gerrit.wikimedia.org/r/213189
Change subject: mesos: Setup marathon properly
......................................................................
mesos: Setup marathon properly
- Make sure the service is running
- Add /etc/default/marathon for setting up ENV variables
- Setup /etc/default/marathon-private for unpuppetized private
variables like HTTP credentials
Change-Id: I84d6c93051a601b487f067d87b660f9589020b05
---
A modules/mesos/files/marathon.conf
M modules/mesos/manifests/master.pp
A modules/mesos/templates/marathon.default.erb
3 files changed, 41 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/89/213189/1
diff --git a/modules/mesos/files/marathon.conf
b/modules/mesos/files/marathon.conf
new file mode 100644
index 0000000..2bcc71e
--- /dev/null
+++ b/modules/mesos/files/marathon.conf
@@ -0,0 +1,18 @@
+description "Marathon scheduler for Mesos"
+
+start on runlevel [2345]
+stop on runlevel [!2345]
+
+respawn
+respawn limit 10 5
+
+pre-start script
+ if [ -f /etc/default/marathon ]; then
+ /etc/default/marathon
+ fi
+ if [ -f /etc/marathon-private ]; then
+ /etc/default/marathon-private # For passwords
+ fi
+end script
+
+exec /usr/bin/marathon
diff --git a/modules/mesos/manifests/master.pp
b/modules/mesos/manifests/master.pp
index 46c6ffc..c2c18b9 100644
--- a/modules/mesos/manifests/master.pp
+++ b/modules/mesos/manifests/master.pp
@@ -3,7 +3,7 @@
$quorum,
) {
- require_package('mesos')
+ require_package('mesos', 'marathon')
file { '/etc/mesos/zk':
content => $zookeeper_url,
@@ -44,4 +44,24 @@
service { 'mesos-slave':
ensure => stopped,
}
+
+ file { '/etc/init/marathon.conf':
+ source => 'puppet:///modules/mesos/marathon.conf',
+ owner => 'root',
+ group => 'root',
+ mode => '0444',
+ notify => Service['marathon']
+ }
+
+ file { '/etc/default/marathon':
+ content => template('mesos/marathon.default.erb'),
+ owner => 'root',
+ group => 'root',
+ mode => '0555',
+ notify => Service['marathon'],
+ }
+
+ service { 'marathon':
+ ensure => running,
+ }
}
diff --git a/modules/mesos/templates/marathon.default.erb
b/modules/mesos/templates/marathon.default.erb
new file mode 100644
index 0000000..1a9683f
--- /dev/null
+++ b/modules/mesos/templates/marathon.default.erb
@@ -0,0 +1,2 @@
+# This file is managed by puppet
+EVENT_SUBSCRIBER=http_callback
--
To view, visit https://gerrit.wikimedia.org/r/213189
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I84d6c93051a601b487f067d87b660f9589020b05
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits