Welcome to Anarcher’s Trashcan, a personal blog about programming, technology, and more.

GreptimeDB as Prometheus Long-term Storage

Is GreptimeDB suitable as a long-term storage solution for Prometheus? To find an answer to this question, I set up a simple configuration of GreptimeDB (v0.13) to investigate.

What is GreptimeDB?

GreptimeDB is an open-source cloud-native time series database that integrates metrics, logs, and events.

kroller : a tiny (restart) tool to help for kubernetes cluster upgrade

Kubernetes upgrades (especially EKS) are categorized into two types based on the Kubernetes architecture:

  • Control plane upgrade (+ etcd)
  • Node upgrade

Particularly when using cloud-managed Kubernetes like EKS, since AWS manages the control plane, you’ll mostly handle node upgrades directly (if you’re not using managed nodegroups).

Prometheus 101 (slide) and Graphite

Prometheus 101

slide: Prometheus 101

slide: query

slide: range vector

I created a simple presentation about Prometheus. I uploaded it using sporto/hugo-remark: A theme for using remark.js with hugo, and I found that creating it in markdown rather than PowerPoint allowed me to focus more on the content. (But that doesn’t necessarily mean the content is better.)

Make REST API Documentation using swagger in Go

For golang based HTTP/REST API documentation,I choose swagger. go-swagger has several features for swagger documentation. The go-swagger can generate swagger spec based code generation but I already have an REST API server. I use go-swagger with golang comment annotation for swagger spec generation.

For REST API development, Design first with writing spec and then generating codes from it is a good approach. goa is a famous tool for this style.

Releasing with bumpversion, govvv and drone

One of pleasures about coding is using good tools. Recently I use bumpversion, govvv and drone for version releasing.

bumpversion

bumpversion is automation for semantic versioning. Most of my projects have simple config file like below. (.bumpversion.cfg)

[bumpversion]
commit = True
tag = True
current_version = 0.8.4
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
serialize = 
	{major}.{minor}.{patch}
[bumpversion:file:VERSION]

Before release,I just run like below:

Using docker-machine

The Docker machine is a command tool created by the docker team to manage docker servers. It automatically creates hosts and installs docker engine on them and configures the docker client to talk.

If you install the docker machine tool,you can use it like below:

About Docker Swarm

오랜만에 docker-korea meetup에서 About Docker Swarm이라는 이름으로 작은 발표를 했다.

장표는 매우 간단하게 구성하고 데모에서 많은 이야기를 하고 싶었는데. 프로젝터설정부터 힘들어서 준비했던것을 절반밖에 이야기하지 못한것 같다.

Docker Swarm은 다른 클러스텅 시스템과 다른 부분들이 있다. 가장 큰 다른 점은 Docker에서 만들었다는 것. 즉 coreos/fleetDistributed Init System을 표방하는 것과 비슷하게 SwarmDocker-native Clustering System을 이야기한다. 1

Vengo 사용하기

Python을 사용하는 사람이라면, virtualenv을 잘 알것이다. 각 프로그램마다 각자의 파이썬 환경을 구성할수 있는 도구이다. (Py3에 기본으로 추가되어 있다)

go tool은 개인적으로 불만이 많은 도구이다. 특히 go get은 여러가지 기능의 부족으로 당황스러움을 느끼게 한다.

가령 go get은 scm(git,hg…)에서 직접 가져온다. 하지만 언제나 master branch의 최신을 가져온다. 즉 버져닝(versioning)에 대한 부분이 없다.

Docker deployment slide

사내에서 Docker 사용에 대한 이야기가 나와서 간단하게 조사해보았다. 매력적인 프로젝트인것은 확실하지만, 기존에 chef나 opsworks로 구성되어 있는 부분도 있고 현재 시스템 구조상 docker으로 이전해서의 이득이 생각외로 크지 않다는 것이 중평.

docker의 장점은 대개 두가지로 이야기 할수 있겠다.

  • Portability (이식성)
  • Repeatability (반복성)

이식성(Portability)은 가장 크게 얻는 이점은 개발환경과 실제 프로덕션 환경의 차이를 설정변수 몇개로 축소할수 있다는 점이라고 생각한다. 여러 환경(개발,테스트,프로덕션)을 일치시키기 위한 별다른 노력을 할 필요 없다는 점이 가장 큰 매력으로 생각한다. 물론 자바와 비슷하게 한번 작성하면 어디서든 동작한다는 것이 여러 Host 환경에서 동작할 수 있다는 점도 무시할수는 없겠다.

Send-to-kindle 2014-05

읽어야 할 글들을 Kindle에 던지는데,뭘 킨들에 던졌는지 기록해 두면 좋을 것 같아서 적어본다.

Go’s power is in emergent behavior

Go Parallel 1,2

Go: Best Practices for Production Environments