English us | |||
---|---|---|---|
1. Prerequisites1.1 Linux ServerCentOS 7 (EOL 2024-06-30), Ubuntu 20.04, 22.04 LTS or Debian 11 | Small | Medium | Heavy |
CPU | 4 Core | 8 Core | 16 |
RAM | 16 GB | 32 GB | 64 GB |
DISK data (SSD/Nvme) | cf. data estimation | cf. data estimation | cf. data estimation |
Code Block | ||
---|---|---|
| ||
curl -J -O -L -X 'GET' 'https://api.adoptium.net/v3/binary/latest/8/ga/linux/x64/jdk/hotspot/normal/eclipse?project=jdk' -H 'accept: */*'
tar -C /opt -xzf "OpenJDK8U-jdk_x64_linux_hotspot_*.tar.gz |
1.3. DATAmaestro Java Archive
You will need the datamaestro-app-<version>-jar-with-dependencies.jar Java archive.
1.4. License
You will need a valid license file license.licto run DATAmaestro server.1.5. Firewall For Redirection
You will need a firewall software with port redirection feature:
2. Installation
2.1. datamaestro set up
Create datamaestro-server user:
Code Block | ||
---|---|---|
| ||
/usr/sbin/useradd -m -p "" -s /bin/bash datamaestro-server |
Move the Java archive to the user home directory:
Code Block | ||
---|---|---|
| ||
mv datamaestro-app-jar-<version>-jar-with-dependencies.jar /home/datamaestro-server/ |
Add symlink to the java archive:
Code Block |
---|
ln -s datamaestro-app-jar-<version>-jar-with-dependencies.jar datamaestro.jar |
Change owner of the Java archive:
Code Block |
---|
chown -R datamaestro-server:datamaestro-server /home/datamaestro-server/* |
Start DATAmaestro server as datamaestro-server to create pepite application home:
Code Block |
---|
sudo su datamaestro-server
java -jar datamaestro.jar -setHomeDir /data -setHome PEPITe |
Then abort by pressing CTRL + C, ENTER. A PEPITe
directory should be created into the /data
directory. You can chose any directory for these parameters.
Copy license.lic
file to /data/PEPITe/DATAmaestro/
Create a file named config
and edit as follow :
Code Block | ||
---|---|---|
| ||
{
"rotateLog": 30,
"securePort": 4443
} |
(Change owner of license.lic
and config
files if they are not owned by datamaestro-server user)
An in-depth configuration document is accessible for a logged in user on the following URL : http://server-hostname/api/debug/help
2.2. datamaestro service
Create unit file in /etc/systemd/system/datamaestro.service with the following content:
Code Block |
---|
[Unit]
Description=DATAmaestro Service
After=network.target
[Service]
Type=simple
User=datamaestro-server
Group=datamaestro-server
WorkingDirectory=/home/datamaestro-server
ExecStart=/usr/bin/java -Xmx18000m -Xms18000m -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -server -jar /home/datamaestro-server/datamaestro.jar -setHomeDir /data -setHome PEPITe
Restart=on-failure
[Install]
WantedBy=multi-user.target |
rem :
For -Xmx and -Xms use ~50% of the RAM, specified as megabyte
Use your own value for
setHomeDir
andsetHome
parametersDo not wrap the ExecStart command into a start_datamaestro.sh
Enable and start service:
Code Block | ||
---|---|---|
| ||
sudo systemctl enable datamaestro
sudo systemctl start datamaestro |
2.3. Firewall Redirection
DATAmaestro is running under a non-root user. Port < 1024 can not be used by the Java process. We need to forward http(s) requests on port 443 to 4443.
2.3.1. Configure REDIRECT via firewalld
Code Block |
---|
sudo firewall-cmd --permanent --add-forward-port=port=443:proto=tcp:toport=4443
sudo firewall-cmd --reload |
3. Configuration
3.1. Users
Open a browser with the URL http://<server-hostname> and the DATAmaestro login page should appears (via https, the browser will warn you that the website does use a self-signed certificate, you can ignore the warning).Login via credentials admin/admin and change the admin password in User Administration (cf. User Administration ).
3.2. SSL Certificates
In order to remove the warning from the browser you need the following items:
certificate for the fully qualified domain name
private key for this fully qualified domain name
the intermediate certificates
Concatenate the intermediaire certificates, the certificates and the private key into a single file.
Code Block |
---|
cat intermediate.pem cert.pem private.pem > bundle.pem
mv bundle.pem /home/datamaestro-server/.PEPITe/DATAmaestro/ |
Edit the datamaestro config
file by adding the certificate
field and the path to the certificates bundle as value.
e.g. /home/datamaestro-server/.PEPITe/DATAmaestro/config
:
Code Block |
---|
{
"publicHost": "my.fqdn.com",
"securePort": 4443,
"publicSecurePort": 443,
"certificate": "./bundle.pem"
} |
You need to restart the server for the new certificate to take effect : sudo systemctl restart datamaestro
3.3. New license
Simply replace the content of the license.lic
file located in the application folder ($PEPITE_DIR/DATAmaestro/) with the new one. Then restart the datamaestro service sudo systemctl restart datamaestro
.
3.4. SMTP server
By default, DATAmaestro use the Google SMTP server to send mail alert.
You can configure your own SMTP server as follow:
Create a security directory inside your PEPITe home directory:
e.g. mkdir /data/PEPITe/security
Inside the security
directory, create the servicesmtp.json
file.
This file is composed of the following fields :
server: smtp server name or ip
port: server port, default is 587
from: the default e-mail address to use for the mail origin. In Lake, when you send an e-mail, you can specify the from address; if you don't, the default will be used.
user and password: credentials for logging onto the smtp server.
useTls: authorizes use of tls during connection. Default is true.
e.g. :
Code Block | ||
---|---|---|
| ||
{
"server":"smtp.mydomain.com",
"password":"mypass42",
"user":"watchdog@mydomain.com",
"from":"watchdog@mydomain.com",
"port":587
"useTls": true
} |
3.5. Logs
The LogControl.json file is created automatically by the server. It contains the default log configuration. Datamaestro's is
Code Block |
---|
{
"org.eclipse.jetty":"error",
"be.pepite":"info"
} |
Log levels are those of log4J : debug, info, warn, error.
The logs file can be fould inside the log directory from the application directory (e.g. .PEPITe/DATAmaestro/logs/
)
The server parameters rotateLog
set the number of days the file are kept.
3.5.1. API
/api/log
: Displays the memory buffer associated with the log (i.e. the last x messages written to the log, x is 500 by default).
/api/log?action=clear
: clear the buffer
/api/log?action=size&value=y
: changes buffer size, i.e. the number of messages stored in memory
/api/log/files
: Returns a list of available log files.
/api/log/files?file=log20220916
: Get specific log file
/api/log/files?from=log20220916&to=log20220922
: Get multiple log files Table of Contents |
---|
Japanese |
---|
DATAmaestro サーバーのインストール1.前提条件1.1 Linux サーバーCentOS 7.8 (または Ubuntu 16.04、18.04、20.04 LTS) サーバー。管理者権限が付与されていること。 (~20 GB) とアプリケーションのデータでは別のディスクを使用することをお勧めします。 1.2.JavaOpenJDK または Oracle (廃止予定) Java 仮想マシン(JVM)実装を選択します。 1.2.1.OpenJDKCentOS 7コマンドラインで次のコマンドを入力します。 sudo yum install java-1.8.0-openjdk ターミナルで次のコマンドを実行すると、インストールされている現在のJavaバージョンを確認できます。 java -version Ubuntuコマンドラインで次のコマンドを入力します。 sudo apt-get install openjdk-8-jdk 1.2.2.OracleOracle JDK8u202 (jdk-8u202-linux-x64.tar.gz) をダウンロードしてインストールします。 https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html ダウンロードディレクトリで次のコマンドを実行します。 sudo tar xzf jdk-8u202-linux-x64.tar.gz sudo mv jdk1.8.0_202 /opt/ sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_202/bin/java 2000000 1.3.DATAmaestro Java アーカイブdatamaestro-app-<バージョン>-jar-with-dependencies.jar Java アーカイブが必要です。 1.4.ライセンスDATAmaestro サーバーを実行するには、有効なライセンスファイル license.licが必要です。 1.5.リダイレクト対応ファイアウォールポートリダイレクト機能を備えたファイアウォールが必要です。 shorewall : https://shorewall.org/ CentOS sudo yum install shorewall EPEL リポジトリを追加する必要があります。https://fedoraproject.org/wiki/EPEL Ubuntu sudo apt-get install shorewall 2.インストール2.1. datamaestro のセットアップdatamaestro-server ユーザーを作成します。 adduser datamaestro-server # type a password Java アーカイブをユーザーのホームディレクトリに移動します。 mv datamaestro-app-jar-<version>-jar-with-dependencies.jar /home/datamaestro-server/ Java アーカイブにシンボリックリンクを追加します。 ln -s datamaestro-app-jar-<version>-jar-with-dependencies.jar datamaestro.jar Java アーカイブの所有者を変更します。 chown -R datamaestro-server:datamaestro-server /home/datamaestro-server/* (任意) DATAmaestro をインストールする任意の場所へのシンボリックリンク .PEPITe を作成します。 ln -s /data/pepite /home/datamaestro-server/.PEPITe datamaestro-server ホームディレクトリから datamaestro-server ユーザーとして DATAmaestro サーバーを起動します。 sudo su datamaestro-server java -jar datamaestro.jar CTRL + C キーと ENTER キーを押して中断します。datamaestro-server のホームディレクトリにディレクトリ .PEPITe が作成されます。 license.lic ファイルを /home/datamaestro-server/.PEPITe/DATAmaestro/ にコピーします。 ファイル config を作成し、次のように編集します。 { "rotateLog": 30, "serverPort": 8080, "securePort": 4443 } (datamaestro-server ユーザーが所有していない場合は、license.lic および config ファイルの所有者を変更します。) ログインユーザーは次の URL で構成に関する詳細なドキュメントを参照できます。http://server-hostname/api/debug/help 2.2. datamaestro サービス/etc/systemd/system/datamaestro.service に次の内容の unit ファイルを作成します。 [Unit] Description=DATAmaestro Service After=network.target
[Service] Type=simple User=datamaestro-server Group=datamaestro-server WorkingDirectory=/home/datamaestro-server ExecStart=/usr/bin/java -Xmx18000m -Xms18000m -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -server -jar /home/datamaestro-server/datamaestro.jar
Restart=on-failure
[Install] WantedBy=multi-user.target rem :
サービスを有効にして起動します。 sudo systemctl enable datamaestro sudo systemctl start datamaestro 2.3.ファイアウォールリダイレクトDATAmaestro は非ルートユーザーで実行されています。Java プロセスでは 1023 以下のポートを使用できません。このため、80 番ポートと 443 番ポートの http(s) 要求をそれぞれ 8080 番ポートと 4443 番ポートに転送する必要があります。 2.3.1.shorewall 経由でリダイレクトを構成Ubuntu ではサンプルファイルをコピーします (CentOS にはこのファイルが付属しています)。 cd /usr/share/doc/shorewall/examples/one-interface/ cp zones interfaces policy rules /etc/shorewall/ 次の行を /etc/shorewall/interfaces に追加します。 net eth0 (eth0 は任意のインターフェイス名に変更します。) 次の行を /etc/shorewall/zones に追加します。 fw firewall net ipv4 次の行を /etc/shorewall/policy に追加します。 fw net ACCEPT net all ACCEPT all all REJECT 次の行を /etc/shorewall/rules に追加します。 ACCEPT net fw tcp 22 REDIRECT all 4443 tcp 443 - - REDIRECT all 8080 tcp 80 - - CentOS: /etc/shorewall/shorewall.conf STARTUP_ENABLED=Yes Ubuntu: /etc/default/shorewall を編集し、次の項目を設定します。 startup=1 サービスを有効にして起動します。 sudo systemctl enable shorewall sudo systemctl start shorewall 3.ログインURL http://<サーバーホスト名> でブラウザーを開きます。DATAmaestro ログインページが表示されます (https 経由では、Web サイトで自己署名証明書が使用されているという警告がブラウザーに表示されますが、この警告は無視できます)。 認証資格情報 admin/admin でログインし、[ユーザー管理] で管理者パスワードを変更します (「ユーザー管理」を参照)。 |