Denis Machard

My technical gists

Infrastructure background, developer mindset. I build things for pleasure.
    @github @mastodon @rss

    Install a Docker Swarm cluster with Persistent Storage Using GlusterFS

    Install a Docker Swarm cluster with Persistent Storage Using GlusterFS

    Prerequisites

    Your ansible inventory and hosts file should be like this:

    cat /etc/hosts

    $ cat /etc/hosts
    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    192.168.1.221	docker-manager01
    192.168.1.222	docker-worker01
    192.168.1.223	docker-worker02
    

    cat inventory.ini

    [swarm_managers]
    docker-manager01
    
    [swarm_workers]
    docker-worker01
    docker-worker02
    
    [swarm:children]
    swarm_managers
    swarm_workers
    
    [glusterfs]
    docker-manager01
    docker-worker01
    docker-worker02
    

    Overview

    The cluster consists of 3 servers:

    • 1 manager
    • 2 workers
    • A distributed file system

    overview docker swarm and glusterfs

    Installation

    Run the following playbooks

    propulsed by hugo and hugo-theme-gists