Month: December 2019

Tanigawa-dake

If you’ve watched Yama no Susume, then you’ve heard of Mt Tanigawa. It’s the goal of a major arc of the story and an important memory to the characters. I went there in a different season though (in the snow), but didn’t climb the main summit. For no particular reason other than I didn’t realize the summit I was at wasn’t the highest point. Whoops.


2019 in review

This year was quite thick in events so I decided to write a year retrospect for a change. I read somewhere that people tend to do wild things when they’re nearing a “round” age like 30, except I read about this after I planned most of the stuff listed below… It definitely did turn into a very eventful 30th.


ArgoCD bootstrap cluster

I wish it could be completely automated… But for now I’ve just automated as much as possible (and convenient). The ingredients:

  • Helm
  • Sealed Secrets
  • Argo CD and Argo Rollouts
  • traefik
  • Prometheus and Grafana

I have a repository for the purposes of playing around with Kubernetes tooling like this – and hopefully turn it into an actual application eventually. I have big plans and lots of stuff I want to try out, but time is limited. All the code examples in this post use the namespaces and naming choices in the repository. The folder structure (relevant to this bit) is like…

system
 ├┬ apps
 │└─ (bootstrapped Argo CD app manifests)
 ├┬ argo
 │└─ the local "umbrella chart" for Argo CD and Argo Rollouts
 ├┬ bootstrap
 │└─ boilerplate project and application manifests
 └┬ manifests
  └─ manifests I didn't bother turning into a Helm chart
     referenced by the raw-manifests.yaml application

メトリクスで完全自動カナリヤデプロイ

アプリコードを変えました。後は機械がなんとかするはずのところ、そこから何十分もかかる手動のデプロイ作業が待っていた。アプリが動く台が増えるとその時間も台数の分だけ倍増する。

理想は、コードの変更がgit上で主ブランチにコミットとして現れたら、CI/CDパイプラインがコンテナイメージを生成して(マージ前にすでにテストが通っている前提)本番環境にカナリヤの方式でデプロイされる。


可変個! 可変個! そして手動gensym!

Clojureを紹介する記事はよくマクロの存在を最強の武器としてあげているが、実際にマクロはそう頻繁には使わない気がする。個人的にマクロを作る目印になるのはとあるウィキの記事に書いてある基準。

C++を主にみたデザインパターンの考え方の批判で指摘されるのは、ああやってパターンを繰り返し適応するのはまだコード化できてないなんらかの抽象化があることを示している。

コードに規則性や繰り返しが現れるのは、今使っている抽象化が十分ではない印。例えばマクロに任せるべきコード展開を手動でやっている。

Paul Graham: Revenge of the nerds

Collapse of the docker0 bridge

We’ve got a printer in the office. I’m not sure how the network is organized, but it’s on a different IP range than the rest of the dev network. And for some reason I couldn’t get it to work.


Kubernetes local storage

Kubernetes使おうとすると早い段階で永続化の話が自然と出てくる。データベースをクラスタ内で動かすとか、ユーザー界の理由もありうるし、クラスタの土台となるツールが永続ボリューム(Persistent Volume)を要求することもある。


Mitake & Otake

Mitake with its ropeway is probably “the” hiking destination in Tokyo. It’s accessible, not particularly high and you still get beautiful views. Oh, and crowds. Of course crowds.