rabbit-slide-unasuke-wakate2020 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rabbit +1 -0
- data/README.md +25 -0
- data/Rakefile +17 -0
- data/config.yaml +21 -0
- data/img/blog_unasuke_com_itamae.png +0 -0
- data/img/icon_raw.jpg +0 -0
- data/img/itamae-machine-ruby-jit.png +0 -0
- data/img/itamae-on-travic-ci-com.png +0 -0
- data/img/itamae-travis-ci-org.png +0 -0
- data/img/itamae-unit-test-on-github-actions.png +0 -0
- data/img/travis-ci-com.png +0 -0
- data/pdf/wakate2020-slide.pdf +0 -0
- data/slide.md +331 -0
- metadata +71 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fb77b087d0cad92342878d40b3743fc8c13d1ee72bc73ac70c83b4bae2e3b617
|
4
|
+
data.tar.gz: 0b48a9234c6a1c2fb54c4700b33cffcdd6c4743248be3d823f0d315e108ea224
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d827b9adad948c269631972eb5a1f92bae622576be324998234f26d06118e600319441520b0e47a8a97ac1a62c59f6bf2669cf022270b464b54c42e2fe47e0d9
|
7
|
+
data.tar.gz: 295f063a07bf4c5d97393c212b798581bec264fac427d2b8cfb3f6773f94ace4126119e23923a2692f62d7f3433a15fce08c91989e5b2810e35c53d1e13da51d
|
data/.rabbit
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--size 1600,900 slide.md
|
data/README.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# wakate2020
|
2
|
+
|
3
|
+
第53回情報科学若手の会での発表スライドです
|
4
|
+
https://wakate.connpass.com/event/165723
|
5
|
+
|
6
|
+
## 作者向け
|
7
|
+
|
8
|
+
### 表示
|
9
|
+
|
10
|
+
rake
|
11
|
+
|
12
|
+
### 公開
|
13
|
+
|
14
|
+
rake publish
|
15
|
+
|
16
|
+
## 閲覧者向け
|
17
|
+
|
18
|
+
### インストール
|
19
|
+
|
20
|
+
gem install rabbit-slide-unasuke-wakate2020
|
21
|
+
|
22
|
+
### 表示
|
23
|
+
|
24
|
+
rabbit rabbit-slide-unasuke-wakate2020.gem
|
25
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require "rabbit/task/slide"
|
2
|
+
|
3
|
+
# Edit ./config.yaml to customize meta data
|
4
|
+
|
5
|
+
spec = nil
|
6
|
+
Rabbit::Task::Slide.new do |task|
|
7
|
+
spec = task.spec
|
8
|
+
# spec.files += Dir.glob("doc/**/*.*")
|
9
|
+
# spec.files -= Dir.glob("private/**/*.*")
|
10
|
+
# spec.add_runtime_dependency("rabbit-theme-YOUR-THEME")
|
11
|
+
end
|
12
|
+
|
13
|
+
desc "Tag #{spec.version}"
|
14
|
+
task :tag do
|
15
|
+
sh("git", "tag", "-a", spec.version.to_s, "-m", "Publish #{spec.version}")
|
16
|
+
sh("git", "push", "--tags")
|
17
|
+
end
|
data/config.yaml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
id: wakate2020
|
3
|
+
base_name: slide
|
4
|
+
tags: []
|
5
|
+
presentation_date:
|
6
|
+
presentation_start_time:
|
7
|
+
presentation_end_time:
|
8
|
+
version: 1.0.0
|
9
|
+
licenses: []
|
10
|
+
slideshare_id:
|
11
|
+
speaker_deck_id:
|
12
|
+
ustream_id:
|
13
|
+
vimeo_id:
|
14
|
+
youtube_id:
|
15
|
+
author:
|
16
|
+
markup_language: :markdown
|
17
|
+
name: unasuke
|
18
|
+
email: yusuke1994525@gmail.com
|
19
|
+
rubygems_user: unasuke
|
20
|
+
slideshare_user:
|
21
|
+
speaker_deck_user:
|
Binary file
|
data/img/icon_raw.jpg
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/slide.md
ADDED
@@ -0,0 +1,331 @@
|
|
1
|
+
# ItamaeというIaCツールのCIについて
|
2
|
+
subtitle
|
3
|
+
: 2020-09-26
|
4
|
+
|
5
|
+
subtitle
|
6
|
+
: 第53回 情報科学若手の会
|
7
|
+
|
8
|
+
author
|
9
|
+
: うなすけ
|
10
|
+
|
11
|
+
theme
|
12
|
+
: unasuke-white
|
13
|
+
|
14
|
+
# 自己紹介
|
15
|
+
- 名前 : うなすけ
|
16
|
+
- 所属 : フリーランス
|
17
|
+
- インフラ寄りサーバーサイドエンジニア
|
18
|
+
- Itamae メンテナ
|
19
|
+
|
20
|
+
- GitHub [@unasuke](https://github.com/unasuke)
|
21
|
+
- Mastodon {::tag name="x-small"}[@unasuke@mstdn.unasuke.com](https://mstdn.unasuke.com/@unasuke){:/tag}
|
22
|
+
- Twitter [@yu\_suke1994](https://twitter.com/yu_suke1994)
|
23
|
+
|
24
|
+
{:relative_width="24" align="right" relative_margin_right="-9" relative_margin_top="42"}
|
25
|
+
|
26
|
+
# Itamaeとは?
|
27
|
+
|
28
|
+
- Itamae は構成管理ツール
|
29
|
+
- Ruby製
|
30
|
+
- <https://github.com/itamae-kitchen/itamae>
|
31
|
+
- おなかま: Puppet, Chef, Ansible
|
32
|
+
- @ryotarai 氏によって作成された
|
33
|
+
- 現在のメンテナ @sue445, @ryotarai, @unasuke
|
34
|
+
|
35
|
+
{:relative_width="40" align="right" relative_margin_right="-9" relative_margin_top="44"}
|
36
|
+
|
37
|
+
# Itamaeと若手の会と僕
|
38
|
+
- 冬の陣2018
|
39
|
+
- CIが通らない話
|
40
|
+
- 第51回
|
41
|
+
- メンテナに直アプローチした話
|
42
|
+
- 第53回 (今回)
|
43
|
+
- CIについて (?)
|
44
|
+
|
45
|
+
こいつItamaeの話ばっかしてんな
|
46
|
+
|
47
|
+
# ItamaeというIaCツールのCIについて
|
48
|
+
`travis-ci.org`
|
49
|
+
|
50
|
+
{:relative_width="100"}
|
51
|
+
|
52
|
+
# ItamaeのCI
|
53
|
+
たまに落ちる
|
54
|
+
|
55
|
+
{:relative_width="70"}
|
56
|
+
|
57
|
+
# ItamaeのCI
|
58
|
+
再実行ができない!!!!
|
59
|
+
|
60
|
+
# ItamaeのCI
|
61
|
+
|
62
|
+
{:.center}
|
63
|
+
{::tag name="xx-large"}しかたない、移行するぞ{:/tag}
|
64
|
+
|
65
|
+
# 前提知識: Itamaeのtestについて
|
66
|
+
|
67
|
+
- Rubyのversion
|
68
|
+
- 2.3からheadまでの6 versions
|
69
|
+
- JITの有無
|
70
|
+
- 2.6以上のRuby(3 versions)に対して
|
71
|
+
- unitなのかintegrationなのか
|
72
|
+
- 実行する環境が異なる
|
73
|
+
|
74
|
+
# OSSのCIツール
|
75
|
+
public repoのCIが無料なのは、有名なのはこれら
|
76
|
+
|
77
|
+
- GitHub Actions
|
78
|
+
- CircleCI
|
79
|
+
|
80
|
+
# GitHub ActionsでItamaeのCI
|
81
|
+
まずはGitHub Actionsをやってみよう
|
82
|
+
|
83
|
+
# GitHub ActionsでItamaeのunit test
|
84
|
+
|
85
|
+
```yaml
|
86
|
+
name: "unit test on ubuntu"
|
87
|
+
|
88
|
+
on:
|
89
|
+
push:
|
90
|
+
branches: "*"
|
91
|
+
jobs:
|
92
|
+
test:
|
93
|
+
strategy:
|
94
|
+
matrix:
|
95
|
+
os: [ubuntu-16.04, ubuntu-18.04]
|
96
|
+
ruby: [2.2, 2.3, 2.4, 2.5, 2.6, 2.7, head]
|
97
|
+
fail-fast: false
|
98
|
+
runs-on: ${{ matrix.os }}
|
99
|
+
steps:
|
100
|
+
- uses: actions/checkout@v2
|
101
|
+
- uses: ruby/setup-ruby@v1
|
102
|
+
with:
|
103
|
+
ruby-version: ${{ matrix.ruby }}
|
104
|
+
- run: bundle install
|
105
|
+
- run: bundle exec rake spec:unit
|
106
|
+
```
|
107
|
+
|
108
|
+
# GitHub ActionsでItamaeのunit test
|
109
|
+
{:relative_width="100"}
|
110
|
+
|
111
|
+
通る
|
112
|
+
|
113
|
+
# GitHub ActionsでItamaeのintegration test
|
114
|
+
|
115
|
+
{:relative_height="90"}
|
116
|
+
|
117
|
+
通らない!!!!!
|
118
|
+
|
119
|
+
# integration testが通らない
|
120
|
+
{:relative_height="100"}
|
121
|
+
|
122
|
+
# integration testが通らない
|
123
|
+
{:relative_height="100"}
|
124
|
+
|
125
|
+
# integration testが通らない
|
126
|
+
- tmpディレクトリへの書き込みでコケる
|
127
|
+
- {::tag name="xx-large"}straceを有効にすると通る{:/tag}
|
128
|
+
- なんで????
|
129
|
+
- さすがに調査がしんどいので採用見送り
|
130
|
+
|
131
|
+
# CircleCIでItamaeのCI
|
132
|
+
ではCircleCIをやってみよう
|
133
|
+
|
134
|
+
# .circleci/config.yml
|
135
|
+
|
136
|
+
```yaml
|
137
|
+
version: 2.1
|
138
|
+
orbs:
|
139
|
+
ruby: circleci/ruby@1.0.7
|
140
|
+
|
141
|
+
executors:
|
142
|
+
docker:
|
143
|
+
docker:
|
144
|
+
- image: cimg/base:stable
|
145
|
+
docker-1804:
|
146
|
+
docker:
|
147
|
+
- image: cimg/base:stable-18.04
|
148
|
+
machine:
|
149
|
+
machine:
|
150
|
+
image: circleci/classic:201808-01
|
151
|
+
|
152
|
+
jobs:
|
153
|
+
unit:
|
154
|
+
parameters:
|
155
|
+
ruby-version:
|
156
|
+
type: string
|
157
|
+
exec:
|
158
|
+
type: executor
|
159
|
+
default: ""
|
160
|
+
executor: << parameters.exec >>
|
161
|
+
steps:
|
162
|
+
- checkout
|
163
|
+
- ruby/install:
|
164
|
+
version: << parameters.ruby-version >>
|
165
|
+
- run: gem install bundler --version 1.17.3 --force
|
166
|
+
- run: bundle install -j4
|
167
|
+
- run: ruby -v
|
168
|
+
- run: bundle exec rake spec:unit
|
169
|
+
integration:
|
170
|
+
parameters:
|
171
|
+
ruby-version:
|
172
|
+
type: string
|
173
|
+
executor: machine
|
174
|
+
# executor: docker
|
175
|
+
steps:
|
176
|
+
- checkout
|
177
|
+
- setup_remote_docker:
|
178
|
+
version: 18.06.0-ce
|
179
|
+
- ruby/install:
|
180
|
+
version: << parameters.ruby-version >>
|
181
|
+
- run: gem install bundler --version 1.17.3 --force
|
182
|
+
- run: bundle install -j4
|
183
|
+
- run:
|
184
|
+
command: |
|
185
|
+
ruby -v
|
186
|
+
export PATH=$HOME/.rvm/bin:$PATH
|
187
|
+
ruby -v
|
188
|
+
- run: bundle exec rake spec:integration:all
|
189
|
+
unit-jit:
|
190
|
+
parameters:
|
191
|
+
ruby-version:
|
192
|
+
type: string
|
193
|
+
executor: docker
|
194
|
+
steps:
|
195
|
+
- checkout
|
196
|
+
- ruby/install:
|
197
|
+
version: << parameters.ruby-version >>
|
198
|
+
- run: gem install bundler --version 1.17.3 --force
|
199
|
+
- run: bundle install -j4
|
200
|
+
- run: ruby -v
|
201
|
+
- run: RUBYOPT=--jit bundle exec rake spec:unit
|
202
|
+
integration-jit:
|
203
|
+
parameters:
|
204
|
+
ruby-version:
|
205
|
+
type: string
|
206
|
+
# executor: machine
|
207
|
+
executor: docker
|
208
|
+
steps:
|
209
|
+
- checkout
|
210
|
+
- setup_remote_docker:
|
211
|
+
version: 18.06.0-ce
|
212
|
+
- ruby/install:
|
213
|
+
version: << parameters.ruby-version >>
|
214
|
+
- run: gem install bundler --version 1.17.3 --force
|
215
|
+
- run: bundle install -j4
|
216
|
+
- run: ruby -v
|
217
|
+
- run: RUBYOPT=--jit bundle exec rake spec:integration:all
|
218
|
+
|
219
|
+
workflows:
|
220
|
+
version: 2
|
221
|
+
all-test:
|
222
|
+
jobs:
|
223
|
+
- unit:
|
224
|
+
exec:
|
225
|
+
name: docker-1804
|
226
|
+
matrix:
|
227
|
+
parameters:
|
228
|
+
ruby-version: ["2.3"]
|
229
|
+
- unit:
|
230
|
+
exec:
|
231
|
+
name: docker
|
232
|
+
matrix:
|
233
|
+
parameters:
|
234
|
+
ruby-version: ["2.4", "2.5", "2.6", "2.7"]
|
235
|
+
- integration:
|
236
|
+
matrix:
|
237
|
+
parameters:
|
238
|
+
ruby-version: ["2.3", "2.4", "2.5", "2.6", "2.7"]
|
239
|
+
# all-test-with-jit:
|
240
|
+
# jobs:
|
241
|
+
- unit-jit:
|
242
|
+
matrix:
|
243
|
+
parameters:
|
244
|
+
ruby-version: ["2.6", "2.7"]
|
245
|
+
- integration-jit:
|
246
|
+
matrix:
|
247
|
+
parameters:
|
248
|
+
ruby-version: ["2.6", "2.7"]
|
249
|
+
```
|
250
|
+
|
251
|
+
読めませんが読まなくていいです
|
252
|
+
|
253
|
+
# CircleCIでItamaeのCI、壁たち
|
254
|
+
1. ruby/install-depsの挙動
|
255
|
+
2. machine executorでRubyのversionが設定できない?
|
256
|
+
3. setup_remote_dockerではvolume mountが使えない
|
257
|
+
|
258
|
+
# 1. ruby/install-depsの挙動
|
259
|
+
- CircleCI公式Orb `circleci/ruby` を使用
|
260
|
+
- `Gemfile.lock` があることを期待している
|
261
|
+
- アプリケーション向きでライブラリ向きではない
|
262
|
+
- 別になくてもいい (オプション指定可能)
|
263
|
+
- bundlerの重複を解決できない!
|
264
|
+
|
265
|
+
結局 `gem install bundler --force` を手書きしないといけない
|
266
|
+
|
267
|
+
# 2. machine executorでRubyのversionが設定できない?
|
268
|
+
- docker executorとmachine executorの2種類がある
|
269
|
+
- integration testはDockerを使用するためmachine executorを使いたい
|
270
|
+
- machine executorで以下のようなエラーが出ている
|
271
|
+
|
272
|
+
{:relative_width="100"}
|
273
|
+
|
274
|
+
# 2. machine executorでRubyのversionが設定できない?
|
275
|
+
- Ruby 2.6なのに `--jit` オプションを渡せない?
|
276
|
+
|
277
|
+
{:relative_width="100"}
|
278
|
+
|
279
|
+
# 2. machine executorでRubyのversionが設定できない?
|
280
|
+
Ruby 2.6のテストでRubyのversionを出力してみると、こう
|
281
|
+
|
282
|
+
{:relative_width="90"}
|
283
|
+
|
284
|
+
Ruby 2.3になっとるやんけ!!!!!!
|
285
|
+
|
286
|
+
# 2. machine executorでRubyのversionが設定できない?
|
287
|
+
- machine executorにおいて `circleci/ruby` がうまく動かない
|
288
|
+
- RVMのPATHが何度やっても通らない
|
289
|
+
- そもそもそんなハックしたくない
|
290
|
+
- しかたない、setup_remote_dockerしよう
|
291
|
+
|
292
|
+
# 3. setup_remote_dockerではvolume mountが使えない
|
293
|
+
- CircleCIのdocker executor内でdockerを使用するしくみ
|
294
|
+
- テストを実行しみると落ちる
|
295
|
+
- どうやらvolume mountに失敗している?
|
296
|
+
|
297
|
+
> ジョブ空間からリモート Docker 内のコンテナにボリュームをマウントすること (およびその逆) はできません。
|
298
|
+
> https://circleci.com/docs/ja/2.0/building-docker-images/#section=configuration
|
299
|
+
|
300
|
+
😭😭😭😭😭😭
|
301
|
+
|
302
|
+
# 結果
|
303
|
+
CircleCIの採用も見送り……
|
304
|
+
\\n
|
305
|
+
(60回くらいCIを回している)
|
306
|
+
|
307
|
+
# what's the next ci platform?
|
308
|
+
皆さんのお好きなCIを思いうかべてみましょう
|
309
|
+
|
310
|
+
# Itamaeはtravis-ci.orgで実行されている
|
311
|
+
- `travis-ci.org` です
|
312
|
+
|
313
|
+
# travis-ci.com
|
314
|
+
{:relative_width="80"}
|
315
|
+
|
316
|
+
<https://blog.travis-ci.com/2018-05-02-open-source-projects-on-travis-ci-com-with-github-apps>
|
317
|
+
|
318
|
+
# Itamaeはtravis-ci.orgで実行されている
|
319
|
+
- `travis-ci.org` です
|
320
|
+
- `travis-ci.org` から `travis-ci.com` に移行すると、どうなる?
|
321
|
+
|
322
|
+
# Itamae CI on travis-ci.com
|
323
|
+
{:relative_width="100"}
|
324
|
+
|
325
|
+
"Restart build" できる!
|
326
|
+
|
327
|
+
# まとめ
|
328
|
+
- CI serviceにはクセがある
|
329
|
+
- travis-ciのmatrixが一番書きやすい
|
330
|
+
- 皆さんのコードのCI、 `travis-ci.com` に移行できてますか?
|
331
|
+
- なぜオレはあんなムダな時間を……
|
metadata
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rabbit-slide-unasuke-wakate2020
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- unasuke
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-09-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rabbit
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.0.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.0.2
|
27
|
+
description: |-
|
28
|
+
第53回情報科学若手の会での発表スライドです
|
29
|
+
https://wakate.connpass.com/event/165723
|
30
|
+
email:
|
31
|
+
- yusuke1994525@gmail.com
|
32
|
+
executables: []
|
33
|
+
extensions: []
|
34
|
+
extra_rdoc_files: []
|
35
|
+
files:
|
36
|
+
- ".rabbit"
|
37
|
+
- README.md
|
38
|
+
- Rakefile
|
39
|
+
- config.yaml
|
40
|
+
- img/blog_unasuke_com_itamae.png
|
41
|
+
- img/icon_raw.jpg
|
42
|
+
- img/itamae-machine-ruby-jit.png
|
43
|
+
- img/itamae-on-travic-ci-com.png
|
44
|
+
- img/itamae-travis-ci-org.png
|
45
|
+
- img/itamae-unit-test-on-github-actions.png
|
46
|
+
- img/travis-ci-com.png
|
47
|
+
- pdf/wakate2020-slide.pdf
|
48
|
+
- slide.md
|
49
|
+
homepage: https://slide.rabbit-shocker.org/authors/unasuke/wakate2020/
|
50
|
+
licenses: []
|
51
|
+
metadata: {}
|
52
|
+
post_install_message:
|
53
|
+
rdoc_options: []
|
54
|
+
require_paths:
|
55
|
+
- lib
|
56
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
requirements: []
|
67
|
+
rubygems_version: 3.0.3
|
68
|
+
signing_key:
|
69
|
+
specification_version: 4
|
70
|
+
summary: wakate2020
|
71
|
+
test_files: []
|