Difference between revisions of "Hotspot Demo Configuration"

From Kiwix
Jump to navigation Jump to search
 
(6 intermediate revisions by 2 users not shown)
Line 10: Line 10:
== Available images ==
== Available images ==


=== EDUPI-FR (0) ===
=== TESTS (0) ===
* reserved
 
=== TESTS (1) ===
* reserved
 
=== EDUPI-FR (2) ===


* domain: <code>edupi-fr.demo.plug.kiwix.org</code>
* domain: <code>edupi-fr.demo.plug.kiwix.org</code>
* tunnel: <code>tap0</code>
* tunnel: <code>tap2</code>
* IP: <code>192.168.1.3</code>
* IP: <code>192.168.1.2</code>
* SSH port: <code>5022</code>
* SSH port: <code>5222</code>


=== EDUPI-EN (1) ===
=== WIKIFUNDI-FR (3) ===


* domain: <code>edupi-en.demo.plug.kiwix.org</code>
* domain: <code>wikifundi-fr.demo.plug.kiwix.org</code>
* tunnel: <code>tap1</code>
* tunnel: <code>tap3</code>
* IP: <code>192.168.1.4</code>
* IP: <code>192.168.1.3</code>
* SSH port: <code>5122</code>
* SSH port: <code>5322</code>


== Add new image ==
== Add new image ==
Line 38: Line 44:


<source lang="sh">
<source lang="sh">
# start QEMU
# start QEMU (in a screen)
img_run_XXX /path/to/image.img
img_run_XXX /path/to/image.img


# wait until boot. log-in (pi/raspberry)
# wait until boot. log-in (pi/raspberry)
> sudo systemctl start ssh && exit
> sudo systemctl enable ssh && sudo systemctl start ssh && exit


# once SSH is enabled (adjust suffix and SSH port)
# once SSH is enabled (adjust suffix and SSH port)
scp -P 5022 ~/plugdemo_edupi-fr pi@localhost:plugdemo
scp -P 5222 ~/plugdemo_edupi-fr pi@localhost:plugdemo
scp -P 5022 ~/guest-setup.sh pi@localhost:  # make sure the name in guest-setup.sh if OK before
scp -P 5222 ~/guest-setup.sh pi@localhost:  # make sure the name in guest-setup.sh if OK before
ssh pi@localhost: -p 5022 "sudo mv ~/plugdemo /usr/local/bin/plugdemo && sh ~/guest-setup.sh"
ssh pi@localhost -p 5022 "sudo mv ~/plugdemo /usr/local/bin/plugdemo && sh ~/guest-setup.sh"
</source>
</source>

Latest revision as of 18:41, 6 January 2019

TL;DR

  • internet on: enp1s0f0 (IP 195.154.82.158)
  • domain (*.demo.plug.kiwix.org)
  • demo private network: 192.168.1.0/24
  • dedicated user: qdemo
  • bridge iface: br0
  • bridge IP: 192.168.1.1

Available images

TESTS (0)

  • reserved

TESTS (1)

  • reserved

EDUPI-FR (2)

  • domain: edupi-fr.demo.plug.kiwix.org
  • tunnel: tap2
  • IP: 192.168.1.2
  • SSH port: 5222

WIKIFUNDI-FR (3)

  • domain: wikifundi-fr.demo.plug.kiwix.org
  • tunnel: tap3
  • IP: 192.168.1.3
  • SSH port: 5322

Add new image

  • add new tap
  • add tap to bridge and enable it
  • Edit /root/host-setup.sh
  • Edit /etc/hosts: add private IP and corresponding hosts
  • Create /home/qdemo/plugdemo_XXX (change IP address)
  • Create /etc/nginx/sites-{available,enabled}/XXX.demo.plug.kiwix.org
  • Create /usr/local/bin/img_run_XXX (change last number with TAP number)
  • edit this document and add new image details

Setup image

# start QEMU (in a screen)
img_run_XXX /path/to/image.img

# wait until boot. log-in (pi/raspberry)
> sudo systemctl enable ssh && sudo systemctl start ssh && exit

# once SSH is enabled (adjust suffix and SSH port)
scp -P 5222 ~/plugdemo_edupi-fr pi@localhost:plugdemo
scp -P 5222 ~/guest-setup.sh pi@localhost:  # make sure the name in guest-setup.sh if OK before
ssh pi@localhost -p 5022 "sudo mv ~/plugdemo /usr/local/bin/plugdemo && sh ~/guest-setup.sh"