CARVIEW |
Select Language
HTTP/2 200
date: Wed, 15 Oct 2025 01:43:54 GMT
content-type: text/html; charset=utf-8
cache-control: max-age=0, private, must-revalidate
cf-cache-status: DYNAMIC
link: ; rel=preload; as=style; nopush,; rel=preload; as=script; nopush,; rel=preload; as=style; nopush,; rel=preload; as=script; nopush,; rel=preload; as=script; nopush
nel: {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1}
referrer-policy: strict-origin-when-cross-origin
report-to: {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=gS%2FF28HwIU62s3%2B8JAIH1yvYX0QQ8bu%2B2p6uJQSHvfY%3D\u0026sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d\u0026ts=1760492634"}],"max_age":3600}
reporting-endpoints: heroku-nel="https://nel.heroku.com/reports?s=gS%2FF28HwIU62s3%2B8JAIH1yvYX0QQ8bu%2B2p6uJQSHvfY%3D&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&ts=1760492634"
server: cloudflare
strict-transport-security: max-age=0; includeSubDomains
vary: Accept,Accept-Encoding
via: 2.0 heroku-router
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
x-request-id: 7d5ba941-e7ba-19a0-0f8f-10293e817371
x-runtime: 0.156790
x-xss-protection: 0
content-encoding: gzip
set-cookie: _secure_speakerd_session=C0lgwvC1YOw8aEQSsesDpwoQpNB3cmNpLugnkme5dAalDdsstxMjKrfHf9tAZVY0yfhT70eJA7WMDMW%2FKhYR3PvwodNObrB%2FIdBR8WxPLSllRLLMuNY4Fr3WQ%2F2Nqe7WWy2ds%2B5PTgHbB1TtmGoOFBnmx0q2Fo5soKZ0lccou0sTLvC4OpmTqrerXe%2BdzuKjBlVqc0l75OCEpV8LeGKbE5LZjOnTCzrkNh4jmFJV6%2BTcqJ3LBhIxzLKO52KoFtP7Saqd0BkzqZIu1KdpIXqVJUYHwDxhEkPP5oEVKGqKIyQf5i1DRK36ufKpzobmM3S2b7ay1JizDPcnMv2cL2iT%2BP9O60i53IgmmQDxei%2By6zR%2F32KXj%2BR51bxV%2F9klagP%2FZNv1DGjiPx0RDqvCoZPUzmLN--y90a%2BIXmxl%2Bs4L8L--PNMftaRFy4nPLxntTgJm5g%3D%3D; HttpOnly; SameSite=Lax; Secure; Path=/; Expires=Wed, 29 Oct 2025 01:43:54 GMT
cf-ray: 98eba0cf78ffc1cc-BLR
Writing Tools in Go For Ops Engineers - Speaker Deck
Writing Tools in Go For Ops Engineers
https://github.com/yuuki1/droot https://github.com/yuuki1/grabeni https://github.com/yuuki1/gokc https://github.com/mackerelio/mkr
Yuuki Tsubouchi (yuuk1)
February 18, 2016
More Decks by Yuuki Tsubouchi (yuuk1)
Other Decks in Programming
Featured
Transcript
-
My ops tools in Go • yuuki1/droot • yuuki1/grabeni •
yuuki1/gokc • mackerelio/mkr -
mkr • For programable server operations with Mackerel • JSON
output (Enable to parse with jq) • Depends on mackerelio/mackerel- client-go • More useful on server (No need to pass an API Key) -
Grabeni • Help a failover tool (Keepalived/ MHA) switch a
VIP • Depends on aws/aws-sdk-go • AWS API Retry/Max Attempts HSBCFOJHSBCFOJYYYYYYYYY -
Droot • chroot an extracted archive from Docker images •
Pull an archive from AWS S3 • Atomic deploy with symlink and rename(2) • `docker export | s3 upload` by io.Pipe() -
gokc • Keepalived (well known with LVS) • Replace maoe/kc
written in Haskell (Parser combinator) • Parser with yacc • Lexer with goroutine and channel -
• 1500+α Hosts • 500+α Roles • Services continued 15
years • Many Old OSs … Hatena -
Quick Development on Server • GOOS=linux GOARCH=amd64 (or build on
Docker) • scp ./binary [remote server] • ./binary -
Quick Development on Server • One binary & Cross compile
• My ops tools aim to run on Linux servers. • ex. droot runs on Linux only -
• Not mean that coding is just quick • Mean
that no hesitation about coding because Go has the simple language specification Quick deployment -
Others • Concurrency by goroutine • `io.Pipe()` • Fast runtime
rather than LL • Error handing by returning error type • `defer` statement • Easy to clear temp resources on failure -
Summary • Pros of Go for ops engineers • Easy
binary distribution • Quick development on server • Quick deployment as a result