Ajout Cluster Ceph » Historique » Version 3
Aymeric APLU, 01/06/2021 11:32
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 | 3 | Aymeric APLU | h2. Sur la machine g20: |
8 | 1 | Laurent GUERBY | |
9 | 1 | Laurent GUERBY | ajouter dans /etc/sources.list.d/puppet.list: |
10 | 1 | Laurent GUERBY | |
11 | 1 | Laurent GUERBY | <pre> |
12 | 1 | Laurent GUERBY | deb http://apt.puppetlabs.com bionic puppet5 |
13 | 1 | Laurent GUERBY | </pre> |
14 | 1 | Laurent GUERBY | |
15 | 1 | Laurent GUERBY | Puis faire: |
16 | 1 | Laurent GUERBY | |
17 | 1 | Laurent GUERBY | <pre> |
18 | 1 | Laurent GUERBY | apt update -y |
19 | 1 | Laurent GUERBY | apt install puppet-agent bridge-utils ruby-dev |
20 | 1 | Laurent GUERBY | </pre> |
21 | 1 | Laurent GUERBY | |
22 | 3 | Aymeric APLU | h2. Sur la machine puppet.t: |
23 | 1 | Laurent GUERBY | |
24 | 1 | Laurent GUERBY | dans /etc/puppetlabs/code/environments/production/manifests/nodes/openstack.pp ajouter la machine dans le variable suivante: |
25 | 1 | Laurent GUERBY | |
26 | 1 | Laurent GUERBY | <pre> |
27 | 1 | Laurent GUERBY | $os_ring_bgp = { |
28 | 1 | Laurent GUERBY | ... |
29 | 1 | Laurent GUERBY | "g20" => [ 65014, "89.234.156.69", "2a03:7220:8083:4500::1" ], |
30 | 1 | Laurent GUERBY | } |
31 | 1 | Laurent GUERBY | </pre> |
32 | 1 | Laurent GUERBY | |
33 | 1 | Laurent GUERBY | Et ajouter une nouvelle node: |
34 | 1 | Laurent GUERBY | |
35 | 1 | Laurent GUERBY | <pre> |
36 | 1 | Laurent GUERBY | node "g20.tetaneutral.net" { |
37 | 1 | Laurent GUERBY | class { 'ttnn_os_ceph_server': } |
38 | 1 | Laurent GUERBY | class { 'ttnn_os_compute': } |
39 | 1 | Laurent GUERBY | include ceph::profile::client |
40 | 1 | Laurent GUERBY | } |
41 | 1 | Laurent GUERBY | </pre> |
42 | 1 | Laurent GUERBY | |
43 | 1 | Laurent GUERBY | |
44 | 3 | Aymeric APLU | h2. Sur la machine g1.t: |
45 | 1 | Laurent GUERBY | |
46 | 1 | Laurent GUERBY | Ajouter la machine et toutes ces IPs dans le /etc/rc.local: |
47 | 1 | Laurent GUERBY | |
48 | 1 | Laurent GUERBY | <pre> |
49 | 1 | Laurent GUERBY | vlan3132_ipv4["g20"]="89.234.156.69" |
50 | 1 | Laurent GUERBY | vlan3132_ipv6["g20"]="2a03:7220:8083:4500::1" |
51 | 1 | Laurent GUERBY | vlan3132_ipv6_local["g20"]="fe80::83:45" |
52 | 1 | Laurent GUERBY | vlan3175_ipv4["g20"]="192.168.3.120" |
53 | 1 | Laurent GUERBY | vlan3199_ipv4["g20"]="192.168.99.235" |
54 | 1 | Laurent GUERBY | netconsole_cfg["g20"]="192.168.128.220" |
55 | 1 | Laurent GUERBY | </pre> |
56 | 1 | Laurent GUERBY | |
57 | 1 | Laurent GUERBY | Ajouter la machine g20 dans /root/tools/tools-common et /root/tools/libvirt/func.inc |
58 | 1 | Laurent GUERBY | |
59 | 1 | Laurent GUERBY | <pre> |
60 | 1 | Laurent GUERBY | HOSTS="stri g1 g2 g3 g4 g5 g6 n7 g8 g9 g10 g11 g12 g20" |
61 | 1 | Laurent GUERBY | </pre> |
62 | 1 | Laurent GUERBY | |
63 | 1 | Laurent GUERBY | Copier le /etc/rc.local sur g20 |
64 | 1 | Laurent GUERBY | |
65 | 3 | Aymeric APLU | h2. Sur la machine g20 |
66 | 1 | Laurent GUERBY | |
67 | 1 | Laurent GUERBY | /!\ ATTENTION ICI CA COUPE LE RESEAU /!\ |
68 | 1 | Laurent GUERBY | |
69 | 3 | Aymeric APLU | Exécuter le /etc/rc.local ou reboot la machine |
70 | 1 | Laurent GUERBY | |
71 | 1 | Laurent GUERBY | Bien vérifier les trois bridges et leur ici: |
72 | 1 | Laurent GUERBY | |
73 | 1 | Laurent GUERBY | vlan3132 |
74 | 1 | Laurent GUERBY | vlan3175 |
75 | 1 | Laurent GUERBY | vlan3199 |
76 | 1 | Laurent GUERBY | |
77 | 1 | Laurent GUERBY | Une fois le réseau setup correctement: |
78 | 1 | Laurent GUERBY | |
79 | 1 | Laurent GUERBY | <pre> |
80 | 1 | Laurent GUERBY | $ puppet agent -vt --certname g20.tetaneutral.net --server puppet.tetaneutral.net |
81 | 1 | Laurent GUERBY | Info: Creating a new SSL key for g20.tetaneutral.net |
82 | 1 | Laurent GUERBY | Info: Caching certificate for ca |
83 | 1 | Laurent GUERBY | Info: csr_attributes file loading from /etc/puppet/csr_attributes.yaml |
84 | 1 | Laurent GUERBY | Info: Creating a new SSL certificate request for g20.tetaneutral.net |
85 | 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 |
86 | 1 | Laurent GUERBY | Info: Caching certificate for ca |
87 | 1 | Laurent GUERBY | Exiting; no certificate found and waitforcert is disabled |
88 | 1 | Laurent GUERBY | </pre> |
89 | 1 | Laurent GUERBY | |
90 | 3 | Aymeric APLU | h2. Puis sur la machine puppet: |
91 | 1 | Laurent GUERBY | |
92 | 1 | Laurent GUERBY | <pre> |
93 | 1 | Laurent GUERBY | $ puppetserver ca sign --certname g20.tetaneutral.net |
94 | 1 | Laurent GUERBY | Successfully signed certificate request for g20.tetaneutral.net |
95 | 1 | Laurent GUERBY | </pre> |
96 | 1 | Laurent GUERBY | |
97 | 3 | Aymeric APLU | h2. Puis sur la machine g20: |
98 | 1 | Laurent GUERBY | |
99 | 1 | Laurent GUERBY | <pre> |
100 | 1 | Laurent GUERBY | $ puppet agent -vt --certname g20.tetaneutral.net --server puppet.tetaneutral.net |
101 | 1 | Laurent GUERBY | </pre> |
102 | 1 | Laurent GUERBY | |
103 | 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) |
104 | 1 | Laurent GUERBY | |
105 | 3 | Aymeric APLU | Relancer plusieurs fois (Je l'ai fait 4x pour g20) , jusqu’à ce qu'il n'y est plus d'erreur |
106 | 1 | Laurent GUERBY | |
107 | 1 | Laurent GUERBY | <pre> |
108 | 1 | Laurent GUERBY | $ puppet agent -vt --certname g20.tetaneutral.net --server puppet.tetaneutral.net |
109 | 1 | Laurent GUERBY | </pre> |
110 | 1 | Laurent GUERBY | |
111 | 1 | Laurent GUERBY | Le dernier sort: |
112 | 1 | Laurent GUERBY | |
113 | 1 | Laurent GUERBY | <pre> |
114 | 1 | Laurent GUERBY | $ puppet agent -vt --certname g20.tetaneutral.net --server puppet.tetaneutral.net |
115 | 1 | Laurent GUERBY | Info: Using configured environment 'production' |
116 | 1 | Laurent GUERBY | Info: Retrieving pluginfacts |
117 | 1 | Laurent GUERBY | Info: Retrieving plugin |
118 | 1 | Laurent GUERBY | Info: Retrieving locales |
119 | 1 | Laurent GUERBY | Info: Loading facts |
120 | 1 | Laurent GUERBY | Info: Caching catalog for g20.tetaneutral.net |
121 | 1 | Laurent GUERBY | Info: /Stage[main]/Ttnn::Puppet/Tidy[/var/lib/puppet/clientbucket]: File does not exist |
122 | 1 | Laurent GUERBY | Info: /Stage[main]/Ttnn::Puppet/Tidy[/opt/puppetlabs/server/data/puppetserver/reports/]: File does not exist |
123 | 1 | Laurent GUERBY | Info: Applying configuration version '1611852800' |
124 | 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) |
125 | 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] |
126 | 1 | Laurent GUERBY | Notice: Applied catalog in 2.34 seconds |
127 | 1 | Laurent GUERBY | </pre> |
128 | 1 | Laurent GUERBY | |
129 | 3 | Aymeric APLU | h2. Enfin sur toutes les autres machines du cluster lancer: |
130 | 1 | Laurent GUERBY | |
131 | 1 | Laurent GUERBY | puppet agent -vt |
132 | 1 | Laurent GUERBY | |
133 | 1 | Laurent GUERBY | Cela va reconfigurer les bird pour ajouter g20 |
134 | 1 | Laurent GUERBY | |
135 | 3 | Aymeric APLU | h2. Et pour finir sur h7.t: |
136 | 1 | Laurent GUERBY | |
137 | 1 | Laurent GUERBY | Ajouter dans /etc/bird/bird/openstack.conf |
138 | 1 | Laurent GUERBY | |
139 | 1 | Laurent GUERBY | <pre> |
140 | 1 | Laurent GUERBY | protocol bgp OPENSTACK_G20 from mesh_openstack { |
141 | 1 | Laurent GUERBY | neighbor 89.234.156.69 as 65014; |
142 | 1 | Laurent GUERBY | } |
143 | 1 | Laurent GUERBY | </pre> |
144 | 1 | Laurent GUERBY | |
145 | 1 | Laurent GUERBY | Ajouter dans /etc/bird/bird6.conf |
146 | 1 | Laurent GUERBY | |
147 | 1 | Laurent GUERBY | <pre> |
148 | 1 | Laurent GUERBY | protocol bgp OPENSTACK_G20 from mesh_openstack { |
149 | 1 | Laurent GUERBY | neighbor 2a03:7220:8083:4500::1 as 65014; |
150 | 1 | Laurent GUERBY | } |
151 | 1 | Laurent GUERBY | </pre> |
152 | 1 | Laurent GUERBY | |
153 | 1 | Laurent GUERBY | Et faire: |
154 | 1 | Laurent GUERBY | |
155 | 1 | Laurent GUERBY | birdc conf |
156 | 1 | Laurent GUERBY | birdc6 conf |
157 | 2 | Aymeric APLU | |
158 | 3 | Aymeric APLU | h2. ne pas oublier sur puppet et nucnagios |
159 | 2 | Aymeric APLU | |
160 | 3 | Aymeric APLU | Il faut ajouter la machine dans quelques fichiers pour al supervision et autres. |
161 | 2 | Aymeric APLU | |
162 | 2 | Aymeric APLU | puppet: dans puppetmaster => environments/production/manifests/files/libvirt/dump-and-sync-xml (liste des hosts) |
163 | 2 | Aymeric APLU | |
164 | 2 | Aymeric APLU | nucnagios dans les fichiers : /omd/sites/ttnn/etc/check_mk : |
165 | 2 | Aymeric APLU | |
166 | 2 | Aymeric APLU | * main.mk |
167 | 2 | Aymeric APLU | * update_vm_parents.sh |
168 | 2 | Aymeric APLU | |
169 | 2 | Aymeric APLU | Penser à lancer le script ./client-plugins/install_plugins.sh |