praekeltfoundation / puppet-marathon

A Puppet module for managing Marathon
BSD 3-Clause "New" or "Revised" License
4 stars 6 forks source link

Missing facts $mesos_zk and $zookeeper_zk #31

Open tamama opened 7 years ago

tamama commented 7 years ago

Hi there,

On README.mk, you mentioned $mesos_zk and $zookeeper_zk - however, I find these facts missing on my puppet agent.

May I ask whether these are still valid options?

Kind regards, Tamama

JayH5 commented 7 years ago

Hey 👋

Sorry, that example in the README is a bit misleading now that I look at it again. $marathon_zk and $mesos_zk are not facts, just variables you define.

In the example, $marathon_zk should be set to the Zookeeper address that Marathon uses to store its state (e.g. 'zk://127.0.0.1:2181/marathon'), while $mesos_zk should be the address that Mesos stores its state (e.g. 'zk://127.0.0.1:2181/mesos').

tamama commented 7 years ago

Hi,

After some research into deric/mesos, I find a more elegant solution. May I attach my solution in the following.

Kind regards, Tamama

=========================================

site/profile/manifests/marathon.pp

class profile::marathon { notify { '[profile::marathon] Starting ... ' : }

Package { 
    provider => 'dnf' ,
}

class { 'marathon' :
    require     => Class['mesos::master'] ,

    repo_manage => false ,
    zookeeper   => regsubst($::mesos::master::zookeeper_url, '/mesos$', '/marathon') ,
    master      => $::mesos::master::zookeeper_url ,
    options     => {
        event_subscriber    => 'http_callback' ,
        hostname            => $::fqdn ,
        http_address        => $::ipaddress_tun0 ,
        http_port           => 58080 ,
    } ,
    java_opts   => '-Xms128m -Xmx256m' ,
}

Class['mesos::repo'] -> Package['marathon']

notify { '[profile::marathon] ... finished' : }

}