summaryrefslogtreecommitdiff
path: root/global/overlay/etc/puppet/modules/catlfish/manifests/merge.pp
blob: 2a54724840d09d05410d29d27824ca98df97397f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
define catlfish::merge(
      $logname  = undef,
      $image    = 'docker.sunet.se/ctct/catlfish-dev',
      $version  = 'latest'
)
{
   $base = '/var/local/db'
   $db = ""${base}/${logname}"
   file {$base: ensure => directory } ->
   file {$db: ensure => directory } ->
   sunet::docker_run {"${name}_catlfish":
       image    => $image,
       env      => ["MERGE_EXTRA_ARGS=--timing","MERGE_DB_DIR=/var/local/db/catlfish"],
       imagetag => $version,
       volumes  => ["/usr/local/etc/catlfish/${name}:/usr/local/etc/catlfish:ro","${db}:/var/local/db/catlfish"],
       command  => ["merge ${name} ${logname}"]
   }
}