52 lines
1.0 KiB
Markdown
52 lines
1.0 KiB
Markdown
An automation of the Left 4 Dead 2 Dedicated Server to a Linux server using Jenkins
|
|
|
|
# Node Preparation
|
|
|
|
## Using Ansible
|
|
|
|
Create an `inventory.ini` file for the node
|
|
|
|
```ini
|
|
[l4d2servers]
|
|
10.0.0.40
|
|
```
|
|
|
|
Create an SSH key, then copy the public key to the authorized keys of the server
|
|
|
|
```bash
|
|
ssh-keygen -t rsa -a 4096 -C "l4d2server" -f $HOME/.ssh/id_rsa_l4d2
|
|
cat $HOME/.ssh/id_rsa_l4d2.pub
|
|
```
|
|
|
|
Run playbook
|
|
|
|
```bash
|
|
ansible-playbook -i inventory.ini playbook.yml --key-file=~/.ssh/id_rsa_l4d2 -vv
|
|
```
|
|
|
|
## Manual
|
|
|
|
On the remote host you need to install:
|
|
- Wine stable [(From WineHQ)](https://gitlab.winehq.org/wine/wine/-/wikis/Debian-Ubuntu)
|
|
- Zip and Unzip
|
|
- libarchive-tools
|
|
- Xvfb
|
|
- PM2
|
|
|
|
```bash
|
|
sudo apt update && sudo apt upgrade
|
|
sudo apt install wget unzip libarchive-tools xvfb curl
|
|
```
|
|
|
|
### Environments
|
|
|
|
You need to create environment variables, name it `.game.env`
|
|
|
|
```sh
|
|
export DIR_WINE="/wine"
|
|
export DIR_STEAMCMD="/wine/drive_c/SteamCMD"
|
|
export DIR_SERVER="/wine/drive_c/l4d2server"
|
|
export WINEPREFIX=$DIR_WINE
|
|
```
|
|
|
|
# Jenkins Configuration |