13
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOS 6.6 に ALMinium をインストール

Posted at

概要

今回は CentOS 6.6 に ALMinium をインストールする上で、少し調整が必要だった事例があったのでご紹介します。
もともと ALMinium は Redmine を利用して ALM(アプリケーションライフサイクル管理)を実現するためのフルスタック環境ですが、バージョン管理ツール連携やアジャイル開発支援に便利な各種プラグインを一通りインストールしてくれることから、お手軽な Redmine 構築ツールとして利用されている方も多いかと思います。
反面、様々なプラグインを組み合わせていることから、依存関係維持に伴うメンテナンスの苦労は容易に想像されます。
今現在、ALMinium に含まれている Redmine は 2.5.x 系ですが、本家の安定版は Redmine 3.0.x 系がリリース済み(2015年 2月 19日)というタイミングも相まって、ハマりどころが多くなっているようです。

環境

  • CentOS 6.6
  • MySQL 5.1.73
  • Apache 2.2.15
  • Passenger 5.0.8
  • Ruby 2.1.6
  • Redmine 2.6.5

構築手順

事前準備
事前に SELinux を無効化

$ sudo vi /etc/selinux/config
SELINUX=disabled
$ sudo reboot
$ getenforce
Disabled

ALMinium インストールスクリプト調整
ALMinium を現行レポジトリから取得して、いくつか調整

$ sudo yum install -y git
$ git clone https://github.com/alminium/alminium.git
$ cd alminium/

Passenger 5.0.x に合わせて修正
Passenger 4.x 想定の箇所を 5.0.x 系に合わせて修正

$ vi inst-script/gems inst-script/*/post-install

修正箇所を確認

$ git diff -U0 -w inst-script/gems inst-script/*/post-install

$ diff --git a/inst-script/gems b/inst-script/gems
@@ -31 +31 @@ case $OS in
- if [ ! -f /usr/lib64/ruby/gems/2.1.0/gems/passenger-4.*/buildout/apache2/mod_passenger.so ]
+ if [ ! -f /usr/lib64/ruby/gems/2.1.0/gems/passenger-*/buildout/apache2/mod_passenger.so ]
@@ -38 +38 @@ case $OS in
- if [ ! -f /opt/local/lib/ruby2.0/gems/2.0.0/gems/passenger-4.*/buildout/apache2/mod_passenger.so ]
+ if [ ! -f /opt/local/lib/ruby2.0/gems/2.0.0/gems/passenger-*/buildout/apache2/mod_passenger.so ]
@@ -47 +47 @@ case $OS in
- if [ ! -f /var/lib/gems/2.0.0/gems/passenger-4.0.*/buildout/apache2/mod_passenger.so ]
+ if [ ! -f /var/lib/gems/2.0.0/gems/passenger-*/buildout/apache2/mod_passenger.so ]
 
diff --git a/inst-script/rhel6/post-install b/inst-script/rhel6/post-install
@@ -11 +11 @@ then
- PASSENGER_VERSION=`passenger-config --version`
+ PASSENGER_VERSION=`passenger-config --version | tr -dc '[:digit:].' `
 
$ diff --git a/inst-script/mac/post-install b/inst-script/mac/post-install
@@ -14 +14 @@ then
- PASSENGER_VERSION=`passenger-config --version`
+ PASSENGER_VERSION=`passenger-config --version | tr -dc '[:digit:].' `
 
$ diff --git a/inst-script/debian/post-install b/inst-script/debian/post-install
@@ -11 +11 @@ then
- PASSENGER_VERSION=`passenger-config --version`
+ PASSENGER_VERSION=`passenger-config --version | tr -dc '[:digit:].' `

Redmine プラグイン の branch/tag を調整
ALMinium インストーラが想定している Redmine 2.5.x 時点の状況に対して、各種 Redmine プラグイン周りや依存している gem の開発が先行しているのでいくつかエラーが出る

Bundled gems are installed into ./vendor/bundler.
rake aborted!
redmine_code_review plugin requires Redmine 3.0.0 or higher but current is 2.5.2.stable

Redmine プラグインの branch や tag を Redmine 2.5.x/2.6.x 時点に合わせて調整

$ vi config/redmine-plugins.lst
$ git diff -U0 -w config/redmine-plugins.lst

$ diff --git a/config/redmine-plugins.lst b/config/redmine-plugins.lst
@@ -13 +13 @@ redmine_importer,master,https://github.com/zh/redmine_importer.git
-redmine_code_review,default,https://bitbucket.org/haru_iida/redmine_code_review
+redmine_code_review,0.6.5,https://bitbucket.org/haru_iida/redmine_code_review
@@ -29 +29 @@ open_flash_chart,master,https://github.com/pullmonkey/open_flash_chart.git
-redmine_charts,develop,https://github.com/drakontia/redmine_charts.git
+redmine_charts,master,https://github.com/drakontia/redmine_charts.git

これで依存関係のエラーがなくなる

Redmine 2.6.x 系に変更
Redmine 2.5.x 系のメンテナンスは終了しているので、2.6.x 系最新に変更

$ vi smelt
$ git diff -U0 smelt

$ diff --git a/smelt b/smelt
@@ -9 +9 @@ export SCRIPT_DIR=`pwd`
-RM_VER=2.5.2
+RM_VER=2.6.5

ALMinium をインストール
今回は SSL 有効、Jenkins ありのオプションを指定してインストール

$ sudo env \
  ALM_HOSTNAME=$(hostname) \
  SSL=y \
  ENABLE_JENKINS=y \
  SMTPSET=1 \
  USE_DISABLE_SECURITY=n \
  ./smelt
13
11
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
13
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?