Giter Site home page Giter Site logo

aws-gaming-box's Introduction

AWS G4 Gaming Box

This project will deploy G4 EC2 windows instance. The instance is running NICEDCV server and is bootstrapped with following applications and drivers:

  • NVIDIA gaming drivers for G4 instances
  • Steam app
  • Parsec app
  • Google Chrome
  • 7Zip
  • AWSCLI

Pre-Requisites

The following dependencies must be installed:

Deploy the CloudFormation Stack

As the solution is using Lambda function, the code needs to be zipped and uploaded to S3 bucket. The Makefile will install lambda libraries, package the template to S3 bucket and finally deploy the CloudFormation stack.

  1. Set the env variables

    BUCKET_NAME=""
    AWS_REGION=""
    KEY_PAIR_NAME=""
  2. Create S3 bucket

    aws s3 mb s3://${BUCKET_NAME} --region ${AWS_REGION}
  3. Create Amazon EC2 key pair Specify the location where to store pem file after >

    aws ec2 create-key-pair --key-name ${KEY_PAIR_NAME} --query 'KeyMaterial' --output text > ~/Downloads/${KEY_PAIR_NAME}.pem --region ${AWS_REGION}
  4. Set the permission of the .pem file to read only

    chmod 400 ~/Downloads/${KEY_PAIR_NAME}.pem
  5. Create a .custom.mk file and populate it with your own values

    cp .custom.mk.example .custom.mk
    Variable Label Example Description
    AWS_REGION eu-west-2 The AWS region to deploy the solution to
    BUCKET_NAME my-unique-bucket-name Use the same value from step above
    STACK_NAME GamingBox The name of the stack
    GAMING_BOX_INSTANCE_TYPE g4dn.xlarge The type of the instance from a G4 family
    KEY_PAIR MyKeyPair The name of the KeyPair created above
    ON_PREM_IP 0.0.0.0/0 CIDR annotation of your home IPv4 address
  6. Deploy the stack

    make deploy
  7. Go to AWS console and wait for the stack to complete

  8. Navigate to the EC2 console, select the Gaming instance and click on Connect

  9. Note down the Public DNS, User name and Password (you may have to wait a few minutes for the password to become available)

Connect to the Gaming Server

  1. Get NICE DCV Client from https://docs.aws.amazon.com/dcv/latest/userguide/client.html
  2. Connect via DCV client, providing login details noted above

What will happen when you are done gaming?

[TODO]

  • Architecture diagram
  • Description how lambda will create snapshot and AMI

Gaming box start up script

[TODO]

  • start the game box using Launch Configuration and AMI created by lambda function
    start-gaming-box -r eu-west-2 -l lt-0xxxxxxx -v 1 -i g4dn.xlarge
  • parameters
    start_server.sh [OPTION]
    -r; AWS Region (default: eu-west-1)
    -l; Set Launch Template ID (required)
    -v; Launch template version (default: 1)
    -i; Instance Type (default: gdn.4xlarge)
    -h; Help

Local Development

This section details how to run the solution locally and deploy your code changes from the command line.

Initialize env

  1. Install the extra prerequisites for development.
  2. Follow the steps 1. to 5. from Deploy the CloudFormation Stack
  3. Initialize the local environment
    make init
  4. Activate virtualenv environment.
    source venv/bin/activate

Test changes

The following command will run pre-commit tests. This should be run before every new commit.

make test

Clean the virtual environment

This command will delete the virtual environment and all installed packages install via make init

make clean

Delete the resources created via CloudFormation

Below command will delete deployed stack

make delete

aws-gaming-box's People

Contributors

rezabekf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

nazparkar

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.