End to end テストをもっとすべきだというセッションでした。セッションでは、NFS driver, pmem-csiを例にして ginkgo, gomegaを使ったやり方の説明を行なっていました。また、テストにおけるパラメータの使い方や、viperの説明なども軽く触れられていました。ここら辺のツールは我々の Neco プロジェクトでもよく使用しており、すんなり理解できました。
最後の質疑応答では freezing test (リリース直前にテストを安定させるため、テストの変更をしない期間) に関する補足も入りました。
E2E Testing: Real Developers Don't Test... But They Should
続いて規模について。年に三回開催されるうち、本イベントは開催期間が一日短く、かつ、規模も半分程度です。これについては大きければよいというものではなくて、本イベントくらいの規模が適切だと思いました。なぜかというと最近参加したKubeCon North AmericaやKubeCon Europeは参加人数が一万人に近づいたりと盛り上がってはいるのですが、セッションが最高20並列で進んだり、部屋間の移動で大渋滞が起きたりと一か所で開催するのに無理があると筆者は考えています。
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
df7d631bb6a8 kindest/node:v1.14.1 "/usr/local/bin/entr…" 2 hours ago Up 2 hours kind-worker3
4da3bf000b00 kindest/node:v1.14.1 "/usr/local/bin/entr…" 2 hours ago Up 2 hours kind-worker2
772938eaed30 kindest/node:v1.14.1 "/usr/local/bin/entr…" 2 hours ago Up 2 hours 37735/tcp, 127.0.0.1:37735->6443/tcp kind-control-plane
957d78a62abd kindest/node:v1.14.1 "/usr/local/bin/entr…" 2 hours ago Up 2 hours kind-worker
kindはこれらのコンテナの中でsystemdサービスとしてkubeletを実行しています。
$ docker exec -it kind-control-plane systemctl status kubelet.service
● kubelet.service - kubelet: The Kubernetes Node Agent
Loaded: loaded (/kind/systemd/kubelet.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/kubelet.service.d
└─10-kubeadm.conf
Active: active (running) since Fri 2019-06-28 02:38:32 UTC; 1h 52m in ago
$ curl http://hello-world-web-server:8000
curl: (6) Could not resolve host: hello-world-web-server
$
クラスタの外からのアクセスなので失敗しました。これは想定通りの動きです。
ローカルプロセスからクラスタにアクセスできない
続いてTelepresenceを介して同じプロセスを動作させるとどうなるでしょうか。
$ telepresence --run curl http://hello-world-web-server:8000
T: Starting proxy with method 'vpn-tcp', which has the following limitations: All processes are affected, only one telepresence can run per machine, and you can't use other VPNs. You may need to add cloud hosts and headless services with --also-proxy. For a full list of method limitations see
T: https://telepresence.io/reference/methods.html
T: Volumes are rooted at $TELEPRESENCE_ROOT. See https://telepresence.io/howto/volumes.html for details.
T: Starting network proxy to cluster using new Deployment telepresence-1562306285-3227046-17962
T: No traffic is being forwarded from the remote Deployment to your local machine. You can use the --expose option to specify which ports you want to forward.
T: Setup complete. Launching your command.
Hello world! ☆ サービスにアクセスできている
T: Your process has exited.
T: Exit cleanup in progress
T: Cleaning up Deployment telepresence-1562306285-3227046-17962
$ telepresence --run-shell
T: Starting proxy with method 'vpn-tcp', which has the following limitations: All processes are affected, only one telepresence can run per machine, and you can't use other VPNs. You may need to add cloud hosts and headless services with --also-proxy. For a full list of method limitations see
T: https://telepresence.io/reference/methods.html
T: Volumes are rooted at $TELEPRESENCE_ROOT. See https://telepresence.io/howto/volumes.html for details.
T: Starting network proxy to cluster using new Deployment telepresence-1562306514-402358-21367
T: No traffic is being forwarded from the remote Deployment to your local machine. You can use the --expose option to specify which ports you want to forward.
T: Setup complete. Launching your command.
$ curl http://hello-world-web-server:8000
Hello world!
shellを含むプロセスだけではなく、クラスタ内でコンテナを動かすこともできます。
$ telepresence --docker-run -it --rm pstauffer/curl curl http://hello-world-web-server:8000
T: Volumes are rooted at $TELEPRESENCE_ROOT. See https://telepresence.io/howto/volumes.html for details.
T: Starting network proxy to cluster using new Deployment telepresence-1562306747-6756666-25541
T: No traffic is being forwarded from the remote Deployment to your local machine. You can use the --expose option to specify which ports you want to forward.
T: Setup complete. Launching your container.
Hello world!
T: Your process has exited.
T: Exit cleanup in progress
T: Cleaning up Deployment telepresence-1562306747-6756666-25541
$
$ telepresence --swap-deployment hello-world-web-server --docker-run --rm -it hello-world-web-server:dev
T: Volumes are rooted at $TELEPRESENCE_ROOT. See https://telepresence.io/howto/volumes.html for details.
T: Starting network proxy to cluster by swapping out Deployment hello-world-web-server with a proxy
T: Forwarding remote port 8000 to local port 8000.
T: Setup complete. Launching your container.
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
...
$ kubectl --insecure-skip-tls-verify=true get configmaps
Error from server (Forbidden): configmaps is forbidden: User "xxxx" cannot list resource "configmaps" in API group "" in the namespace "default"
YakumoはUS市場にKintoneを展開することをゴールとしたプロジェクトで、その一環として国内のデータセンターで提供しているKintoneをAmazon Web Service (AWS)に移行しています。
つい先日、Yakumoで開発・運用してるKintoneがリリースされました。
本記事では、Yakumoにおけるモニタリングと、YakumoチームでのDataDogの活用例について紹介します。
SQSやKinesis Data Streamなどのマネージドサービスについては、引き続きCloudWatchメトリクスを利用しています。
これらのサービスもKintoneの運用を支えていますが、お客様への影響が少なく緊急度が低いと判断しました。
そのためKintoneのメトリクスと並べて比較しないということで、DataDogの対象にしませんでした。