Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Spinup: Yet another fruitfly tool

Spinup: Yet another fruitfly tool

The slides I did for a talk at a Reykjavík AWS Meetup. Telling the story of a tool I wrote as an early EKS adopter.

More Decks by Steinn Eldjárn Sigurðarson

Other Decks in Technology

Transcript

  1. Spinup Easiest way to get up and running with EKS?

    Steinn Eldjárn Sigurðarson Co-Founder @ GRID June 2019
  2. Obligatory self-aggrandizing slide • Backend dev for most of my

    life • Love stages 1, 2, 3, and 7 of DevOps toolchain • Love and hate both Python and AWS • Used to run a big™ AWS stack
  3. Kubernetes • container orchestration system • more efficient resource management

    • application oriented infrastructure • …it's pretty dreamy!
  4. My kubernetes story? • love immutable infrastructure • docker containers

    for everything since 2014 • (same time as k8s was announced)
  5. My kubernetes story? • Ran my first clusters using kops

    • upgrading was scary • everything was immutable except k8s (yes I'm an idiot)
  6. EKS to the rescue? We travel back in history, all

    the way to September 2018 • EKS cluster creation in console • Nodes added via CloudFormation
  7. EKS to the rescue? • Ok, so not quite what

    I expected • But: • This was 2018: time for me to (finally) study CloudFormation
  8. spinup A story about a boy and his CloudFormation •

    My company shuts down Reykjavík office! • I needed to handover infrastructure • Why not...
  9. spinup Reasons / Motivation: • I hate YAML and JSON

    • Found a nice python library: troposphere • Wanted CF with: ◦ VPC ◦ EKS ◦ RDS ◦ ElasticSearch ◦ Redis
  10. spinup Acceptance Criteria: • Ability to spin up a new

    *everything in as few commands as possible • Generate custom CF • Use stack outputs to update local kubectl • Install k8s resources (yaml template munging)
  11. spinup: the plan $ spinup mybrandnewstack [--options..] formation.json Wrote CF

    JSON to: 'formation.json' .. Now use the CloudFormation web console to create a stack from this json https://eu-west-1.console.aws.amazon.com/cloudformation/home?re gion=eu-west-1#/stacks?filter=active $ spinup kubeconfig mybrandnewstack ... $ spinup finish_setup mybrandnewstack ...
  12. spinup Great success! • Left Takumi in October 2018 •

    Everything migrated to a brand new spinup-derived stack • Exposed all the skeletons in my closet • Made documenting infrastructure much easier
  13. spinup More success! • Used it again to create new

    infrastructure for GRID • Convenient for new devs to get up and running • Still need to edit CM's with IAM -> k8s user mapping • Adding new features possible but … • Infrastructure is full of messy details!
  14. spinup: reality $ history | grep spinup 10431 spinup formation

    --help 10432 spinup formation --eks --postgres --redis grid2019 10434 vi /Users/ses/w/spinup/spinup/formation.py 10435 vi spinup/formation.py 10438 vi spinup/__init__.py 10441 spinup formation --eks --postgres --redis grid2019 10464 spinup 10466 vi spinup/__init__.py 10469 git add spinup/tpl/* 10496 spinup kubeconfig grid 10500 cat spinup/tpl/traefik/flahaha
  15. spinup So where does that leave us? • YADT (yet

    another deprecated tool) • There are better, more mature tools out there (eksctl, I'm looking at you!) • Don't force everything into a single CF stack. Just don't. • Feel free to check out the repo and troposphere is cool, you might learn something: github.com/steinnes/spinup
  16. Thanks! Feel free to educate me about all things cloud,

    and if you'd like to learn more about GRID, grab me after the talks :-)