退役SEのつれづれ日記

定年退役SEが、つれづれなる想いをしたためています。
(旧名:『システムノヲニワソト』)

[redmine][slack]redmineとslackの連携機能を検証する(その1)

2016-01-30 | サーバ設定(redmine,zabbix
最近、slackの利用を考えて、機能の検証を実行することにしました。
他のタイムライン共有/チャットツールに比べ、他のツールとの連携機能が充実しているところがポイントです。

はじめは、redmineです。

(参考)
1.pluginページ:
https://github.com/sciyoshi/redmine-slack

2.qiitaページ
Slack chat plugin for Redmineを入れてみた
http://qiita.com/yuji0602/items/9ee2fe6620da5f36efc9

Redmine の通知をSlackに飛ばす (複数プロジェクト完全対応版)
http://qiita.com/AknEp/items/f94fd6ff4f02b9387dbc

3.SlackとRedmineを連携し、登録したチケットの更新を通知する方法
http://liginc.co.jp/web/programming/other-programming/97710

4.SlackにRedmineのチケット更新を通知する
http://blogs.zealot.co.jp/archives/763


まずは、pluginの導入です。
説明を読むと、バージョン3.2は未対応のようなので、まずはbitnami-redmineのバージョン2の最新版(2.6.9)をdockerコンテナで作成し、稼働検証です。
(こんなとき、dockerは便利ですね!)

(GITHUB)
system-oni800/docker-cent6-bitnami-redmine2.6
https://github.com/system-oni800/docker-cent6-bitnami-redmine2.6

(bitnami-redmine-stackを変更すれば利用できます)
githubからpluginをcloneしてrakeしますが、上手く行きません。
rake aborted!
LoadError: No such file to load -- httpclient
・・・

bundle installで実行しても、結果は同じ。
[root@docker-con htdocs]# bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Fetching gem metadata from https://rubygems.org/..
Fetching version metadata from https://rubygems.org/.
Resolving dependencies...
Installing httpclient 2.7.1
Using bundler 1.10.4
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.

[root@docker-con htdocs]# bundle exec rake --trace redmine:plugins:migrate NAME=redmine_slack RAILS_ENV=production
** Invoke redmine:plugins:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
LoadError: No such file to load -- httpclient


いろいろとGoogle先生に聞きながら、
1.htdocsのGemfileにgem "httpclient"を追記
2.yum install gcc -y -qの実行:bitnai-stackでは開発ツールが省略されている
3.bundle install --no-deployment --without development testの実行
で行けることを確認
[root@dokcer-con htdocs]# vi Gemfile
Gemfileにgem "httpclient"を追記
[root@dokcer-con htdocs]# yum install gcc -y
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.4.7-16.el6 will be installed
・・・・
Installed:
gcc.x86_64 0:4.4.7-16.el6

Dependency Installed:
cloog-ppl.x86_64 0:0.15.7-1.2.el6 cpp.x86_64 0:4.4.7-16.el6 glibc-devel.x86_64 0:2.12-1.166.el6_7.3
glibc-headers.x86_64 0:2.12-1.166.el6_7.3 kernel-headers.x86_64 0:2.6.32-573.12.1.el6 libgomp.x86_64 0:4.4.7-16.el6
mpfr.x86_64 0:2.4.1-6.el6 ppl.x86_64 0:0.10.2-11.el6

Complete!
[root@dokcer-con htdocs]# bundle install --no-deployment --without development test
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for
all non-root users on this machine.
Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`.
Your Gemfile lists the gem httpclient (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies.......
Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Using rake 10.4.2
・・・・
Installing redcarpet 3.3.3 with native extensions
Installing request_store 1.0.5
Installing rmagick 2.13.4 with native extensions
Bundle complete! 27 Gemfile dependencies, 43 gems now installed.
Gems in the groups development, test and sqlite were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
Post-install message from rmagick:
Please report any bugs. See https://github.com/gemhome/rmagick/compare/RMagick_2-13-2...master and https://github.com/rmagick/rmagick/issues/18

これで、bitnami-redmine-stackを再起動して、pluginを確認したスクリーンショットが最初のもの。

その後、slackとの連携を設定して稼働確認して、まずは第一段階終了。
コメント    この記事についてブログを書く
  • Twitterでシェアする
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする
« [zabbix]agentとserverが通信... | トップ | [redmine][slack]redmineとsl... »

コメントを投稿

ブログ作成者から承認されるまでコメントは反映されません。