Top Secret tech

(aka how to make a play-by-email videogame)

Browser/App

Editor

Server + AWS

Core technologies

Browser App Server Editor AWS
Git/GitHub
Typescript
React
NPM
Grunt
Mocha
Electron
Node JS
Cloudformation

Cloudformation?

  • Create/delete 'stacks'
  • Declarative
  • JSON templates
  • Use with AWS CLI/Console

Example - S3 bucket

// cfntemplate.json
{
        "Description": "S3 bucket",

        "Resources": {
                "S3Bucket": {
                        "Type" : "AWS::S3::Bucket",
                        "Properties" : {
                                "BucketName" : "my-s3-bucket"
                        }
                }
        }
}
aws cloudformation create-stack --stack-name bucket --template-body file://cfntemplate.json
aws cloudformation delete-stack --stack-name bucket

AWS resources

  • Server
    • Auto Scaling Group
    • Elastic Load Balancer
    • CloudWatch
    • Security Groups/IAM Profiles
  • Database
    • DynamoDB
  • Game data
    • S3

Real template examples

Gotchas:

  • Think about security groups and roles
  • Stack creation is slow so test everything locally/using SSH
  • CloudWatch agent doesn't work on Ubuntu
  • Healthchecks
  • Some documentation is missing

Deploying game code

  1. Local python script
    1. Checkout code and game content
    2. Zip
    3. Upload to S3
  2. EC2 User Data
    1. Install dependencies
    2. Download game data from S3
    3. Run game

TLDR

Cloudformation:

  • Removes human error in infrastructure creation
  • Allows 'stack' replication
  • Declarative - handles order dependencies
  • Parameterisable

Top Secret tech

By virtualdtor

Top Secret tech

The technology behind Top Secret, a video game about the Snowden leaks.

  • 375