内部動作 - 追加時
21
Cloud Provider
• AWS / GCP / Azure
• LXD
• OpenStack
• etc etc
…
② Send a webhook
to myshoes
① Request job
③ Execute provider
Virtual Machine
with actions/runner
④ Create an instance
⑤ Register runner
Slide 22
Slide 22 text
内部動作 - 削除時
22
Cloud Provider
• AWS / GCP / Azure
• LXD
• OpenStack
• etc etc
…
① Get a list of runner
③ Execute provider
Virtual Machine
with actions/runner
④ Delete an instance
② Check to delete runner
Slide 23
Slide 23 text
内部動作 - 追加時
23
Cloud Provider
• AWS / GCP / Azure
• LXD
• OpenStack
• etc etc
…
② Send a webhook
to myshoes
① Request job
③ Execute provider
Virtual Machine
with actions/runner
④ Create an instance
⑤ Register runner
Slide 24
Slide 24 text
内部動作 - 追加時
24
Cloud Provider
• AWS / GCP / Azure
• LXD
• OpenStack
• etc etc
…
③ Execute provider
Virtual Machine
with actions/runner
④ Create an instance
② Send a webhook
① Request job
⑤ Register runner
Slide 25
Slide 25 text
内部動作 - shoes provider
25
Cloud Provider
Execute provider
(hashicorp/go-plugin)
Virtual Machine
with actions/runner
shoes-xxx
Virtual Machine
with actions/runner
Virtual Machine
with actions/runner
Call API
1
.Runner Name : runnerに付けるべき名前
2
.Setup Script : actions/runner展開スクリプト
3
.Resource Type : runnerのスペック
Slide 26
Slide 26 text
内部動作 - shoes-aws
26
Amazon Web Services
Execute provider
(hashicorp/go-plugin)
EC
2
with actions/runner
shoes-aws
EC
2
with actions/runner
EC
2
with actions/runner
Call AWS REST API
1
.Runner Name to tag “Name”
2
.Setup Script to cloud-init user-data
3
.Resource Type to AWS Instance Type
Slide 27
Slide 27 text
内部動作 - shoes-lxd
27
LXD server
Execute provider
(hashicorp/go-plugin)
LXD Container
with actions/runner
shoes-lxd
Call LXD REST API
LXD Container
with actions/runner
LXD Container
with actions/runner
1
.Runner Name to Instance name
2
.Setup Script to cloud-init user-data
3
.Resource Type to limits.cpu, limits.memory
サイバーエージェントにおけるmyshoes構成
• whywaita/myshoes + shoes-lxd-multi
• LXD (LinuX Container Daemon)
• マルチテナント提供: myshoes-controller
• MySQL Cluster (with orchestrator)
• Docker Registry v
2
, LXD image server
42
Slide 43
Slide 43 text
Kubernetes Cluster
サイバーエージェントにおけるmyshoes構成
43
myshoes-proxy
(Global IP)
github.com
GHES
User
Tenant A
Tenant B
webhook
myshoes REST API
Stadium VM
Stadium VM
Stadium VMs
LXD (listen
8
44 3
)
Stadium VM
Stadium VM
Stadium VMs
LXD (listen
8
44 3
)
Stadium VM
Stadium VM
Stadium VMs
LXD (listen
8
44 3
)
k
8
s Service
k
8
s Service
for Service X
for Service Y
k
8
s Service
Tenant C
k
8
s Service
Slide 44
Slide 44 text
既存 Cycloud
サイバーエージェントにおけるmyshoes構成
44
Tenant A
Tenant B
Stadium VM
Stadium VM
Stadium VMs
LXD (listen
8
44 3
)
Stadium VM
Stadium VM
Stadium VMs
LXD (listen
8
44 3
)
Stadium VM
Stadium VM
Stadium VMs
LXD (listen
8
44 3
)
k
8
s Service
k
8
s Service
for Service X
for Service Y
k
8
s Service
Tenant C
k
8
s Service
Service VM
Service VM
Service VM
既存 Cycloud ユーザは
⾃テナントのVMとの接続が可能
他テナントのVMとの接続は不可
Kubernetes Cluster
サイバーエージェントにおけるmyshoes構成 (今まで)
56
myshoes-proxy
(Global IP)
github.com
GHES
User
Tenant A
Tenant B
webhook
myshoes REST API
Stadium VM
Stadium VM
Stadium VMs
LXD (listen
8
44 3
)
Stadium VM
Stadium VM
Stadium VMs
LXD (listen
8
44 3
)
Stadium VM
Stadium VM
Stadium VMs
LXD (listen
8
44 3
)
k
8
s Service
k
8
s Service
for Service X
for Service Y
k
8
s Service
Tenant C
k
8
s Service
Slide 57
Slide 57 text
Kubernetes Cluster
サイバーエージェントにおけるmyshoes構成 (今まで)
57
Tenant A
Stadium VM
Stadium VM
Stadium VMs
LXD (listen
8
44 3
)
Stadium VM
Stadium VM
Stadium VMs
LXD (listen
8
44 3
)
Stadium VM
Stadium VM
Stadium VMs
LXD (listen
8
44 3
)
for Service X
shoes-lxd-multi
shoes-lxd-multi-server
① Execute
② RPC call
③ Schedule
Slide 58
Slide 58 text
Kubernetes Cluster
サイバーエージェントにおけるmyshoes構成 (これから)
58
Tenant A
Stadium VM
Stadium VM
Stadium VMs
LXD (listen
8
44 3
)
Stadium VM
Stadium VM
Mac mini x N
for Service X
shoes-label-router
shoes-lxd-multi-server
① Execute
② RPC call
③ Schedule
shoes-macos-server
Slide 59
Slide 59 text
shoes-label-router
• myshoes provider
• runs-on の記述を元に処理を実⾏
• Linux or macOS (RPC calls先を決定)
• resource_type
• OS version
59
runs-on: myshoes_linux_large_22.04
runs-on: myshoes_macos_large_12
Slide 60
Slide 60 text
shoes-label-router
• myshoes provider
• runs-on の記述を元に処理を実⾏
• Linux or macOS (RPC calls先を決定)
• resource_type
• OS version
60
runs-on: myshoes_linux_large_22.04
runs-on: myshoes_macos_large_12
ユーザは runs-onを
変えるだけでOK!