All NVMesh Management Servers should have access to two shared volumes: one for Mongo and one for backups. This can be done by Azure files, NFS server, or any other persistent volume method.
The following uses the NFS method. To use another method or if an NFS server is already set, skip to Add a Persistent Volume to the Cluster stage.
Create an NFS Server Instance
Go to Microsoft Azure – Resource Groups and choose the resource group associated with the cluster (it should have a name starting with the cluster name). Click Add.
On the left, click Compute and then choose Virtual Machine.
Edit the virtual machine settings as follows:
- Virtual Machine name: NFS
- Region: same as the cluster
- Image: Ubuntu Server 18.04
- Size: a minimal machine should be sufficient, for instance “Standard B1ls (1 vcpu, 0.5 GiB memory)”
- Administrator account: it is easiest to use SSH and paste an existing public key
Click Next and then disks.
Click Next and then networking.
Choose the worker subnet as the subnet on this machine will run the managements pods, and use a public IP (don’t touch the field).
Click review and create and then create again and wait for the VM to start. When the machine will be created the following screen will appear. Click Go-to resource.
If ssh times out, allow inbound port 22 to the VM. On the VM resource page, click Networking and add the rule.
On the machine run:
sudo apt install -y nfs-kernel-server sudo mkdir -p /opt/nvmesh/backups sudo mkdir -p /opt/nvmesh/mongo sudo chown -R nobody:nogroup /opt/nvmesh/backups/ sudo chown -R nobody:nogroup /opt/nvmesh/mongo/ sudo chmod 777 /opt/nvmesh/backups/ sudo chmod 777 /opt/nvmesh/mongo/
Edit /etc/exports and add (with root permissions):
/opt/nvmesh/backups 10.0.32.0/24(rw,sync,no_subtree_check) /opt/nvmesh/mongo 10.0.32.0/24(rw,sync,no_subtree_check)
Finally, run the following:
sudo exportfs -a sudo systemctl restart nfs-kernel-server
Run ifconfig to take the internal IP address of the machine and record it for future use.