Attach extra volumes for stateful services
requested to merge gitlab-jh/gitlab-environment-toolkit:att-data-disks-for-stateful-services into master
Attach extra data disks to the nodes that require data persistence and data safety, such as postgres.
Changes:
Terraform
- Add
data_disk_type
anddata_disk_size
in tencentcloud module to configure data disks. Ifdata_disk_size
is null, no disk will be created. - Add
<service>_data_disk_size
on dedicated services in the gitlab_ref_arch_tencentcloud. Currently only elastic, gitaly, postgres and redis have the options based on our requirements.
Ansible
- In ansible
common
role, add variabledata_disk
to determine whether mount the disk or not. If thedata_disk
is found, the disk will be mounted to/var/opt/gitlab
when it is an omnibus node or/var/lib/docker
when it is a elasticserch node.
Edited by vincent stchu