Update 'README.md'

This commit is contained in:
alban 2020-10-04 17:21:40 +00:00
parent 02f7be1a5f
commit f1fb97608f

View File

@ -75,21 +75,26 @@ You will access the VM services through "virtual" localhost ports of your machin
But the VM will not be able to exchange data on LAN.
### kvm:user Local Ports to VM ports
### kvm:user 0. Rediction of VM Ports to Local Ports
Ports translations are done by adding 10000 to each VM service port.
Ports redirections are done so that you can access the VM port.
* 10022 SSH (22)
* 10080 HTTP (80)
* 10443 HTTPS (443)
* 16379 REDIS (6379)
* 16454 ARTNET (6454)
* 19001 WEBSOCKET ws (9001)
* 19002 WEBSOCKET SECURE wss (9001)
In our case, we propose to access Port number "N" by adding 10000 to it.
So, to connect to the SSH server you will use the 10022 port on localhost.
Here are the resulting redirections in the (Localhost:Port) (VM:Port) format:
### kvm:user Booting
```
* localhost:10022 SSH (VM:22) i.e. ssh root@localhost -p 10022
* localhost:10080 HTTP (VM:80) i.e. x-www-browser http://localhost:10080
* localhost:10443 HTTPS (VM:443) i.e. x-www-browser https://localhost:10443
* localhost:16379 REDIS (VM:6379) i.e.redis-cli -h localhost -p 16379
* localhost:16454 ARTNET (VM:6454)
* localhost:19001 WEBSOCKET ws (VM:9001)
* localhost:19002 WEBSOCKET SECURE wss (VM:9001)
```
### kvm:user 1. Booting
```
@ -108,7 +113,17 @@ sudo /usr/bin/qemu-system-x86_64 \
```
### kvm:user Connecting
### kvm:user 2. Connecting to the VM
**If you start the LXDE version, a login box should appear after boot. Use:**
```
LOGIN root
PASS laser (e.g. lqser for AZERTY keyboards)
```
**With LXDE or not, you can connect using the SSH protocol:**
```
# Wait until ssh/login is available in the VM
# Type password "laser" i.e. "lqser" on AZERTY keyboards
@ -116,6 +131,52 @@ ssh root@localhost -p10022
```
### kvm:user 3. Configure the app
**Some configuration is required to access the web interface**
The app will run an auto-diagnostic, which might fail to connect to network in this mode.
But it's not so bad: with the ports redirections, it works nonetheless.
Just choose (c)onfigure in the menu when asked to access the configuration menu.
Enter the value `127.0.0.1` for the `#1 The IP address for webui` key.
To do so, press `1`, then type `127.0.0.1`, and then type `x`.
### kvm:user 4. Start playing
**Start the LJ app on the VM**
```
root@debian:/opt/LJ python3 ./main.py
```
This should start all the required processes.
**Access the web app from the HOST, i.e. your machine**
Open a web browser on [http://locahost:10080].
It should show a 'CONNECTED' message, and the 'Simulator' page show a default parallelogram.
You can now start sending your points to the redis server from your machine and see the result in the web simulator.
With redis installed on your machine:
```
redis-cli -h 127.0.0.1 -p 16379 set '/pl/0/0' '(150.0, 230.0, 65280), (170.0, 170.0, 65280), (230.0, 170.0, 65280), (210.0, 230.0, 65280), (150.0, 230.0, 65280)]'
```
## kvm:bridge KVM with full network access
@ -232,8 +293,3 @@ ssh root@${GUEST_IP}
# Todos
[] Export USB devices
[] Nginx redirect to https
[] Nginx wss websockets redirect
[x] @todo deploy http(+s with snakeoil cert) with nginx
[x] @todo read IP from updateUI.pu OR BETTER read IP addresses from a common file