just kill it

Click here to load reader

Post on 23-Feb-2017

64 views

Category:

Technology

0 download

Embed Size (px)

TRANSCRIPT

PowerPoint Presentation

Just Kill [email protected] | @paulwhitmer

Practice hopefully at least twice.Create demo:Simple web appGOCDDeploy app to AWS Show it

1

Jim Counts

Legacy Code ExpertFull Stack ConsultantC#/VB/Perl/AngularJS/Node/Cloud

2

Paul Whitmer

Full Stack ASP.NET MVCC#/AngularJS/NodeJS/CloudLinux/WindowsDevOps TIG Mentor

3

Why Care?

The goal is to deliver new features and not worry about the servers. Increasing value to our customers.

Jim: why should we care?Paul: Faster turn around for application development. Never worrying about checking in builds. Unit testing and behavioral testing the application before launch.4

Our ExperienceA little historyGo back to basics, when high level tools fail to deliverHow do we do it now?BuildDeployRemove human interaction

Paul: Jim, how did we get here?

5

BuildAutomatic: continuous integration on check-insCheck-in frequently to get feedback more oftenCreate fast builds to tighten up the feedback cycleReveal any hidden assumptions about your build

Jim: Discuss what a build server is.6

Build: GoCD polls git repository for changes

Jim: explain this process!!! 7

Build: Build fast

Jim: What were some ways that we were able to speed up the build and deployment times?Paul: Lesson learned we attacked the weaknesses.8

Build: Check-ins often

9

Example WebserverDeveloper makes changes and checks inBuild server detects changes and agent in cloud runs tests and builds softwareFinal product is zipped up and stored on cloud file serverBuild server generates a custom boot script from a template and launches a new instance to kick off the deploy

Paul: We use grunt to run our build tests and deployment from the gocd agent.10

Launch ScriptWhere to find the codeFirewall configurationSecurity RolesNetwork/VPN configurationRemote access keysSo many details automate them!

Paul: We use grunt to run our build tests and deployment from the gocd agent.11

Deploy QuicklyLoad baseline instance with custom boot scriptPull and run pre-built code from online file storageConnect to load balancer

Create amazon ami with utilities and bootstrapping software

Nodejs pre installed to run utility scripts and app itselfPreconfigured to allow non-root to run on port 80Utility scripts to fetch app packages from repositoryHealth monitoring and logging scripts

12

Boot scriptDownload my app, unzip, and run appAdd thy self to load balancer and wait to become healthyTell load balancer to remove other instances with a different versionTag thy selfWait ten minutes then start "Death Cron

Its another script!A generic script that the boot script invokes with parameters.

13

Remove human interactionNo human needs to kickoff a build/deploymentScripts are built from template for each environmentEnvironment itself has been mostly built from script as wellSelf cleaning instance destruction

14

Cron jobRuns every minuteAm I attached to the load balancer?No?Amazon, please kill meYes!The world loves me, keep going and check it again in a minute

aka "Death Cron"

15

Back To basics

High level tools promise magic, but can deliver their own set of problemsBeanstalkCloudformerDockerWhen a tool doesnt deliver, kill itRevisit the tool with a better understanding of underlying mechanics.

16

Questions?