Git Product home page Git Product logo

srcds-autoinstall's Introduction

SRCDS - Autoinstall

If you like to host your own half life dedicated servers on linux, this software can automatically deploy multiple servers each with their own config and plugins using Docker with LinuxGSM docker images. LinuxGSM is the underlying server management software, this just set's everything up with shell scripts. Perfect for using in conjunction with AWS's Spot Instances.

Index

Prerequisites

  • Docker
  • AWS Cli (For S3 config)

Config

The following config files are supported and will be copied over to the correct directories. Place your config files in the config directory (create it if one doesn't exit). For example: config/server1.

  • LinuxGSM
    • lgsm.cfg
  • Server
    • mapcycle.txt
    • motd.txt
    • plugins.ini
    • server.cfg
  • AMX Mod X
    • users.ini (admins)
  • FoxBot (TFC)
    • botnames.cfg
    • foxbot.cfg

Manual

You can create multiple directories:

- config
  - server1
    - server.cfg
    - users.ini
  - server2
    - server.cfg
    - users.ini

Automatic (S3)

You can set CONFIG_SETUP=auto variable in your .env file to enable automatic download of your config files from an s3 bucket.

Supported files: .zip, or .tar.gz

In order to download from S3 you must set the appropriate AWS Cli credentials in your .env as well.

Note: This script will run on the host machine. Which means AWS Cli must be installed.

# Manual or Auto
CONFIG_SETUP=auto

The directory structure of the file should mirror our root directory:

- config
  - server1
    - server.cfg
    - plugins.ini
- plugins
  - server1
    - map_vote.amxx

Game Servers

All srcds instances run on docker and defined in the docker-compose.yml. You can define multiple instances on different ports to run on the same host.

You can browse all the supported LinuxGSM docker images.

Take note of the container name as that's what is passed when using the make commands.

cstrike:
  image: gameservermanagers/gameserver:cstrike
  ...
dod:
  image: gameservermanagers/gameserver:dod
  ...
tfc:
  image: gameservermanagers/gameserver:tfc
  ...

Installing your first server

Each server should have their own server-example.sh script (minus the example).

make install CONTAINER=tfc1 GAME=tfc CONFIG=classic SCRIPT=server-example.sh

Commands

Utilize the Makefile included to install configs and plugins.

Pass your continer, game and config folder name to the make commands:

  • CONTAINER=tfc
  • GAME=tfc
  • CONFIG=classic

Run the following commands in your root directory:

# Metamod
make install-metamod CONTAINER=tfc GAME=tfc CONFIG=classic

# AMX Mod X
make install-amxmod CONTAINER=tfc GAME=tfc CONFIG=classic

# FoxBoT (TFC)
make install-foxbot CONTAINER=tfc

# Copy your configs
make setup CONTAINER=tfc1 GAME=tfc CONFIG=classic

Or install everything:

make install-all

Deploy

Launch Instances

Just start the docker instances, the servers will start up.

docker-compose up -d;

AWS Spot Instances

The idea here is when launching a spot instance for the first tiem, pull this repo, copy your configs to the appropriate locations and run the make commands through docker.

Contributing

See our contributing guidelines.

License

See our licensing information.

srcds-autoinstall's People

Contributors

jstnmthw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.