fuel-library/deployment/puppet/swift/examples/all.pp
Dmitry Ilyin 9b76d1ae6d Add package providers and version lookup
This commits adds modified version of the
Puppet Package type. It includes code that
looks for package version in /etc/versions.yaml
file if the package is going to be installed instead
of just installing the first available version.

This lookup will be initiated only is you
pass :installed or :present to the package's
ensure property. Passing :latest, :absent
or explicit version string will cause
the default behaviour.

Lookups will be performed only for apt and
yum providers.

Yum and Apt providers in this patch are
hacked to support transactional rollbacks.
When the provider is updating the package from
one version to another it saves the diff of
packages to a file and if it’s ever asked to
install the previous version again the provider
takes the diff file and installs the previous
package versions and their dependencies.

Change-Id: I84e4b7540f9e72ceb2e1dee0762184d3e2b4356c
Implements: blueprint patch-openstack
2014-04-14 18:54:09 +04:00

63 lines
1.6 KiB
Puppet

#
# This example file is almost the
# can be used to build out a sample swift all in one environment
#
$swift_local_net_ip='127.0.0.1'
$swift_shared_secret='changeme'
Exec { logoutput => true }
package { 'curl': ensure => present }
class { 'ssh::server::install': }
class { 'memcached':
listen_ip => $swift_local_net_ip,
}
class { 'swift':
# not sure how I want to deal with this shared secret
swift_hash_suffix => $swift_shared_secret,
package_ensure => installed,
}
# === Configure Storage
class { 'swift::storage':
storage_local_net_ip => $swift_local_net_ip
}
# create xfs partitions on a loopback device and mounts them
swift::storage::loopback { '2':
require => Class['swift'],
}
# sets up storage nodes which is composed of a single
# device that contains an endpoint for an object, account, and container
swift::storage::node { '2':
mnt_base_dir => '/srv/node',
manage_ring => true,
zone => '2',
storage_local_net_ip => $swift_local_net_ip,
require => Swift::Storage::Loopback[2] ,
}
class { 'swift::ringbuilder':
part_power => '18',
replicas => '1',
min_part_hours => 1,
require => Class['swift'],
}
# TODO should I enable swath in the default config?
class { 'swift::proxy':
proxy_local_net_ip => $swift_local_net_ip,
pipeline => ['healthcheck', 'cache', 'tempauth', 'proxy-server'],
account_autocreate => true,
require => Class['swift::ringbuilder'],
}
class { ['swift::proxy::healthcheck', 'swift::proxy::cache', 'swift::proxy::tempauth']: }