LoginSignup
2
2

More than 5 years have passed since last update.

Flo for Spring XD でグラフィカルに XD をあつかう話

Last updated at Posted at 2015-12-02

Spring XD がなかなか面白いので、ドキュメントにあるような、グラフィカルな操作を実現するためのセットアップを試してみたメモ。

まず、はじめに大前提なのですが、公式サイトにあるような、ジョブネットちっくな UI は、ただ Spring XD をセットアップするだけではついてきません。
公式サイトに画面キャプチャが貼りつけられているので、勘違いしてしまいますが、この機能はバンドルされてもいませんし、追加機能のダウンロードも spring.io ではできません。

以下のような。
スクリーンショット 2015-12-02 20.13.33.png

これが欲しくて、セットアップ方法を調べてみました。

環境

以下のとおり。

$ sw_vers -productName
Mac OS X
$ sw_vers -productVersion
10.10.3
$ xd-singlenode
 _____                           __   _______
/  ___|          (-)             \ \ / /  _  \
\ `--. _ __  _ __ _ _ __   __ _   \ V /| | | |
 `--. \ '_ \| '__| | '_ \ / _` |  / ^ \| | | |
/\__/ / |_) | |  | | | | | (_| | / / \ \ |/ /
\____/| .__/|_|  |_|_| |_|\__, | \/   \/___/
      | |                  __/ |
      |_|                 |___/
1.3.0.RELEASE                    eXtreme Data

...

以前セットアップした環境を引き続き利用します。
Spring XD のセットアップを試してみた話

Flo for Spring XD の入手

Pivotal のサイトから入手できる。
Download Flo for Spring XD — Pivotal Network

ダウンロードしようとするとログインを求められるので、アカウントを持っていない場合は作成する。
2015-12-02 現在、このアカウント作成が、実は地味にめんどくさい。
めんどくさいので、この手順含めて残しておきます。

先のサイトからダウンロードを始めようとすると、サインインを促すダイアログが表示される。
ここでは [Sign In] で進める。
スクリーンショット 2015-12-02 20.38.32.png

サインイン画面に移動するので、[Create account] から、アカウントの作成に進みます。
スクリーンショット 2015-12-02 20.39.58.png

ユーザー名として使用されるメールアドレスを入力します。
登録したメールアドレスに確認メールが届くので、メール内の確認リンクを踏んでさらに進めます。
m スクリーンショット 2015-12-02 20.42.17.png

パスワードを設定します。
I have read and agree to the Term of Service for Pivotal Web Services にチェックを入れて、[Sign Up Now] でアカウントを作成します。
m スクリーンショット 2015-12-02 20.45.57.png

続いてプロファイル情報の設定。
コメの付いてるとこを入力して、政府関係組織に勤めていたり、政府からのお仕事で使おうと思ってるアカウントなら、ARE YOU A GOVERNMENT EMPLOYEE OR DOWNLOADING ON BEHALF OF A GOVERNMENT AGENCY? で "Yes"、そうじゃないなら、"No" を選ぶ。
By checking this box, I am representing that I have read, understand, and accept the Terms of Use and the Cookie & Privacy Policy. にもチェックを入れて [Join]。
m スクリーンショット 2015-12-02 20.49.57.png

このあと、さらにいろいろな情報の入力を促されるものの、ここまでで十分なので、ここで先ほどのダウンロードページ (Download Flo for Spring XD — Pivotal Network) まで戻り、ダウンロードをはじめます。
スクリーンショット 2015-12-02 20.50.29.png

使用許諾の確認が求められるので [Agree]。
ここまでで、やっとダウンロードがはじまります。
ながかった。
スクリーンショット 2015-12-02 20.51.51.png

Flo for Spring XD の適用

ここからいよいよ、やっとの思いで手に入れた flo-spring-xd-admin-ui-client-1.3.0.RELEASE.zip の適用に移る。

公式のインストールマニュアルは以下。
Installing Flo | Pivotal Docs

はじめに、Spring XD のインストールパスを確認する。

$ which xd-singlenode
/usr/local/bin/xd-singlenode
$ ls -al /usr/local/bin/xd-singlenode
lrwxr-xr-x  1 yoichi.kikuchi  admin  50 11 30 10:45 /usr/local/bin/xd-singlenode -> ../Cellar/springxd/1.3.0.RELEASE/bin/xd-singlenode

/usr/local/Cellar/springxd/1.3.0.RELEASE にインストールされているようなので、必ずバックアップを取り、先ほど入手した zip を以下のとおり移動、展開する。

この zip を展開すると spring-xd-admin-ui-client-1.3.0.RELEASE.jar というファイルが出てくるのだが、これはすでに /usr/local/Cellar/springxd/1.3.0.RELEASE/libexec/xd/lib/ に配置済みのファイルであり、これを上書きすることで機能を適用するということのようで、公式のマニュアルにもバックアップの取得が手順として盛り込まれている。

$ cp spring-xd-admin-ui-client-1.3.0.RELEASE.jar spring-xd-admin-ui-client-1.3.0.RELEASE.jar.bak
$ mv ~/Downloads/flo-spring-xd-admin-ui-client-1.3.0.RELEASE.zip /usr/local/Cellar/springxd/1.3.0.RELEASE/libexec/xd/lib/
$ unzip flo-spring-xd-admin-ui-client-1.3.0.RELEASE.zip
Archive:  flo-spring-xd-admin-ui-client-1.3.0.RELEASE.zip
replace spring-xd-admin-ui-client-1.3.0.RELEASE.jar? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
  inflating: spring-xd-admin-ui-client-1.3.0.RELEASE.jar

インストールはこれだけで完了。
xd-singlenode を起動していたら再起動をして、あとは ブラウザキャッシュをクリアする と、適用が確認できるようになる。

$ kill `ps aux | grep xd-singlenode | grep -v grep | awk '{print $2}'`
$ xd-singlenode &

Streams の作成画面が随分とリッチになりました。
スクリーンショット 2015-12-02 21.58.58.png

ここまでできると、これまで xd-shell が必要だった Stream の作成操作がドラッグ&ドロップで行えるようになります。
実際に簡単なものを作成してみるのはまた次に回しますが、これで非常にラクに Stream を作成することができるようになりました。

使用感などについては、ビデオもどうぞ。
Flo for Spring XD: Advanced Stream creation - YouTube
Flo for Spring XD: Composed Batch Job Orchestration - YouTube

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2