@@ -32,6 +32,16 @@ $swift_local_net_ip = $ipaddress_eth0
|
|||||||
|
|
||||||
Exec { logoutput => true }
|
Exec { logoutput => true }
|
||||||
|
|
||||||
|
stage { 'openstack_ppa':}
|
||||||
|
|
||||||
|
Stage['openstack_ppa'] -> Stage['main']
|
||||||
|
|
||||||
|
class { 'apt':
|
||||||
|
stage => 'openstack_ppa',
|
||||||
|
}
|
||||||
|
class { 'swift::repo::trunk':
|
||||||
|
stage => 'openstack_ppa',
|
||||||
|
}
|
||||||
#
|
#
|
||||||
# specifies that nodes with the cert names of
|
# specifies that nodes with the cert names of
|
||||||
# swift_storage_1,2, and 3 will be assigned the
|
# swift_storage_1,2, and 3 will be assigned the
|
||||||
|
@@ -96,37 +96,6 @@ class swift::proxy(
|
|||||||
require => Package['swift-proxy'],
|
require => Package['swift-proxy'],
|
||||||
}
|
}
|
||||||
|
|
||||||
if($::operatingsystem == 'Ubuntu') {
|
|
||||||
# TODO - this needs to be updated once the init file is not broken
|
|
||||||
file { '/etc/init/swift-proxy.conf':
|
|
||||||
mode => '0644',
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
content => '
|
|
||||||
# swift-proxy - SWIFT Proxy Server
|
|
||||||
# This is temporarily managed by Puppet
|
|
||||||
# until 917893 is fixed
|
|
||||||
# The swift proxy server.
|
|
||||||
|
|
||||||
description "SWIFT Proxy Server"
|
|
||||||
author "Marc Cluet <marc.cluet@ubuntu.com>"
|
|
||||||
|
|
||||||
start on runlevel [2345]
|
|
||||||
stop on runlevel [016]
|
|
||||||
|
|
||||||
pre-start script
|
|
||||||
if [ -f "/etc/swift/proxy-server.conf" ]; then
|
|
||||||
exec /usr/bin/swift-init proxy-server start
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
end script
|
|
||||||
|
|
||||||
post-stop exec /usr/bin/swift-init proxy-server stop',
|
|
||||||
before => Service['swift-proxy'],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
service { 'swift-proxy':
|
service { 'swift-proxy':
|
||||||
name => $::swift::params::proxy_service_name,
|
name => $::swift::params::proxy_service_name,
|
||||||
ensure => running,
|
ensure => running,
|
||||||
|
@@ -2,5 +2,5 @@
|
|||||||
# sets up the swift trunk ppa
|
# sets up the swift trunk ppa
|
||||||
#
|
#
|
||||||
class swift::repo::trunk {
|
class swift::repo::trunk {
|
||||||
apt::ppa { 'ppa:swift-core/trunk': }
|
apt::ppa { 'ppa:openstack-ubuntu-testing/openstack-trunk-testing': }
|
||||||
}
|
}
|
||||||
|
@@ -29,6 +29,8 @@ define swift::storage::generic(
|
|||||||
validate_re($name, '^object|container|account$')
|
validate_re($name, '^object|container|account$')
|
||||||
|
|
||||||
package { "swift-${name}":
|
package { "swift-${name}":
|
||||||
|
# this is a way to dynamically build the variables to lookup
|
||||||
|
# sorry its so ugly :(
|
||||||
name => inline_template("<%= scope.lookupvar('::swift::params::${name}_package_name') %>"),
|
name => inline_template("<%= scope.lookupvar('::swift::params::${name}_package_name') %>"),
|
||||||
ensure => $package_ensure,
|
ensure => $package_ensure,
|
||||||
}
|
}
|
||||||
@@ -45,14 +47,7 @@ define swift::storage::generic(
|
|||||||
enable => true,
|
enable => true,
|
||||||
hasstatus => true,
|
hasstatus => true,
|
||||||
provider => $service_provider,
|
provider => $service_provider,
|
||||||
}
|
subscribe => Package["swift-${name}"],
|
||||||
|
|
||||||
# TODO - this should be fixed in the upstream
|
|
||||||
# packages so that this code can be removed.
|
|
||||||
# 931893
|
|
||||||
if($::operatingsystem == 'Ubuntu') {
|
|
||||||
# I have to fix broken init scripts on Ubuntu
|
|
||||||
swift::storage::generic::upstart { $name: }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -1,10 +0,0 @@
|
|||||||
# TODO this should be removed when the upstart packages are fixed.
|
|
||||||
define swift::storage::generic::upstart() {
|
|
||||||
file { "/etc/init/swift-${name}.conf":
|
|
||||||
mode => '0644',
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
source => "puppet:///modules/swift/swift-${name}.conf.upstart",
|
|
||||||
before => Service["swift-${name}"],
|
|
||||||
}
|
|
||||||
}
|
|
@@ -113,9 +113,6 @@ describe 'swift::proxy' do
|
|||||||
(content.split("\n") & expected_lines).should =~ expected_lines
|
(content.split("\n") & expected_lines).should =~ expected_lines
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# TODO this resource should just be here temporarily until packaging
|
|
||||||
# is fixed
|
|
||||||
it { should contain_file('/etc/init/swift-proxy.conf') }
|
|
||||||
|
|
||||||
describe 'when using tempauth' do
|
describe 'when using tempauth' do
|
||||||
|
|
||||||
|
6
spec/classes/swift_xfs_spec.rb
Normal file
6
spec/classes/swift_xfs_spec.rb
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
require 'spec_helper'
|
||||||
|
describe 'swift::xfs' do
|
||||||
|
['xfsprogs', 'parted'].each do |present_package|
|
||||||
|
it { should contain_package(present_package).with_ensure('present') }
|
||||||
|
end
|
||||||
|
end
|
Reference in New Issue
Block a user