Projet

Général

Profil

OSC » Historique » Version 7

Gérald Schwartzmann, 15/01/2016 11:39

1 1 Klaas TJEBBES
h1. OSC
2 1 Klaas TJEBBES
3 3 Klaas TJEBBES
OSC est un script permettant de se connecter aux machines virtuelles OpenNebula avec un client lourd VNC (ssvncviewer).
4 3 Klaas TJEBBES
5 3 Klaas TJEBBES
6 4 Klaas TJEBBES
Installer ssvncviewer, python-gevent et python-websocket :
7 1 Klaas TJEBBES
<pre>
8 3 Klaas TJEBBES
 aptitude install -y ssvnc
9 1 Klaas TJEBBES
 aptitude install -y python-gevent
10 1 Klaas TJEBBES
 aptitude install -y python-websocket
11 2 Klaas TJEBBES
</pre>
12 1 Klaas TJEBBES
13 6 Gérald Schwartzmann
ou
14 6 Gérald Schwartzmann
15 6 Gérald Schwartzmann
<pre>
16 6 Gérald Schwartzmann
# apt-get install -y ssvnc python-gevent python-websocket
17 6 Gérald Schwartzmann
</pre>
18 6 Gérald Schwartzmann
19 7 Gérald Schwartzmann
Télécharger le script OSC et le rendre exécutable :
20 2 Klaas TJEBBES
<pre>
21 1 Klaas TJEBBES
 wget https://raw.githubusercontent.com/baby-gnu/one-sunstone-rest-client/master/osc
22 1 Klaas TJEBBES
 chmod +x osc
23 2 Klaas TJEBBES
</pre>
24 1 Klaas TJEBBES
25 4 Klaas TJEBBES
Créer le fichier d'authentification :
26 2 Klaas TJEBBES
<pre>
27 1 Klaas TJEBBES
 mkdir ~/.one/
28 1 Klaas TJEBBES
 vi ~/.one/one_auth
29 2 Klaas TJEBBES
</pre>
30 1 Klaas TJEBBES
31 1 Klaas TJEBBES
Contenu du fichier _~/.one/one_auth_ :
32 2 Klaas TJEBBES
<pre>
33 2 Klaas TJEBBES
 <LOGIN_NEBULA>:<PASSWORD_NEBULA>
34 2 Klaas TJEBBES
</pre>
35 1 Klaas TJEBBES
36 5 Klaas TJEBBES
Exécuter la commande interactive :
37 2 Klaas TJEBBES
<pre>
38 1 Klaas TJEBBES
 python osc --url http://one.eole.lan/
39 1 Klaas TJEBBES
</pre>
40 5 Klaas TJEBBES
41 5 Klaas TJEBBES
Ou directement :
42 5 Klaas TJEBBES
<pre>
43 5 Klaas TJEBBES
python osc --url http://one.eole.lan/ --vm <ID_VM> --startvnc
44 5 Klaas TJEBBES
</pre>
45 5 Klaas TJEBBES
où <ID_VM> est l'ID OpenNebula de la machine virtuelle (voir dans l'interface "Virtual Resources" => "Virtual Machines" => "ID").