Abstract container backend
In the future we want to be able to create bundles that can make use of different container backends. We leave the current default set to 'docker' but we allow other types. Tested with the 'podman' backend after applying: https://github.com/ClusterLabs/pacemaker/pull/1564 https://github.com/ClusterLabs/pcs/pull/181 https://github.com/ClusterLabs/resource-agents/pull/1193 Change-Id: Ia4a7b58d14d80e85d51e98acec1aad2ba90b69de
This commit is contained in:
parent
966943a79e
commit
e400b7b82a
|
@ -13,9 +13,10 @@ Puppet::Type.type(:pcmk_bundle).provide(:default) do
|
|||
storage_maps = @resource[:storage_maps]
|
||||
network = @resource[:network]
|
||||
location_rule = @resource[:location_rule]
|
||||
container_backend = @resource[:container_backend]
|
||||
|
||||
# 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
|
||||
cmd += " replicas=#{replicas}"
|
||||
end
|
||||
|
|
|
@ -152,4 +152,8 @@ Puppet::Type.newtype(:pcmk_bundle) do
|
|||
|
||||
defaultto 600
|
||||
end
|
||||
newproperty(:container_backend) do
|
||||
desc "Container backend"
|
||||
defaultto "docker"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -131,6 +131,7 @@ define pacemaker::resource::bundle(
|
|||
$try_sleep = 0,
|
||||
$verify_on_create = false,
|
||||
$location_rule = undef,
|
||||
$container_backend = 'docker',
|
||||
$deep_compare = hiera('pacemaker::resource::bundle::deep_compare', false),
|
||||
$update_settle_secs = hiera('pacemaker::resource::bundle::update_settle_secs', 600),
|
||||
) {
|
||||
|
@ -159,6 +160,7 @@ define pacemaker::resource::bundle(
|
|||
try_sleep => $try_sleep,
|
||||
verify_on_create => $verify_on_create,
|
||||
location_rule => $location_rule,
|
||||
container_backend => $container_backend,
|
||||
deep_compare => $deep_compare,
|
||||
update_settle_secs => $update_settle_secs,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue