Packaging the socks shop with Nix

Me

Maarten
Hoogendoorn

@moretea_nl on twitter@moretea_nl

@moretea on github@moretea

research engineer

@

cs logo

CS



our clients

cs clients

goal for user clients

  • improve time to market
  • enable experimentation

means

  • CI/CD
  • cloud native architecture

Tech at our user clients

  • Docker
  • Micro services
  • Orchestrator
    • Kubernetes
    • Mesos

This talk

Nix

Socks shop

Socks Shop

Microservice reference app

  • Different languages
  • Several deployment targets
    • Kubernetes
    • Swarm
    • Mesos
    • AWS ECS
    • ...
  • Packaged as Docker containers

nix

set of tools

scope

  • Build
    • Create packages
    • Manage all dependencies
  • Deployment
    • Configuration management system
    • Cloud resource provisioning

Tools

  • nixlang
  • nixpkgs
  • NixOS
  • NixOps

Why bother?

we already have

    • Terraform
    • CloudFormation
    • Ansible
    • Chef
    • Puppet
    • Docker
    • Rkt

One language to rule them all!

  • Simple
  • FP
  • Pure

therefore composable

Managing dependencies

App Dependencies

Deps past

Layers

Intermezzo

Graphs

TAKE HOME MSG

  • Layers do not compose well
  • Graphs do

Demos

Building

  • Ruby application (dev-env demo). Nokogiri
  • Go application
    • (and how to write two support two different vendor managers)
  • Node application

Deploying

  • Docker / AC images
  • Nix containers
  • NixOps

NixOps

  • Local
  • GCE

summary

Advantages

  • One language to rule them all
  • Predictable
  • 100% identical development environments

Disadvantages

  • Either something works immediately, or it takes quite some time
  • Smaller eco-system
  • Only reference manual, no 'guides'

Next

Thanks!

Maarten
Hoogendoorn

@moretea_nl on twitter@moretea_nl

@moretea on github@moretea