Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nicc777/164d5c65510d369248fa50c338a71ba7 to your computer and use it in GitHub Desktop.
Save nicc777/164d5c65510d369248fa50c338a71ba7 to your computer and use it in GitHub Desktop.
Provision GlusterFS Mount Points in K3s Nodes running on Multipass
#!/bin/bash
for node in node1 node2 node3 ;do
multipass exec $node -- sudo DEBIAN_FRONTEND=noninteractive apt update
multipass exec $node -- sudo DEBIAN_FRONTEND=noninteractive apt install -yq software-properties-common
multipass exec $node -- sudo DEBIAN_FRONTEND=noninteractive add-apt-repository -y ppa:gluster/glusterfs-7
multipass exec $node -- sudo DEBIAN_FRONTEND=noninteractive apt update
multipass exec $node -- sudo DEBIAN_FRONTEND=noninteractive apt install -y glusterfs-client
multipass exec $node -- sudo mkdir -p /opt/local-path-provisioner
multipass exec $node -- sudo chmod 777 /opt/local-path-provisioner
multipass exec $node -- sudo mount -t glusterfs glusterfs1:volume1 /opt/local-path-provisioner
multipass exec $node -- df -h
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment