Ajout Cluster Ceph » Historique » Version 5
Aymeric APLU, 17/06/2021 22:42
1 | 1 | Laurent GUERBY | {{toc}} |
---|---|---|---|
2 | 1 | Laurent GUERBY | |
3 | 1 | Laurent GUERBY | h1. Ajout Cluster Ceph |
4 | 1 | Laurent GUERBY | |
5 | 1 | Laurent GUERBY | Copié depuis https://pad.tetaneutral.net/p/cluster-new-host |
6 | 1 | Laurent GUERBY | |
7 | 5 | Aymeric APLU | h2. sur la machine g22: |
8 | 5 | Aymeric APLU | |
9 | 5 | Aymeric APLU | faire une config réseau depus l'impi (uniquement ipv4 avec gw par defaut, plus simple à taper) |
10 | 5 | Aymeric APLU | |
11 | 5 | Aymeric APLU | Une fois le link up sur le vlan 3132, faire un ssh et faire la config réseau via rc.local (cf section suivante "h2. Sur la machine g1.t": ) |
12 | 5 | Aymeric APLU | |
13 | 5 | Aymeric APLU | |
14 | 5 | Aymeric APLU | Ne pas oublier : |
15 | 5 | Aymeric APLU | dans /etc/default/grub |
16 | 5 | Aymeric APLU | |
17 | 5 | Aymeric APLU | <pre>GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0"</pre> |
18 | 5 | Aymeric APLU | |
19 | 5 | Aymeric APLU | |
20 | 5 | Aymeric APLU | Copier /etc/systemd/system/rc-local.service depuis g21. |
21 | 5 | Aymeric APLU | |
22 | 5 | Aymeric APLU | Faire un fichier /etc/udev/rules.d/70-persistent-net.rules avec le contenu pour renomer les interfaces réseaux (voir example sur g21) |
23 | 5 | Aymeric APLU | |
24 | 5 | Aymeric APLU | |
25 | 5 | Aymeric APLU | |
26 | 1 | Laurent GUERBY | h2. Sur la machine g20: |
27 | 1 | Laurent GUERBY | |
28 | 1 | Laurent GUERBY | ajouter dans /etc/sources.list.d/puppet.list: |
29 | 1 | Laurent GUERBY | |
30 | 1 | Laurent GUERBY | <pre> |
31 | 1 | Laurent GUERBY | deb http://apt.puppetlabs.com bionic puppet5 |
32 | 1 | Laurent GUERBY | </pre> |
33 | 1 | Laurent GUERBY | |
34 | 1 | Laurent GUERBY | Puis faire: |
35 | 1 | Laurent GUERBY | |
36 | 1 | Laurent GUERBY | <pre> |
37 | 1 | Laurent GUERBY | apt update -y |
38 | 5 | Aymeric APLU | apt install puppet-agent bridge-utils |
39 | 1 | Laurent GUERBY | </pre> |
40 | 1 | Laurent GUERBY | |
41 | 3 | Aymeric APLU | h2. Sur la machine puppet.t: |
42 | 1 | Laurent GUERBY | |
43 | 1 | Laurent GUERBY | dans /etc/puppetlabs/code/environments/production/manifests/nodes/openstack.pp ajouter la machine dans le variable suivante: |
44 | 1 | Laurent GUERBY | |
45 | 1 | Laurent GUERBY | <pre> |
46 | 1 | Laurent GUERBY | $os_ring_bgp = { |
47 | 1 | Laurent GUERBY | ... |
48 | 1 | Laurent GUERBY | "g20" => [ 65014, "89.234.156.69", "2a03:7220:8083:4500::1" ], |
49 | 1 | Laurent GUERBY | } |
50 | 1 | Laurent GUERBY | </pre> |
51 | 1 | Laurent GUERBY | |
52 | 1 | Laurent GUERBY | Et ajouter une nouvelle node: |
53 | 1 | Laurent GUERBY | |
54 | 1 | Laurent GUERBY | <pre> |
55 | 1 | Laurent GUERBY | node "g20.tetaneutral.net" { |
56 | 1 | Laurent GUERBY | class { 'ttnn_os_ceph_server': } |
57 | 1 | Laurent GUERBY | class { 'ttnn_os_compute': } |
58 | 1 | Laurent GUERBY | include ceph::profile::client |
59 | 1 | Laurent GUERBY | } |
60 | 1 | Laurent GUERBY | </pre> |
61 | 1 | Laurent GUERBY | |
62 | 1 | Laurent GUERBY | |
63 | 3 | Aymeric APLU | h2. Sur la machine g1.t: |
64 | 1 | Laurent GUERBY | |
65 | 1 | Laurent GUERBY | Ajouter la machine et toutes ces IPs dans le /etc/rc.local: |
66 | 1 | Laurent GUERBY | |
67 | 1 | Laurent GUERBY | <pre> |
68 | 1 | Laurent GUERBY | vlan3132_ipv4["g20"]="89.234.156.69" |
69 | 1 | Laurent GUERBY | vlan3132_ipv6["g20"]="2a03:7220:8083:4500::1" |
70 | 1 | Laurent GUERBY | vlan3132_ipv6_local["g20"]="fe80::83:45" |
71 | 1 | Laurent GUERBY | vlan3175_ipv4["g20"]="192.168.3.120" |
72 | 1 | Laurent GUERBY | vlan3199_ipv4["g20"]="192.168.99.235" |
73 | 1 | Laurent GUERBY | netconsole_cfg["g20"]="192.168.128.220" |
74 | 1 | Laurent GUERBY | </pre> |
75 | 1 | Laurent GUERBY | |
76 | 1 | Laurent GUERBY | Ajouter la machine g20 dans /root/tools/tools-common et /root/tools/libvirt/func.inc |
77 | 1 | Laurent GUERBY | |
78 | 1 | Laurent GUERBY | <pre> |
79 | 1 | Laurent GUERBY | HOSTS="stri g1 g2 g3 g4 g5 g6 n7 g8 g9 g10 g11 g12 g20" |
80 | 1 | Laurent GUERBY | </pre> |
81 | 1 | Laurent GUERBY | |
82 | 1 | Laurent GUERBY | Copier le /etc/rc.local sur g20 |
83 | 1 | Laurent GUERBY | |
84 | 3 | Aymeric APLU | h2. Sur la machine g20 |
85 | 1 | Laurent GUERBY | |
86 | 1 | Laurent GUERBY | /!\ ATTENTION ICI CA COUPE LE RESEAU /!\ |
87 | 1 | Laurent GUERBY | |
88 | 3 | Aymeric APLU | Exécuter le /etc/rc.local ou reboot la machine |
89 | 1 | Laurent GUERBY | |
90 | 1 | Laurent GUERBY | Bien vérifier les trois bridges et leur ici: |
91 | 1 | Laurent GUERBY | |
92 | 1 | Laurent GUERBY | vlan3132 |
93 | 1 | Laurent GUERBY | vlan3175 |
94 | 1 | Laurent GUERBY | vlan3199 |
95 | 1 | Laurent GUERBY | |
96 | 1 | Laurent GUERBY | Une fois le réseau setup correctement: |
97 | 1 | Laurent GUERBY | |
98 | 1 | Laurent GUERBY | <pre> |
99 | 1 | Laurent GUERBY | $ puppet agent -vt --certname g20.tetaneutral.net --server puppet.tetaneutral.net |
100 | 1 | Laurent GUERBY | Info: Creating a new SSL key for g20.tetaneutral.net |
101 | 1 | Laurent GUERBY | Info: Caching certificate for ca |
102 | 1 | Laurent GUERBY | Info: csr_attributes file loading from /etc/puppet/csr_attributes.yaml |
103 | 1 | Laurent GUERBY | Info: Creating a new SSL certificate request for g20.tetaneutral.net |
104 | 1 | Laurent GUERBY | Info: Certificate Request fingerprint (SHA256): BF:C8:2A:B1:48:63:3A:C9:F2:A0:84:A2:89:0E:74:0E:91:C6:51:4C:B6:DA:1D:50:07:A3:E8:6A:C7:62:D4:4C |
105 | 1 | Laurent GUERBY | Info: Caching certificate for ca |
106 | 1 | Laurent GUERBY | Exiting; no certificate found and waitforcert is disabled |
107 | 1 | Laurent GUERBY | </pre> |
108 | 1 | Laurent GUERBY | |
109 | 3 | Aymeric APLU | h2. Puis sur la machine puppet: |
110 | 1 | Laurent GUERBY | |
111 | 1 | Laurent GUERBY | <pre> |
112 | 1 | Laurent GUERBY | $ puppetserver ca sign --certname g20.tetaneutral.net |
113 | 1 | Laurent GUERBY | Successfully signed certificate request for g20.tetaneutral.net |
114 | 1 | Laurent GUERBY | </pre> |
115 | 1 | Laurent GUERBY | |
116 | 3 | Aymeric APLU | h2. Puis sur la machine g20: |
117 | 1 | Laurent GUERBY | |
118 | 1 | Laurent GUERBY | <pre> |
119 | 1 | Laurent GUERBY | $ puppet agent -vt --certname g20.tetaneutral.net --server puppet.tetaneutral.net |
120 | 1 | Laurent GUERBY | </pre> |
121 | 1 | Laurent GUERBY | |
122 | 3 | Aymeric APLU | ... prendre un café ... ne pas avoir peur des 200 erreurs qui vont s'afficher (y'a quelque dépendances entre certain étape manquante, mais c'est pas bien grave) |
123 | 1 | Laurent GUERBY | |
124 | 3 | Aymeric APLU | Relancer plusieurs fois (Je l'ai fait 4x pour g20) , jusqu’à ce qu'il n'y est plus d'erreur |
125 | 1 | Laurent GUERBY | |
126 | 1 | Laurent GUERBY | <pre> |
127 | 1 | Laurent GUERBY | $ puppet agent -vt --certname g20.tetaneutral.net --server puppet.tetaneutral.net |
128 | 1 | Laurent GUERBY | </pre> |
129 | 1 | Laurent GUERBY | |
130 | 1 | Laurent GUERBY | Le dernier sort: |
131 | 1 | Laurent GUERBY | |
132 | 1 | Laurent GUERBY | <pre> |
133 | 1 | Laurent GUERBY | $ puppet agent -vt --certname g20.tetaneutral.net --server puppet.tetaneutral.net |
134 | 1 | Laurent GUERBY | Info: Using configured environment 'production' |
135 | 1 | Laurent GUERBY | Info: Retrieving pluginfacts |
136 | 1 | Laurent GUERBY | Info: Retrieving plugin |
137 | 1 | Laurent GUERBY | Info: Retrieving locales |
138 | 1 | Laurent GUERBY | Info: Loading facts |
139 | 1 | Laurent GUERBY | Info: Caching catalog for g20.tetaneutral.net |
140 | 1 | Laurent GUERBY | Info: /Stage[main]/Ttnn::Puppet/Tidy[/var/lib/puppet/clientbucket]: File does not exist |
141 | 1 | Laurent GUERBY | Info: /Stage[main]/Ttnn::Puppet/Tidy[/opt/puppetlabs/server/data/puppetserver/reports/]: File does not exist |
142 | 1 | Laurent GUERBY | Info: Applying configuration version '1611852800' |
143 | 1 | Laurent GUERBY | Notice: /Stage[main]/Ttnn::Prometheus::Exporters/Ttnn::Prometheus::Exporter[libvirt]/Prometheus::Daemon[libvirt_exporter]/Service[libvirt_exporter]/ensure: ensure changed 'stopped' to 'running' (corrective) |
144 | 1 | Laurent GUERBY | Info: /Stage[main]/Ttnn::Prometheus::Exporters/Ttnn::Prometheus::Exporter[libvirt]/Prometheus::Daemon[libvirt_exporter]/Service[libvirt_exporter]: Unscheduling refresh on Service[libvirt_exporter] |
145 | 1 | Laurent GUERBY | Notice: Applied catalog in 2.34 seconds |
146 | 1 | Laurent GUERBY | </pre> |
147 | 1 | Laurent GUERBY | |
148 | 3 | Aymeric APLU | h2. Enfin sur toutes les autres machines du cluster lancer: |
149 | 1 | Laurent GUERBY | |
150 | 1 | Laurent GUERBY | puppet agent -vt |
151 | 1 | Laurent GUERBY | |
152 | 1 | Laurent GUERBY | Cela va reconfigurer les bird pour ajouter g20 |
153 | 1 | Laurent GUERBY | |
154 | 3 | Aymeric APLU | h2. Et pour finir sur h7.t: |
155 | 1 | Laurent GUERBY | |
156 | 1 | Laurent GUERBY | Ajouter dans /etc/bird/bird/openstack.conf |
157 | 1 | Laurent GUERBY | |
158 | 1 | Laurent GUERBY | <pre> |
159 | 1 | Laurent GUERBY | protocol bgp OPENSTACK_G20 from mesh_openstack { |
160 | 1 | Laurent GUERBY | neighbor 89.234.156.69 as 65014; |
161 | 1 | Laurent GUERBY | } |
162 | 1 | Laurent GUERBY | </pre> |
163 | 1 | Laurent GUERBY | |
164 | 1 | Laurent GUERBY | Ajouter dans /etc/bird/bird6.conf |
165 | 1 | Laurent GUERBY | |
166 | 1 | Laurent GUERBY | <pre> |
167 | 1 | Laurent GUERBY | protocol bgp OPENSTACK_G20 from mesh_openstack { |
168 | 1 | Laurent GUERBY | neighbor 2a03:7220:8083:4500::1 as 65014; |
169 | 1 | Laurent GUERBY | } |
170 | 1 | Laurent GUERBY | </pre> |
171 | 1 | Laurent GUERBY | |
172 | 1 | Laurent GUERBY | Et faire: |
173 | 1 | Laurent GUERBY | |
174 | 1 | Laurent GUERBY | birdc conf |
175 | 1 | Laurent GUERBY | birdc6 conf |
176 | 2 | Aymeric APLU | |
177 | 3 | Aymeric APLU | h2. ne pas oublier sur puppet et nucnagios |
178 | 2 | Aymeric APLU | |
179 | 3 | Aymeric APLU | Il faut ajouter la machine dans quelques fichiers pour al supervision et autres. |
180 | 2 | Aymeric APLU | |
181 | 2 | Aymeric APLU | puppet: dans puppetmaster => environments/production/manifests/files/libvirt/dump-and-sync-xml (liste des hosts) |
182 | 2 | Aymeric APLU | |
183 | 2 | Aymeric APLU | nucnagios dans les fichiers : /omd/sites/ttnn/etc/check_mk : |
184 | 2 | Aymeric APLU | |
185 | 2 | Aymeric APLU | * main.mk |
186 | 2 | Aymeric APLU | * update_vm_parents.sh |
187 | 2 | Aymeric APLU | |
188 | 2 | Aymeric APLU | Penser à lancer le script ./client-plugins/install_plugins.sh |
189 | 4 | Aymeric APLU | |
190 | 4 | Aymeric APLU | h2. secret et paquet |
191 | 4 | Aymeric APLU | |
192 | 4 | Aymeric APLU | installer le paquet python-libvirt puis relancer le service |
193 | 4 | Aymeric APLU | |
194 | 4 | Aymeric APLU | systemctl restart libvirt_exporter.service |
195 | 4 | Aymeric APLU | |
196 | 4 | Aymeric APLU | copier les secrets ceph dans /etc/libvirt/secrets/ depuis g1 |
197 | 4 | Aymeric APLU | |
198 | 4 | Aymeric APLU | restart les services libvirt |