LoginSignup
3
1

More than 5 years have passed since last update.

Tableau Server on Linux with SAML

Last updated at Posted at 2018-01-24

Tableau Server on Linuxが10.5でリリースされたので試してみました。

環境はAWS上で以下の構成です

  • インスタンス r4.2xlarge
  • OS CentOS 7.4
  • ルート領域 30GB
  • データ領域 300GB

CentOSの設定

インスタンス起動後は以下を実行
ホスト名は変更していません。ホスト名を変更する場合は外部からDNSで参照可能なホスト名(FQDN)を設定する必要があります。
外部からアクセスするDNS名と同じである必要はありません。

ロケール関係の設定

localectl set-keymap jp106
timedatectl set-timezone Asia/Tokyo

初期設定

yum -y update
yum -y groupinstall base "Development tools"
setenforce 0
vi /etc/sysconfig/selinux
SELINUX=enforcing
↓
SELINUX=disabled

パスワードの設定

AWSのログインユーザである"centos"にパスワードの設定を行う
tsmコマンド実行時に必要になります

sudo passwd centos

Tableauのインストール

Tableau社より日本語のインストール手順が書かれていますので以下はポイントだけです
https://onlinehelp.tableau.com/current/server-linux/ja-jp/server_linux.htm

パッケージのインストール

sudo ./initialize-tsm --accepteula を行う際にはデータ領域にデータが入るように
sudo ./initialize-tsm -d /data/tableau --accepteula として変更します。
初期設定のままでデータ領域を変更する場合はシンボリックリンクでデータ領域にリンクを張るほうがいいかもしれません

イニシャライズが終わったら別途シェルコンソールを立ち上げるかログインしなおすか、
source /etc/profile.d/tableau_server.sh
を実行します

日本語文字化け対策のため以下のパッケージをいれておく

rpm -qa | grep epel-release
sudo yum install epel-release.noarch
yum search noto japanese
sudo yum install google-noto-sans-japanese-fonts.noarch <-- 日本語のみ
sudo yum install google-noto* <-- 日本語含む他の言語

Tableau Server のアクティブ化と登録

tsm register --template > /path/to/registration_file.json で再インストールなどする場合のためにテンプレート化しておいた方がいいです

ローカル ファイアウォールの構成

ここでは特に設定を行わず、AWS側のセキュリティグループで任意のポートをオープンしました

初期ノード設定の構成

アイデンティティ ストア及びゲートウェイ設定用のjsonファイルを作成しインポートします。
以下は例です

{
   "configEntities": {
      "gatewaySettings": {
         "_type": "gatewaySettingsType",
         "port": 80,
         "firewallOpeningEnabled": true,
         "sslRedirectEnabled": false,
         "publicHost": "localhost",
         "publicPort": 80
      },
      "identityStore": {
         "_type": "identityStoreType",
         "type": "local"
      }
    },
     "configKeys": {
        "gateway.timeout": "900"
     }
}

Windows環境からリストアする場合は、サンプルワークブックを入れても上書きされます

インストールのファイナライズ

Tableau Server の初期化と起動 まで行った後、Windows環境からリストアする場合は

SAMLの設定

idPはOneloginで行いました
Oneloginのアプリケーション選択は、"Tableau Server(Signed Response)"を選択しています

参考情報は
https://onlinehelp.tableau.com/current/online/ja-jp/saml_config_onelogin.htm
https://www.interworks.com/blog/tkau/2016/03/30/how-configure-tableau-server-saml-onelogin-idp

Tableau Server側の設定は https://onlinehelp.tableau.com/current/server-linux/ja-jp/config_saml_linux.htm です

tsm authentication saml export-metadata -f のコマンドはSAMLの設定があればエクスポートできるようです

SAMLの設定に必要なファイルは [data directory]/data/saml に保存します
証明書が必要で
https://onlinehelp.tableau.com/current/server-linux/ja-jp/ssl_cert_create.htm
を参考に作成します
しかしながら、 /opt/tableau/tableau_server/packages/apache.<番号>/bin/openssl は実行しても

/opt/tableau/tableau_server/packages/apache.10500.18.0109.1050/bin/openssl: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory

となって、利用できなかったのでcentos側のopensslを使用して以下を実行します

openssl genrsa -out server.key 4096
openssl req -new -key server.key -out server.csr
openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 3650

ここで作成したserver.key, server.crt, oneloginのmetadataを /data/saml に保存します

また、設定用のjsonファイルを以下のように作成します
returnUrl及びentityIdは外部からアクセス可能なDNS名で登録します
サーバーのホスト名と一致させる必要はありません

{
  "configEntities": {
    "samlSettings": {
      "_type": "samlSettingsType",
      "enabled": true,
      "returnUrl": "https://tableau.example.com",
      "entityId": "https://tableau.example.com",
      "certFile": "/data/tableau/data/saml/server.crt",
      "keyFile": "/data/tableau/data/saml/server.key",
      "idpMetadataFile": "/data/tableau/data/saml/onelogin_metadata_698075.xml"
    }
  }
}

上記のファイルをインポートし設定反映させます

tsm settings import -f /path/to/file.json
tsm pending-changes apply

問題点

  • initialize-tsm を実行時にDNS参照できないホスト名にしているとエラーになる
  • 日本語を含むワークブックで一部文字化け(□に☓がついたようになる)

文字化けは以下で解決します
http://kb.tableau.com/articles/issue/text-renders-as-square-boxes-instead-of-expected-non-english-characters

EPELリポジトリを追加してNOTO CJK fontsをインストール
rpm -qa | grep epel-release
sudo yum install epel-release.noarch
yum search noto japanese
sudo yum install google-noto-sans-japanese-fonts.noarch
tsm restart
3
1
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
3
1