Puppet module to fully deploy all neccesarry services to run a LAN party at any size with ease
Puppet module to fully deploy all neccesarry services to run a LAN party at any size with ease
The following components are included
add_game.sh
)add_game.sh
to create an entry in your webservers /games.html and add a local file or directory.Everything data-related is located somewhere in /var by default. So it’s recommended that you add an additional partition mounted on /var.
Please don’t start the dnsmasq server in a network, which already has a DHCP server. Things could go wrong.
And the hole torrent tracker part doesn’t working without DNS.
The lanserver website is currently available in two languages.
To switch it edit the lanserver/manifests/params.pp lang parameter and reapply the module to the server.
If you want to translate the website, copy the en directory in lanserver/files/webroot/ and translate the whole content of index.html, torrent.html and tech.html.
You also need to add language vars to lanserver/manifests/webroot.pp for your specific language code. Two letters are allowed.
Every service mentioned above can be managed independently. Enable or disable the services via lanserver/manifests/params,pp
git clone --recursive https://github.com/pseiler/puppet-lanserver
cd lanserver/manifests
ip addr show
.bash install_server.sh
as root.This lanserver features serveral type of services.
To have an easy overview if everything is running,
run lanserver status
on the command line
To stop/start everything uselanserver start
orlanserver stop
Every service running is controlled by systemd.
Check the specific service or use the controller script
“lanserver” to start or stop all lanserver services.
To add a new game, or just add a new plattform for a game, just run game_add.sh
. You can find every parameter of the script when calling it with the -h parameter.
Every parameter except -f is optional and will be asked interactively. The file or directory must already exist somewhere on this server. So you need to transfer the game/application file or directory manually via scp or something else.
The snippet files you generated with this script are located in /var/www/template by default. It’s a bit ugly but perhaps this part will be rewritten with a database-like backend.
If needed, you can modify the *.html snippets with the editor of your choice.
If you have changed something manually in in a html snippet in /var/www/template just run games_reindex.sh
to create a new games.html in the webservers directory.
If your device has two interfaces, you can use a bash script called nat_control.sh
to enable NAT forwarding/masquerading to the LAN network.
It only has two options (enable/disable) and when calling it with enable you must provide the device which has internet access. It depends on your configuration of interfaces.
Example:
root# nat_control.sh enable eth1
If you want to add a component to the puppet module, just create a new lanserver/manifests/
directory and write some puppet code. If you want to add support for more distributions, modify the install_server.sh
file and add a function which checks requirements as repositories for packages, etc. Don’t forget to check the module code for distribution-specific paths and add a conditional statement for it.
add_game.sh
to use a markup language like .xml or use a little database backend like sqliteadd_game.sh
. Output html snipet when found.