LoginSignup
2
4

More than 5 years have passed since last update.

PentahoのDockerイメージを作って試す

Last updated at Posted at 2015-12-19

はじめに

BIツールを使えるようになりたいと思い、オープンソースのPentahoを使ってみます。勉強なので一から試してみます。

とりあえず試す

DockerHubにosuo/pentaho-biserver-ceというのを作りました。これをこんな感じで動かします。サンプルを確認できるようになるまで、結構な時間がかかります。気長に。

$ docker run --rm --name pentaho -p 8080:8080 osuo/pentaho-biserver-ce

コンソールにログがでます。こんな感じになったら起動完了です。
※ここまで待たなくてもログインできましたが、サンプルファイルがなかったりしたので、待つのが無難だと。

log
・・・
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にアクセスします。

スクリーンショット 2015-12-20 3.05.09.png

評価者としてログインという箇所があるので、そこをクリックして、ユーザAdminのGoをでログインします。

サンプルファイルを確認します。
ホーム→ファイルを参照と選択して、ファイル参照画面に進みます。
Public/Steel Wheels/Analysis選択して、2005 Q1 Product Analysis.xjpivotを開きます。

スクリーンショット 2015-12-20 3.05.42.png

スクリーンショット 2015-12-20 3.08.54.png

警告出てますが、フィルターを変更したり、ドリルダウンしたりと色々操作ができます。

PentahoDockerイメージ構築用のDockerfile

こんな感じにしました。pentahoの初回起動時の確認を回避する処理と、Tomcatをフォアグラウンドで実行する処理などを入れてあります。

Dockerfile
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です。

参考

Pentaho Community 6.0
Pentahoコミュニティ版のDockerイメージ

2
4
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
4