Remove Storage role & inventory

This commit is contained in:
Yousef Alam 2016-10-13 10:11:49 +01:00
Родитель f394ad4817
Коммит 534926f9f4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 10B7403F339660D9
8 изменённых файлов: 4 добавлений и 78 удалений

Просмотреть файл

@ -36,10 +36,6 @@ Get Involved!
* OpenVPN
* ``openvpn-firewall``
* Configures ``iptables`` rules for our VPN traffic.
* Storage
* Configures our [GlusterFS](https://www.gluster.org/) cluster.
* Provides a distributed and scalable storage solution.
* We mainly use it as persistent storage backing our docker instances.
### Ansible galaxy dependencies

Просмотреть файл

@ -25,8 +25,6 @@ marathon_app_volumes:
- "wordpress-mozillaireland-production"
- "wordpress-mozillaireland-staging"
- "jenkins"
marathon_gluster_volume: 'marathon'
marathon_gluster_mountpoint: '/srv/marathon'
marathon_efs_mountpoint: '/srv/marathon-efs'
marathon_staging_filesystem_id: 'fs-669b552f'
marathon_production_filesystem_id: 'fs-799b5530'

Просмотреть файл

@ -1,6 +1,5 @@
[tag_app_openvpn]
[tag_app_consul]
[tag_app_storage]
[tag_Name_admin]
[openvpn:children]
@ -12,8 +11,5 @@ tag_app_consul
[sensu:children]
tag_app_consul
[storage:children]
tag_app_storage
[admin:children]
tag_Name_admin

Просмотреть файл

@ -1,16 +1,17 @@
---
- name: Install GlusterFS PPA
- name: remove GlusterFS PPA
apt_repository:
repo: "ppa:gluster/glusterfs-3.7"
state: absent
tags:
- storage
- gluster
- name: Install GlusterFS client
- name: remove GlusterFS client
apt:
name: "glusterfs-client"
state: present
state: absent
tags:
- storage
- gluster

Просмотреть файл

@ -1,13 +1,5 @@
---
- name: Ensure gluster volume mountpoint exists
file:
path: "{{ marathon_gluster_mountpoint }}"
state: directory
tags:
- storage
- gluster
- name: Ensure EFS mountpoint exists
file:
path: "{{ marathon_efs_mountpoint }}"

Просмотреть файл

@ -1,46 +0,0 @@
---
- name: Install GlusterFS PPA
apt_repository:
repo: "ppa:gluster/glusterfs-3.7"
tags:
- gluster
- name: Install GlusterFS server
apt:
name: "{{ item }}"
state: present
with_items:
- glusterfs-server
- glusterfs-client
tags:
- gluster
- name: Ensure GlusterFS server is running
service:
name: glusterfs-server
state: started
tags:
- gluster
- name: Ensure that `brick` directories exist
file:
path: "{{ brick_path}}/{{ item }}"
state: directory
with_items: gluster_volumes
tags:
- gluster
- name: Create replicated gluster volume
gluster_volume:
name: "{{ item }}"
brick: "{{ brick_path}}/{{ item }}"
replicas: "{{ groups['storage']|length }}"
host: "{{ ansible_default_ipv4['address'] }}"
cluster: "{% for host in groups['storage'] %}{{ hostvars[host].ansible_default_ipv4['address'] }}{% if not loop.last %},{% endif %}{% endfor %}"
state: present
force: yes
when: inventory_hostname == "{{ groups['storage']|first }}"
with_items: gluster_volumes
tags:
- gluster

Просмотреть файл

@ -1,3 +0,0 @@
---
brick_path: /srv/gluster

Просмотреть файл

@ -51,14 +51,6 @@
tags:
- openvpn
- hosts: storage
sudo: yes
roles:
- storage
vars:
gluster_volumes:
- marathon
- hosts: mesos-master
sudo: yes
roles: