105 Commits

Author SHA1 Message Date
Dan Bode
530ed65ea9 Add modue synlinks to gitignore
The spec tests now expect the modulepath
spec/fixtures/modules to contain links to all
of the modules that are required to run the
unit tests.

In order to run the tests, I need to create links
for these modules, but if I check in those links, it
will mess up the tests when they run in travis-ci.
2012-03-02 19:56:33 -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
2dbcf740df Add everything needed by travis-ci
This commit adds all of the config files
needed for travisci
2012-02-27 16:52:49 -08:00
Dan Bode
8d4d5ea6b8 Merge pull request #5 from bodepd/fix_test
Fix test
2012-02-26 21:21:53 -08:00
Dan Bode
4acfaeaa9d Update stoage::xfs tests
This file was accidentally checked in before
the tests works.

This commit fixes the spec tests.
2012-02-26 21:19:13 -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
97d6e20b88 Merge pull request #4 from bodepd/add_spec_tests
Add spec tests
2012-02-26 20:58:52 -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
b569cf6f0f Remove extra newlines from swift proxy erb 2012-02-26 20:53:10 -08:00
Dan Bode
4775be3a5f Add rspec-puppet test coverage
This commit adds test coverage for almost all
swift classes and defines.

It does not quite add 100% coverage (probably
more like 85%)
2012-02-26 20:52:27 -08:00
Dan Bode
3f35820347 Merge pull request #3 from bodepd/add_integration_test
Add swift test script
2012-02-14 19:24:59 -08:00
Dan Bode
405069829e Add swift test script
Adds basic test script that I have been using to
test the swift module.
2012-02-14 19:24:20 -08:00
Dan Bode
3cef45b2cc Merge pull request #2 from bodepd/swift_update
Swift update
2012-02-14 15:16:44 -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
b7713e5a51 Merge pull request #1 from bodepd/multi_node_support
Multi node support
2012-02-14 14:22:34 -08:00
Dan Bode
b7a8f0cdee Improve inline comments
Improve inline comments so that the example
manifests can serve as a documented example.
2012-02-14 14:19:52 -08:00
Dan Bode
380ab56cc0 Add ringbuilder role class to proxy role
Cleaned up code so that ringbuilder is a role.

Add this role to the proxy node declaration.
2012-02-14 14:19:16 -08:00
Dan Bode
6f5cf724e8 Update ring exported resources
update the ports to be 6000-6002 and ensure that
the zone parameter is set from $swift_zone.
2012-02-14 14:17:43 -08:00
Dan Bode
eded81575c Remove swift::storage::device declaration
This commit removes the declaration of
swift::storage::device since the servers are now
built from the swift::storage class declaration.
2012-02-14 14:16:37 -08:00
Dan Bode
31dc69b985 remove puppetmaster node declaration
Removes the puppetmaster node declaration so that
this manifest can be imported from the openstack's
manifests/site.pp (so that the openstack project
and the swift project can use the same node
declarations when swift is added as a submodule to
the openstack project)
2012-02-14 14:14:23 -08:00
Dan Bode
3689cf7a20 Use node declarations
Updates the code to use node declarations instead
of a case statement. This is done to conform to
the rest of the openstack manifest and may be
reverted at a later date.
2012-02-14 14:13:35 -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
edd9a6b7d0 Clean up swift ringbuilder role
This commit cleans up the multi-node example code
for the ringbuilder role.

- adds resource collection code to collect exported
ring balancing resources.
- fixes a typo in the name.
2012-02-13 17:02:21 -08:00
Dan Bode
cc163db0bb Add ringbuilder class to swift proxy role
For now, I am assuing that the swift proxy role
also includes the ring building role.

This commit adds a declaration of the
swift::ringbuilder class to the swift_proxy_role
class.
2012-02-13 17:00:26 -08:00
Dan Bode
d062985219 Add proxy to apt class
This commit adds a proxy to the apt class in the
pre config manifest.

This is because I am using a squid proxy to speed
up testing in my environment.

I need to expose this as a config option so that
the hardcoded address of my app proxy is not
required for anyone to use this.
2012-02-13 16:58:45 -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
3cd7bdf276 Add role_puppetmaster class
Add a class that can be used to assign a
puppetmaster role.

This code is required b/c storedconfigs is required
for the multi-node swift scenario.
2012-02-13 15:43:43 -08:00
Dan Bode
5bebb84103 Added code for setting swift_storage_3
Previously there was not code for role assigment
of a node called swift_storage_3.

This commit updates a conditional statement to
assign a role based on this certname.
2012-02-13 15:42:55 -08:00
Dan Bode
ea7973635b Change swift_local_net_ip address to be a global var
This commit updates the varialbe swift_local_net_ip
to make it a global variable.
2012-02-13 15:41:12 -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
7228c5cd95 Create multi-node example
It does not work yet, but its getting closer...
2012-01-27 22:11:27 -08:00
Dan Bode
69ef2c1686 Refactor single node example 2012-01-27 22:11:08 -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
4ff3e18f3a Split example manifests into separate files
This commit splits the example manifest into
separate files all and pre and removes the node
declarations
2012-01-23 13:12:57 -08:00
Dan Bode
01d2a78bc8 Add validation instructions to README
This commits adds steps for how to validate that
a swift cluster has been installed correctly.
2012-01-23 11:46:24 -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
b6b13ce1b2 Handle case where ring_builder has no rows
The code was not robust when no
rows were returned from
  swift_ringbuilder(builder_file_path).

The calls to retrieve an array range from the
array of this commands output was returning nil
which caused the failure: undef method each on nil

This change explicitly checks for the case where
there are no rows returned by swift-ring-builder.
2012-01-23 11:44:54 -08:00
Dan Bode
1be67de6d4 Remove accidentally checked in swap file 2012-01-23 11:44:52 -08:00
Dan Bode
9d3bb3c364 Refactor README
Adds missing colons.

Adds missing assignment arrows to equals signs
2012-01-23 11:44:33 -08:00
Dan Bode
ece1d8407f Refactor of example site.pp
This commit refactors the previous site.pp example.

Adds ring building types and removes the ringbuilding
file.

Remove unnessary comments.

Adds requirement that swift proxy is only configured
after the ring is built.
2012-01-23 11:44:22 -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