Merge "Abstract container backend"
This commit is contained in:
commit
b9c2c963ff
|
@ -13,9 +13,10 @@ Puppet::Type.type(:pcmk_bundle).provide(:default) do
|
||||||
storage_maps = @resource[:storage_maps]
|
storage_maps = @resource[:storage_maps]
|
||||||
network = @resource[:network]
|
network = @resource[:network]
|
||||||
location_rule = @resource[:location_rule]
|
location_rule = @resource[:location_rule]
|
||||||
|
container_backend = @resource[:container_backend]
|
||||||
|
|
||||||
# Build the 'pcs resource create' command. Check out the pcs man page :-)
|
# Build the 'pcs resource create' command. Check out the pcs man page :-)
|
||||||
cmd = 'resource bundle create ' + @resource[:name]+' container docker image=' + @resource[:image]
|
cmd = 'resource bundle create ' + @resource[:name]+' container ' + container_backend + ' image=' + @resource[:image]
|
||||||
if replicas
|
if replicas
|
||||||
cmd += " replicas=#{replicas}"
|
cmd += " replicas=#{replicas}"
|
||||||
end
|
end
|
||||||
|
|
|
@ -152,4 +152,8 @@ Puppet::Type.newtype(:pcmk_bundle) do
|
||||||
|
|
||||||
defaultto 600
|
defaultto 600
|
||||||
end
|
end
|
||||||
|
newproperty(:container_backend) do
|
||||||
|
desc "Container backend"
|
||||||
|
defaultto "docker"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -131,6 +131,7 @@ define pacemaker::resource::bundle(
|
||||||
$try_sleep = 0,
|
$try_sleep = 0,
|
||||||
$verify_on_create = false,
|
$verify_on_create = false,
|
||||||
$location_rule = undef,
|
$location_rule = undef,
|
||||||
|
$container_backend = 'docker',
|
||||||
$deep_compare = hiera('pacemaker::resource::bundle::deep_compare', false),
|
$deep_compare = hiera('pacemaker::resource::bundle::deep_compare', false),
|
||||||
$update_settle_secs = hiera('pacemaker::resource::bundle::update_settle_secs', 600),
|
$update_settle_secs = hiera('pacemaker::resource::bundle::update_settle_secs', 600),
|
||||||
) {
|
) {
|
||||||
|
@ -159,6 +160,7 @@ define pacemaker::resource::bundle(
|
||||||
try_sleep => $try_sleep,
|
try_sleep => $try_sleep,
|
||||||
verify_on_create => $verify_on_create,
|
verify_on_create => $verify_on_create,
|
||||||
location_rule => $location_rule,
|
location_rule => $location_rule,
|
||||||
|
container_backend => $container_backend,
|
||||||
deep_compare => $deep_compare,
|
deep_compare => $deep_compare,
|
||||||
update_settle_secs => $update_settle_secs,
|
update_settle_secs => $update_settle_secs,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue