devopscon 2015 - devops in mobile games

37
DevOps in Mobile Games Or „How to serve millions of players“ Andreas Katzig @derFunk Technical Director of Chimera Entertainment @ChimeraEnt

Upload: andreas-katzig

Post on 14-Apr-2017

94 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: DevOpsCon 2015 - DevOps in Mobile Games

DevOps in Mobile GamesOr „How to serve millions of players“

Andreas Katzig@derFunk

Technical Director of Chimera Entertainment@ChimeraEnt

Page 2: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

About me

• Online user since 1994• BBS, FidoNet, Compuserve

• Online programmer since 1996• PHP 2, MySQL 3

• Founder of Photono Design andCo-Founder of Photono Software in 1999

Page 3: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

About me

• Graduate Degree in Computer Science

• Co-Founder of Vulcando Games in 2006• Funded by Exist/BMWi in 2008

• Released 2 MMOG Titles

• Own OpenGL-based Game Engine with dozens of custom tools

Page 4: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

About me

• Joined Chimera Entertainment in 2009

• Now overseeing the Tech Department

• Chimera is the flagship studio of theremote control productions family

• More than 14 other studios are part of it

Page 5: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

Chimera. Mobile Games.

• Chimera is a Unity 3D studio

• First Unity Engine licensee in Germany

• Since 2010 more than 15 game releaseson more than 7 different platforms

• The most prominent ones being

• Angry Birds Epic (Mobile)

• Our own idea, pitched to Rovio in 2012

• John Woo‘s BloodStroke (Mobile)

• Bernd das Brot (PC)

• Dr. Kawashima (PC)

• Ravensburger Memory™ (PC, Mobile)

Page 6: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

Chimera. Mobile Games.

> 65.000.000 Downloads worldwide

Page 7: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

Chimera. Partners.

Page 8: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

Chimera. Key Technology Partners.

Page 9: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

Chimera. Platforms.

Page 10: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

Chimera. Development Processes.

• Agile / Scrum since 2008• Define (your own) goals in a two-weeks sprint cycle.

• Daily standups with the Team. Post-Its, Burndown Charts, all that stuff.

• Dedicated DevOps Engineer working 90% from remote• Slack helps to stay in touch

• DevOps also happens from the Chimera HQ in Munich

• Regular Code Reviews• Utilizing Atlassian Crucible

• Peer Reviews

• Regular Dev Team Meetings, Focus Days, Social Events etc.

Page 11: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

Chimera. Development Practices and Paradigms.

• „Move fast“• But try to not break things.

• Yes, originally from Facebook. They also removed „break things“ from their motto this year (because things broke too often).

• „Does it scale“?• Default question for every DevOps Engineer.

Page 12: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

Chimera. Development Practices and Paradigms.

• „Convention over Configuration“• This is true for code, but not necessarily for DevOps, as we have a lot of configuration scripts here.

• “Configuration as Code“

• Prevents „Configuration Drift“

• „Code once, run everywhere“• That‘s where Docker comes in place

• „Version all the Things“

• „Automize everything“

• „Don‘t repeat yourself“

• „Separation of Concerns“

• „Single Responsibilities“

• „Loose coupling of modular components“

• Wow, can you still read that?

Page 13: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

Chimera. Mobile Games. Tech. Infrastructure.

• Continuous Integration with Jenkins• One Jenkins head server

• > 5 headless slaves (OSX, Win, Linux)

• Building for mobile platforms, consoles, standalone

• Nightly project builds and integration tests of our own Cross Platform Library

• Parameterized manual builds

• Extended uses of Jenkins• Auto-install new Unity versions on all buildservers as they are released

• Jobs to manually upload assets to servers and services

• „Project setup script“ that generates SCM repositories and Jenkins build jobs for all mobile platforms

• According to Chimera conventions – Every project setup is similar

• Resigning-Jobs for IPAs and APKs

Page 14: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

Chimera. Mobile Games. Tech. Infrastructure.

• Continuous Delivery• Apps: Mobile Over The Air distribution

• Simple custom solution

• Artifacts: Deployment via Amazon S3

• Repositories involved• SVN/GIT

• Docker Hub

• NuGet

Our Build Engineer Grisha will be here this evening! Take the chance to talk to him!

Page 15: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

Chimera. Mobile Games. Tech Stack. Backend.

• We‘re sharing C# code between Unity and the backend• Of course we do! Data Models (DTOs), Game Logic, Serialization

• To run C# code at the server side, we‘re using Mono• As FastCGI processes behind NginX

• Communication layer is RESTful web services• Stateless Microservices

• Server OS is generally Debian

• C# SDKs for all thinkable server components are available• AWS, MySQL, Redis, Memcached etc

