はじめに
BIツールを使えるようになりたいと思い、オープンソースの__Pentaho__を使ってみます。勉強なので一から試してみます。
とりあえず試す
DockerHubにosuo/pentaho-biserver-ceというのを作りました。これをこんな感じで動かします。サンプルを確認できるようになるまで、結構な時間がかかります。気長に。
$ docker run --rm --name pentaho -p 8080:8080 osuo/pentaho-biserver-ce
コンソールにログがでます。こんな感じになったら起動完了です。
※ここまで待たなくてもログインできましたが、サンプルファイルがなかったりしたので、待つのが無難だと。
・・・
2015/12/19 17:59:48 - RepositoriesMeta - Reading repositories XML file: FromInputStream
2015/12/19 17:59:48 - General - Creating repository meta store interface
2015/12/19 17:59:48 - General - Connected to the enterprise repository
2015/12/19 18:00:08 - RepositoriesMeta - Reading repositories XML file: FromInputStream
2015/12/19 18:00:08 - General - Creating repository meta store interface
2015/12/19 18:00:08 - General - Connected to the enterprise repository
2015/12/19 18:00:11 - RepositoriesMeta - Reading repositories XML file: FromInputStream
2015/12/19 18:00:11 - General - Creating repository meta store interface
2015/12/19 18:00:11 - General - Connected to the enterprise repository
2015/12/19 18:00:18 - RepositoriesMeta - Reading repositories XML file: FromInputStream
2015/12/19 18:00:18 - General - Creating repository meta store interface
2015/12/19 18:00:18 - General - Connected to the enterprise repository
2015/12/19 18:00:21 - RepositoriesMeta - Reading repositories XML file: FromInputStream
2015/12/19 18:00:21 - General - Creating repository meta store interface
2015/12/19 18:00:21 - General - Connected to the enterprise repository
2015/12/19 18:00:24 - RepositoriesMeta - Reading repositories XML file: FromInputStream
2015/12/19 18:00:24 - General - Creating repository meta store interface
2015/12/19 18:00:24 - General - Connected to the enterprise repository
2015/12/19 18:00:27 - RepositoriesMeta - Reading repositories XML file: FromInputStream
2015/12/19 18:00:27 - General - Creating repository meta store interface
2015/12/19 18:00:27 - General - Connected to the enterprise repository
2015/12/19 18:00:29 - RepositoriesMeta - Reading repositories XML file: FromInputStream
2015/12/19 18:00:29 - General - Creating repository meta store interface
2015/12/19 18:00:29 - General - Connected to the enterprise repository
ブラウザで、__DockerHostのIP:8080__にアクセスします。
__評価者としてログイン__という箇所があるので、そこをクリックして、ユーザAdminの__Go__をでログインします。
サンプルファイルを確認します。
__ホーム→ファイルを参照__と選択して、ファイル参照画面に進みます。
__Public/Steel Wheels/Analysis__選択して、__2005 Q1 Product Analysis.xjpivot__を開きます。
警告出てますが、フィルターを変更したり、ドリルダウンしたりと色々操作ができます。
PentahoDockerイメージ構築用のDockerfile
こんな感じにしました。pentahoの初回起動時の確認を回避する処理と、Tomcatをフォアグラウンドで実行する処理などを入れてあります。
ROM java
MAINTAINER Kazumasa Hagihara <hagihara.k@gmail.com>
ENV ARCHIVE biserver-ce-6.0.1.0-386.zip
ENV PENTAHO_HOME /opt/biserver-ce
#RUN curl -L -s -o $ARCHIVE http://downloads.sourceforge.net/project/pentaho/Business%20Intelligence%20Server/6.0/biserver-ce-6.0.1.0-386.zip?r=http%3A%2F%2Fcommunity.pentaho.com%2F&ts=1450533981&use_mirror=jaist
COPY archives/$ARCHIVE /
RUN unzip $ARCHIVE -d /opt
RUN rm $ARCHIVE
# 初回起動時のチェックを回避する
RUN rm $PENTAHO_HOME/promptuser.sh
# 不要なshをなくす
RUN sed -i -e 's/sh startup.sh/exec \.\/startup.sh/' $PENTAHO_HOME/start-pentaho.sh
RUN sed -i -e 's/sh shutdown.sh/exec \.\/shutdown.sh/' $PENTAHO_HOME/stop-pentaho.sh
# tomcatをフォアグアウンドで動かす
RUN sed -i -e 's/\(exec ".*"\) start/\1 run/' $PENTAHO_HOME/tomcat/bin/startup.sh
EXPOSE 8080 9001
ENTRYPOINT ["/opt/biserver-ce/start-pentaho.sh"]
SourceForgeからPentahoのアーカイブをダウンロードしたかったのですが、なんだかうまくいかず断念。。。事前にダウンロードしたアーカイブを__archives__フォルダに配置しています。
メモ
DockerHubにはDockerイメージが幾つかあります。なのですが、CEの6.0相当の物を探して試すも、サンプルファイルの確認でエラーになってしましました。(きっとJDBC周りの設定が足りていないのだと思います。)
次はPDIです。