Ansible – GlusterFS – Apache
I wanted to share some of these playbooks for reference to others who may be attempting to do something similar. Overall I am setting up some Ubuntu servers which will be used for different functions (HAProxy load balancers, MariaDB, Apache and GlusterFS). HAProxy will be load balancing traffic back to the Apache servers and eventually MariaDB. There are separate servers which will be running as GlusterFS servers in which all of the Apache servers will be using a GlusterFS mount for their /var/www to keep all servers in sync. I will be piecing together more of this post as time goes on but for now I wanted to share the main parts for reference. Feel free to leave comments on anything else that might be of interest based on the information here.
Below is my site hosts inventory…(More on how this has been created in the future 🙂 )
Below is my site.yml file which includes some of the roles that I am installing. I can post more about the roles or put up on github for reference.
Below is the playbook for the configuration of lvm.
Below is the playbook for the initial GlusterFS setup.
And finally the actual GlusterFS playbook to do the actual configurations on the web servers and GlusterFS servers.