Hyper!

Page 16: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we rolled in 2010.

Page 17: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we roll today.

• AWS• Elastic Container Services

• Docker!

• Horizontal Scaling

• High Availability

• And more

Page 18: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we roll today. Components.

• AWS• Classes of problems abstracted away:

Power and network topology, hardware costs andvendor differences, network storage systems, etc...

• Flexibility to start new servers or whole new environments in minutes.

• Auto scaling and zero setup costs. Wow.

Our DevOps Engineer Giannicola is here today! Take the chance to talk to him!

Page 19: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we roll today. Components.

• ECS• Management of Docker containers on a cluster

• Basic scheduling of containers based on resourceneeds, isolation policies, and availability requirements

• Integrates with auto scaling and ELB

• Easy Blue/Green deployments solution

• We run our stateless game backends on it

Page 20: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we roll today. Components.

• Terraform• A tool for building, changing, and versioning

infrastructure safely and efficiently

• Infrastructure as Code

• Change Automation

• We used it to create our whole AWS infrastructure

• We use it for basic configuration management too• but it cannot completely substitute Ansible or equivalent tool

Page 21: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we roll today. Components.

• Docker• Developers have full control over the execution

environment of an application

• Reduced risks when deploying

• Infrastructure as Code

• Lightweight virtualization

• Standard packaging unit for builds, tests and deployments

Page 22: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we roll today. Components.

• CoreOS• Operating system for the cloud age

• Everything runs in containers

• Does not ship with a package manager, basic shippable units are Docker containers

• The goal is to have the build system output a container as the final artifact: then systemd and fleet deal with containers lifecycle

Page 23: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we roll today. Components.

• CoreOS• Fleet works by receiving systemd unit files and scheduling

them onto machines in the cluster based on declared conflictsand other properties

• Easy and robust (replicated) Service Discovery with etcd:services can scale seamlessly

• We use it to deploy our monitoring infrastructure, our applicationlogging facility and our chat cluster

Page 24: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we roll today. Components.

• Consul• Service Registration and Discovery through

HTTP and DNS interfaces.

• Distributed and highly available system:gossip pool, distributed health checking

• We use it for our chat and ELK clusters

• We‘re also using „Registrator“ from Gliderlabs in connection with Consul• „Registrator automatically registers and deregisters services for any Docker container

by inspecting containers as they come online.”

Page 25: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we roll today. Components.

• Consul Web Interface

Page 26: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we roll today. Components.

• ELK• Main open source centralized logging solution

• Elasticsearch containers clusters together thanks to etcd

• Logstash and Kibana containers discover Elasticsearchquery nodes thanks to Consul

• Logstash is powerful enough to be able to parse logs fromvarious sources (nginx logs, log4net application logs, etc...)

Page 27: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we roll today. Components.

• ELK

Page 28: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we roll today. Components.

• Collectd• It gathers statistics about the system it is running on

• Simple and lightweight tool written in C, with more than 90 plugins

• Collected metrics can be sent to Logstash, Influxdb, Librato:it does not generate graphs, information must be sent to other tools

• We run it as a Docker container on every server we want to monitor

Page 29: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we roll today. Components.

• Influxdb• Time series, metrics and analytics database

• Data can be queried with a SQL-like language

• HTTP(S) API for data ingestion and queries

• It has built-in support for other data protocols such as collectd

Page 30: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we roll today. Components.

• Influxdb• Written in Go with no external dependencies

• Clustering, replication and high-availability is in an alpha state

• We store Collectd metrics from various hosts on it,running as a Docker container

Page 31: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we roll today. Components.

• Grafana• Graph and dashboard builder for visualizing

time series metrics

• Built in support for many of the most populartime series data sources: Graphite, Elasticsearch,Influxdb, CloudWatch

• We run it as a Docker container: it's the perfect pair for Influxdb, we visualize Collectd metrics gathered on all servers

Page 32: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we roll today. Components.

• Grafana

Page 33: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we roll today. Components.

• Librato• SaaS real-time cloud monitoring

• Integrates with more than 100 open-source agents,turn-key solutions and 3rd-party services:CloudWatch, Heroku, Collectd, Statsd, etc...

• Fastest and easiest solution to collect, correlate and visualize data at any layer of the stack

• We send CloudWatch and Collectd metrics to it, in order to have another level of system dashboards

Page 34: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

How we roll today. Components.

• Librato

Page 35: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

Questions?

Page 36: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

Page 37: DevOpsCon 2015 - DevOps in Mobile Games

Andreas Katzig,Technical Director

We‘re hiring!

http://jobs.chimera-entertainment.de@ChimeraEnt@derFunk