Prepare for LVM based VCP
This patch adds metadata needed to setup partitions on
VCP with LVM.
The new param 'image_layout' is added to salt:control:size:<size_name>
This is metadata that describes partition layout of VCP.
For now VCP has predefined list of partitions see
https://gerrit.mcp.mirantis.com/#/c/30862/
image_layout defines sizes for each of partitions that should be
applied after VCP is provisioned. The resizing will be done by
growlvmp.py script placed on VCP
https://gerrit.mcp.mirantis.com/#/c/31052/
The default layout:
image_layout:
root:
size: '30%VG' # 30% of VG total size
home:
size: '1G' # fixed size 1G
var_log:
size: '11%VG' # 11% of VG total size
var_log_audit:
size: '5G' # fixed size 5G
var_tmp:
size: '11%VG' # 11% of VG total size
tmp:
size: '5G' # fixed size 5G
Related-Prod: PROD-24537
Change-Id: I18205dfa8478be2ae092a87ced833c8ab0cc01ea
diff --git a/salt/control/placement/stacklight/small.yml b/salt/control/placement/stacklight/small.yml
index 9223340..4bfd44c 100644
--- a/salt/control/placement/stacklight/small.yml
+++ b/salt/control/placement/stacklight/small.yml
@@ -15,6 +15,27 @@
stacklight_log_backend_image: ${_param:salt_control_xenial_image_backend}
stacklight_monitor_backend_image: ${_param:salt_control_xenial_image_backend}
stacklight_telemetry_backend_image: ${_param:salt_control_xenial_image_backend}
+ salt_control_cluster_node_cloud_init_stacklight_log:
+ user_data:
+ write_files:
+ - content: |
+ ${salt:control:size:stacklight.log:image_layout}
+ owner: root:root
+ path: /usr/share/growlvm/image-layout.yml
+ salt_control_cluster_node_cloud_init_stacklight_server:
+ user_data:
+ write_files:
+ - content: |
+ ${salt:control:size:stacklight.server:image_layout}
+ owner: root:root
+ path: /usr/share/growlvm/image-layout.yml
+ salt_control_cluster_node_cloud_init_stacklight_telemetry:
+ user_data:
+ write_files:
+ - content: |
+ ${salt:control:size:stacklight.telemetry:image_layout}
+ owner: root:root
+ path: /usr/share/growlvm/image-layout.yml
salt:
control:
cluster:
@@ -26,51 +47,60 @@
backend: ${_param:stacklight_telemetry_backend_image}
provider: ${_param:infra_kvm_node04_hostname}.${_param:cluster_domain}
size: stacklight.telemetry
+ cloud_init: ${_param:salt_control_cluster_node_cloud_init_stacklight_telemetry}
mtr02:
name: ${_param:stacklight_telemetry_node02_hostname}
image: ${_param:salt_control_xenial_image}
backend: ${_param:stacklight_telemetry_backend_image}
provider: ${_param:infra_kvm_node05_hostname}.${_param:cluster_domain}
size: stacklight.telemetry
+ cloud_init: ${_param:salt_control_cluster_node_cloud_init_stacklight_telemetry}
mtr03:
name: ${_param:stacklight_telemetry_node03_hostname}
image: ${_param:salt_control_xenial_image}
backend: ${_param:stacklight_telemetry_backend_image}
provider: ${_param:infra_kvm_node06_hostname}.${_param:cluster_domain}
size: stacklight.telemetry
+ cloud_init: ${_param:salt_control_cluster_node_cloud_init_stacklight_telemetry}
log01:
name: ${_param:stacklight_log_node01_hostname}
image: ${_param:salt_control_xenial_image}
backend: ${_param:stacklight_log_backend_image}
provider: ${_param:infra_kvm_node04_hostname}.${_param:cluster_domain}
size: stacklight.log
+ cloud_init: ${_param:salt_control_cluster_node_cloud_init_stacklight_log}
log02:
name: ${_param:stacklight_log_node02_hostname}
image: ${_param:salt_control_xenial_image}
backend: ${_param:stacklight_log_backend_image}
provider: ${_param:infra_kvm_node05_hostname}.${_param:cluster_domain}
size: stacklight.log
+ cloud_init: ${_param:salt_control_cluster_node_cloud_init_stacklight_log}
log03:
name: ${_param:stacklight_log_node03_hostname}
image: ${_param:salt_control_xenial_image}
backend: ${_param:stacklight_log_backend_image}
provider: ${_param:infra_kvm_node06_hostname}.${_param:cluster_domain}
size: stacklight.log
+ cloud_init: ${_param:salt_control_cluster_node_cloud_init_stacklight_log}
mon01:
name: ${_param:stacklight_monitor_node01_hostname}
image: ${_param:salt_control_xenial_image}
backend: ${_param:stacklight_monitor_backend_image}
provider: ${_param:infra_kvm_node04_hostname}.${_param:cluster_domain}
size: stacklight.server
+ cloud_init: ${_param:salt_control_cluster_node_cloud_init_stacklight_server}
mon02:
name: ${_param:stacklight_monitor_node02_hostname}
image: ${_param:salt_control_xenial_image}
backend: ${_param:stacklight_monitor_backend_image}
provider: ${_param:infra_kvm_node05_hostname}.${_param:cluster_domain}
size: stacklight.server
+ cloud_init: ${_param:salt_control_cluster_node_cloud_init_stacklight_server}
mon03:
name: ${_param:stacklight_monitor_node03_hostname}
image: ${_param:salt_control_xenial_image}
backend: ${_param:stacklight_monitor_backend_image}
provider: ${_param:infra_kvm_node06_hostname}.${_param:cluster_domain}
size: stacklight.server
+ cloud_init: ${_param:salt_control_cluster_node_cloud_init_stacklight_server}