Начиная с версии 10.5 (последняя актуальная на сегодня) — Tableau Server можно запускать не только на Windows, но и на Linux, чем мы займёмся сегодня.
Пост достаточно кратенький, просто пошаговая инструкция.
Запускать будем в AWS, на EC2 по управлением Ubuntu 16.04.
Содержание
Запуск AWS EC2
Требования к интансу:
CPU | RAM | Free Disk Space | |
---|---|---|---|
Minimum Hardware Requirements | 2-core | 8 GB | 15 GB |
Запускаем:
8 гиг памяти, 100 гиг диска, открываем порты 22, 80 и 443.
Установка Tableau
Подключаемся к инстансу:
[simterm]
$ ssh [email protected] -i tableau-linux-test.pem
[/simterm]
Обновляем пакеты:
[simterm]
ubuntu@ip-172-31-34-210:~$ sudo -s root@ip-172-31-34-210:~# apt update && apt -y upgrade && reboot
[/simterm]
В документации по установке несколько интересных моментов.
Во-первых:
For security reasons, you cannot use the root user as the installation user or the installation might fail. Use
sudo
instead.
Ну, ОК…
Второе:
Important: The hostname of the server must not change after you start TSM. For example, this might happen if you use the cloud-init package to initialize a virtual machine, and you install Tableau Server on that virtual machine.
Бред… Ну, тоже ОК — пока особо роли не играет, т.к. тестовая установка.
Ещё один нюанс:
Tableau Server must be installed in the
/opt
directory.
Вот очень интересно…
Ладно, это первая версия с поддержкой Linux, некоторые вещи ещё, может быть, недопилили.
«Поняслася!» (с)
Загружаем установочный пакет — 1495 MB, ссылка на странице загрузок:
[simterm]
ubuntu@ip-172-31-34-210:~$ wget https://downloads.tableau.com/esdalt/10.5.0/tableau-server-10-5-0_amd64.deb
[/simterm]
Устанавливаем его:
[simterm]
ubuntu@ip-172-31-34-210:~$ sudo apt install ./tableau-server-10-5-0_amd64.deb
[/simterm]
…
0 upgraded, 140 newly installed, 0 to remove and 0 not upgraded.
Need to get 97.5 MB/1,593 MB of archives.
…
Ничего так… 140 пакетов зависимостей, 1.6 гб после их установки.
ОК, запускаем установку, по завершению — принимаем условия лицензии и запускаем сервисы, но пока не сам сервер (см. дополнительные опции в документации):
[simterm]
ubuntu@ip-172-31-34-210:~$ sudo /opt/tableau/tableau_server/packages/scripts.10500.18.0109.1050/initialize-tsm --accepteula Creating 'tableau' group for Tableau Server Creating 'tsmadmin' group for TSM admin authorization Creating 'tableau' unprivileged user account Creating 'tsmagent' privileged user account Creating directories and setting permissions... Using '/var/opt/tableau/tableau_server' as the data directory. Adding user 'ubuntu' to group 'tableau'... Adding user 'ubuntu' to group 'tsmadmin'... Added. Note: These group membership changes do not take effect in shells already open. For these to take effect, log out of the shell and log back in. Adding sudo capability for privileged user... Creating environment file... Starting TSM services... TSM services started successfully Use the 'tsm' command to continue setting up Tableau Server. >> Tableau binary directory will be added to PATH for new shells. To get the >> updated path, either start a new session, or for bash users run: >> source /etc/profile.d/tableau_server.sh The TSM administrative REST API endpoint is available at ip-172-31-34-210:8850 Use the TSM command line interface to interact with TSM. There is no browser-accessible web UI in this release. You will be prompted to authenticate, or can log in using the username 'ubuntu', with the same password you used to log into this session (or any other username in the administrative group and with its password). Done.
[/simterm]
Сервер, как сказано выше, устанавливается в /opt
:
[simterm]
ubuntu@ip-172-31-34-210:~$ ls -l /opt/tableau/tableau_server/packages/ total 204 drwxr-xr-x 7 root root 4096 Mar 26 09:00 apache.10500.18.0109.1050 drwxr-xr-x 2 root root 4096 Mar 26 09:01 appzookeeper.10500.18.0109.1050 drwxr-xr-x 8 root root 24576 Mar 26 09:01 bin.10500.18.0109.1050 ... drwxr-xr-x 3 root root 4096 Mar 26 09:01 wgserver.10500.18.0109.1050 drwxr-xr-x 3 root root 4096 Mar 26 09:01 zookeeper.10500.18.0109.1050
[/simterm]
Теперь можно либо перелогиниться, либо получить переменные окружения, прочитав файл /etc/profile.d/tableau_server.sh
:
[simterm]
ubuntu@ip-172-31-34-210:~$ . /etc/profile.d/tableau_server.sh
[/simterm]
И обновив свои группы:
[simterm]
ubuntu@ip-172-31-34-210:~$ newgrp tableau ubuntu@ip-172-31-34-210:~$ newgrp tsmadmin
[/simterm]
Проверяем группы:
[simterm]
ubuntu@ip-172-31-34-210:~$ groups tsmadmin adm dialout cdrom floppy sudo audio dip video plugdev netdev lxd tableau ubuntu
[/simterm]
Активация Tableau
Т.к. пользователь ubuntu
по-умолчанию «безпарольный», а авторизация выполняется по PEM-ключу — устанавливаем ему пароль через sudo
:
[simterm]
ubuntu@ip-172-31-34-210:~$ sudo passwd ubuntu Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
[/simterm]
Подключаемся к серверу, документация по CLI тут>>>:
[simterm]
ubuntu@ip-172-31-34-210:~$ tsm login -u ubuntu Password:
[/simterm]
Активируем триал-ключ:
[simterm]
ubuntu@ip-172-31-34-210:~$ tsm licenses activate -t Trial activated.
[/simterm]
Регистрация Tableau
Создаём файл регистрации из шаблона:
[simterm]
ubuntu@ip-172-31-34-210:~$ tsm register --template > /home/ubuntu/tableau_reg_file.json
[/simterm]
Обновляем в нём информацию о пользователе:
{ "zip" : "88888", "country" : "Ukraine", "city" : "Kiev", "last_name" : "Lastname", "industry" : "Software", "eula" : "yes", "title" : "JobTitle", "phone" : "0969998877", "company" : "Company", "state" : "ST", "department" : "Dep", "first_name" : "Firstname", "email" : "[email protected]" }
Поле State тоже обязательно, просто «» не пройдёт.
Выполняем регистрацию:
[simterm]
ubuntu@ip-172-31-34-210:~$ tsm register --file /home/ubuntu/tableau_reg_file.json Registration complete.
[/simterm]
Настройка identityStore
Для хранения информации о пользователях и группах — Tableau использует identityStore
. Хранилище может быть либо локальным, либо внешним, в виде LDAP-севера.
Тут используем локальное, создаём файл, например /home/ubuntu/tableau_identityStore_file.json
, примеры файлов — тут>>>:
{ "configEntities":{ "identityStore": { "_type": "identityStoreType", "type": "local" } } }
Загружаем его в Tableau:
[simterm]
ubuntu@ip-172-31-34-210:~$ tsm settings import -f /home/ubuntu/tableau_identityStore_file.json
[/simterm]
В случае использования NGINX или необходимости настройки SSL в самом Tableau — необходимо так же выполнить настройку gatewaySettings
.
Другие параметры — см. в документации тут>>>.
Сейчас они нам не нужны, пропускаем.
Завершение настройки
Применяем все изменения, которые сделали в процессе настройки:
[simterm]
ubuntu@ip-172-31-34-210:~$ tsm pending-changes apply This operation will perform a server restart. Are you sure you wish to continue? (y/n): y Starting deployments asynchronous job. 9% - Retrieving the topology to deploy. 18% - Retrieving the configuration to deploy. 27% - Validating the new topology. 36% - Determining if server needs to be started. 45% - Disabling all services. 54% - Waiting for the services to stop. 63% - Updating nodes to new topology. 72% - Waiting for topology to be applied. 81% - Updating nodes to new configuration. 90% - Reconfiguring services. 100% - Waiting for services to reconfigure and start. Successfully deployed nodes with updated configuration and topology version.
[/simterm]
Выполняем инициализацию сервера и запускаем его (запускался он доооолго — минут 15, но тут минимальная конфигурация «железа»):
[simterm]
ubuntu@ip-172-31-34-210:~$ tsm initialize --start-server --request-timeout 1800 Initializing the server... 3% - Validating that there are no pending changes. 7% - Generating passwords. 11% - Initializing the topology. 14% - Checking if required database services are present. 18% - Disabling database services. 22% - Installing the maintenance app. 25% - Connecting to the database maintenance app at host: 'localhost', port: '8054'. 29% - Initializing the temporary database instance. 33% - Starting the temporary database instance. 37% - Creating roles and databases. 40% - Running migrations. 44% - Localizing the default projects. 48% - Stopping the temporary database instance. 51% - Making the temporary database default. 55% - Enabling the database services. 59% - Removing the database maintenance app. 62% - Generating new asset key. 66% - Saving asset key. 70% - Finalizing the topology. 74% - Reconfiguring services. 77% - Waiting for services to reconfigure and start. 81% - Initializing the next active repository. 85% - Enabling the services required for indexing. 88% - Rebuilding the search index. 92% - Finalizing the initialization. 96% - Enabling all services. 100% - Waiting for the services to start. Server was initialized successfully.
[/simterm]
Тут уже можно зайти на страничку сервера:
Заканчиваем настройку — создаём администратора:
[simterm]
ubuntu@ip-172-31-34-210:~$ tabcmd initialuser --server 'localhost:80' --username 'tabtestadmin' --password 'p@ssw0rd' ===== redirecting to http://localhost/auth ===== Signed out ===== Creating new session ===== Server: http://localhost:80 ===== Username: tabtestadmin ===== Connecting to the server... ===== Signing in... ===== Succeeded
[/simterm]
Логинимся через Web UI:
В целом на этом установка завершена.