The ungleich VNC console » History » Version 13
Jin-Guk Kwon, 02/02/2020 03:03 PM
1 | 13 | Jin-Guk Kwon | h1. The ungleich VM console |
---|---|---|---|
2 | 1 | Jin-Guk Kwon | |
3 | 2 | Jin-Guk Kwon | {{toc}} |
4 | |||
5 | 1 | Jin-Guk Kwon | h2. 1. System Architecture |
6 | |||
7 | 8 | Jin-Guk Kwon | This service supports accessing console of your VM through guacamole service. |
8 | 13 | Jin-Guk Kwon | And To log-in VM console web needs datacenterlight.ch account. User's accounts are syncronized with LDAP. |
9 | 8 | Jin-Guk Kwon | |
10 | 1 | Jin-Guk Kwon | !archi.png! |
11 | |||
12 | 2 | Jin-Guk Kwon | h2. 2. Set guacamole server |
13 | 1 | Jin-Guk Kwon | |
14 | - run cdist |
||
15 | |||
16 | <pre> |
||
17 | cd ~/.cdist; git pull; cdist config -bj7 -p9 -vv desktop.ungleich.ch |
||
18 | </pre> |
||
19 | |||
20 | - in manifest |
||
21 | |||
22 | <pre> |
||
23 | …… |
||
24 | desktop.ungleich.ch) |
||
25 | 3 | Jin-Guk Kwon | __guacamole_centos --ldap-hostname 'ldap server url' \ |
26 | 1 | Jin-Guk Kwon | --ldap-port '636' \ |
27 | --ldap-encryption-method 'ssl' \ |
||
28 | 3 | Jin-Guk Kwon | --ldap-user-base-dn 'ou=XXX,dc=ungleich,dc=ch' \ |
29 | 1 | Jin-Guk Kwon | --ldap-search-bind-password ‘refer to pass' \ |
30 | 3 | Jin-Guk Kwon | --ldap-search-bind-dn 'cn=XXXXX,dc=ungleich,dc=ch' \ |
31 | 1 | Jin-Guk Kwon | --ldap-username-attribute 'uid' \ |
32 | --postgresql-hostname 'localhost' \ |
||
33 | 3 | Jin-Guk Kwon | --postgresql-username 'USER name' \ |
34 | --postgresql-database 'DB-name' \ |
||
35 | --postgresql-port 'XXXX' \ |
||
36 | --postgresql-password 'password' \ |
||
37 | 1 | Jin-Guk Kwon | --TOTP \ |
38 | --guacd-db 'postgresql' |
||
39 | </pre> |
||
40 | |||
41 | 2 | Jin-Guk Kwon | h2. 3. Create VNC connection for VM |
42 | 1 | Jin-Guk Kwon | |
43 | !g_con.png! |
||
44 | |||
45 | h3. 1) install postgresql on opennebual server |
||
46 | |||
47 | <pre> |
||
48 | apt install postgresql-client |
||
49 | </pre> |
||
50 | |||
51 | 12 | Jin-Guk Kwon | h3. 2) config postgresql for accessing from external host(%{color:blue}This is excuted by cdist%) |
52 | 1 | Jin-Guk Kwon | |
53 | 2 | Jin-Guk Kwon | - vi /var/lib/pgsql/data/postgresql.conf on guacamole server(desktop) |
54 | 1 | Jin-Guk Kwon | |
55 | <pre> |
||
56 | listen_addresses = '*' |
||
57 | </pre> |
||
58 | |||
59 | 2 | Jin-Guk Kwon | - vi /var/lib/pgsql/data/pg_hba.conf on guacamole server(desktop) |
60 | 1 | Jin-Guk Kwon | |
61 | <pre> |
||
62 | host all all opennbula server address trust |
||
63 | </pre> |
||
64 | |||
65 | 2 | Jin-Guk Kwon | - Restart postgresql |
66 | |||
67 | 1 | Jin-Guk Kwon | <pre> |
68 | systemctl restart postgresql |
||
69 | </pre> |
||
70 | |||
71 | 4 | Jin-Guk Kwon | h3. 3) set vnc connection automatically on opennebula server |
72 | 1 | Jin-Guk Kwon | |
73 | 2 | Jin-Guk Kwon | h4. (1) vnc connection script |
74 | 1 | Jin-Guk Kwon | |
75 | 2 | Jin-Guk Kwon | - vm_list_dual_uid : create VM list file(uid, email, VM Number, host, VNC port) (https://code.ungleich.ch/ungleich-public/ungleich-tools/blob/master/vm_list_dual_uid) |
76 | 1 | Jin-Guk Kwon | |
77 | 2 | Jin-Guk Kwon | - create-guacamole-session-ldap-db : create VNC connection on desktop (https://code.ungleich.ch/ungleich-public/ungleich-tools/blob/master/create-guacamole-session-ldap-DB) |
78 | 1 | Jin-Guk Kwon | |
79 | 2 | Jin-Guk Kwon | h4. (2) create crontab |
80 | 1 | Jin-Guk Kwon | |
81 | <pre> |
||
82 | crontab -e |
||
83 | </pre> |
||
84 | |||
85 | <pre> |
||
86 | 15 0,2,4,6,8,10,12,14,16,18,20,22 * * * ./vm_list_dual_uid #create vm_list |
||
87 | 45 0,2,4,6,8,10,12,14,16,18,20,22 * * * ./create-guacamole-session-ldap-db vm_vnc_list #create vm_list |
||
88 | </pre> |
||
89 | 2 | Jin-Guk Kwon | |
90 | 7 | Jin-Guk Kwon | h2. 4. Monitoring VNC console |
91 | |||
92 | - We are monitoring VNC console with prometheus. |
||
93 | - run cdist __dcl_monitoring_server(update prometheus.yml) |
||
94 | |||
95 | 6 | Jin-Guk Kwon | h2. %{color:blue}※User VM information is synchronized with the VNC console every hour. If you create VM right now, you can access VNC console after one hour.(vnc connection script takes about 7~8 minutes.)% |