Puppet Class: dragonfly::supernode

Defined in:
modules/dragonfly/manifests/supernode.pp

Overview

Parameters:

  • listen_port (Stdlib::Port::Unprivileged) (defaults to: 8002)

    The TCP port supernode will listen for connections of P2P nodes (dfget) on.

  • download_port (Stdlib::Port::Unprivileged) (defaults to: 8002)

    The TCP port of a local HTTP server (needs to be provided manually) which is used as source for initial parts (seeder) by P2P clients (dfget). It should be set to @listen_port if @cdn_pattern = 'source' is used, see: github.com/dragonflyoss/Dragonfly/issues/1558

  • cdn_pattern (Enum['local', 'source']) (defaults to: 'source')

    This may be 'local' if a local HTTP server is provided to seed parts, or 'source' if clients (dfget) should use the original source as seeder for parts.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'modules/dragonfly/manifests/supernode.pp', line 16

class dragonfly::supernode (
  Stdlib::Port::Unprivileged $listen_port = 8002,
  Stdlib::Port::Unprivileged $download_port = 8002,
  Enum['local', 'source']    $cdn_pattern = 'source',
){
  ensure_packages('dragonfly-supernode')

  file { '/etc/dragonfly/supernode.yml':
    ensure  => file,
    owner   => 'root',
    group   => 'root',
    mode    => '0644',
    content => template('dragonfly/supernode.yml.erb'),
    notify  => Service['dragonfly-supernode'],
  }

  service { 'dragonfly-supernode':
    ensure  => running,
  }
}