Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. OpenProject 3.0, Ubuntu 12.04 Production Procedure

OpenProject 3.0, Ubuntu 12.04 Production Procedure

Added by Christopher Panici about 11 years ago

Can anyone describe the production procedure in greater detail? I want to run production on the same computer that the development is currently running on. Do I need Apache? Or some other software?

Please help, I’d like to get this working because I have a TON of project work to do.

Thanks,
chris


Replies (16)

RE: OpenProject 3.0, Ubuntu 12.04 Production Procedure - Added by Christopher Panici about 11 years ago

I am also assuming (hoping) that when the production mode is running, it will start automatically when the computer boots?

Thanks,
chris

RE: OpenProject 3.0, Ubuntu 12.04 Production Procedure - Added by Karol Skolar about 11 years ago

Hi Chris,
if you want to start OP with OS, you have to configure Passenger plugin for Apache and also Apache.
Apache also carry load-balancing and whole OP will be much faster when running on apache instead of just stared Rails server process.

I`m in talk with Jens (OP developer) if there is need to publish guide, how to install OP on Debian/Centos and Apache integration, because we are close to final release of OP. So, please, be patient. Maybe I will publish it today.

Karol

RE: OpenProject 3.0, Ubuntu 12.04 Production Procedure - Added by Christopher Panici about 11 years ago

Karol, that would be awesome if you could publish that today. Please let me know if/when you do.

Thanks,
Chris

RE: OpenProject 3.0, Ubuntu 12.04 Production Procedure - Added by Leo Dewde about 11 years ago

I just spent the last two (8am until 11pm non-stop) desperately trying to integrate OpenProject 3.0 to Apache using passenger on my Ubuntu 12.04 server - it’s still not running : (. The furthest I’ve gotten was to the point where passenger showed an error message saying “bundler can’t be found”.

Seems to be very difficult for non-ruby experts to deploy OpenProject correctly.

It’s quite sad because OpenProject looks so incredibly awesome from what I’ve seen so far by starting the server directly.

Any help or documentation on how to integrate OpenProject into Apache (or any other way to deploy with reasonable performance) on Ubuntu would be much much appreciated!!!

RE: OpenProject 3.0, Ubuntu 12.04 Production Procedure - Added by Karol Skolar about 11 years ago

Hi guys,
I already finished tutorial installation for Centos here: https://www.openproject.org/topics/576?board_id=9
Installation of Apache/Passenger is very similar to the Debian/Ubuntu.

@Leo
Did you finished OP instalation successfully and OP its available on port 3000? If yes, then installation of Apache/Passenger wont be problem.
Let me now. First you have to have working installation of OP.

@Chris
you need to to complete all steps also for production with pre-parameter RAILS_ENV=“production”:

RAILS_ENV="production" bundle exec rake db:migrate

RAILS_ENV="production" bundle exec rake db:seed

RAILS_ENV="production" bundle exec rake assets:precompile

Let me know if this helped.

Maybe I will also add tutorial for Debian/Ubuntu, but its taking a lot of time.

Karol

RE: OpenProject 3.0, Ubuntu 12.04 Production Procedure - Added by Christopher Panici about 11 years ago

Karol, I am a noob when it comes to RAILS. Is there a step before that to get into the rails environment, or can I simply run those commands from a fresh terminal?

Thanks,
Chris

RE: OpenProject 3.0, Ubuntu 12.04 Production Procedure - Added by Leo Dewde about 11 years ago

@Karol yes, the installation was working well on port 3000. Fortunately, there is good documentation for that.

Not sure what I did wrong when trying to integrate it into passenger. I followed the Passenger users guide for “Deploying a Rack-based Ruby application (including Rails >= 3)” (chapter 4). http://www.modrails.com/documentation/Users%20guide%20Apache.html#_deploying_a_rack_based_ruby_application_including_rails_gt_3

I took a look at your tutorial for CentOS, the steps look very similar to the ones I took. I didn’t add any lines to httpd.conf, as far as I remember I used a2enmod instead. In any case, the module loaded fine but it returned an error message saying that the bundler gem is not found. Possibly THAT’S the reason why passenger didn’t find bundler? Your version of manually adding passenger to httpd.conf points to the ruby version installed in the openproject home folder!

Will try out later and share results later on tonight or possibly tomorrow.

Anyways, thanks much!

RE: OpenProject 3.0, Ubuntu 12.04 Production Procedure - Added by Karol Skolar about 11 years ago

Hi Leo,
for installing Apache/Passenger, run this as root (to be sure, that you have all necessary packages):

root@ubuntu#: apt-get install libcurl4-gnutls-dev apache2-threaded-dev libapr1-dev libaprutil1-dev

Then “su” into the user under which you have installed Openproject and Ruby. This should be the same user, is it? In my case user “openproject”

root@ubuntu#: su - openproject -c "bash -l"

Go to the folder, where you have Ruby/RVM installed (in my case /home/openproject)

Install Passenger gem

openproject@ubuntu#: gem install passenger

Then compile passenger for Apache running this command:

openproject@ubuntu#: passenger-install-apache2-module

Follow the installation and add lines into httpd and virtualhost conf as noticed in the wizard. If there are any errors, let me know.
Karol

RE: OpenProject 3.0, Ubuntu 12.04 Production Procedure - Added by Leo Dewde about 11 years ago

@Karol Skolar IT WORKS! I’m so excited : ) 2.5 days of work but definelty worth it.

The main difference from my previous installation is that I installed passenger the way you suggested with “gem install passenger” and then “passener-install_apache2-module”. Before, I used aptitude. I ASSUME this caused apache to use another ruby then the one installed under /home/openproject.

I still wonder about a couple of things:

1) Apache is running under the user “www-data”. To give apache the ability to read and execute stuff from /home/openproject, I added “www-data” to the group “openproject”. Is that not the way it should be done?

2) During the installation process, I didn’t specify my correct email configuration. Is it still possible to change this now that everything is fully installed?

3) I saw that you recommend to install the mod_security module for apache. Do I need to be very worried not having it installed for a couple of days?

Thanks so much for your support!!! I’m so happy everything works now : )

edit: let me know if you need to know any details or help for your guide

RE: OpenProject 3.0, Ubuntu 12.04 Production Procedure - Added by Karol Skolar about 11 years ago

Great news Leo :)
1) what is the workflow you want to apply by adding permissions of www-data user to openproject files?
2) yes, you can add it whenever you want, maybe apache restart is needed, not sure
3) :) the security is the first thing you should be worried about when you are shooting anything to the internet :). mod_ssl is only 1 part, you should configure apache correctly when it is accessible from the internet. but when you will access OP from secured LAN, its different situation. I`m not also experienced in security and also in Ruby, so I won`t help you :(.

Karol

RE: OpenProject 3.0, Ubuntu 12.04 Production Procedure - Added by Leo Dewde about 11 years ago

@Karol I’ve taken your advice (thanks again!) and set up mod_ssl, mod_evasive and mod_security on the server. I’ve configured mod_security according to this page and currtently use v2.2.5 (other versions don’t work for me either, I’ve tried).

There is, however, a problem with mod_security: When I try to update work packages and press the submit button, it redirects to page not found. As far as I can tell, this has nothing to do with SecRequestBodyLimit, SecRequestBodyNoFilesLimit or SecRequestBodyInMemoryLimit which are all set to >12MB. When I disable SecRequestBodyAccess (set it to Off), everything works. I’ve played around with the modsecurity.conf a bit, but nothing works. Do you have any idea how to fix this?

Also, I have another question: having everything set up and running in production now, what’s the best way to update openproject when the official release comes out in a few days?

Concerning question 1) from my previous post, it was a stupid question. I thought www-data needs rwx rights on /home/openproject, which it doesn’t. Setting it to rx for others, like you suggest in your CentOS installation guide, makes much more sense.

Thanks much!

Cheers,
Leo

RE: OpenProject 3.0, Ubuntu 12.04 Production Procedure - Added by Philipp Tessenow about 11 years ago

Concerning the update, the following steps should get you going (running as the openproject user within the openproject installation directory):

  # make sure you have a backup of your database, repositories and uploaded files
  # stop the server, when running a production environment

  git fetch
  git checkout release/3.0
  # there might be a conflict in Gemfile.lock. If that is the case, you can savely delete Gemfile.lock. `bundle install` will create that file again later.

  # you might want to upgrade your ruby to the latest available patch-level

  # if you have plugins, make sure they are still compatible
  # update them in Gemfile.plugins
  # and follow their upgrade instructions if necessary

  bundle install
  RAILS_ENV="production" bundle exec rake db:migrate

  # upgrade should be finished, you may start your server again
  # or give it a test-run through executing `RAILS_ENV="production" bundle exec rails server`

We probably give upgrade instructions with the 3.0 release - but this are the general steps you need. However, I cannot stress enough that you should make sure that you have recent backups before doing anything :)

—
Philipp

RE: OpenProject 3.0, Ubuntu 12.04 Production Procedure - Added by Christopher Panici about 11 years ago

@Karol

I’ve installed apache and passenger. However, what configuration file do I have to modify? And what should the configuration file look like?

Thanks,
Chris

RE: OpenProject 3.0, Ubuntu 12.04 Production Procedure - Added by Christopher Panici about 11 years ago

I can’t get apache server to run:

neech@ubuntu-1204:/var/log/apache2$ sudo /etc/init.d/apache2 restart
Syntax error on line 51 of /etc/modsecurity/activated_rules/modsecurity_crs_16_session_hijacking.conf:
ModSecurity: Disruptive actions can only be specified by chain starter rules.
Action ‘configtest’ failed.
The Apache error log may have more information.
…fail!

Apache Log File:
[Thu Mar 06 19:37:56 2014] [notice] Apache/2.2.22 (Ubuntu) configured — resuming normal operations
[Thu Mar 06 20:18:28 2014] [notice] caught SIGTERM, shutting down
[Thu Mar 06 20:18:30 2014] [notice] ModSecurity for Apache/2.6.3 (http://www.modsecurity.org/) configured.
[Thu Mar 06 20:18:30 2014] [notice] ModSecurity: APR compiled version=“1.4.6”; loaded version=“1.4.6”
[Thu Mar 06 20:18:30 2014] [notice] ModSecurity: PCRE compiled version=“8.12”; loaded version=“8.12 2011-01-15”
[Thu Mar 06 20:18:30 2014] [notice] ModSecurity: LUA compiled version=“Lua 5.1”
[Thu Mar 06 20:18:30 2014] [notice] ModSecurity: LIBXML compiled version=“2.7.8”
[Thu Mar 06 20:18:31 2014] [notice] Apache/2.2.22 (Ubuntu) configured — resuming normal operations
[Thu Mar 06 20:47:16 2014] [notice] caught SIGTERM, shutting down

RE: OpenProject 3.0, Ubuntu 12.04 Production Procedure - Added by Karol Skolar about 11 years ago

Hi Chris,
What step exactly you are looking for? Which configuration file?
Please, note that I have created new tutorial for Debian/Apache here:
https://www.openproject.org/topics/684?board_id=9

There is tutorial how to install Apache with Passenger and as far as it is for Debian, its the same for Ubuntu.

Karol

Christopher Panici wrote:

@Karol

I’ve installed apache and passenger. However, what configuration file do I have to modify? And what should the configuration file look like?

Thanks,
Chris

RE: OpenProject 3.0, Ubuntu 12.04 Production Procedure - Added by Christopher Panici about 11 years ago

@Karol,

Thank you! I was looking for these steps:

Add this lines to /etc/httpd/conf/apache2.conf, but first, check if the syntax is the same as the “passenger-install-apache2-module” installer noticed:
LoadModule passenger_module /home/openproject/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /home/openproject/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37
PassengerDefaultRuby /home/openproject/.rvm/gems/ruby-2.1.0/wrappers/ruby

Create VirtualHost file for Apache:
[root@debian]# vim /etc/apache2/conf.d/openproject.conf
Paste these lines into it:
<VirtualHost *:80>
ServerName www.myopenprojectsite.com
# !!! Be sure to point DocumentRoot to ‘public’!
DocumentRoot /home/openproject/openproject/public
<Directory /home/openproject/openproject/public>
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews

Start Apache
[root@debian]# service httpd start

I will have to try these steps later, but hopefully this clears up why my apache server will not start…

Thanks again,
Chris

  • (1 - 16/16)
Loading...