Code Monkey home page Code Monkey logo

automatic-game-server's Introduction

Automatic Games Server - Counter Strike: Global Offensive server

Counter Strike: Global Offensive

This repository contains the required code to be able to spin up a game server, in a DevOps way.

At the end you will got an ec2 instance in your configured AWS account with an installed Counter Strike: Global Offensive server, in automatic way. This code was used to create a virtual team-building.

Table of contents

First usage

AWS account (has free tier - credit card required) is a requirement, as this terraform code will create resources on it. Please pay attention for PRE-REQUIRED! section at the end of this readme (Inputs), especially:

  • key_name
  • shared_credentials_file
  • private_key

HowTo - Create and configure SSH-key

Check the following markdown documentation.

Terraform binary

Before you start to use this code, terraform must to be installed. Please follow official guides about how to install it. If it was done, please apply "terraform init" command (in this repository's folder) to initialize required providers.

As a result you will got a plan what you can apply with "terraform apply" command. When you finished the game, you can destroy all created resource with "terraform destroy" command.

Configured GSLT code for server

To be able to build a CS:GO server provided by steam, you need a GSLT code. For more information, please visit this page.

After it please add you personaized GSLT code to csgoserver.cfg.

Used technologies & Software

Terraform

Terraform creates infrastructure under applications. In this example AWS provider is in use.

Terraform providers

Terraform code was tested and use with following versions:

  • Terraform = v0.12.26
  • provider.aws: version = v2.10.0
  • provider.null: version = v2.1.2

Ansible

Ansible installs automatically applications / adjust OS settings.

Visual Studio Code

This IDE was used to prepare and handle all of the code.

vagrant folder

Vagrant is a hashicorp tool which provides you a way to spin up a virtual machine in your local computer (via virtualbox). It is ideal to reproduce the server in your local computer, without any cloud provider.

Purpose

Try / Check / Adjust and fine-tune the game server without any additional price.

Usage

Change your directory to the vagrant folder (in IDE / terminal) and execute vagrant up command which will create a virtual machine based on configured "Vagrantfile". After that you can connect to your dedicated Counter Strike: Global Offensive server in 192.168.56.56 address, port 27015 (default).

Describe files

connection.tf

Store provider(s) like AWS. This is a terraform plugin which "provide" classes.

network.tf

Adjust network settings, required to create any instance within in. Most of the parameters are variables to use them during instance creation (servers.tf)

outputs.tf

Define output values, displayed at the end of terraform's running.

servers.tf

Describe instances & bootstrap code.

variables.tf

Definition of variables, created / used in code for terraform.


The text below was generated by an automatic document mechanism.

Inputs

Name Description Type Default
readme NOT PART OF CODE Readme information. This readme was generated with terraform-docs. terraform-docs --with-aggregate-type-defaults --no-required --no-sort markdown . string "terraform-docs"
key_name PRE-REQUIRED! SSH key name, used for linux instances. Must to be exist on AWS account before apply terraform code. string "csgo"
shared_credentials_file PRE-REQUIRED! Path of your AWS credentials file. Do NOT store it under version control system! string "./secrets/credentials"
private_key PRE-REQUIRED! Path of your private SSH key. Required to connect target instance via SSH. string "./secrets/csgo_priv.key"
region AWS region. Where to deploy with this Infrastructure-As-A-Code - terraform. string "eu-west-1"
profile AWS Credential(s) profile. Define the name of the profile as defined in your aws credentials file. string "default"
instance_type AWS instance type. Define size of machine. https://aws.amazon.com/ec2/instance-types/ string "t3a.medium"
ami_user SSH user, used for login to linux instance. Depends on used AMI. string "ec2-user"

Outputs

Name Description
Counter_Strike_Global_Offensive_server_address IP address of created cs go server.

Custom Counter Strike: Global Offensive settings

All fine-tune and modifications are in:

How-To play your in your new server

You have multiple way, how to connect to your customer server. Here is an example.

Common issues

Check the following markdown documentation.

License

MIT

Author Information

Peter Mikaczo - [email protected]

automatic-game-server's People

Contributors

ch-e-mistry 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.