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

Wercker on CoreOS

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

Wercker on CoreOS

Avatar for Matthew Hooker

Matthew Hooker

March 16, 2015
Tweet

More Decks by Matthew Hooker

Other Decks in Technology

Transcript

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

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

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

    work pipeline • Describe required services box:  tcnksm/[email protected]
  4. Interface • wercker.yml • Describe job environment • Describe a

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

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

    Immutable, tested object linked to commit • Repeatability
  7. 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
  8. 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
  9. kiddie-pool • Sits between work queue and fleet • Constructs

    Unit from job metadata • Unit invokes `wercker` cli tool • Sends to fleet over http API
  10. 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/
  11. 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
  12. 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
  13. Provisioning • Vagrant for development • AWS/Cloud Formation for user-facing

    • Single script to send application units to fleet • Separation of concerns, no duplication
  14. 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
  15. 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
  16. Thank you Matt Hooker wercker Software Engineer [email protected] @mwhooker http://wercker.com

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