Merge "Support subcloud deploy upload the common files"

This commit is contained in:
Zuul 2020-04-17 15:01:38 +00:00 committed by Gerrit Code Review
commit 7665c92ec9

View File

@ -7,6 +7,7 @@ class platform::dcmanager::params (
$service_name = 'dcmanager',
$default_endpoint_type = 'internalURL',
$service_create = false,
$deploy_base_dir = '/opt/platform/deploy',
$iso_base_dir_source = '/opt/platform/iso',
$iso_base_dir_target = '/www/pages/iso',
) {
@ -41,6 +42,10 @@ class platform::dcmanager
ensure => directory,
mode => '0755',
}
file {$deploy_base_dir:
ensure => directory,
mode => '0755',
}
}
}
@ -84,6 +89,7 @@ class platform::dcmanager::fs::runtime {
include ::platform::dcmanager::params
$iso_base_dir_source = $::platform::dcmanager::params::iso_base_dir_source
$iso_base_dir_target = $::platform::dcmanager::params::iso_base_dir_target
$deploy_base_dir = $::platform::dcmanager::params::deploy_base_dir
file {$iso_base_dir_source:
ensure => directory,
@ -95,6 +101,11 @@ class platform::dcmanager::fs::runtime {
mode => '0755',
}
file {$deploy_base_dir:
ensure => directory,
mode => '0755',
}
exec { "bind mount ${iso_base_dir_target}":
command => "mount -o bind -t ext4 ${iso_base_dir_source} ${iso_base_dir_target}",
require => File[ $iso_base_dir_source, $iso_base_dir_target ]