Projet

Général

Profil

Installation Gateway dans nebula » Historique » Version 41

Gilles Grandgérard, 02/09/2014 16:20

1 40 Gilles Grandgérard
h1. A) Installation pour utilisation
2 3 Gilles Grandgérard
3 40 Gilles Grandgérard
h2. A.1) Récupération du dépot eole-ci-test
4 1 Gilles Grandgérard
5 4 Gilles Grandgérard
Faire :
6 4 Gilles Grandgérard
<pre>
7 29 Gérald Schwartzmann
git clone https://dev-eole.ac-dijon.fr/git/eole-ci-tests.git
8 4 Gilles Grandgérard
</pre>
9 1 Gilles Grandgérard
10 40 Gilles Grandgérard
h2. A.2) Ajout de la gateway dans le eole-ci-tests
11 1 Gilles Grandgérard
12 41 Gilles Grandgérard
il faut créer un script dans 'configuration/gateway/' dont le nom sera 'routeur_<user_nebula>.sh'.
13 25 Gilles Grandgérard
Penser à mettre les droits d'execution.
14 1 Gilles Grandgérard
15 22 Gilles Grandgérard
<pre>
16 22 Gilles Grandgérard
IP_EOLE=<fin de l'Ip sur le reseau EOLE>
17 22 Gilles Grandgérard
</pre>
18 22 Gilles Grandgérard
19 26 Gilles Grandgérard
Voir : 
20 26 Gilles Grandgérard
* http://dev-eole.ac-dijon.fr/projects/eole-interne/wiki/Adressage_ip 
21 26 Gilles Grandgérard
* Attention à ce que l'adresse soit disponible 
22 1 Gilles Grandgérard
23 40 Gilles Grandgérard
h2. A.3) Ajout de la clef publique ssh dans eole-ci-tests/security/authorized_keys
24 1 Gilles Grandgérard
25 30 Gérald Schwartzmann
Les clefs publiques SSH présentes dans eole-ci-tests/security/authorized_keys sont automatiquement concatenées dans /root/.ssh/authorized_keys au 1er démarrage de la VM.
26 1 Gilles Grandgérard
L'acces a chaque VM peut se faire sans mot de passe.
27 1 Gilles Grandgérard
28 1 Gilles Grandgérard
Utiliser le nom 'user@hostname' pour votre fichier de cle.
29 1 Gilles Grandgérard
30 40 Gilles Grandgérard
h2. A.4) Commit
31 1 Gilles Grandgérard
32 1 Gilles Grandgérard
<pre>
33 31 Gérald Schwartzmann
git add -a
34 31 Gérald Schwartzmann
git commit -m "ajout de l'utisateur <user>"
35 1 Gilles Grandgérard
git push
36 1 Gilles Grandgérard
</pre>
37 26 Gilles Grandgérard
38 26 Gilles Grandgérard
Attendre que Jenkins publie le commit vers les VM
39 26 Gilles Grandgérard
40 40 Gilles Grandgérard
h2. A.5) Initialiser les réseaux dans Nebula
41 1 Gilles Grandgérard
42 36 Gilles Grandgérard
* Ouvrir votre navigateur, et Aller http://jenkins.eole.lan/view/Dev/job/genere-modele-reseau-dans-nebula/build?delay=0sec
43 37 Gilles Grandgérard
* Se connecter (compte smb.eole.lan)
44 37 Gilles Grandgérard
* Saisir le nom d'utilisateur et le mot de passe
45 37 Gilles Grandgérard
* Cliquer sur 'build'
46 38 Gilles Grandgérard
* Dans l"historique des builds" un build apparait. Cliquer sur le lien
47 38 Gilles Grandgérard
* Cliquer ensuite sur le lien 'Console Output'
48 37 Gilles Grandgérard
* Le texte affiche la sortie standard du processus de création des réseaux virtuels
49 37 Gilles Grandgérard
 
