Oracle Developer Cloudで実践する効率的なDevOps [Oracle Cloud Days Tokyo 2016]
-
date post
16-Apr-2017 -
Category
Technology
-
view
154 -
download
2
Transcript of Oracle Developer Cloudで実践する効率的なDevOps [Oracle Cloud Days Tokyo 2016]
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
効率的なDevOps実践は可能か – 必要なノウハウを集約した開発者用クラウドとは!?
クラウド・テクノロジー事業統括
Fusion Middleware事業本部
担当マネージャ
伊藤 敬
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
•以下の事項は、弊社の一般的な製品の方向性に関する概要を説明するものです。また、情報提供を唯一の目的とするものであり、いかなる契約にも組み込むことはできません。以下の事項は、マテリアルやコード、機能を提供することをコミットメント(確約)するものではないため、購買決定を行う際の判断材料になさらないで下さい。オラクル製品に関して記載されている機能の開発、リリースおよび時期については、弊社の裁量により決定されます。
OracleとJavaは、Oracle Corporation 及びその子会社、関連会社の米国及びその他の国における登録商標です。 文中の社名、商品名等は各社の商標または登録商標である場合があります。
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
ビジネスニーズに応じた企業システムの拡大(イメージ)
Enterprise System
Mission Critical
Microservices
DevOps
Cloud Java EE
Multi Language on JVM
SoE (Systems of
Engagement)
SoR (Systems of
Record)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
A Billion Smartphones Require New Systems Of Engagement - Ted Schadler's Blog SoE - “Systems of Engagement”とは何か
http://blogs.forrester.com/ted_schadler/12-02-14-a_billion_smartphones_require_new_systems_of_engagement
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
DevOps以前
いますぐ変更を 反映したい のに。。
安定運用 したいのに。。
開発 運用
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
DevOps Principles テクノロジーが開発手法の進化を可能にする
Development (開発)
Operations (運用)
Devops
New Goal: 新機能の追加と平行した システムの安定・持続運用
6
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Plan
Code
Build
Test
Release
Deploy
Operate
Monitor
DevOps
• DevOpsとは、 開発 (Development) と運用 (Operations) が協力し、ビジネス要求に対して、より柔軟に、スピーディに対応できるシステムを構築 するための開発方法論
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
FASTER RELEASES
• ビジネスニーズに即した 迅速性
• サービス停止少なく頻繁な リリース
SAVE MONEY
• 手作業の削減で開発コスト を削減
• 自動化によるヒューマンエラー の回避
FOCUS ON BUSINESS
• 単価の高いエンジニアを 利益の高い作業に フォーカスさせる
DevOps 実践で得られるメリット
8
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
CD CI
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
DevOpsの中核的方法論 CI: 継続的インテグレーション(Continuous Integration)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
DEVELOP
REVISION CONTROL
Developer Cloud Service
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Developer Cloud Serviceを利用したDevOps実践の特長
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Developer Cloud Serviceを利用したDevOpsの実践(部分)
Developer Cloud Service
管理やQAテスト Web サービスコンソールを活用 • Home画面で最近のアクティビティの確認 • 課題管理 • コードレビュー • ビルド
PC/タブレット/スマートフォン
IDE、Gitコマンドライン、Mavenコマンドラインを利用 • プライベートGitリポジトリを利用して開発 • プライベートMavenリポジトリを利用して開発
開発(コーディング、ビルド、単体テスト)
PC
WebLogic Server
Oracle Java Cloud Service
•Hudson成果物を クラウド内デプロイ (自動/手動)
•Mavenダウンロード •Hudson成果物のダウンロード
アプリケーション・デプロイ
自社APサーバー
war
war
zip Tomcat, JBoss,
Node.js, etc
Oracle Application Container Cloud Service
•Hudson成果物を クラウド内デプロイ (自動/手動) CI CD
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
利点①:開発・テスト用サーバーを用意しなくてよい 準備が速い・低リスク・身軽な開発環境
開発端末 社内
ネットワーク 接続
開発リソースの準備
インストールや セキュリティ設定など
(VM/OS/Tools)
インターネット 接続
サーバー ストレージ など
調達
Oracle Public Cloud PaaS
データセンターやサーバールームの準備
開発端末 開発チーム
開発チーム
PaaSクラウド利用の準備
数週間 数週間
開発リソースの準備
数日
セットアップ
•すぐに開発開始 •身軽な開発環境 •開発環境の構築が低リスク 後で拡張・縮退可 従量課金
通常ケース
Oralce Public Cloudを利用
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
利点②:クラウド内にツール群が整備、開発にすぐ着手可能
• 学習コストが低い
– Developer Cloud Serviceの中の開発ツールはオープンソース開発で流行のものがベース
• プロジェクトの作成は簡単・スピーディ
– Developer Cloud Serviceのプロジェクトは1分未満でプロビジョニングされる
• 新しいメンバーも開発ツールに簡単アクセス
– プロジェクトにメンバーのメールアドレスを追加するだけ
– プロジェクト画面から、各開発ツールへはタブで選択可能。各開発ツールへの個別URLを覚える必要なし。
Developer Cloud Service ProjectA
Developer Cloud Service ProjectB
Git
Issues
Build
Review
Wiki
プロジェクトB プロジェクトA
Git
Issues
Build
Review
Wiki Deploy Deploy
• 流行の開発ツールで学習コスト低! • プロジェクト画面から各種ツールに簡単アクセス • 接続先プロジェクトの切替だけで開発プロジェクト変更
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
利点③:継続的インテグレーション(CI)の導入が簡単
• Developer Cloud Serviceは継続的インテグレーションを簡単に導入するための機能を用意
– Gitブランチのレビューとマージ
– 自動ビルド
– 自動デプロイ
• ブランチ毎にアプリケーションをデプロイし、複数テストを同時実行
開発 テスト用
JCSインスタンス
ブランチA
Git コミット
ビルド& Junitテスト
ジョブA
Java Cloud にデプロイ
デプロイ 設定A
Java Cloudでテスト
Java Cloud にデプロイ
QA テスト用
JCSインスタンス
デプロイ 設定
ブランチB ジョブB デプロイ 設定B
デプロイ 設定
master ブランチ ビルド
master ビルドジョブ
開発フロー
QAフロー
コード レビュー
ブランチA コード
ブランチB コード
ブランチ マージ
ブランチA をmasterへ
ブランチB をmasterへ
master ビルドジョブ
Java Cloudでテスト
ビルド・デプロイを自動化可能
ビルド・デプロイを自動化可能
機能A完了
機能B完了
開発完了
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
利点④: Oracle Public Cloudで開発の実行環境をオンデマンドに拡張・縮退
• 開発フェーズに沿ってアプリケーションやデータベースの実行環境を拡張
– 開発の初期は必要最小限のリソース
– 開発・テスト人数多くなってきたら少しずつ拡張 • Java Cloud Service及びDatabase Cloud Serviceはスケールイン・スケールダウン機能でCPUやメモリの拡張・縮退が簡単
• Java Cloud Service及びDatabase Cloud Serviceはインスタンスを増やして環境面の追加が簡単
– Developer Cloud Service側はデプロイ設定の追加だけで追加対応可能
JCS01 DBCS01
プロトタイプ開発フェーズ
JCS01(開発用) DBCS01(開発用)
開発初期フェーズ
node CPU
node CPU
node CPU CPU
node CPU CPU
CPU CPU CPU CPU
開発後期フェーズ
JCS01(開発用) DBCS01(開発用)
node CPU CPU
node CPU CPU
CPU CPU CPU CPU
JCS02(QA用) DBCS02(QA用)
node CPU CPU
node CPU CPU
CPU CPU CPU CPU
Java Cloud Serviceインスタンス
ノード CPU 凡例 Database Cloud Serviceインスタンス
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
利点⑤:柔軟なリモートチーム型開発 Developer Cloud Serviceで必要なのは端末とインターネット接続だけ
• 場所に縛られない開発
– 一つのチームで小規模の開発プロジェクトを複数担当
– 専門技術者が複数プロジェクトを担当。例えば、
• プロダクト・マネージャーが複数プロジェクトを管理
• 自動化が得意な開発者が複数のプロジェクトの自動化を担当
• コードレビューをシステム上でリモートに実施
– レビュープロセスを全てシステム上で完結。より日常的にレビューを実施することができます。
• 進捗確認の会議を少なく
– Developer Cloud Serviceの画面で開発チームの直近のアクティビティを把握。課題の進捗を把握。
Project B Project A Project C
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Plan
Code
Build
Test
Release
Deploy
Operate
Monitor
Developer Cloud Service -> “Plan”
• Agile プロジェクト マネジメント
• Wiki
• Issueトラッキング
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Agile / Sprintプランニング
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Agile Reports による進捗管理
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Plan
Code
Build
Test
Release
Deploy
Operate
Monitor
Developer Cloud Service -> “Code”
• Gitリポジトリ
• クラウド上でのコーディング
• コードレビュー
• IDEとの連携
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Gitによるソースコード開発
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Gitソースコード管理
• プライベートGitリポジトリ
– Developer Cloud Serviceプロジェクト内に複数のGitリポジトリを管理可能
• ソースコード表示
– Webブラウザ上でGitリポジトリ内のコミットやファイル差分を確認
– ブランチやタグの作成もブラウザから実行可能
• 外部Gitリポジトリの管理
– GitHubなどの外部Gitリポジトリを登録し、プロジェクトのGitリポジトリと同じ様に管理可能
リビジョンの表示
ファイル差分の表示
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Web上のGitリポジトリの操作
Developer Cloud Service のGitリポジトリ
プロジェクト内のGitリポジトリの表示
新規作成ではGitHubなど外部からインポート可能
ソースコード表示画面ではリポジトリやブランチの切り替えが簡単
リポジトリの追加
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
統合開発環境(IDE)インテグレーション • Oracle Enterprise Pack for EclipseとNetBeansには
Oracle Cloud専用のプラグインが追加
• Developer Cloud Serivceの以下の情報にアクセス可能
– Gitリポジトリ • 通常のEclipseのEGitのリポジトリとして利用可能
– Tasks • Eclipseの場合MylynでIssuesを管理
– Build • ジョブ履歴と結果表示や成果物ファイルのダウンロード
• ジョブ実行
• まとめて一つのIDEで表示・操作可能
– 複数のOracle Cloud (Identity Domain)接続
– 複数のDeveloper Cloud Serviceプロジェクト
Oracle Enterprise for EclipseのOracle Cloudビュー
Oracle Cloud 接続
Developer Cloud Serviceプロジェクト
Gitリポジトリ
Tasks(課題)
Hudson ジョブ履歴
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Plan
Code
Build
Test
Release
Deploy
Operate
Monitor
Developer Cloud Service -> “Build”
• メジャーなビルド・フレームワークを サポート
• BuildレポートとNotifications
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
プロジェクト用Mavenリポジトリ
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
チーム開発に簡単利用!
• チーム内Mavenリポジトリの用途
– プロジェクト共通ライブラリの管理
– サードパーティ・ライブラリのチーム内共有
– アプリケーション成果物の管理
簡単に使えるMavenリポジトリ
アプリケーション コード
共通ライブラリ コード
Developer Cloud Service Mavenリポジトリ
共通ライブラリ
外部ライブラリ
ビルドから 自動アップロード(mvn deploy)
ブラウザ
手動で アップロード
ビルド
ビルド
アプリケーション
ビルドから 自動アップロード(mvn deploy)
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Hudsonでビルドとデプロイを自動化
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Hudsonビルド • Hudsonをベースとしたビルド機能
• サポートされているビルド・ステップ
– Maven3またはMaven2の実行 / Ant実行 / シェル実行
• プライベートMavenリポジトリと連携
– ライブラリをビルドしてプライベートMavenリポジトリに登録
– プライベートMavenリポジトリ内のライブラリをダウンロードして、アプリケーションをビルド
• ビルドの例
– ソースコードをコンパイルしてアプリケーション・ファイル(jar/war/earなど)を作成(パッケージ)
– テストコードのJUnitテストを実施
– シェルからcURLを使い、Java Cloud Service REST APIで、Java Cloud Serviceの操作も可能
ビルド画面
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Plan
Code
Build
Test
Release
Deploy
Operate
Monitor
Developer Cloud Service -> “Test”
• JUnit
• Selenium
• FindBugs
• QAデプロイ
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Developer Cloud Serviceでテスト自動化
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
• Selenium IDEを使って記録したWebDriverテストスクリプト
• Developer CloudはXvfbをサポート – GUIなしのFirefoxのSelenium WebDriverテストが可能
Developer Cloudでできる自動テスト① Selenium WebDriverを利用
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
• Apache JMeterを使ってJava Cloud Serviceに簡易な負荷テストを実行
• Developer Cloud Serviceにテストをジョブとして登録し、いつでもテストが実施可能に
• jmeter-maven-plugin (https://github.com/jmeter-maven-plugin/jmeter-maven-plugin)を利用すればMavenから簡単にJMeterのインストールと実行が可能
• JMeterの結果ファイルをアーチファクト保存して結果を参照
Developer Cloudでできる自動テスト② jmeter-maven-plugin を利用
Java Cloud Service
WebLogic サーバー
Developer Cloud Service
ビルドVM
JMeter
多重 Webリクエスト
ジョブ実行
Maven Central
Repository
download
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
• Seleniumテストで多重度テストをしてみたい場合に利用
• JMeterのJUnitサンプラーを利用
Developer Cloudでできる自動テスト③ JMeter + Selenium
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Plan
Code
Build
Test
Release
Deploy
Operate
Monitor
Oracle Cloud Services -> “Deploy”
•利用が容易なデプロイメント・プラットフォーム
• Developer Cloud Serviceから以下に直接デプロイできる – Java Cloud Service
• Java EE in the Cloud
– Application Container Cloud • Java SE, NodeJS, PHP, Ruby*, Python*
– Mobile Cloud Service
– Container Cloud Service • Docker Containers
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Plan
Code
Build
Test
Release
Deploy
Operate
Monitor
Oracle Management Cloud -> “Monitor”
01100100 01100001 01110100 01100001 0110010001100001 01110100 0100 0110000101100100 01100001 01110100 01100001 0110010001100001 01011 01110100110000101100100 01100001 01110100 110000101100100 01100001 01110100 011000010110010001100001 01110100 110000101100100 0100111 01100001 01110100110000101100100 01100001 01110100 01100001 011010 0110010001100001 0111010001100001 0110010001100001 01110100 01001 01100001 0110010001100001 0111010001100001 0110010001100001 01001 01110100 01100001 0110010001100001 0111010001100001 0100101001 001 0110010001100001 01110100 01100001 011001000110000101110100 010011 01100001 0110010001100001 01110100 01100001 01100100 0110000101001 01110100 01100001 0110010001100001 01110100 01100001 01100100 0100 0110000101110100 01100001 0110010001100001 01110100 01000100 0100 11000010110010001100001 01110100 110000101100100 01100001 01110100 01100001 011001000110000101110100 110000101100100 01100001 010001 01110100 110000101100100 0110000101110100 01100001 01000100 010011 0110010001100001 01110100 011000010110010001100001 01110100 01000 01110100 110000101100100 01100001 0111010001100001 01000100 010011 0110010001100001 01110100 01100001 011001000110000101110100 010011
END USER EXPERIENCE
APPLICATION
MIDDLE TIER
DATA TIER
VIRTUALIZATION TIER
VM CONTAINER
INFRASTRUCTURE TIER
VM CONTAINER
Real UsersSynthetic Users
Unified Platform
App metricsTransactions
Server metricsDiagnosticsLogs
Host metricsVM metricsContainer metrics
CMDBTicketsAlerts
INTELLIGENT, UNIFIED PLATFORM…
POWERED BY MACHINE LEARNING
COMPLETE, INTEGRATED SUITE
HETEROGENEOUS AND OPEN
✔
✔
✔
✔
• 異種環境へのインテリジェントな管理を実現
• オペレーション情報は一括統合
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
“トライアル”でDeveloper Cloud Service/DevOpsを体験!
• 30日間無料トライアルを お試しいただけます!
• Developer Cloud Service、Java Cloud、Database Cloudがご利用いただけます
• 是非お試しください!
• 日本オラクルのホームページからご利用いただけます
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Oracle Public Cloud を
システム担当者1人 いれば簡単に導入できるサーヒス
「Oracle Cloud スタータパック」
OLTPに最適なチューニング済みの環境を 簡単に構築し、お客様の負荷を軽減
お問い合わせ先 :ソフトバンク コマース&サービス株式会社 IT-EXchangeのIDをお持ちのお客様 : http://www.it-ex.com/ 新規のお客様 : http://cas.softbank.jp/contact/form/partner.html
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Oracle Digitalは、オラクル製品の導入をご検討いただく際の総合窓口。 電話とインターネットによるダイレクトなコニュニケーションで、どんなお問い合わせにもすばやく対応します。
もちろん、無償。どんなことでも、ご相談ください。
Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |