退役SEのつれづれ日記

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

[redmine]redmine3.4.5の導入とpluginの追加

2018-05-04 | サーバ設定(redmine,zabbix
ちょっと間が空いてしまいましたが、redmineの3.4.5がリリースされています。
BitnamiRedmineStackもアップデートされていますので、導入してみました。

さらに、今回はRedmineUpのagileとCRMのプラグインも導入してみました。
(参考)
RedmineUpのプラグインページ
・agile
 https://www.redmineup.com/pages/ja/plugins/agile
・CRM(Contact)
 https://www.redmineup.com/pages/ja/plugins/crm

導入作業は例のごとく、Dokcerコンテナ化してCI対応です。
[root@server]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
centos7             rm3450a             355ec2dd8916        3 minutes ago       2.86GB
だんだんとコンテナイメージが大きくなっています。

さて、plugin、テーマ、データ、ファイルの移行です。
docker run -v でホスト側のディレクトリをコンテナにマウントして
対象のファイルを渡します。

その後は、ファイルをそれぞれのディレクトリに格納し、
(1)DBmigrate:但し、エラーあり
(2)プラグインの導入コマンド(migrate):NAME=でプラグイン毎に
(3)DBのload
(4)redmineの再起動
で終了。
[root@container1 redmine3]# unzip redmine_agile-1_4_6-light.zip
Archive: redmine_agile-1_4_6-light.zip
creating: redmine_agile/
・・・
[root@container1 redmine3]# unzip redmine_crm-4_1_2-light.zip
Archive: redmine_crm-4_1_2-light.zip
creating: redmine_contacts/
・・・
[root@container1 htdocs]# bundle install --no-deployment --without development test postgresql sqlite
・・・
[root@container1 htdocs]# bundle exec rake --trace db:migrate
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
== 20161220091118 AddIndexOnIssuesParentId: migrating =========================
-- add_index(:issues, :parent_id)
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Index name 'index_issues_on_parent_id' on table 'issues' already exists
/opt/redmine/ruby/lib/ruby/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:954:in `add_index_options'
・・・
[root@container1 htdocs]# bundle exec rake --trace redmine:plugins:migrate NAME=redmine_contacts
** Invoke redmine:plugins:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:plugins:migrate
Migrating redmine_contacts (Redmine CRM plugin (Light version))...
== 16 CreateContacts: migrating ===============================================
-- create_table(:contacts)
-> 0.6003s
-- add_index(:contacts, :author_id)
-> 0.2316s
-- add_index(:contacts, :company)
-> 0.4518s
-- add_index(:contacts, :is_company)
-> 0.1659s
-- add_index(:contacts, :email)
-> 0.2777s
-- add_index(:contacts, :first_name)
-> 0.3909s
-- add_index(:contacts, :assigned_to_id)
-> 0.3259s
== 16 CreateContacts: migrated (2.4450s) ======================================

== 17 CreateContactsRelations: migrating ======================================
-- create_table(:contacts_deals, {:id=>false})
-> 0.2806s
-- add_index(:contacts_deals, :deal_id)
-> 0.1223s
-- add_index(:contacts_deals, :contact_id)
-> 0.0828s
-- create_table(:contacts_issues, {:id=>false})
-> 0.2275s
-- add_index(:contacts_issues, :issue_id)
-> 0.1383s
-- add_index(:contacts_issues, :contact_id)
-> 0.1280s
-- create_table(:contacts_projects, {:id=>false})
-> 0.1632s
-- add_index(:contacts_projects, :project_id)
-> 0.2395s
-- add_index(:contacts_projects, :contact_id)
-> 0.1477s
== 17 CreateContactsRelations: migrated (1.5313s) =============================

== 18 CreateDeals: migrating ==================================================
-- create_table(:deals)
-> 0.2356s
-- add_index(:deals, :contact_id)
-> 0.2974s
-- add_index(:deals, :project_id)
-> 0.3607s
-- add_index(:deals, :status_id)
-> 0.1669s
-- add_index(:deals, :author_id)
-> 0.1299s
-- add_index(:deals, :category_id)
-> 0.1439s
== 18 CreateDeals: migrated (1.3353s) =========================================

== 19 CreateDealsRelations: migrating =========================================
-- create_table(:deal_categories)
-> 0.2863s
-- add_index(:deal_categories, :project_id)
-> 0.1713s
-- create_table(:deal_processes)
-> 0.3475s
-- add_index(:deal_processes, [:author_id])
-> 0.3246s
-- add_index(:deal_processes, [:deal_id])
-> 0.3069s
-- create_table(:deal_statuses)
-> 0.1623s
-- add_index(:deal_statuses, [:is_closed])
-> 0.2169s
-- create_table(:deal_statuses_projects, {:id=>false})
-> 0.2405s
-- add_index(:deal_statuses_projects, [:project_id, :deal_status_id])
-> 0.2163s
== 19 CreateDealsRelations: migrated (2.2741s) ================================

== 20 CreateNotes: migrating ==================================================
-- create_table(:notes)
-> 0.2548s
-- add_index(:notes, [:source_id, :source_type])
-> 0.1293s
-- add_index(:notes, [:author_id])
-> 0.0536s
== 20 CreateNotes: migrated (0.4382s) =========================================

== 21 CreateTags: migrating ===================================================
== 21 CreateTags: migrated (0.0014s) ==========================================

== 22 CreateRecentlyVieweds: migrating ========================================
-- create_table(:recently_vieweds)
-> 0.1391s
-- add_index(:recently_vieweds, [:viewed_id, :viewed_type])
-> 0.1790s
-- add_index(:recently_vieweds, :viewer_id)
-> 0.2422s
== 22 CreateRecentlyVieweds: migrated (0.5609s) ===============================

== 23 CreateContactsSettings: migrating =======================================
-- create_table(:contacts_settings)
-> 0.2631s
-- add_index(:contacts_settings, :project_id)
-> 0.2313s
== 23 CreateContactsSettings: migrated (0.4947s) ==============================

== 24 AddTypeToNotes: migrating ===============================================
-- add_column(:notes, :type_id, :integer)
-> 0.5135s
-- add_index(:notes, :type_id)
-> 0.2138s
== 24 AddTypeToNotes: migrated (0.7276s) ======================================

== 25 AddFieldsToDeals: migrating =============================================
-- change_column(:deals, :duration, :integer, {:default=>1})
-> 0.0316s
-- add_column(:deals, :due_date, :timestamp)
-> 0.3696s
-- add_column(:deals, :probability, :integer)
-> 0.6592s
== 25 AddFieldsToDeals: migrated (1.0608s) ====================================

== 26 CreateContactsQueries: migrating ========================================
-- create_table(:contacts_queries)
-> 0.1286s
-- add_index(:contacts_queries, :project_id)
-> 0.1853s
-- add_index(:contacts_queries, :user_id)
-> 0.1350s
== 26 CreateContactsQueries: migrated (0.4494s) ===============================

== 27 ChangeDealsCurrencyType: migrating ======================================
-- change_column(:deals, :currency, :string)
-> 0.5906s
== 27 ChangeDealsCurrencyType: migrated (0.5907s) =============================

== 28 AddCachedTagListToContacts: migrating ===================================
-- add_column(:contacts, :cached_tag_list, :string)
-> 0.3405s
== 28 AddCachedTagListToContacts: migrated (0.3406s) ==========================

== 29 AddVisibilityToContacts: migrating ======================================
-- add_column(:contacts, :visibility, :integer, {:default=>0, :null=>false})
-> 0.3726s
== 29 AddVisibilityToContacts: migrated (0.5017s) =============================

== 30 ChangeDealStatusesIsClosed: migrating ===================================
-- remove_column(:deal_statuses, :is_closed)
-> 0.3928s
-- add_column(:deal_statuses, :status_type, :integer, {:default=>0, :null=>false})
-> 0.3905s
== 30 ChangeDealStatusesIsClosed: migrated (0.7841s) ==========================

== 31 PopulateContactsModule: migrating =======================================
== 31 PopulateContactsModule: migrated (0.0247s) ==============================

== 32 CreateAddresses: migrating ==============================================
-- create_table(:addresses)
-> 0.3401s
-- add_index(:addresses, [:addressable_id, :addressable_type])
-> 0.2047s
-- add_index(:addresses, :address_type)
-> 0.2890s
-- remove_column(:contacts, :address)
-> 0.7789s
== 32 CreateAddresses: migrated (1.6151s) =====================================

== 33 CreateDealsIssues: migrating ============================================
-- create_table(:deals_issues)
-> 0.1881s
-- add_index(:deals_issues, :issue_id)
-> 0.1888s
-- add_index(:deals_issues, :deal_id)
-> 0.2018s
== 33 CreateDealsIssues: migrated (0.5792s) ===================================

== 34 ChangeDealsPricePrecision: migrating ====================================
-- change_column(:deals, :price, :decimal, {:precision=>20, :scale=>2})
-> 0.9325s
== 34 ChangeDealsPricePrecision: migrated (0.9327s) ===========================

** Invoke db:schema:dump (first_time)
** Invoke environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:schema:dump
[root@container1 htdocs]# bundle exec rake --trace redmine:plugins:migrate NAME=redmine_agile
** Invoke redmine:plugins:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:plugins:migrate
Migrating redmine_agile (Redmine Agile plugin (Light version))...
== 4 RenameAgileRanks: migrating ==============================================
-- index_exists?(:agile_ranks, :issue_id)
-> 0.0008s
-- remove_index(:agile_ranks, :issue_id)
-> 0.1654s
-- index_exists?(:agile_ranks, :position)
-> 0.0007s
-- remove_index(:agile_ranks, :position)
-> 0.1330s
-- rename_table(:agile_ranks, :agile_data)
-> 0.1251s
-- add_index(:agile_data, :issue_id)
-> 0.1568s
-- add_index(:agile_data, :position)
-> 0.1799s
== 4 RenameAgileRanks: migrated (0.7625s) =====================================

== 5 AddStoryPointsToAgileRanks: migrating ====================================
-- add_column(:agile_data, :story_points, :integer)
-> 0.3801s
== 5 AddStoryPointsToAgileRanks: migrated (0.3803s) ===========================

** Invoke db:schema:dump (first_time)
** Invoke environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:schema:dump
[root@container1 htdocs]# systemctl restart redmine
[root@container1 htdocs]# systemctl status -l redmine
● redmine.service - SYSV: Bitnami Service
Loaded: loaded (/etc/rc.d/init.d/redmine; bad; vendor preset: disabled)
Active: active (running) since Thu 2018-05-03 19:15:56 JST; 20s ago
Docs: man:systemd-sysv-generator(8)
Process: 24598 ExecStop=/etc/rc.d/init.d/redmine stop (code=exited, status=0/SUCCESS)
Process: 24646 ExecStart=/etc/rc.d/init.d/redmine start (code=exited, status=0/SUCCESS)
CGroup: /docker/f3819186b8b48347556e6fed0438d020c2acc0e3bf43a6b0d89644e7550230b9/system.slice/redmine.service
・・・

コンタクトの作成もAgileの機能検証も問題なし。
ただ、(1)のキー重複のエラーが発生の影響はまだ確認できず。
これだけが気がかりだが・・
コメント    この記事についてブログを書く
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする
« [redmine][plugin]serial_num... | トップ | ジュンク堂トークセッション... »