43 Commits

Author SHA1 Message Date
Dan Bode
993ed67fd2 Remove inheritance
Part of a code wide refactor to remove unnessary
inheritance.
2012-04-22 12:12:53 -07:00
Dan Bode
24a01d1bea Implement proxy pipline into fragments
The swift pipeline is commonly used to plug
capabilities in.

This pipeline should be implemented in a way that
is easier to extend as people desire additional
pipelines.

This commit implements classes that can be used
to configure the following pipelines:
  - proxy::cache
  - proxy::healthcheck
  - proxy::keystone
  - proxy::swauth

It also reimplements swift::proxy to utilize those
pipelines for configuration.
2012-04-22 12:11:27 -07:00
Dan Bode
84d59985fc Remove ppa config
This commit removes the config for setting up
the custom ppas. The ppas referenced here have
been deprecated.
2012-04-21 12:55:51 -07:00
Dan Bode
59afc07d3b Refactor of swift server configs
This commit performs a refactor of the
swift::storage::config to use fragments.

Updates server templates
  - makes workers,user, and mount_checks configurable
  - adds a default for concurrency
  - makes the pipeline configurable
  - remove vm_test_mode flag

Updates swift::storage::server to use fragments for
the config file.

This has been refactored to allow the end user a
greater level of flexibility over how they can
configure custom plugins for swift.

Also adds additional class params: pipeline,
mount_check, user, workers, concurrency.

Update the unit tests for swift::storage:server
2012-04-21 12:54:17 -07:00
Dan Bode
cf78b8343e Merge pull request #16 from fcharlier/swift_on_debian
Some modifications to install swift correctly on Debian
2012-04-11 20:05:54 -07:00
Dan Bode
f802df8e5a Fix dep issue in swift
The service should definitely not start before
its related package is installed.

And now it doesn't!
2012-04-06 10:55:07 -07:00
Dan Bode
0cbd959761 Upsate trunk for use Ubuntu latest packages 2012-04-06 10:19:29 -07:00
Dan Bode
c07615d557 Remove patched upstart scripts
I was using older versions of the Ubuntu packages
that shipped with broken upstart scripts.

I am removing these patches now that I am using packages
that work.

Also updates the spec tests to account for the changes.
2012-04-06 09:42:48 -07:00
François Charlier
2474649cb8 Enforce some dependencies
Things were not executed in the right order with the examples/all.pp
2012-03-29 19:48:44 +02:00
François Charlier
dba28ed0a6 Enable other providers than upstart 2012-03-29 19:48:44 +02:00
Derek Higgins
5377fbc2f2 Get service_provider from params file 2012-03-21 15:58:15 +00:00
Dan Bode
cd33a745c5 Add fedora support
This commit adds support for fedora.

It introduces a params namespace class
to hold data differences between ubuntu and fedora.

It also moves the xfs packages into their own class (swift::xfs)
2012-03-20 12:55:34 -07:00
Dan Bode
94fb333ab9 Move generic::upstart to its own file
I am not so sure that having multiple resource
types in the same file is supported as of 2.7.11

I am refactoring this code so that the upstart define
resides in its own file according to our standards.
2012-03-17 01:42:15 -07:00
Dan
6fed9719ed Add code for ring syncing
This commit adds puppet code to handle syncing of the ring
databases.

The class swift::ringserver is used to set up an rsync server
that serve out the ring databases.

The define swift::ringsync is used to rsync these ring databases
to the other hosts.
2012-03-14 05:45:17 +00:00
Dan Bode
cb233bd6a1 Remove rsync service mentions
Since rsync is now managed by xinetd, it is
necessary to remove the references to the rsync
service.

This was previously causing catalog compilation failures.

Also updates travisci and the unit tests
2012-03-13 16:06:51 -07:00
Dan Bode
6f9e108695 Use xinetd for rsync
Previously, using the rsync sevices on Ubuntu
did not actually work.

