Save 37% off PRO during our Black Friday Sale! »

Wercker on CoreOS

Wercker on CoreOS

F1695dcf6a21f90f5db84b2eee2cbdbe?s=128

Matthew Hooker

March 16, 2015
Tweet

Transcript

  1. wercker

  2. wercker on CoreOS http://wercker.com @wercker

  3. Wercker: automation driven development • Wercker is an automation platform

    • ci/cd not ambitious enough • continuous is assumed
  4. Interface • wercker.yml • Describe job environment • Describe a

    work pipeline • Describe required services
  5. Interface • wercker.yml • Describe job environment • Describe a

    work pipeline • Describe required services box:  tcnksm/gox@0.1.0
  6. Interface • wercker.yml • Describe job environment • Describe a

    work pipeline • Describe required services steps:              -­‐  script:                      name:  install                      code:  go  get  -­‐v  -­‐d  ./...              -­‐  golint
  7. Interface • wercker.yml • Describe job environment • Describe a

    work pipeline • Describe required services services:          -­‐  mongodb
  8. Output • Pipeline outputs container image • Hugely beneficial •

    Immutable, tested object linked to commit • Repeatability
  9. Under the hood • Standalone process dispatches work to fleet

    • Called “kiddie-pool”
  10. mhook • Needed simple package manager • downloads packages from

    S3 • indexed by project, branch, and commit • similar to Kelsey Hightower’s `pm` https://github.com/wercker/mhook
  11. kiddie-pool uses mhook [Unit]   Description=Wercker  Kiddie-­‐Pool  %i   After=install-­‐mhook.service

      [Service]   ExecStartPre=/tmp/mhook  -­‐-­‐bucket  <bucket>  \\          —project  kiddie-­‐pool  \\   —branch  master  \\   —commit  latest  \\   /opt/bin/kiddie-­‐pool-­‐%i   ExecStartPre=/usr/bin/chmod  +x  /tmp/kiddie-­‐pool-­‐%i  ...   [Install]   WantedBy=multi-­‐user.target   [X-­‐Fleet]   Global=true
  12. kiddie-pool • Sits between work queue and fleet • Constructs

    Unit from job metadata • Unit invokes `wercker` cli tool • Sends to fleet over http API
  13. wercker cli • Understands how to actually run the job

    • You can download and run wercker locally • rapid iteration • don’t even need us • wow http://wercker.com/downloads/
  14. What’s next • Smart job assignment • Fleet naively allocates

    work • Need a job scheduler that’s smarter • Colocate jobs, data, and services • Help us build this
  15. What’s next • mhook • Push behavior • Signing packages

    • Wercker step
  16. Logging • Logging • Use Graylog because they have a

    working docker image • `journalhook` sends application data to journal • `journal2gelf` container streams journal to graylog • persists journal cursor https://github.com/wercker/journalhook
  17. Provisioning • Vagrant for development • AWS/Cloud Formation for user-facing

    • Single script to send application units to fleet • Separation of concerns, no duplication
  18. etcd • Used to publish service information • In the

    application to signal job aborts • Best way to run is as cluster of its own • should get easier with 2.0 with proxies • need to configure many things to have correct etcd url
  19. References 1. http://wercker.com/downloads/ 2. https://github.com/wercker/mhook 3. https://github.com/wercker/journalhook 4. https://github.com/systemd/journal2gelf 5.

    https://registry.hub.docker.com/u/mwhooker/ journal2gelf/ 6. https://speakerdeck.com/mwhooker/wercker-on- coreos
  20. Thank you Matt Hooker wercker Software Engineer matt@wercker.com @mwhooker http://wercker.com

    http://twitter.com/wercker Grab a shirt and/or sticker! wercker