SPOJE.NET

Technická dokumentace

Uživatelské nástroje

Nástroje pro tento web


Postranní lišta


Provozují SPOJE.NET.
Nejlepší internet v Praze.

howto:hosting:redmine

Redmine

Aktualizace

  • Pokud migrujeme z verze 1.3.x do 2.x, nainstalujeme nejdriv
apt-get install ruby-dev
gem install bundler
  • Zazalohujeme databazi
  • Zazalohujeme adresar public, config
  • Ostatni adresare a soubory krome adresare files smazeme a nakopirujeme novou verzi
  • Ze stareho adresare config prekopirujeme soubory configuration.yml a database.yml

Pokud pouzivame ruby 1.9 a vyssi, zmenime v soubory database.yml radek adapter: mysqladapter: mysql2
Do souboru configuration.yml (pokud tam jeste neni), pridame secret_token: 'abcd' kde abcd bude nahodny retezec

  • Prepneme se do root adresare redmine a spustime instalaci. Pokud pouzivame pluginy, je dobre vsechny zavislosti na dalsim gems vyjmenovat do souboru Gemfile

Upgrade verze 3.x

bundle install --without development test
  • Pokud aktulizujeme z verze 2.5.x na novejsi, pouzijeme prikaz bundle update
  • Nyni provedeme migraci databaze
bundle exec rake generate_secret_token
bundle exec rake db:migrate RAILS_ENV=production
  • Pokud mame nejake plguiny
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
  • A na zaver vycistime cache
bundle exec rake tmp:cache:clear tmp:sessions:clear
  • Nyni provedeme restart Apache

Poznamky pri instalaci pluginu

Pokud provedeme nejakou zmenu ve strukture databaze, je nutne vzdy potom zavolat bundle exec rake db:migrate RAILS_ENV=production v root adresari redmine a potom restartovat Apache

Pokud provedeme instalaci noveho pluginu (umistujeme do adresare plugins), je nutne zavolat rake redmine:plugins:migrate RAILS_ENV=production a potom restartovat Apache
Pokud chceme plugin odinstalovat, je potreba zavolat rake redmine:plugins:migrate NAME=plugin_name VERSION=0 RAILS_ENV=production, potom smazat plugin z adresare plugins a restartovat Apache

Napojeni na nextcloud

CREATE VIEW nextcloud_user AS
SELECT users.login, users.hashed_password, users.salt, email_addresses.address
FROM users
INNER JOIN email_addresses ON (users.id=email_addresses.user_id)
WHERE users.status=1 AND users.type="User";

Instalace konkretni verze bundle

gem install bundler -v 1.16.1
bundler -v

Bundler version 1.16.1
gem uninstall bundler

Select gem to uninstall:
 1. bundler-1.17.1
 2. bundler-2.1.4
 3. All versions

Problemy

send_notification

Pokud po aktualizaci redmine zaznamename pri vkladani poznamek k ticketu nasledujici chybu

translation missing: en.field_send_notification changed from 0 to --- !ruby/object:Mail::Message body: !ruby/object:Mail::Body boundary: --==_mimepart_52a0ad837f377_63933fb8c3f4a54081298 preamble: .... 

potom je potreba odstranit v tabulce issue sloupec send_notification a nasledne potom zavolat prikaz bundle exec rake db:migrate RAILS_ENV=production a restartovat apache.

Pokud uz se nam prihodilo, ze jsou nektere poznamky k ticketu o tyto hlasku prodlouzeny, najdeme je a smazeme z tabulky journal_details

Chyba 500 pri ukladani ukolu nebo nahodne pri nacitani ticketu s prilohama

    PassengerUploadBufferDir /cesta/redmine/passenger/

a zkontrolovat ze v adresari redmine tento existuje a ma do nej apache pravo zapisu

Od verze 5 se to jmenuje - PassengerDataBufferDir

Upgrade ruby na 2.3

  • po upgradu ruby je potreba znova nainstalovat bundler gem install bundler pripadne doinstalovat dalsi zavilosti ktere se zjisti pri naslednem zusteni bundle install

redmine_agile

We had the same issue and after some investigations, we found that the problem was generated by the redmine_agile plugin.

/assets/stylesheets/redmine_agile.css

html {
-  overflow-y: inherit !important;
+  /* overflow-y: inherit !important; */
}

Upgrade na Ruby 2.5 / Debian 10

  1. gem install bundler:1.17.1
  2. bundle update --bundler

Pokud to vypise nejakou chybu o neexistence verze v repozitari, tak provedte update prislusneho balicku, ktery to pise, napr.:

  1. bundle update mimemagic

Nakonec provest stadanrdni postup pri upgradu redmine viz. vyse.

Pokud nestartuje po upgradu apache - stalo se mi pod LXC

  1. sed -i -e 's,PrivateTmp=true,PrivateTmp=false\nNoNewPrivileges=yes,g' /lib/systemd/system/apache2.service
  2. systemctl daemon-reload

Gitolite v2 => Gitolite v3

  • backing up all the repositories and hooks
  • dpkg –purge gitolite
  • rm -rf /var/lib/gitolite
  • install gitolite3 (ev. dpkg-reconfigure gitolite3)
  • putting the repositories and hooks back in place
  • running:
gitolite compile
gitolite setup --hooks-only
gitolite trigger POST_COMPILE
  • uncoment in .gitolite.rc
   # look for "git-config" in the documentation
    GIT_CONFIG_KEYS                 =>  '.*',

    LOCAL_CODE                =>  "$ENV{HOME}/local",
  • sudo to redmine user and run:
bundle exec rake redmine_git_hosting:update_repositories RAILS_ENV=production
bundle exec rake redmine_git_hosting:fetch_changesets RAILS_ENV=production
bundle exec rake redmine_git_hosting:install_gitolite_hooks RAILS_ENV=production
bundle exec rake redmine_git_hosting:install_hook_parameters RAILS_ENV=production
bundle exec rake redmine_git_hosting:install_gitolite_hooks RAILS_ENV=production

**POZOR**

Pokud najdeme v logu logs/git_hosting.log tyto hlasky:

2022-07-26 18:28:25 +0200 [ERROR] Access denied for Gitolite Admin SSH Keys
2022-07-26 18:28:25 +0200 [ERROR] unsupported URL protocol

a zaroven v konfigurace git hostingu v redmine na karte configtest sviti v kolonce Rugged compiled features ssh červeně, tak je potřeba nainstalovat znova gem rugged s podporou ssh

# gem list | grep rugged
rugged (0.99.0)
# gem uninstall rugged
# apt-get install libssh2-1-dev
# gem install rugged -v 0.99.0

Migrace Trac do Redmine

# rake redmine:migrate_from_trac RAILS_ENV="production"

WARNING: a new project will be added to Redmine during this process.
Are you sure you want to continue ? [y/N] y

Trac directory []: /var/local/projects/prometheus
Trac database adapter (sqlite3, mysql2, postgresql) [sqlite3]: 
Trac database encoding [UTF-8]: 
Target project identifier []: prometheus

This project already exists in your Redmine database.
Are you sure you want to append data to this project ? [Y/n] y

Trac database version is: 26
Migrating components.
Migrating milestones...........
Migrating custom fields
Migrating tickets....................................
Migrating wiki......................................................

Components:      1/1
Milestones:      11/11
Tickets:         36/36
Ticket files:    0/0
Custom values:   0/0
Wiki edits:      54/54
Wiki files:      0/0
howto/hosting/redmine.txt · Poslední úprava: 2022/07/27 14:23 autor: gandalf