Greenfields tech
decisions
Me
• Trent Hornibrook
• Cevo
• Work to solve problems with great clients
• Like DiUS / Thoughtworks / Cogent
• but much much better
This talk
• Give me feedback on the tech choices you
would pick
• I will share with you what I picked and why
Imagine this:
Example startup
• They purchased some home grown software
• Need to deliver quickly
Day 1
• Two java apps iterated on for the past 10 years
• SQLSERVER datastores
• Think we may need to deploy on physical tin
• Does 80% of what we want from a business
perspective
The thing
Decisions
• You have carte blanche - what do you do?
Greenfields
• What would you choose:
• Team communication
• Hosting the code
• Build / packaging / where to deploy
• Logging / Monitoring / Alerting
Team communication
• What would you use?
Team communication
• Slack
• Hipchat
• Skype
• Hangouts
• Nothing
Team communication
• Slack
• Hipchat
• Skype
• Hangouts
• Nothing
Team communication
• That was easy
Hosting of code
• What would you use?
Hosting of code
• GitHub
• GitHub enterprise
• Bitbucket
• AWS CodeCommit
• GitLab
• Self rolled
Hosting of code
• GitHub
• GitHub enterprise
• Bitbucket
• AWS CodeCommit
• GitLab
• Self rolled
Hosting of code
Hosting of code
• Kinda hooks into the Atlasian suite
• Can pull commits into Jira stories
CI
• What would you use?
CI
• BuildKite
• Bamboo
• Jenkins
• TravisCi
• CircleCi
• Enterprise Jenkins
CI
• BuildKite
• Bamboo
• Jenkins
• TravisCi
• CircleCi
• Enterprise Jenkins
Buildkite
Buildkite
Buildkite
Buildkite
Buildkite
Buildkite
Buildkite
Buildkite
• Fully described pipelines as code in the code
• Manage nothing (well very little)
• Autoscale builds
• Great security pattern
• Local community
• Have you tried Bamboo?
Where to host
• Where would you host the app?
• Would you choose a IaaS platform or PaaS?
• What would you use?
Where to host
• IaaS
• AWS
• Azure
• Google Cloud
• PaaS
• Beanstalk
• Heroku
Where to host
• IaaS
• AWS
• Azure
• Google Cloud
• PaaS
• Beanstalk
• Heroku
AWS Account layout
• Account layout phase 1
• nonprod - staging
• prod - prod
• build - where we build & package - ci things
• audit - cloudtrail
• billing - consolidated billing
AWS Account layout
AWS Account layout
AWS Account layout
AWS Account layout
• Account layout phase 1
• nonprod - building & staging
• prod - prod
• master - saved package
• audit - cloudtrail
• billing - consolidated billing
Where to host
• The AWS horse is a safe bet
• Know we were going to grow and wanted more
control (IaaS over PaaS)
• Almost everyone knows AWS - skills transference
• Strong knowledge in good AWS security
• IAM / Security groups etc
AWS Account Layout
• Lay out everything the same
• Exceptions will occur, but don't start with them
• Seperate account by access control
• Avoid VPC peering!
• If you VPC peer, why have different accounts?
The Artefact / packaging
• What would you use?
The Artefact / packaging
• Docker container
• RPM / Deb
• Zip file
• Baking of AMIs / VMKDs
• rsync’ing of files
The Artefact / packaging
• Docker container
• RPM / Deb
• Zip file
• Baking of AMIs / VMKDs
• rsync’ing of files
The Artefact / packaging
The Artefact / packaging
• Hedged bets on needing to deploy onto
physical tin
• Like baking AMIs without the cost
• Helps (or should help) local development
Config as code
• What would you use?
• Caveat - it is just this for the moment:
Config as code
• Just cloudformation
• Ansible
• Chef
• Puppet
• Confluence doc
Config as code
• Just cloudformation
• Ansible
• Chef
• Puppet
• Confluence doc
Config as code
Config as code
Config as code
• Simplest solution
• Not complex enough to introduce Ansible /
Chef / Puppet / etc
• Not big enough for service discovery
• Most minimal repeatable solution
Logging
• What would you use?
Logging
• Splunk
• Logstash
• Loggly
• SumoLogic
• Cloudwatch Logs
Logging
• Splunk
• Logstash
• Loggly
• SumoLogic
• Cloudwatch Logs
Logging
Logging
Logging
Logging
Logging
• Prefer to pay for a SaaS provider for this
• You look after the logs, I’ll look after the app
• SumoLogic was Splunk like without $plunk
• Didn't spend a lot of time deciding - picked one
and moved on
Application monitoring
• What would you use?
Application monitoring
• NewRelic
• Cloudwatch
• Datadog
• Roll you own
Application monitoring
• NewRelic
• Cloudwatch
• Datadog
• Roll you own
What I start with
• Application performance (NewRelic)
• Mobile crash (NewRelic)
• Web endpoint from a third party (NewRelic)
• (Basic) Server metrics (NewRelic / Cloudwatch)
• Internal API HTTP endpoints (Cloudwatch)
• SQS queues (Cloudwatch)
• RDS disk usage (Cloudwatch)
What I avoid
• Application disk / CPU / memory usage (thats
not already free)
• Email queues
• MySQL ‘slave lag’
Alerting
• PagerDuty
• VictorOps
Monitoring / Alerting
• Pick a SaaS that works at an affordable price
• Don't spend too much time picking one
• Refine overtime once the app is up and running
The second month
• The app does 80% of what we want from a
business perspective
• Lets get a team together to work on the 20%
• Old-code-phobia
• Microservices-all-the-things
Config as code
• What would you use?
• Caveat - it is just this for the moment:
Config as code
• What would you use?
• Caveat - it’s this:
Config as code
Three approaches spring to mind:
• Extend the one ec2 instance docker run
approach
• ‘docker-compose’ on the ec2 instance
• Docker Scheduler
What I like
• Awesome security
• Tight IAM policies
• Security groups between the things
• Write once, deploy everywhere
Schedulers
• Kubernetes
• Mesos
• Swarm
• Rancher
• ECS
Schedulers
• Kubernetes
• Mesos
• Swarm
• Rancher
• ECS
Rancher
• Really easy to visualise what is going on
• Obtain access to the console logs
• Even run commands on the console!
• Can be controlled by docker-compose (plus a
rancher-compose file)
• Local dev++
Rancher
Rancher
Rancher
Rancher
Rancher
Rancher
Rancher
Rancher - pro
• Developer friendly
• docker-compose
Rancher - neg
• Doesn't fit well with IAM
• It looses its shit when ec2 hosts go away
• ECR container support is flimsy
• No scaling support
• Hard to be half in AWS (eg RDS) & Rancher
ECS
ECS
• Have to duplicate work
• Task definitions are not docker-compose files
• Multiple state machines
• Configuration?
ECS
ECS
ECS
• When a new container is built you just want to
update the single task definition
ECS
ECS
• But what if the infrastructure changes
• New / Change to RDS
• S3
• IAM policy
ECS
ECS - pro
• In the AWS ecosystem
• Surely ECS will get better, no?
• Task based IAM
ECS - neg
• Have to duplicate docker-compose into Task Definitions
• How you control the state
• Use ecs-cli ? Use ecs-deploy ? Use cloudformation?
• You MUST have log aggregation
• The UI is messy
• Hard to diagnose what is happening
• Task based IAM has wedged us - maturity?
Lessons
• Try and pick tools that have strong community
support & have common knowledge in the community
• Pick the solution that your broad team members
knows about
• Config-as-code all-the-things
• git blame away from understanding why
• Start simple and iterate

Greenfields tech decisions