50 36 Gilles Grandgérard
51 40 Gilles Grandgérard
h2. A.6) Lancer la gateway
52 36 Gilles Grandgérard
53 36 Gilles Grandgérard
* Aller dans OpenNebula (https://benjamin.eole.lan/)
54 35 Gérald Schwartzmann
* Aller dans 'Virtual Resources', puis 'Templates'
55 35 Gérald Schwartzmann
* Chercher 'gateway'
56 35 Gérald Schwartzmann
* Cliquer sur 'Instantiate'.La VM démarre.
57 28 Gilles Grandgérard
58 35 Gérald Schwartzmann
* Vérification
59 35 Gérald Schwartzmann
** Se connecter en VNC avec 'eole/$eole&123456'
60 35 Gérald Schwartzmann
** Taper 'ip addr' ==> vérifier l'IP SW EOLE
61 32 Gérald Schwartzmann
* lancer :
62 32 Gérald Schwartzmann
<pre>
63 32 Gérald Schwartzmann
 ssh root@<ipgateway>  ==> la connexion doit être sans mot de passe car la clef
64 32 Gérald Schwartzmann
</pre>
65 26 Gilles Grandgérard
66 40 Gilles Grandgérard
h1. B) Préparation du poste de travail
67 26 Gilles Grandgérard
68 40 Gilles Grandgérard
h2. B.1) Modifier /etc/hosts
69 26 Gilles Grandgérard
70 35 Gérald Schwartzmann
* Ajouter votre gateway : 
71 26 Gilles Grandgérard
<pre>
72 1 Gilles Grandgérard
192.168.230.<IP> gateway.ac-test.fr
73 1 Gilles Grandgérard
</pre>
74 26 Gilles Grandgérard
75 26 Gilles Grandgérard
* Vérification
76 26 Gilles Grandgérard
<pre>
77 35 Gérald Schwartzmann
ping gateway
78 26 Gilles Grandgérard
ping gateway.ac-test.fr
79 26 Gilles Grandgérard
</pre>
80 26 Gilles Grandgérard
81 40 Gilles Grandgérard
h2. B.2) Ajouter tous les noms des machines ac-test.fr dans /etc/hosts
82 40 Gilles Grandgérard
83 26 Gilles Grandgérard
* Concatener le fichier (eole-ci-tests.git)/scripts/host dans /etc/hosts
84 26 Gilles Grandgérard
85 1 Gilles Grandgérard
<pre>
86 1 Gilles Grandgérard
cd (eole-ci-tests.git)/scripts/
87 1 Gilles Grandgérard
cat hosts >> /etc/hosts
88 33 Gérald Schwartzmann
</pre>
89 1 Gilles Grandgérard
90 40 Gilles Grandgérard
h2. B.3) Activation des routes
91 40 Gilles Grandgérard
92 33 Gérald Schwartzmann
* Executer le fichier (eole-ci-tests.git)/scripts/gateway-up.sh
93 33 Gérald Schwartzmann
Les routes sont inscrites...
94 35 Gérald Schwartzmann
95 40 Gilles Grandgérard
h2. B.4) Selection de l'identitée SSH ( Si besoin)
96 40 Gilles Grandgérard
97 40 Gilles Grandgérard
Dans le cas, ou vous utilisez plusieurs clef publique ssh, Modifier le fichier '.ssh/config' en ajoutant :
98 39 Benjamin Bohard
<pre>
99 39 Benjamin Bohard
Host *.ac-test.fr
100 40 Gilles Grandgérard
   IdentityFile ~/.ssh/<fichier de la cle copiée dans eole-ci-tests>
101 39 Benjamin Bohard
</pre>
102 39 Benjamin Bohard
103 40 Gilles Grandgérard
h2. B.5) Vérification
104 27 Gilles Grandgérard
105 27 Gilles Grandgérard
*Aller dans OpenNebual (https://benjamin.eole.lan/)
106 27 Gilles Grandgérard
*Aller dans 'Virtual Resources', puis 'Templates'
107 27 Gilles Grandgérard
*Chercher 'aca.eolebase'
108 27 Gilles Grandgérard
*Cliquer sur 'Instantiate'.La VM démarre.
109 27 Gilles Grandgérard
*Se connecter en VNC avec 'eole/$eole&123456'
110 27 Gilles Grandgérard
*Taper 'ip addr' ==> vérifier l'IP SW EOLE
111 27 Gilles Grandgérard
112 27 Gilles Grandgérard
113 1 Gilles Grandgérard
h1. Creation d'un test
114 1 Gilles Grandgérard
115 3 Gilles Grandgérard
todo
116 3 Gilles Grandgérard
117 1 Gilles Grandgérard
h1. Lancement dans jenkins
118 3 Gilles Grandgérard
119 3 Gilles Grandgérard
h2. Mise à jour de "eole-ci-tests" sur toutes les VM
120 3 Gilles Grandgérard
121 1 Gilles Grandgérard
todo
122 1 Gilles Grandgérard
123 31 Gérald Schwartzmann
h2.