After reading the init script, I decided that it
is annoyingly different from Redhat's implementation
so I have chosen to use xinetd to make the module more
consistent between the distros.
2012-03-13 14:49:28 -07:00
Dan Bode
66b7235856 Only fix upstart scripts on Ubuntu.
ensure that the upstart patches are only
managed on Ubuntu instances.
2012-03-13 12:14:33 -07:00
Dan Bode
900e061a11 Add inline commments
Cleans up old inline comments and adds new comments.
2012-03-05 21:57:10 -08:00
Dan Bode
4752a3d85f Decouple memcached configuration from proxy
It is possible that the memcache server(s) may
reside on different machines than the swift
proxy.

This commit decouples the configurations of the
two services.
2012-03-05 21:57:10 -08:00
Dan Bode
c7caf05c36 Make all local net ips required
Previously, the binding address for all services
was set to localhost.

This is not going to be a commonly used value
for production deployments.

The defaults for address have been removes b/c
there isn't really a sensible default. This is
something that the users should have to set.
2012-03-05 21:56:37 -08:00
Dan Bode
0e7cb86dcd Update ring creation defaults
Updates the defaults to ring creation to use
replica of 3 and min part hours of 24.

These are the defaults recommended by the swift
documentation.
2012-03-02 20:03:53 -08:00
Dan Bode
5083e19bc4 Decouple storage server types from each other
Previously, all of the storage server types
(account, container, proxy) were always
configured to be installed on the same node.

It often makes sense to only have the account and
container together, and to put the object server on
a different node. (or its possible that other
configurations make sense)

This commit refactors the swift module so that
each of the types of nodes can be built
independently of each other.
2012-03-02 20:01:49 -08:00
Dan Bode
954e6c0357 Remove reference to ssh keys
Swift does not need to have keys. This commit
removes the ssh keys.
2012-03-02 10:35:02 -08:00
Dan Bode
272937ed9c Pass correct mount dir to swift::storage::mount
Previously, swift::storage::xfs was not passing
the correct variable for mnt_base_dir to
swift::storage::mount. $mount_base_dir was incorrectly
specified.

This commit resolves this mistake and ensures that the correct
variable is passed.
2012-02-26 21:14:12 -08:00
Dan Bode
6705d556cf Fix swauth proxy config
Previously, the package for swauth of the swift
proxy was being added based on a variable that
was never set.

This commit updates that conditional to use the
correct variable.
2012-02-26 20:57:51 -08:00
Dan Bode
65b6f0a695 Fix milestone and release ppa config
Previously, a copy and paste error had resulted
in 3 definitions of the trunk ppa class.

Two of those were intended to be swift::repo::trunk
and swift::repo::release.

This commit corrects this error.
2012-02-26 20:54:57 -08:00
Dan Bode
547a96930e Add repo class for milestone and release
Add classes that can be used to setup the ppas
for installing swift from millestone and release.
2012-02-14 15:06:07 -08:00
Dan Bode
e9dfe0f8e5 Improve documentation
Improves README and inline docs, comments
2012-02-14 15:05:35 -08:00
Dan Bode
e5a31452b0 Fix swift::storage device path default
The default devices path for the storage class
was incorrectly set to /srv/nodes.

This commits updates it to /srv/node so that it is
consistent with the rest of manifests in this module.
2012-02-14 15:04:45 -08:00
Dan Bode
0955f3cd1c Add explicit class params for setting storeage ports
Previously, all of the ports used by the storage
class were hardcoded.

This commits adds the following class parameters to
the swift::storage class to allow for configuration
of the ports used by a storage server:
  - object_port
  - container_port
  - account_port
2012-02-14 15:03:49 -08:00
Dan Bode
44b1c56d74 Renamed storage::device to storage::server
Changed the name of the defined resource type:
swift::storage::device to be swift::storage::server.

This change was made in order to better align with
the swift terminology since this define was
configuring a swift component server which has no
direct association with a device.

This commit also makes the swift::storage::server
the only place where the swift server template is
used. This allowed me to assume that the variables
device and bind_port will always be available.

Also updates declarations of the renamed type to
use the correct type name.

Removes the direct server file config from
swift::storage, replacing it instead with
declarations of swift::storage::server.
2012-02-14 14:09:01 -08:00
Dan Bode
c56bc60bfd Add custom upstart scripts
In the current trunk PPA for oneiric (which is what
I am using for testing), the upstart files seem
to have a problem where they only will start the
swift servers if the file:
  /etc/swift/<server_name>-server

exists. Raised as issue: 931893
in Launchpad.

