Giter VIP home page Giter VIP logo

csgo-on-cloud's Introduction

CSGO dedicated server on Azure

Running a CSGO dedicated server on Azure using terraform with ansible and LinuxGSM

Initial Steps

  • Install terraform(v1.1.7), azurecli(2.34.1)

  • Azure login and copy subscription_id

    az login
    
  • Create service principal

    MSYS_NO_PATHCONV=1 az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/<subscription_id>"
    
  • Populate secrets, create a file secrets.tfvars under azure folder

  • Check azure for vm_size and storage_disk_type

   region = "japaneast"
   subscription_id = "<id>"
   client_id       = "<appid from service principal>"
   tenant_id       = "<tenant id from login>"
   resource_group_name = "RG_NAME"
   vm_size = "Standard_F4"
   storage_disk_type = "Standard_LRS"
   sv_password = "secret"
   rcon_password = "secret"
   gslt = "gslt from steam"
   client_secret = "<password from service principle>"

Terraform steps

terraform init
terraform plan -var-file="secrets.tfvars"
terraform apply -var-file="secrets.tfvars"

Ansible steps

  • Once the server is provisioned, you can access it via ssh as below,
ssh -i ~/.ssh/id_rsa csgoserver@ipaddress_of_vm
  • Below command will run the ansible playbook and create csgo server
ansible-pull -U https://github.com/anupvarghese/csgo-on-cloud.git -i 127.0.0.1 competitive.yml

Notes

This setup uses LinuxGSM to host csgo server.

Management of the game server can be found in these docs

If you want to deploy with changes that are in a branch and not master, try this - ansible-pull -U https://github.com/anupvarghese/csgo-on-cloud.git -C <your_branch_name> -i 127.0.0.1 competitive.yml

csgo-on-cloud's People

Contributors

anupvarghese avatar faizalmo avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  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.