- アプリケーションは Mono Repo 上にサブディレクトリとして数十ほど存在
- 各アプリケーションは独立してリリース可能とする
- そのためにリリースブランチ等には
*/release
といった形でそのアプリケーションの名前を持つ
- そのためにリリースブランチ等には
- 開発チームは self-contained な DevOps チームへの変化を目指している
- とりあえずは gRPC のロードバランシングさえできればそれでよし
- 現状 gRPC は新規サービス含めトラフィックの少ないサービスでしか使われてない
- とはいえそれらのサービスの成長だったり、トラフィックの大きいサービスで使うときに当然困ることになるので
- Circuit Breaker 的な仕組みが社内で運用できていないので、その辺にも使っていけたらと思ってる (そのうち検証する)
- 現状は @ujihisa さんが作った Dark Launch で手動で落とすとかしている
- そもそも現状は partial outage 可能なマイクロサービス化された部分が限定的だし、特に問題も起きていないのでそれがないことで日々障害が起きている!なんてこともない
- Production readiness checklist 的には Circuit Breaker 入れるか、少なともなんかあったら切り離せるように、ということにはしてある https://quipper.hatenablog.com/entry/2019/06/07/080000
- ゆくゆくは AWS App Mesh なり Istio なりでサービスメッシュしたいと思っているが、いきなりそこに行くのはリスクが大きいのでまずは Envoy 単体に慣れたい
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ip_map=$(jq --raw-input . | jq --slurp . | jq 'to_entries | map({key: .value, value: true}) | from_entries' --compact-output) | |
aws --profile aya ec2 describe-instances | \ | |
jq -r --argjson ipMap "${ip_map}" \ | |
'.Reservations[].Instances[] | select(.PrivateIpAddress | in($ipMap)) | .InstanceId' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'yaml' | |
def kind_to_sub_extension(kind) | |
case kind | |
when 'ConfigMap' | |
'cm' | |
when 'DaemonSet' | |
'ds' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PECO_CMD="peco" | |
KUBECTL_CMD="kubectl" | |
if ! hash "${PECO_CMD}" 2> /dev/null; then | |
>&2 echo "error: ${PECO_CMD} is not installed" | |
>&2 echo "see https://github.com/peco/peco" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fetch, { Response } from 'node-fetch'; | |
interface ResponseWithParsedJson extends Response { | |
parsedJson?: any; | |
} | |
const toResponseWithParsedJson = ( | |
res: Response, | |
json: any, | |
): ResponseWithParsedJson => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fetch, { Response } from 'node-fetch'; | |
interface ResponseWithParsedJson extends Response { | |
parsedJson?: any; | |
} | |
const toResponseWithParsedJson = ( | |
res: Response, | |
json: any, | |
): ResponseWithParsedJson => { |
https://48pedia.org/%E6%AC%85%E5%9D%8246%E3%83%A1%E3%83%B3%E3%83%90%E3%83%BC%E4%B8%80%E8%A6%A7 を開いて Chrome の Developer Tools の Console から実行する。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"languageModel": { | |
"intents": [ | |
{ | |
"name": "AMAZON.CancelIntent", | |
"samples": [] | |
}, | |
{ | |
"name": "AMAZON.HelpIntent", | |
"samples": [] |