Device image repository
The device images are stored in the drbd filesystem (/opt/platform/device_images) in the active controller. In order to allow the other worker hosts to retrieve the device images from the active controller over lighttpd, the directory /www/pages/device_images is created as a bind mount of the drbd directory. This mount resource is managed by SM. The 'device_images' is added to the lighttpd static content list. Tests performed on the following systems: AIO-DX, AIO-DX plus compute, Standard 2+1 DC with AIO-DX plus subcloud DC with Standard subcloud Story: 2007875 Task: 41877 Depends-On: https://review.opendev.org/c/starlingx/ha/+/776489 Change-Id: I4e7686ece49546d7ef84f5724370167afaf21375 Signed-off-by: Teresa Ho <teresa.ho@windriver.com>
This commit is contained in:
parent
3c2f1530c9
commit
a8cf39d9d3
@ -104,6 +104,8 @@ include ::platform::sm
|
|||||||
include ::platform::lmon
|
include ::platform::lmon
|
||||||
include ::platform::rook
|
include ::platform::rook
|
||||||
|
|
||||||
|
include ::platform::deviceimage
|
||||||
|
|
||||||
class { '::platform::config::controller::post':
|
class { '::platform::config::controller::post':
|
||||||
stage => post,
|
stage => post,
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ server.max-keep-alive-idle = 0
|
|||||||
## read proxy.txt for more info
|
## read proxy.txt for more info
|
||||||
|
|
||||||
# Proxy all non-static content to the local horizon dashboard
|
# Proxy all non-static content to the local horizon dashboard
|
||||||
$HTTP["url"] !~ "^/(rel-[^/]*|feed|updates|static|helm_charts|iso)/" {
|
$HTTP["url"] !~ "^/(rel-[^/]*|feed|updates|static|helm_charts|iso|device_images)/" {
|
||||||
proxy.server = ( "" =>
|
proxy.server = ( "" =>
|
||||||
( "localhost" =>
|
( "localhost" =>
|
||||||
(
|
(
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
class platform::deviceimage::params(
|
||||||
|
$source_deviceimage_base_dir = '/opt/platform/device_images',
|
||||||
|
$target_deviceimage_base_dir = '/www/pages/device_images',
|
||||||
|
) {}
|
||||||
|
|
||||||
|
class platform::deviceimage
|
||||||
|
inherits ::platform::deviceimage::params {
|
||||||
|
|
||||||
|
file {$target_deviceimage_base_dir:
|
||||||
|
ensure => directory,
|
||||||
|
owner => 'www',
|
||||||
|
require => User['www']
|
||||||
|
}
|
||||||
|
|
||||||
|
Drbd::Resource <| |>
|
||||||
|
|
||||||
|
-> file {$source_deviceimage_base_dir:
|
||||||
|
ensure => directory,
|
||||||
|
owner => 'www',
|
||||||
|
require => User['www']
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -88,6 +88,10 @@ class platform::sm
|
|||||||
$helmrepo_fs_source_dir = $::platform::helm::repositories::params::source_helm_repos_base_dir
|
$helmrepo_fs_source_dir = $::platform::helm::repositories::params::source_helm_repos_base_dir
|
||||||
$helmrepo_fs_target_dir = $::platform::helm::repositories::params::target_helm_repos_base_dir
|
$helmrepo_fs_target_dir = $::platform::helm::repositories::params::target_helm_repos_base_dir
|
||||||
|
|
||||||
|
include ::platform::deviceimage::params
|
||||||
|
$deviceimage_fs_source_dir = $::platform::deviceimage::params::source_deviceimage_base_dir
|
||||||
|
$deviceimage_fs_target_dir = $::platform::deviceimage::params::target_deviceimage_base_dir
|
||||||
|
|
||||||
include ::platform::drbd::cephmon::params
|
include ::platform::drbd::cephmon::params
|
||||||
$cephmon_drbd_resource = $::platform::drbd::cephmon::params::resource_name
|
$cephmon_drbd_resource = $::platform::drbd::cephmon::params::resource_name
|
||||||
$cephmon_fs_device = $::platform::drbd::cephmon::params::device
|
$cephmon_fs_device = $::platform::drbd::cephmon::params::device
|
||||||
@ -420,6 +424,17 @@ class platform::sm
|
|||||||
command => "sm-configure service_instance etcd-fs etcd-fs \"device=${etcd_fs_device},directory=${etcd_fs_directory},options=noatime,nodiratime,fstype=ext4,check_level=20\"",
|
command => "sm-configure service_instance etcd-fs etcd-fs \"device=${etcd_fs_device},directory=${etcd_fs_directory},options=noatime,nodiratime,fstype=ext4,check_level=20\"",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Configure device image repository
|
||||||
|
exec { 'Provision device-image-fs (service-group-member)':
|
||||||
|
command => 'sm-provision service-group-member controller-services device-image-fs',
|
||||||
|
}
|
||||||
|
-> exec { 'Provision device-image-fs (service)':
|
||||||
|
command => 'sm-provision service device-image-fs',
|
||||||
|
}
|
||||||
|
-> exec { 'Configure Device Image Repository FileSystem':
|
||||||
|
command => "sm-configure service_instance device-image-fs device-image-fs \"device=${deviceimage_fs_source_dir},directory=${deviceimage_fs_target_dir},options=bind,noatime,nodiratime,fstype=ext4,check_level=20\"",
|
||||||
|
}
|
||||||
|
|
||||||
# TODO: region code needs to be revisited
|
# TODO: region code needs to be revisited
|
||||||
if $region_config {
|
if $region_config {
|
||||||
# In a default Multi-Region configuration, Keystone is running as a
|
# In a default Multi-Region configuration, Keystone is running as a
|
||||||
|
Loading…
Reference in New Issue
Block a user