...

MobileFirst Foundation V8.0 開発構成ガイド 導入と構成

by user

on
Category: Documents
134

views

Report

Comments

Transcript

MobileFirst Foundation V8.0 開発構成ガイド 導入と構成
IBM MobileFirst Foundation V8.0
開発構成ガイド
導入と構成
日本IBM(株)
日本IBMシステムズ・エンジニアリング(株)
© 2016 IBM Corporation
ご説明順序
MobileFirst Foundationコンポーネント概要
MobileFirst Foundationサーバー基盤
MobileFirst Foundation複数サーバー構成パターン
MobileFirstアプリケーション管理
MobileFirst Foundation運用・監視
参考資料
© 2016 IBM Corporation
3
MobileFirst Foundation V8
コンポーネント概要
© 2016 IBM Corporation
4
MobileFirst Foundation V8のコンポーネント
IDE
Xcode,Android
Studio,Visual Studio
IDE
SDK
iOS
MobileFirst
Application Center
Device Runtime
Android
Windows 10 UWP
Windows 8.1
Windows Phone8.1
MobileFirst Server
MobileFirst Operetions Console
JSON
© 2016 IBM Corporation
5
MobileFirst Operations Console
• 管理者向けダッシュボード
• アプリケーションのデプロイ
• アプリケーションの管理およびバー
ジョン管理
• プッシュ通知の管理
• 分析サーバーとの統合
© 2016 IBM Corporation
7
MobileFirst Analytics
Webベースの分析ツールで、モバイルの状況および
サーバー・インフラストラクチャーを詳しく把握
例)ユーザー保持のデフォルト・レポート
異常終了レポート
カスタム・データおよびカスタム・グラフ
ネットワークの使用状況
プッシュ通知の結果
デバッグ・ログ収集
© 2016 IBM Corporation
8
Application Center
•
企業内アプリケーション・ストアとして以下のことが可能
• Android、iOS、Windows、Cordova、及びWebのクラ
イアント・アプリケーションをモバイル・デバイスに配
布
• アプリケーション削除/アクセス制御などのアプリケー
ション管理
• アプリケーションに関するフィードバックの表示
など
© 2016 IBM Corporation
9
MobileFirst Foundationの典型的なトポロジー
MobileFirst サーバー、Application Center、
MobileFirst Operations Console、Operational Analytics は、
アプリケーション・サーバー上で稼動
ベンダーのプッシュ・サービス
(Apple APN, Google GCM)
WAS Liberty Core (同梱)
or WAS or Tomcat
Mobile
Device
Internet
IHS
負荷分散
装置
plugin
plugin
WAS
Liberty
IBM Java
操作分析用サーバMobileFirst Operational Analytics
開発環境
• MobileFirst CLI
• MobileFirst Studio Plug-in
for Eclipse
Backend
System 2
IBM Java
IHS
・App Store/Google Play/
Windows Store/
Application Center/MDMなど
を利用してアプリをインストール
WAS
Liberty
Backend
System 1
DB
管理および
ランタイム
DB
AppCenter
DB
WAS Liberty Core (同梱)
or WAS or Tomcat
© 2016 IBM Corporation
10
(開発) MobileFirst Developer Kit
•
IBM MobileFirst™ Platform Foundation Developer Kitに含
まれているもの
• MobileFirst Development Server(開発用MobileFirst
Server )
• サンプル・アプリケーション
© 2016 IBM Corporation
11
(開発)MobileFirst CLI
• MobileFirst Server へのアプリケーションの登録・アプリケーション
の構成・アダプターの作成、ビルド、およびデプロイがコマンド・ラ
インで可能
© 2016 IBM Corporation
12
(開発)MobileFirst Studio Plug-in for Eclipse
• MFF CLI のラッパー
• Eclipse Marketplace で検索して導入
© 2016 IBM Corporation
13
MobileFirst Foundationサーバー基盤
© 2016 IBM Corporation
14
アーキテクチャー
DB
DB
MobileFirst Server
アダプター
MobileFirst Analytics
analytics-service.war)
Java Adapter
WARファイル
(サービスの実体)
MobileFirst Server
MobileFirst Server
mfp-push-service.war)
JavaScript HTTP Adapter
MobileFirst Operations
Console
(mfp-admin-ui-war)
mfp-live-update.war
MobileFirst Analytics
Console
analytics-ui.war)
JavaScript SQL Adapter
MobileFirst Server
MobileFirst Server
MobileFirst Server
mfp-admin-service.war
mfp-dev-artifacts.war
mfp-server.war
MobileFirst
• エンタープライズ・システムへの接続:
• セキュアなクライアント・サーバー接続
• バックエンド・データへの直接アクセス
• 認証
• 統一されたプッシュ通知用インターフェース
• クライアント制御:
• アプリケーションのバージョン管理
• アプリケーションのダイレクト・アップデート
• 既存の認証システムとの統合
• 利用状況の統計データ、ログの取得
© 2016 IBM Corporation
15
Operations Console
IT
/
© 2016 IBM Corporation
16
管理サービス
• MobileFirst Operations Console、REST APIもしくはCLIから利用し、そ
れらのバックエンドとして機能
• HTTPでの他のサービスと通信
•
以下の機能を提供
• 管理
•ランタイムとの通信
• ランタイムは管理サービスからサービスを提供する必要のあるアダプターお
よびアプリケーションのリストを取得する
•ライブ更新サービスとの通信
• 管理サービスはライブ更新サービスのMobileFirst 成果物についての構成情報
を保管および取得する
•Pushサービスとの通信
• 管理サービスがPushサービスにさまざまなプッシュ操作を要求
• 構成
•あるサーバーで登録したアプリケーション定義を別のサーバーへ転送し、アプリケ
ーション登録の手間を省くことができる
© 2016 IBM Corporation
17
ランタイム
Device Runtime
• クロスプラットフォーム互換レイヤー
• OSの違いを吸収
• サーバー統合フレームワーク
• アプリケーション統合をサポー
トするインフラストラクチャの
提供
• 暗号化された同期可能ストレージ
• 拡張クラッシュ及びプラットフォーム
レベルの例外キャプチャー
• モバイル分析用のイベント・キャプチ
ャー
© 2016 IBM Corporation
18
データベース
• 管理データベースとランタイム・データベースが1つに
MFPDATA
Push
MFPF
MFPF
APPCNTR
Application Center
Application Center
Application Center
© 2016 IBM Corporation
19
MobileFirst サーバー導入構成手順
• プロジェクトWARの手動デプロイが不要となり、Operations
Consoleとランタイムの構成が一回の手順で可能
• アプリケーション(.wlappファイル)のデプロイも不要に
1. 事前準備
IBM Installation Manager (IIM)、DB、Java EE サーバーのインストール・構成
2. MFF 用データベースの作成 (オプション)
1. データベース・アクセス・ユーザーの作成
2. データベース・インスタンスの作成
3. IIMによる MFF Serverのインストール
4. アプリケーション・サーバーの作成
5. Operations Console とランタイムのデプロイ
•
Ant タスク または サーバー構成ツール
6. インストール確認
MobileFirst コンソールへのアクセス
http://<host>:<Port>/mfpconsole
Application Center コンソールへのアクセス
http://<host>:<Port>/applicationcenter
© 2016 IBM Corporation
20
サーバー構成
• アプリケーション・サーバーにデプロイされている MobileFirst Server
Web アプリケーションの JNDI プロパティーを構成
JNDI
JNDI
(
(
mfp.admin.jmx.dmgr.port
mfp.admin.jmx.dmgr.host
mfp.admin.serverid
mfp.admin.jmx.user
JNDI
mfp.push.db.type
mfp.push.apns.proxy.host
JNDI
JNDI
mfp.db.relational.queryTimeout
(
JNDI
mfp.admin.jmx.dmgr.host
mfp.admin.jmx.dmgr.port
Liberty
mfp.admin.jmx.port
(
(
© 2016 IBM Corporation
mfp.push.db.cloudant.url
mfp.push.db.cloudant.dbName
21
MobileFirst Foundation複数サーバー
構成パターン
© 2016 IBM Corporation
22
WAS NDクラスター・トポロジー
MobileFIrst
Operations Console
、非対称または対称、またはその両方
のデプロイメントをサポート
• 同一サーバーまたはクラスター内
の対称デプロイメント
• 異なるサーバーまたはクラスター
内にランタイムと管理サービスが
2
ある非対称デプロイメント
• 対称および非対称のデプロイメン
MobileFIrst
ト
MobileFIrst
OperationsConsole
Console • 前面にリバースプロキシーを配置可能
Operations
MobileFirst Server
MobileFirstServer
Server
MobileFirst
MobileFirst Server
MobileFirstServer
Server
MobileFirst
•
ND セル
1
管理
DB
ライブ更新
DB
ランタイム1
DB
2
22
3
33
© 2016 IBM Corporation
ランタイム2
DB
ランタイム3
DB
23
サーバー・ファーム・トポロジー
•
•
Liberty Farm
Liberty
Liberty
2
MobileFIrst
Operations Console
MobileFIrst
Operations Console
MobileFirst Server
MobileFirst Server
MobileFirst Server
MobileFirst Server
•
管理サービス・データベースと
ランタイム・データベースを共有
ファーム内の各サーバーは、同じタ
イプのアプリケーション・サーバー
の Java™ 仮想マシン (JVM) でなけ
ればならない
対称デプロイメントのみをサポート
管理
DB
ライブ更新
DB
ランタイム1
DB
2
2
3
3
© 2016 IBM Corporation
ランタイム2
DB
ランタイム3
DB
24
Liberty 集合(Liberty Collective)トポロジー
Liberty 集合
Collective Member1
Member2
•集合の 1 つまたは複数のコントローラーに、1 つ
または複数の管理コンポーネントをデプロイ
•集合のクラスター・メンバーに、1 つまたは複数の
ランタイムをデプロイ
•1 つの MobileFirst Operations Console が、集合
のクラスター・メンバーにデプロイされた複数のラ
ンタイムを管理
ランタイム1
DB
2
2
22
3
33
ランタイム2
DB
ランタイム3
DB
Collective Controller
MobileFIrst Operations Console
管理
DB
ライブ更新
DB
© 2016 IBM Corporation
25
サーバー構成ツールを利用したファーム構成
• サーバー・ファームの構成がサーバー構成ツールから可能となった
• JNDIプロパティーの手動設定が不要となった
1. 事前準備(1回)
2. MFF Serverのインストール(1回)
3. アプリケーション・サーバーの作成
(メンバーごとに毎回)
4. Operations Console とランタイム
のデプロイ(メンバー毎に毎回)
5. ポート番号の書き換え
(初回以外毎回)
6. メンバー同士の鍵の交換
7. メンバー同士のトラストストア内の
HTTPS 証明書の交換
8. 稼動確認(メンバー毎)
© 2016 IBM Corporation
26
MobileFirst サーバーの
複数インスタンス構成
• コストと構成にかかる手数で適切なものを選択
• コスト高で手数少ないのはNDクラスター
• コスト低で手数多いのはLibertyファームとLiberty集合
WAS ND クラスター
Liberty
サーバー・ファーム構成
不要
要
不要
Collective構成
不要
不要
要
Web サーバー・
プラグイン構成ファイル
管理コンソール上のボタ
ンを押して生成
plug-in cfg marge or 手
動編集
wsadmin script
Java EE サーバーの
一般的な構成作業
管理コンソールで
1つのコンソールでセル全
体を構成可能
手動もしくはwsadmin
scriptによる自動化
手動もしくはwsadmin
scriptによる自動化
導入・構成・運用管理の
全体的な難易度
◎ (比較的易)
△(難)
○ (やや難)
ライセンス・保守費用
△
MFF + WAS ND
◎
MFF のみ
△
MFF+WAS ND
© 2016 IBM Corporation
ファーム
Liberty 集合
27
参考:Analyticsのノード設定パターン
• Analyticsにおけるノードは、サーバーに相当する
• 以下の3つのノード設定パターンが存在する
• マスター専用
• データ専用
• マスター・データ兼用
• デフォルトではマスター・データ兼用となる
• 以下をマスター適格ノードと呼ぶ
• マスター専用
• マスター・データ兼用
• マスター適格ノードからただひとつのマスター・ノードが投票(Vote)
により決定され、他のノードはデータ・ノードとして機能する
© 2016 IBM Corporation
28
参考:Analyticsの最小の高可用構成
• 高可用構成をとる場合、マスター適格ノードのうち1台がマスターノー
ド、他のノードはデータ・ノードとして機能
wpsrv13
Analytics
データ・
ノード
wpsrv14
Analytics
マスター・
ノード
wpsrv15
Analytics
データ・
ノード
ロード・バランサー
ロード・バランサー
MobileFirst
サーバー
Analytics
コンソール
© 2016 IBM Corporation
29
参考:Analyticsの高可用構成に必要なノード数
• Analyticsサーバーの高可用構成には最低3台のサーバが必要
定足数(quorum)
マスター
適格ノード数
1
2
3
1ノード
×
(SPOFとなるため)
N/A
N/A
2ノード
×
×
N/A
3ノード
(正常時、2つのマスター適格
ノードがお互いにマスター・
ノードになろうとする)
(異常時、マスター・ノードが
落ちた場合マスター決定が行
われない)
×
○
×
(2ないし3つのマスター適格
ノードがお互いにマスターノー
ドになろうとする)
(正常時、1ノード異常時と
もにマスター決定が行われ
る)
(異常時、マスターノードが落
ちた場合マスター決定が行わ
れない)
※定足数(quorum):投票開始のために必要な最少数
多くの場合、(ノード数/2)の端数を切り捨てたもの+1で計算
© 2016 IBM Corporation
30
MobileFirstアプリケーション管理
© 2016 IBM Corporation
31
MobileFirstアプリケーションの実行イメージ
MobileFirst Server
プッシュ
インストール
通信
通信
バックエンド・システム
JSON
データベース
通信
モバイル
ユーザー
MFPDATA
通信
分析結果等の取得
ランタイムDBと管理DBが
1つに
MobileFirst Operetions Console/
REST API/MobileFirst CLI
管理操作
通信
MFP
Operational Analytics
管理者
デプロイ/更新/削除
MobileFirst Application Center
デプロイ/更新/削除
開発者、テスター
組織内利用者
開発チーム向け配信
通信
データベース
APPCNTR
インストール
© 2016 IBM Corporation
32
アプリケーションの登録/更新/削除
• .wlappファイルのデプロイは不要となり、アプリケーション定義
のみを登録/更新/削除
© 2016 IBM Corporation
33
アプリケーション管理 インポート/エクスポート
• アプリケーション定義をコンソールでインポート/エクスポート
可能
© 2016 IBM Corporation
34
アダプター管理 デプロイ/削除
• 開発・ビルドしたアダプターをデプロイ/削除
© 2016 IBM Corporation
35
アダプター管理 インポート/エクスポート
• アダプターをコンソールからインポート/エクスポート可能
© 2016 IBM Corporation
36
アプリケーションのダイレクト・アップデート
• WebリソースをMobileFirstサーバーから直接アップデート可能
②アプリケーションの
ダウンロード
④Webリソース(Cordova)
のアップデートをチェック
①アプリケーションの
デプロイ
⑤アップデートされた
Webリソースを受信
③更新アプリケーションの
デプロイ
© 2016 IBM Corporation
37
ライブ更新(Live Update) サービス
• Operations Console 上からクライアント・アプリケーションの
フィーチャーのON/OFFが可能
モバイル
ユーザー
Foundation SDK
Live Update SDK
MobileFirst Server
Live Update
adapter
Segment
Resolver
adapter
Client Application
Configuration Service
© 2016 IBM Corporation
38
MobileFirst Foundation運用・監視
© 2016 IBM Corporation
39
バックアップ取得対象
MFFインストール・ディレクトリ
<MobileFirst_install_root>
ApplicationCenter
MobileFirstServer
Libertyプロファイル・ディレクトリ
<Liberty_root>
• バックアップ取得対象
• MFF インストール・ディレクトリ
• Java EE サーバーの構成ファイル類
• Libertyの場合はサーバーディレクトリ
• WASの場合はプロファイル・ディレクトリ
※使用しているJava EEサーバーのガイドに従う
• データベース
usr
servers
•
•
MFPDATA
APPCNTR
mobilefirstserver
WASプロファイル・ディレクトリ
<Profile_root>
config
MobileFirst サーバーの構成ファイルはMobileFirst
サーバーの JNDI 環境項目に含まれる。
プロジェクト WARについてはV8からデプロイが不要
となったため、管理対象からはずす
etc
installedApps
properties
© 2016 IBM Corporation
40
バックアップのタイミング
• 不定期バックアップ
• インストール直後、Fix適用の前後、構成変更時に取得
• バックアップ取得対象
•
•
•
MFPF インストール・ディレクトリ
Java EE サーバーの構成ファイル類
データベース
• 定期バックアップ
• 日時バッチなどで定期的に取得
• バックアップ取得対象
•
•
データベース
Analytics 分析データ (analyticsData ディレクトリ)
- 分析データはサーバー稼働に必要なものではないので、リストアするものではない
© 2016 IBM Corporation
41
ロギングとモニタリング
•基本的なロギングのメカニズムは アプリケーション・サーバー依存
•MobileFirst のログはすべて com.ibm.mfp で始まる
•Application Center のログは com.ibm.puremeap で始まる
/
com.ibm.mfp.server.js.adapter
FINEST
mfp.admin.audit
MobileFirst Operations Console
Liberty
JVM
<LIBERTY_ROOT>/usr/servers/<moblefirstserver>/logs/messages.
log
SystemOut SystemErr
WAS
JVM
<PROFILE_ROOT>/logs/<
<PROFILE_ROOT>/logs/<
>/SystemOut.log (
>/SystemErr.log (
)
)
com.ibm.mfp.server.security
FINEST
© 2016 IBM Corporation
42
監査ログ
•すべての管理操作の監査ログを格納
•ログイン/ログアウトの監査ログ
•アダプターのデプロイやアプリケーションのロック
© 2016 IBM Corporation
43
ハウスキーピング
•
ログ・メンテナンス
MobileFirst サーバー
• 独自の仕組みでのログ出力はないため、
Web アプリケーション・サーバーのログ
・メンテナンスにより実施
Analyticsサーバー
• デフォルトでは無限に保存されるため、
データ・パージ設定が必須
•
V7.1にあった稼動確認用クエリーURLは廃止された
© 2016 IBM Corporation
44
監視
•MobileFirst サーバーの監視は、一般的なWebアプリケーションの監視
と同様
• プロセス監視
• Java EE サーバーのプロセス
• データベース・サーバー・プロセス
• TCPポート監視
• ログ監視
• 特定文字列監視
• リソース監視
• CPU使用率
• メモリ使用率
• ディスク使用率
• JVM GC
© 2016 IBM Corporation
45
参考資料
© 2016 IBM Corporation
46
参考文献
•
•
MobileFirst Foundation {dev} – IBM MobileFirst Foundation 8.0
• https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/
IBM MobileFirst Platform V8.0 ドキュメンテーション
• http://www.ibm.com/support/knowledgecenter/ja/SSHS8R_8.0.0/wl_
welcome.html
© 2016 IBM Corporation
47
© Copyright IBM Corporation 2012. All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind,
express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have
the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM
software. References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities
referenced in these materials may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature
availability in any way. IBM, the IBM logo, Rational, the Rational logo, Telelogic, the Telelogic logo, and other IBM products and services are trademarks of the International Business Machines
Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others.
© 2016 IBM Corporation
48
Fly UP