-
Notifications
You must be signed in to change notification settings - Fork 5
/
ceph-preinstall.yml
110 lines (95 loc) · 2.83 KB
/
ceph-preinstall.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# file: ceph-preinstall.yml
# invocation: ansible-playbook -i hosts ceph-preinstall.yml
# edit /etc/ansible/hosts to include all ceph rhscs,mon,osds,rgws
# https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/3/html-single/installation_guide_for_red_hat_enterprise_linux/
# Assumes that servers have:
# already been registered
# subscriptions attached
# Bastion host (rhclient4) has enabled rhel-7-server-rhceph-3-tools-rpms
---
- hosts: all
gather_facts: no
tasks:
- yum: name=firewalld,yum-utils,vim state=present
- systemd: name=firewalld enabled=yes state=started
- command: yum-config-manager --disable epel
- hosts: mons
gather_facts: no
vars:
mon_repos:
- rhel-7-server-rpms
- rhel-7-server-extras-rpms
- rhel-7-server-rhceph-3-mon-rpms
mon_ports:
- 6789/tcp
- 6800-7300/tcp
tasks:
- name: Enable repos for Ceph MONs
set_fact: repos={{ mon_repos | join(' --enable=') }}
- command: subscription-manager repos --disable="*" --enable={{ repos }}
- name: Configure MON Firewall
firewalld:
port: "{{ item }}"
permanent: true
state: enabled
with_items: "{{ mon_ports }}"
- hosts: osds
gather_facts: no
vars:
osd_repos:
- rhel-7-server-rpms
- rhel-7-server-extras-rpms
- rhel-7-server-rhceph-3-osd-rpms
osd_ports:
- 6800-7300/tcp
tasks:
- name: Enable repos for Ceph OSDs
set_fact: repos={{ osd_repos | join(' --enable=') }}
- command: subscription-manager repos --disable="*" --enable={{ repos }}
- name: Configure OSD Firewall
firewalld:
port: "{{ item }}"
permanent: true
state: enabled
with_items: "{{ osd_ports }}"
- hosts: mdss
gather_facts: no
vars:
mds_repos:
- rhel-7-server-rpms
- rhel-7-server-extras-rpms
- rhel-7-server-rhceph-3-tools-rpms
mds_ports:
- 6800/tcp
tasks:
- name: Enable repos for CephFS / MDS
set_fact: repos={{ mds_repos | join(' --enable=') }}
- command: subscription-manager repos --disable="*" --enable={{ repos }}
- name: Configure CephFS / MDS Firewall
firewalld:
port: "{{ item }}"
permanent: true
state: enabled
with_items: "{{ mds_ports }}"
- hosts: rgws
gather_facts: no
vars:
rgw_repos:
- rhel-7-server-rpms
- rhel-7-server-extras-rpms
- rhel-7-server-rhceph-3-tools-rpms
rgw_ports:
- 80/tcp
- 443/tcp
- 7480/tcp
- 8080/tcp
tasks:
- name: Enable repos for Ceph RGWs
set_fact: repos={{ rgw_repos | join(' --enable=') }}
- command: subscription-manager repos --disable="*" --enable={{ repos }}
- name: Configure RGW Firewall
firewalld:
port: "{{ item }}"
permanent: true
state: enabled
with_items: "{{ rgw_ports }}"