Configure LVM and Docker direct-lvm storage on the controllers
This commit is contained in:
parent
08d34db3d1
commit
8425b3c733
@ -5,3 +5,51 @@
|
||||
# User with which to access the controllers via SSH during bootstrap, in order
|
||||
# to setup the Kayobe user account.
|
||||
controller_bootstrap_user: "{{ lookup('env', 'USER') }}"
|
||||
|
||||
###############################################################################
|
||||
# Controller node LVM configuration.
|
||||
|
||||
# List of controller volume groups. See mrlesmithjr.manage-lvm role for
|
||||
# format.
|
||||
controller_lvm_groups: "{{ controller_lvm_groups_default + controller_lvm_groups_extra }}"
|
||||
|
||||
# Default list of controller volume groups. See mrlesmithjr.manage-lvm role for
|
||||
# format.
|
||||
controller_lvm_groups_default:
|
||||
- "{{ controller_lvm_group_data }}"
|
||||
|
||||
# Additional list of controller volume groups. See mrlesmithjr.manage-lvm role
|
||||
# for format.
|
||||
controller_lvm_groups_extra: []
|
||||
|
||||
# Controller LVM volume group for data. See mrlesmithjr.manage-lvm role for
|
||||
# format.
|
||||
controller_lvm_group_data:
|
||||
vgname: data
|
||||
disks: "{{ controller_lvm_group_data_disks | join(',') }}"
|
||||
create: True
|
||||
lvnames: "{{ controller_lvm_group_data_lvs }}"
|
||||
|
||||
# List of disks for use by controller LVM data volume group. Default to an
|
||||
# invalid value to require configuration.
|
||||
controller_lvm_group_data_disks:
|
||||
- changeme
|
||||
|
||||
# List of LVM logical volumes for the data volume group.
|
||||
controller_lvm_group_data_lvs:
|
||||
- "{{ controller_lvm_group_data_lv_docker_volumes }}"
|
||||
|
||||
# Docker volumes LVM backing volume.
|
||||
controller_lvm_group_data_lv_docker_volumes:
|
||||
lvname: docker-volumes
|
||||
size: "{{ controller_lvm_group_data_lv_docker_volumes_size }}"
|
||||
create: True
|
||||
filesystem: "{{ controller_lvm_group_data_lv_docker_volumes_fs }}"
|
||||
mount: True
|
||||
mntp: /var/lib/docker/volumes
|
||||
|
||||
# Size of docker volumes LVM backing volume.
|
||||
controller_lvm_group_data_lv_docker_volumes_size: 75%VG
|
||||
|
||||
# Filesystem for docker volumes LVM backing volume. ext4 allows for shrinking.
|
||||
controller_lvm_group_data_lv_docker_volumes_fs: ext4
|
||||
|
@ -1,12 +1,19 @@
|
||||
---
|
||||
###############################################################################
|
||||
# Seed node configuration.
|
||||
# Seed node LVM configuration.
|
||||
|
||||
# List of seed VM LVM volume groups. See mrlesmithjr.manage-lvm role for
|
||||
# List of seed volume groups. See mrlesmithjr.manage-lvm role for format.
|
||||
seed_lvm_groups: "{{ seed_lvm_groups_default + seed_lvm_groups_extra }}"
|
||||
|
||||
# Default list of seed volume groups. See mrlesmithjr.manage-lvm role for
|
||||
# format.
|
||||
seed_lvm_groups:
|
||||
seed_lvm_groups_default:
|
||||
- "{{ seed_lvm_group_data }}"
|
||||
|
||||
# Additional list of seed volume groups. See mrlesmithjr.manage-lvm role for
|
||||
# format.
|
||||
seed_lvm_groups_extra: []
|
||||
|
||||
# Seed LVM volume group for data. See mrlesmithjr.manage-lvm role for format.
|
||||
seed_lvm_group_data:
|
||||
vgname: data
|
||||
|
@ -3,4 +3,4 @@
|
||||
# Controller node LVM configuration.
|
||||
|
||||
# List of LVM volume groups.
|
||||
lvm_groups: []
|
||||
lvm_groups: "{{ controller_lvm_groups }}"
|
||||
|
@ -1,6 +1,16 @@
|
||||
---
|
||||
- name: Ensure LVM configuration is applied
|
||||
hosts: seed:controllers
|
||||
pre_tasks:
|
||||
- name: Fail if the LVM physical disks have not been configured
|
||||
fail:
|
||||
msg: >
|
||||
The physical disk list has not been configured for volume
|
||||
{{ item.vgname }}. Ensure that each volume group in 'lvm_groups'
|
||||
has a valid 'disks' list.
|
||||
with_items: "{{ lvm_groups | default([]) }}"
|
||||
when:
|
||||
- "{{ not item.disks | default([]) or 'changeme' in item.disks | default([]) }}"
|
||||
roles:
|
||||
- role: mrlesmithjr.manage-lvm
|
||||
manage_lvm: True
|
||||
|
@ -15,6 +15,41 @@
|
||||
# List of extra networks to which controller nodes are attached.
|
||||
#controller_extra_network_interfaces:
|
||||
|
||||
###############################################################################
|
||||
# Controller node LVM configuration.
|
||||
|
||||
# List of controller volume groups. See mrlesmithjr.manage-lvm role for
|
||||
# format.
|
||||
#controller_lvm_groups:
|
||||
|
||||
# Default list of controller volume groups. See mrlesmithjr.manage-lvm role for
|
||||
# format.
|
||||
#controller_lvm_groups_default:
|
||||
|
||||
# Additional list of controller volume groups. See mrlesmithjr.manage-lvm role
|
||||
# for format.
|
||||
#controller_lvm_groups_extra:
|
||||
|
||||
# Controller LVM volume group for data. See mrlesmithjr.manage-lvm role for
|
||||
# format.
|
||||
#controller_lvm_group_data:
|
||||
|
||||
# List of disks for use by controller LVM data volume group. Default to an
|
||||
# invalid value to require configuration.
|
||||
#controller_lvm_group_data_disks:
|
||||
|
||||
# List of LVM logical volumes for the data volume group.
|
||||
#controller_lvm_group_data_lvs:
|
||||
|
||||
# Docker volumes LVM backing volume.
|
||||
#controller_lvm_group_data_lv_docker_volumes:
|
||||
|
||||
# Size of docker volumes LVM backing volume.
|
||||
#controller_lvm_group_data_lv_docker_volumes_size:
|
||||
|
||||
# Filesystem for docker volumes LVM backing volume. ext4 allows for shrinking.
|
||||
#controller_lvm_group_data_lv_docker_volumes_fs:
|
||||
|
||||
###############################################################################
|
||||
# Dummy variable to allow Ansible to accept this file.
|
||||
workaround_ansible_issue_8743: yes
|
||||
|
@ -13,10 +13,18 @@
|
||||
###############################################################################
|
||||
# LVM configuration.
|
||||
|
||||
# List of seed VM LVM volume groups. See mrlesmithjr.manage-lvm role for
|
||||
# List of seed volume groups. See mrlesmithjr.manage-lvm role for
|
||||
# format.
|
||||
#seed_lvm_groups:
|
||||
|
||||
# Default list of seed volume groups. See mrlesmithjr.manage-lvm role for
|
||||
# format.
|
||||
#seed_lvm_groups_default:
|
||||
|
||||
# Additional list of seed volume groups. See mrlesmithjr.manage-lvm role
|
||||
# for format.
|
||||
#seed_lvm_groups_extra:
|
||||
|
||||
# Seed LVM volume group for data. See mrlesmithjr.manage-lvm role for format.
|
||||
#seed_lvm_group_data:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user