OpenProject installieren: Unterschied zwischen den Versionen

Aus Hostsharing Wiki
Zur Navigation springen Zur Suche springen
Zeile 89: Zeile 89:
       host: localhost
       host: localhost
       database: xyz00_prjdb (wie oben angegeben)
       database: xyz00_prjdb (wie oben angegeben)
       pool: 5
       pool: 10
       username: xyz00_dbuser (wie oben angegeben)
       username: xyz00_dbuser (wie oben angegeben)
       password: meinPasswort (wie oben angegeben)
       password: meinPasswort (wie oben angegeben)

Version vom 26. November 2019, 14:02 Uhr

OpenProject ist eine umfangreiche Projektmanagement-Software. Die Software ist multiprojektfähig; für jedes Projekt stehen folgende Werkzeuge zur Verfügung:

  • Wiki
  • Vorgangsverfolgung (Ticketsystem, Issue Tracker)
  • Zeiterfassung
  • Dokument- und Dateiverwaltung

Diese Anleitung beschreibt, wie man OpenProject auf der Managed Hosting Plattform von Hostsharing installieren kann. OpenProject lässt sich in jedem Managed Webspace betreiben.

Vorbereitungen

Mit Hilfe von HSAdmin wird angelegt:

  1. Ein User als Service-User mit /bin/bash als Shell, zum Beispiel Beispiel: xyz00-project"
  2. Eine Domain mit xyz00-project als Domain-Administrator, zum Beispiel "prj.example.com"
  3. Einen Postgresql-User xyz00_dbuser mit Passwort meinPasswort
  4. Eine Postgresql-Datenbank xyz00_prjdb mit Datenbank-Owner xyz00_dbuser

= Vorbereitung de Webspace

Die "leichtgewichtige" Subdomain "www" wird gelöscht. Ebenso die .htaccess-Datei mit der Weiterleitung dorthin.

   xyz00@h20 $ sudo -u xyz00-project -i
   xyz00-project@h20:~$ cd ~/doms/projekt.example.com/
   xyz00-project@h20:~/doms/projekt.example.com$ rm -rf subs/www/ subs-ssl/www/ htdocs-ssl/.htaccess 

Installation of Ruby

Weiterhin benötigt OpenProject eine geeignete Version der Programmiersprache Ruby:

Die Installation-Anleitung für OpenProject schlägt für die Installation rbenv vor.

   xyz00-project@h20:~/doms/projekt.example.com$ cd
   xyz00-project@h20:~$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
   xyz00-project@h20:~$ touch .profile
   xyz00-project@h20:~$ chmod u+x .profile
   xyz00-project@h20:~$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile
   xyz00-project@h20:~$ echo 'eval "$(rbenv init -)"' >> ~/.profile
   xyz00-project@h20:~$ source ~/.profile
   xyz00-project@h20:~$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
   xyz00-project@h20:~$ rbenv install 2.6.5
   xyz00-project@h20:~$ rbenv rehash
   xyz00-project@h20:~$ rbenv global 2.6.5

Als Test bitte aufrufen: ruby -v

Die Anzeige sollte etwa das Folgende enthalten: ruby 2.6.5pXYZ (....) [x86_64-linux]

Installation of Node

Die Installation-Anleitung für OpenProject schlägt für die Installation nodenv vor.

   xyz00-project@h20:~$ git clone https://github.com/OiNutter/nodenv.git ~/.nodenv
   xyz00-project@h20:~$ echo 'export PATH="$HOME/.nodenv/bin:$PATH"' >> ~/.profile
   xyz00-project@h20:~$ echo 'eval "$(nodenv init -)"' >> ~/.profile
   xyz00-project@h20:~$ source ~/.profile
   xyz00-project@h20:~$ git clone git://github.com/OiNutter/node-build.git ~/.nodenv/plugins/node-build
   xyz00-project@h20:~$ nodenv install 12.11.1
   xyz00-project@h20:~$ nodenv rehash
   xyz00-project@h20:~$ nodenv global 12.11.1

Ein Test mit node --version solte anzeigen: v12.11.1

Download, Entpacken, Konfiguration

Installation of OpenProject

Wir installieren die OpenProject Community Edition. siehe https://github.com/opf/openproject

   xyz00-project@h20:~$ git clone https://github.com/opf/openproject.git --branch stable/10 --depth 1
   xyz00-project@h20:~$ cd ~/openproject
   xyz00-project@h20:~$ gem update --system
   xyz00-project@h20:~$ gem install bundler
   xyz00-project@h20:~$ bundle update --bundler
   xyz00-project@h20:~$ bundle install --deployment --without mysql2 sqlite development test therubyracer docker
   xyz00-project@h20:~$ npm install

Configure OpenProject

Erstelle eine Konfiguration für den Datenbank-Zugriff in der Datei config/database.yml

   xyz00-project@h20:~$ cd ~/openproject
   xyz00-project@h20:~/openproject$ cp config/database.yml.example config/database.yml

Now we edit the config/database.yml file and insert our database credentials for PostgreSQL. It should look like this (please keep in mind that you have to use the values you used above: user, database and password):

   production:
     adapter: postgresql
     encoding: unicode
     host: localhost
     database: xyz00_prjdb (wie oben angegeben)
     pool: 10
     username: xyz00_dbuser (wie oben angegeben)
     password: meinPasswort (wie oben angegeben)
   xyz00-project@h20:~$ cd ~/openproject
   xyz00-project@h20:~/openproject$ cp config/configuration.yml.example config/configuration.yml
   default:
     log_level: info
     email_delivery_method: :smtp
     smtp_address: localhost
     smtp_port: 25
     smtp_domain: example.com

Finish the installation of OpenProject

   xyz00-project@h20:~$ cd ~/openproject-ce
   xyz00-project@h20:~/openproject-ce$ echo "export SECRET_KEY_BASE=$(./bin/rake secret)" >> ~/.profile
   xyz00-project@h20:~/openproject-ce$ source ~/.profile
   xyz00-project@h20:~/openproject-ce$ RAILS_ENV="production" ./bin/rake db:migrate
   xyz00-project@h20:~/openproject-ce$ RAILS_ENV="production" LOCALE=de ./bin/rake db:seed
   xyz00-project@h20:~/openproject-ce$ RAILS_ENV="production" ./bin/rake assets:precompile

Referenzen