More Related Content
Similar to Jenkins User Conference 東京 2015
Similar to Jenkins User Conference 東京 2015 (20)
More from Kohsuke Kawaguchi
More from Kohsuke Kawaguchi (15)
Jenkins User Conference 東京 2015
- 1. ©2013 CloudBees, Inc. All Rights Reserved 1©2013 CloudBees, Inc. All Rights Reserved
Jenkins ユーザーカンファレンス
東京 2015
川口耕介 / CTO, CloudBees, Inc.
kk@kohsuke.org / @kohsukekawa
- 2. ©2013 CloudBees, Inc. All Rights Reserved 2
CloudBeesの紹介 cloudbees.com
• エンタープライズ向けJenkinsソリューション
の提供
• Jenkins Enterprise by CloudBees
• Jenkins Operations Center by CloudBees
• Jenkins OSS サポート
• エンタープライズ向けプラグイン
• OSS Jenkinsの開発、コミュニティでの活動
• トレーニング及びコンサルティング
http://softwaretest.jp/jenkins/
- 20. ©2013 CloudBees, Inc. All Rights Reserved 20
DotCiとは
• GitHub専用のJenkinsディストロ
• 1 リポジトリ = 1 ジョブ
• .ci.yamlによるバージョン管理された設定
• Docker
• バックエンドとしてMongoDB
- 21. ©2013 CloudBees, Inc. All Rights Reserved 21
UI リフレッシュ
• 見た目の刷新
• レスポンシブ・デザイン
• 大きなボタンと入力フィールド
• カーブ
• 互換性を保ちつつ
- 22. ©2013 CloudBees, Inc. All Rights Reserved 22
更なる UI/UX の改善
• ページ内容の動的な部分更新
–FOSDEM UI会議の積み残し課題
• やりたいこと色々
–GitHub等のリポジトリ一覧からジョブを作る
–プラグイン・パック
–設定画面の分解
–…
- 26. ©2013 CloudBees, Inc. All Rights Reserved 26
継続的デリバリとファイルの追跡
• いつ、なにが、どこにデプロイされたのか?
• 追跡結果を基にした更なる自動化
– スモークテスト
– 該当ビルドに情報を表示
• 拡張可能
– 様々なツールのプロトコルに対応可能
- 27. ©2013 CloudBees, Inc. All Rights Reserved 27
JenkinsとDocker
• DotCI
• Dockerプラグイン
– Dockerコンテナ内で使い捨てスレーブを走らせる
• Docker build publishプラグイン
– イメージのビルドとアップロード
- 29. ©2013 CloudBees, Inc. All Rights Reserved 29
受け入れテスト&ハーネス
• 実は古いプロジェクトの再生版v2
• 活発なアクティビティ
–コミット/週: 50+
–コミッタ: 22
–テスト: 365
–対象プラグイン: ~50
- 30. ©2013 CloudBees, Inc. All Rights Reserved 30
X1K: スケーラビリティの改善
• マスター・スレーブ通信のNIO化
–何百ものスレーブを効率よく指揮
• 現在:JNLPスレーブでの利用
• 今後:CLI通信での利用
• Maven2ジョブの高速化
- 33. ©2013 CloudBees, Inc. All Rights Reserved 33
ユースケース: 複雑な活動の指揮
• 多段階の継続的デプロイメント・パイプライン
• 一時サーバを活用したビルド
• 青緑デプロイメント + 自動コミット・アボート
• テストの並列実行と自動的なsharding
• literateプラグインと連携したブランチ毎の自動
ジョブ生成
- 34. ©2013 CloudBees, Inc. All Rights Reserved 34
サポートしたい処理の特徴
• 多段の処理を含む複雑なパイプライン
• ループや並列処理を含む非直線的な処理
• 再起動をまたぐ長時間ビルドのサポート
• 中断、確認、分岐などの人間との対話
• 一過性のエラーなどに便利な途中からの再開
• ジョブ間・組織間の処理の再利用
• 一箇所で処理を簡潔に記述
- 39. ©2013 CloudBees, Inc. All Rights Reserved 39
node(“linux”) {
git ‘https://github.com/foo/bar.git’
sh “mvn install”
parallel(
{ sh “./regression-test.sh” },
{ sh “./performance-test.sh” }
)
…
}
- 41. ©2013 CloudBees, Inc. All Rights Reserved 41
foo()
void foo() {
try {
sh ‘sleep 1h’
} finally {
sh ‘rm -rf *.tmp’
}
}
- 42. ©2013 CloudBees, Inc. All Rights Reserved 42
Groovyのフローの中断と再開
• 「継続渡し方式(CPS)」への変換
• カスタムのGroovyインタプリタで実行
• プログラムの状態をセーフポイントで永続化
• Jenkins起動後の状態の復元
– Pickle: 素直に永続化できないオブジェクトを処理す
る拡張ポイント
- 43. ©2013 CloudBees, Inc. All Rights Reserved 43
ビルドの中断と再開
• It “just works”
• ローカル変数やコールスタックも復元
• シェルなど外部プロセスも生き延びる
– スレーブの再接続
• Jenkins Enterprise: チェックポイントから再開
– 最初からやり直すのではなく途中からやり直す
– 元のビルドからアーティファクトなどを再利用
- 52. ©2013 CloudBees, Inc. All Rights Reserved 52
現状
• 難しい基盤のところは大体完成
• ユーザ・コミッタ募集中
• 現在 version 1.1
• LTSでも動きます
- 53. ©2013 CloudBees, Inc. All Rights Reserved 53
まとめ
• 複雑な活動を簡潔に指揮・記述
• 一つのジョブで必要な全てを記述
• GroovyによるDSL
• JVMのロスや再起動に耐えるデザイン
• 拡張性
• github.com/jenkinsci/workflow-plugin
- 54. ©2013 CloudBees, Inc. All Rights Reserved 54
ワークフロー
• github.com/jenkinsci/workflow-plugin
• 幾つもの新しい拡張ポイント
• Jenkins Enterpriseへの機能追加も予定してま
す
- 56. ©2013 CloudBees, Inc. All Rights Reserved 56
LTSのトレインモデルへの変更
メインリリース系列
LTSリリース系列
ベースラインを選ぶ
1.554.21.554.1 1.554.3
4週間毎のLTSリリース
- 57. ©2013 CloudBees, Inc. All Rights Reserved 57
LTSのトレインモデルへの変更
• アップグレードを事前計画するのが簡単
• LTSテストプロセスへの参加を容易に
- 58. ©2013 CloudBees, Inc. All Rights Reserved 58
受け入れテスト&ハーネス
• 実は古いプロジェクトの再生版v2
• 活発なアクティビティ
–コミット/週: 50+
–コミッタ: 22
–テスト: 365
–対象プラグイン: ~50
- 60. ©2013 CloudBees, Inc. All Rights Reserved 60
Class of problems we hope to catch
• Browser-specific issues
• Container-specific issues
• OS-specific issues
• Packaging-specific issues
• Problematic plugin combinations
• Plugin with newer versions of cores
- 61. ©2013 CloudBees, Inc. All Rights Reserved 61
This is for you, too
I want to make sure a new
version of Jenkins works in
my environment with my set
of plugins.
- 62. ©2013 CloudBees, Inc. All Rights Reserved 62
Reusability
• Make your tests our tests
• Amass a bigger pool of tests
- 63. ©2013 CloudBees, Inc. All Rights Reserved 63
Separately reusable pieces
Jenkins
Controller
Page Objects
JENKINS
HOME seeder
Machine
Provisioner
Docker
fixtures
Cucumber
integration
Geb + Spock Vagrant
JUT Process
pool
- 64. ©2013 CloudBees, Inc. All Rights Reserved 64
More work ahead
• More regular executions
–More target platforms
–More browsers
• Test stability improvements
• Expand to non-functional tests
- 66. ©2013 CloudBees, Inc. All Rights Reserved 66
More efficient master/slave communication
• NIO in remoting
–use a few threads to manage 100s of
slaves
• JNLP today, coming to CLI soon
• Maven2 jobs are a lot faster
- 70. ©2013 CloudBees, Inc. All Rights Reserved 70
“Eat our own dogfood” approach
• Continuous delivery pipeline for
our own infra
• Shout out to Puppet Labs for their
help
- 71. ©2013 CloudBees, Inc. All Rights Reserved 71
Infra Summary
• It’s all out there
–github.com/jenkins-infra/jenkins-infra
• Come join the infra team
–Work on cutting-edge stuff & brag about it
elsewhere
- 74. ©2013 CloudBees, Inc. All Rights Reserved 74
Conclusion
• So many exciting things going on in
the project
• Let’s build this together
- 75. ©2013 CloudBees, Inc. All Rights Reserved 75
Ops側の変更は最小に
• Chef
– カスタム・レポートハンドラとして実装
• Puppet
– 標準リポート形式をJenkinsにPOSTするだけ
• 求むフィードバック
– データをJenkinsに送るベストな方法