This commit adds puppet code to deploy custom
upstart scripts that have fixed this issue.
2012-02-14 14:03:25 -08:00
Dan Bode
310ca91b59 Removed swift::storage::device::* defines
Previously, I had created a define intended to
wrap the creation of the storage device endpoints
with their associated ring configs.

I wound up decided against this for two reasons:
  - Abtstracting storage endpoints together with
the ring configurations can be confusing b/c it
conflates actions associated with the storage role
with actions associated with the ringbuilding role.
  - Abstracting the ring building hides side effects
of this manifest from the user (that it will effect
the ringbuilder role)

This pull request does the following:

- removes the swift::storage::device::* defines

- update the following code to use
swift::storage::device in combination with
ring_*_device
 -- examples/multi
 -- swift::storage::node
2012-02-13 16:50:41 -08:00
Dan Bode
18d681943e Add inline docs to manifests
This commit adds some initial inline documentation
of the manifests.

It also performs some basic whitespace cleanup.
2012-02-13 15:39:18 -08:00
Dan Bode
b035a32b42 Refactor swift::storage::node to use device defines
This commit updates the node class from using
Swift::Storage::Device to the individual defines.

This change was made b/c we could not dyncamically
set the names of the native types.
2012-01-27 22:09:31 -08:00
Dan Bode
67d53de23a Remove swift::storage::node from loopback define
This commit removes The swift::storage::node
declaration from the swift::storage::loopback
definition.

This is done to decouple the code that creates
and mounts partitions from the code that creates
swift devices.
2012-01-27 22:07:28 -08:00
Dan Bode
cea6b846dc Remove Rsync::Server::Module defaults
This commit consolidates resource defaults into
the resource declaration.
2012-01-27 22:02:50 -08:00
Dan Bode
a6fcff35ef Add defines for managing devices and rings
Implements three defines that can be used to manage
the three kinds of swift devices:

  - objects
  - accounts
  - containers

These defines wrap swift::storage::device (which
manages rsync modules and swift device configuration)
and add additional resources for managing the
ring device entries.

The defines accept a parameter called manage_ring
which can be used to specify rather the ringbuilding
resources should be declared or exported.
2012-01-27 21:59:50 -08:00
Dan Bode
8c13cd147f Fix mispelling of container
In swift::ringbuilder::rebalance there was a typo
in the $name validation code.

This commit updates the spelling to be correct.
2012-01-23 11:45:36 -08:00
Dan Bode
de50a0923b Update misnamed ringbuilder defines
the defined resource types ringbuilder::create
and ringbuilder::rebalance were incorrectly
named.

This commit updates them to the correct names:
  - swift::ringbuilder::create
  - swift::ringbuilder::rebalance
2012-01-23 11:45:18 -08:00
Dan Bode
900096f27d Remove comma from last define parameter
The commit removes the comma trailing the last
parameter in the swift::storage::mount definition.

This was causing a parser failure.
2012-01-23 11:44:11 -08:00
Dan Bode
917426380e Implement ringbuilder
This commit adds a class, defined resources and
native types that can be used together to manage
the creation, configuration, and rebalancing of
rings.

Creates the following native types:

  ring_account_device
  ring_container_device
  ring_object_device

The implementation of these types is provided
by swift-ring-builder and most of the functionality
is provided by the parent provider (SwiftRingBuilder)

Each of the providers is hard-coded to find the
relevent ring database in /etc/swift. This directory
location can currently not be configured.

Each provider implements self.instances so the
current state can of the ring can be queried from
puppet.

These providers do not handle either the creation
or the rebalancing of the rings, they are intended
to be used in combination with defined resource types
that perform that functionality:

  swift::ringbuilder::create
  swift::ringbuilder::rebalance

The swift::ringbuilder class is also created as
a part of this commit. This class does the following:

  - creates object, account, and container rings
(it uses the same parameters to create these rings)
  - creates the rebalance defines
  - sets up the following relationships:
    for each ring type, create should be applied before
    the native types which should refresh the rebalance
2012-01-23 11:42:42 -08:00
Dan Bode
47d49e7780 Initial commit.
This initial commit only targets a single node
swift install on Natty based on 1.4.6
2012-01-19 18:58:37 -08:00