digdagServerの構築メモ
Centos7にdigdagサーバーを構築した際のメモ
久しぶりに自分のローカルPCにCentos7でサーバーを構築しようとしたが、 vagrant up しようとするとエラーが発生。。
下記組み合わせだとvagrant upがエラーする
D:\vagrant\labo>vagrant up The version of powershell currently installed on this host is less than the required minimum version. Please upgrade the installed version of powershell to the minimum required version and run the command again. Installed version: 2 Minimum required version: 3
上記エラーメッセージからPowerShellのバージョンを2系から3系以上に変更したが 次にWMF5.0(Windows Management Framework 5.0)をインストールする必要もあった。 詳細は以下のリンクから確認できる。
WMFのインストールが必要
digdagServerを構築する際にpostgreSQLを
- postgres9.6のインストールは以下のURLを参考にしてインストール
- CREATE EXTENSIONしないとエラーになるので注意
digdag_db=> CREATE EXTENSION "uuid-ossp"; ERROR: could not open extension control file "/usr/pgsql-9.6/share/extension/uuid-ossp.control": No such file or directory ## 拡張モジュールのインストールが必要 # yum -y install postgresql96-contrib.x86_64 ## postgresユーザーでログインして psql -U postgres -h 127.0.0.1 -d digdag_db CREATE EXTENSION "uuid-ossp";
postgre9.6 install
- https://qiita.com/purini-to/items/702565733a03c202d98e
- https://qiita.com/uhooi/items/44ed9370740c7521dce4
digdag/embulkのインストール
- java1.8がインストールされていることが前提
$ java -version openjdk version "1.8.0_151" OpenJDK Runtime Environment (build 1.8.0_151-b12) OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode) # インストールされていなければいれる $ yum -y install java-1.8.0-openjdk
# Embulkの導入 $ curl --create-dirs -o ~/bin/embulk -L https://dl.embulk.org/embulk-latest.jar $ chmod +x ~/bin/embulk # Digdagの導入 $ curl --create-dirs -o ~/bin/digdag -L "https://dl.digdag.io/digdag-latest" $ chmod +x ~/bin/digdag # OSX環境の場合は次のように.bash_profileを編集する $ cat << 'EOF' >> ~/.bash_profile # User specfic environment and startup programs export PATH=$PATH:$HOME/bin EOF $ source ~/.bash_profile
digdagはまりポイント
https://qiita.com/toyama0919/items/142d290c8dcb2c86851c
# vi /usr/lib/systemd/system/digdag.service [Unit] Description=digdag [Service] Type=simple PIDFile=/run/digdag.pid ExecStart="/usr/local/bin/digdag server -b 0.0.0.0 --config /opt/digdag/server.properties -O /opt/digdag/logs/tasklogs -A /opt/digdag/logs/accesslogs -L /opt/digdag/logs/server.log" User=root Group=root WorkingDirectory=/opt/digdag Restart=always RestartSec=5 KillMode=process TimeoutStopSec=1200 SyslogIdentifier=digdag [Install] WantedBy=multi-user.target
ExecStartは別ファイルにしないとエラーになるので注意
シェルは別ファイルにしないとエラーする
[Unit] Description=digdag [Service] Type=simple PIDFile=/run/digdag.pid ExecStart=/opt/digdag/start.sh User=root Group=root [Install] WantedBy=multi-user.target
https://qiita.com/cmwig65/items/3386a061aeb3d2f81b81 https://qiita.com/toyama0919/items/142d290c8dcb2c86851c https://qiita.com/bwtakacy/items/ec3151644512ca65f6b6