Skip to content

ctrlaltdel/puppet-tahoe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tahoe-LAFS Puppet module

This Puppet module ease the deployment of a Tahoe-LAFS storage grid across multiple machine thanks to the Puppet system management system.

Currently supported distributions are Debian and Ubuntu but preliminary support for easy_install is also present.

This Puppet module depends on the "puppet-common" puppet module, available from http://github.com/ctrlaltdel/puppet-common .

Usage

First, ensure that system-wide Tahoe-LAFS dependencies are present on your system:

include tahoe

Even though a generic Tahoe node can be managed directly by the tahoe::node type, you'll probably end up using the following special-purposes types:

  • tahoe::introducer - The introducer's purpose is to keep a
  • tahoe::storage - A storage node
  • tahoe::helper - An upload helper
  • tahoe::client - A simple Tahoe client which does not provide any storage to the grid.
  • tahoe::stats-gatherer - A Tahoe node whose goal is to gatherer stats from other nodes in the grid.

To install a Tahoe introducer in directory /srv/tahoe-introducer which listen on port 8123:

tahoe::introducer {"introducer":
  ensure    => present,
  directory => "/srv/tahoe-introducer,
  webport   => "tcp:8123:interface=0.0.0.0",
}

tahoe::storage {"storage1":
  ensure          => present,
  directory       => "/mnt/sdb",
  webport         => "tcp:3456:interface=0.0.0.0",
  introducer_furl => "pb://[email protected]:12345/introducer",
  stats_furl      => "pb://[email protected]:12346/foobar",
}

tahoe::helper {"helper":
  ensure          => present,
  directory       => "/srv/tahoe-helper";
  webport         => "tcp:8124:interface=0.0.0.0",
  introducer_furl => "pb://[email protected]:12345/introducer",
  stats_furl      => "pb://[email protected]:12346/foobar",
}

tahoe::client {"client":
  ensure          => present,
  directory       => "/srv/tahoe-client",
  webport         => "tcp:3456:interface=0.0.0.0",
  introducer_furl => "pb://[email protected]:12345/introducer",
  stats_furl      => "pb://[email protected]:12346/foobar",
  helper_furl     => "pb://[email protected]:12347/foobar2",
}

tahoe::stats-gatherer {"stats":
  ensure    => present,
  directory => "/srv/tahoe-stats",
}

Sample usage

The following sample puppet configuration allows the deployment of a complete Tahoe storage grid spanning three different systems (one introducer and two storage nodes):

$introducer_furl = "pb://[email protected]:55368,127.0.0.1:55368/introducer"
$stats_furl      = "pb://[email protected]:55945,1.2.3.4:55945/blah"

node 'srv1.mydomain.com' {
  include tahoe

  #
  # Tahoe Introducer
  #
  tahoe::introducer {"introducer":
    ensure    => present,
    directory => "/srv/tahoe-introducer",
    webport   => "tcp:8123:interface=0.0.0.0",
  }

  #
  # Tahoe helper
  #
  tahoe::helper {"helper":
    ensure          => present,
    directory       => "/srv/tahoe-helper",
    webport         => "tcp:8124:interface=0.0.0.0",
    introducer_furl => $introducer_furl,
    stats_furl      => $stats_gatherer_furl,
  }

  #
  # Grid stats
  #
  tahoe::stats-gatherer {"stats":
    ensure    => present,
    directory => "/srv/tahoe-stats-gatherer",
  }
}

# Simple storage node with one disk
node 'srv2.mydomain.com' {
  include tahoe

  tahoe::storage {"storage1":
    ensure              => present,
    directory           => "/srv/tahoe-s1",
    webport             => "tcp:3456:interface=0.0.0.0",
    introducer_furl     => $introducer_furl,
    stats_furl          => $stats_furl,
  }
}

# Storage node with two disks
node 'srv3.mydomain.com' {
  include tahoe

  tahoe::storage {"storage2":
    ensure              => present,
    directory           => "/mnt/sdb",
    webport             => "tcp:3456:interface=0.0.0.0",
    introducer_furl     => $introducer_furl,
    stats_furl          => $stats_furl,
  }

  tahoe::storage {"storage3":
    ensure              => present,
    directory           => "/mnt/sdc",
    webport             => "tcp:3457:interface=0.0.0.0",
    introducer_furl     => $introducer_furl,
    stats_furl          => $stats_furl,
  }
}

Bugs

  • Debian packages provided by allmydata.org are not signed and therefore cannot be automatically installed by Puppet. You have to install them by calling apt-get install.
  • It is currently necessary to write the introducer furl by hand to your puppet recipe. It is not automatically filled after the introducer node got created.

Credits

Author: François Deppierraz [email protected]

Part of this work was made possible by Nimag Networks Sàrl http://www.nimag.net/.

References

About

Puppet module for managing Tahoe storage grid

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published