kb84tkhrのブログ

何を書こうか考え中です あ、あと組織とは関係ないってやつです 個人的なやつ

PPP3: Redmineのインストール(撃沈)

Part 2 チーム開発のサイクル

ぼっちが仮想でチーム気分出しながら読みます

Chapter 04 チーム開発のためのツール

04-01 課題管理システム

ここではRedmineを紹介している
使ったことがないわけではないけど、典型的な使い方はしてない気がする

Ansibleを使ったインストールというのが面白そうなのでやってみる

ここでは Appendix A: 開発環境のセットアップ で構築したゲストOS上にインストールする手順を説明します。

新しい仮想マシンでってことだよな
なんか残しておいたんだっけ?

$ vagrant box list
bento/ubuntu-16.04 (virtualbox, 201812.27.0)
bento/ubuntu-18.04 (virtualbox, 201812.27.0)
devhost-base       (virtualbox, 0)

devhost-baseは違うやつだな
スナップショットしか残してなかったか
スナップショットから複製・・・は無理だよな
ちょっと失敗
作り直す
今度はbox作っておく

でAnsibleとPlaybookをインストール

$ sudo apt install -y python-pip libpython-dev git libssl-dev
$ sudo pip2 install ansible
$ git clone https://github.com/farend/redmine-ubuntu-ansible.git

redmine-ubuntu-ansibleのフォルダ内をつらつらと眺めてみる
ふーん
これがPlaybookとやらか
というだけにしておく
本と同じ手順がREADMEに書いてあった

設定
group_vars/redmine-serversdb_passwd_redmineを変更するだけ

いよいよインストール

$ ansible-playbook -K -i hosts site.yml

見てるだけ
何か怒られた

TASK [redmine : gemsパッケージのインストール] *********************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["bundle", "install", "--path", "vendor/bundle"], "delta": "0:00:11.578815", "end": "2019-05-15 13:46:48.119491", "msg": "non-zero
return code", "rc": 6, "start": "2019-05-15 13:46:36.540676", "stderr": "Don't run Bundler as root. Bundler can ask for sudo if it is needed, and\ninstalling your bundle as root will break this application for all non-root\nusers on this machine.\nThe dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for
ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.\nBundler could not find compatible versions for gem \"bundler\":\n  In Gemfile:\n    bundler (< 2.0.0, >= 1.5.0)\n\n  Current Bundler version:\n    bundler (2.0.1)\nThis Gemfile requires a different version of Bundler.\nPerhaps you need to update Bundler by running `gem install bundler`?\n\nCould not find gem 'bundler (< 2.0.0, >= 1.5.0)' in any of the relevant sources:\n  the local ruby installation", "stderr_lines": ["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.", "The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.", "Bundler could not find compatible versions for gem \"bundler\":", "  In Gemfile:", "    bundler (< 2.0.0, >= 1.5.0)", "", "  Current Bundler version:", "    bundler (2.0.1)", "This Gemfile requires a different version of Bundler.", "Perhaps you need to update Bundler by running `gem install bundler`?", "", "Could not find gem 'bundler (< 2.0.0, >= 1.5.0)' in any of the relevant sources:", "  the local ruby installation"], "stdout": "Fetching gem metadata from https://rubygems.org/.............\nFetching gem metadata from https://rubygems.org/.\nResolving dependencies...", "stdout_lines": ["Fetching gem metadata from https://rubygems.org/.............", "Fetching gem metadata from https://rubygems.org/.", "Resolving dependencies..."]}
        to retry, use: --limit @/home/vagrant/redmine-ubuntu-ansible/site.retry

PLAY RECAP ********************************************************************************************************************************************************************************
localhost                  : ok=23   changed=18   unreachable=0    failed=1

rootで走らせるなとかBundlerのバージョンが違うとか
tzinfo-dataは使われてないからどうこうだとか

うーん今日はここまでかな