Support subcloud deploy upload the common files

Create /opt/platform/deploy to host the deploy common files.

Partial-Bug: 1864508

Change-Id: Ifd40cb02d4a2ee17a05457b43c6227aaa069e01e
Signed-off-by: Tao Liu <tao.liu@windriver.com>
This commit is contained in:
Tao Liu 2020-04-16 10:08:59 -04:00
parent 9a18b70860
commit 7910646e9b

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 ]