Giter Club home page Giter Club logo

glusterfs-gce's Introduction

Bootstrap HA GlusterFS Cluster in GCE

  • This project bootstraps off-cluster HA GlusterFS Cluster, if you are interested to run HA GlusterFS Cluster in Kubernetes, check out gluster-kubernetes project.

As you know shared file systems are a tricky problem. One solution to that problem is a distributed file system. Something that your apps can read from and write to. When it comes to distributed file systems, GlusterFS is one of the leading products.

With a few simple scripts on your Mac OS X or Linux machine, you can deploy a multi-zone HA GlusterFS cluster to Google Compute Engine (GCE) that provides scalable, persistent shared storage for your GCE or Google Container Engine (GKE) Kubernetes clusters.

By default it is set to three GlusterFS servers, one server per Google Cloud zone in the same chosen region.

Prerequisites

Before continuing, please make sure you have:

Clone this project and set settings:

$ git clone https://github.com/rimusz/glusterfs-gce
$ cd glusterfs-gce/cluster
  • Edit the cluster/settings file and set PROJECT, REGION and ZONES, the rest of settings in this file are probably fine, but can be adjusted if need be.

Bootstrap the cluster

$ ./create_cluster.sh

This command will create three servers.

Each server will have:

  • A static IP
  • The GlusterFS server package installed
  • A Google Cloud persistent disk to be used as a GlusterFS brick, that is: storage space made available to the cluster

Create volumes

A GlusterFS volume is a collection of bricks. A volume can store data across the bricks in three basic ways: distributed, striped, or replicated.

With the script below you will be able to create GFS replicated volumes on all three servers automaticly:

$ cd ..
$ ./create_volume.sh VOLUME_NAME
At this point, your GlusterFS cluster should be fully set up and operational

You can check Kubernetes GlusterFS example how to use GlusterFS with Kubernetes.

Extras

In cluster folder there are two more scripts:

  • upgrade_glusterfs.sh - allows to upgrade GlusterFS server package on all servers
  • upgrade_servers.sh - runs apt-get update && apt-get upgrade on all servers

Delete the cluster

$ ./delete_cluster.sh

This command will delete the whole cluster.

glusterfs-gce's People

Contributors

gorozcoh avatar rasekar2000 avatar rimusz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glusterfs-gce's Issues

Why does the glusterfs cluster require external ip addresses?

It seem more secure if they only had internal address. I also noticed that currently create volume script requires these addresses.

When I remove the external address manually it seems to still function as expected just cant create new volumes.

create_cluster.sh script fails to install glusterfs-server

Fails with the following error:
Err:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-libc-dev amd64 4.4.0-78.99
404 Not Found [IP: 104.155.199.95 80]
Err:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-libc-dev amd64 4.4.0-78.99
404 Not Found [IP: 104.155.199.95 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_4.4.0-78.99_amd64.deb 404 Not Found [IP: 104.155.199.95 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Was able to avoid error by running "sudo apt-get update command" before installing glusterfs-server

persistent-ssd or local-ssd

Is there any reason I should use persistent-ssd over local-ssd if I am planning on replicating the data across 3 nodes in prod?

Boot disk size

By default the boot disk size is 200GB for the Gluster instance. I was curious if this is required? How much data is really stored outside of the bricks. Not saying it needs to be changed just curious.

Persistent Volume / PVC for GlusterFS-GCE

Best Practice to access glusterFs on GCE?

Option 1)
GlusterFS IPs as Endpoints
https://github.com/kubernetes/kubernetes/tree/master/examples/volumes/glusterfs
This is working fine .
Option 2)
Creating PersistentVolume and Access it via PersistentVolumeClaim.
https://github.com/kubernetes/kubernetes/tree/master/examples/volumes/vsphere
I haven't tried this. But seems an option. But not sure, will it work? If you think this will not work or not applicable, we can create an enhancement request.

@rimusz / @janakiramm : Please share your thoughts!

Thanks and Regards,
Raj

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.