GlusterFS on both Debian nodes, Cloud-init for CoreOS on Libvirt
With only 2 nodes, I cannot use ceph to share storage between nodes for container persistent storage. Gluster could be used with only 2 nodes and fulfil my requirements. My aim being to use docker/rkt on top of coreOS, I looked for gluster support on CoreOS. Unfortunately, CoreOS Devs don’t want to add support for Gluster fs tools on CoreOS base. (more exaclty, I cannot use gluster client to mount gluster storage for docker usage). My only solution left is to use GlusteFS between my 2 Debian nodes then to export the clustered filesystem using NFS.
Today I also ameliored the DNS configuration in unbound and installed CoreOS using libvirt/KVM and cloud-init.
Installing gluster
-
Install gluster is straightforward, just follow the link high-availability-storage-with-glusterfs-on-debian-8-with-two-nodes referenced at the bottom of the page
-
Creation of Gluster NFS volume
- On nodes, specify the socket binding address. Add the following line to the file /etc/glusterfs/glusterd.vol
- Don’t forget to restart the daemon after editing the volume configuration
Correcting DNS reverse zone
I forgot to declare the reverse zone for the GRE subnet. So I added the zone 255.16.172.in-addr.arpa to NSD & modified Unbound to route requests to the authoritative server.
Deploying CoreOS with libvirt
I followed the CoreOS documentation to Install CoreOS with libvirt. To do so, you will need a recent libvirt with support for cloud-init config method. It is known that CentOS6/RHEL6 does not support disk based cloud-inits as proposed by CoreOS.
- Create the directory and store CoreOS image into it
- Make a snapshot of the current image
- Create the directory for the config drive
- Create the cloud-init file /var/lib/libvirt/images/coreos/coreos1/openstack/latest/user_data
- Create the VM with virt-install