Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INSTALL and production systems setup documentation needs update since we now use Bundler #162

Closed
jerboaa opened this issue Nov 7, 2010 · 10 comments
Assignees
Milestone

Comments

@jerboaa
Copy link
Member

jerboaa commented Nov 7, 2010

We should update and test MarkUs setup instructions. Maybe we should also provide a version of MarkUs with all gem dependencies packaged (bundle package).

@jerboaa
Copy link
Member Author

jerboaa commented Nov 18, 2010

#20 has some more thoughts which need to be addressed.

@ghost ghost assigned benjaminvialle May 10, 2011
@benjaminvialle
Copy link
Member

From Byron:

INSTALL DOCUMENTATION:

The config/environments/production.rb file needs to be configured earlier than indicated in the installation documentation. Specifically, you need to decide on the storage location before creating the instructor. You also need to make the directory for the svn storage.

The "secret" is in config/environment.rb, not in config/environments/production.rb as indicated by the install doc.

production.rb/development.rb:

REPOSITORY_EXTERNAL_BASE_URL "only makes sense" if you're using external commits. We should make it more clear that you can just leave it blank, or comment it out if you're never using external commits.

REPOSITORY_PERMISSION_FILE documentation lists two scenarios. In the second one, I think the 'true' should be 'false'.

OTHER:

More help on configuring the mongrel cluster would be nice (ie: comments in the config file).

@benjaminvialle
Copy link
Member

Added InstallProdOld instructions, regrouping all instructions for installing old releases of MarkUs. It also brings configuration for svn webdav configuration.

See : https://github.com/MarkUsProject/Markus/wiki/InstallProdOld

@benjaminvialle
Copy link
Member

Added Mac OS X installation for developer : https://github.com/MarkUsProject/Markus/wiki/InstallationMacOsX

And ImageMagick one : https://github.com/MarkUsProject/Markus/wiki/ImageMagick

Next to come : GNU/Linux and Mac OS X tutorial for server-side.

@mikeconley
Copy link
Member

So I created a fresh Ubuntu Natty VM and walked myself through the install process, step by step. My goal was to end up with a production MarkUs install running on MySQL with either Passenger or a Mongrel Cluster set up.

A few observations:

  1. After installing rubygems and installing bundler, bundler will not work right away (despite the bundle script being in the PATH), because it will "require 'bundler'". This won't work yet, because it either requires that the user set the RUBYOPT environment variable to "rubygems". See http://docs.rubygems.org/read/chapter/3, search for RUBYOPT.

  2. When using bundler, it is important that the user put the databases that they're NOT using (in my case, PostgreSQL and SQLite) in the --without clause.

Comment: This is a little counter-intuitive. Wouldn't it be better to have something like:
bundle install --with mysql production
as opposed to the negative version:
bundle install --without test development sqlite postgresql

  1. Even though bundler installed rake, it was not immediately available in my PATH for execution. Ubuntu kept suggesting that I do "apt-get install rake", which I eventually did.

  2. ruby-debug is required in memory_repository.rb and subversion_repository.rb. This was causing start-up failures, since ruby-debug wasn't part of the production bundle. This is pretty critical.

Benjamin has a patch for this under review here: http://review.markusproject.org/r/1023/

  1. The ApachePassenger install wikipage asks the user to do:

sudo aptitude install libapache2-mod-passenger
sudo passenger-install-apache2-module

But passenger-install-apache2-module was not available as an executable after I installed libapache2-mod-passenger. So, I followed the instructions here instead, which installed Passenger as a gem: http://www.modrails.com/install.html

In the end, I was unable to get Passenger or Mongrel Cluster working - I wasn't able to put as much time into it as the other steps. I'll try again tomorrow.

@jerboaa
Copy link
Member Author

jerboaa commented Jun 11, 2011

Thanks Mike for doing this. Our users will appreciate this. Here are my comments:

Re: bundle install --with mysql production

I believe this is a bundler particularity. If it is possible that's fine with me, but I think bundler only supports --without. At least the last time I checked. Since the user does this only once, I'm not worried.

Re: bundler, rubygems issue. Lets put a note there please.

Re: 3.) I'm worried that on some distributions the shipped rake version is not recent enough. It would be good if we get it going with bundler installing it. How about $ bundle exec rake Doesn't that work either?

Re: 4.) Let's strip ruby-debug from subversion_repository.rb and memory_repository.rb (or comment it out for released code).

So far my thoughts. What do you think?

mikeconley added a commit to mikeconley/Markus that referenced this issue Jun 11, 2011
mikeconley added a commit to mikeconley/Markus that referenced this issue Jun 11, 2011
…tion installs to freak out (since ruby-debug is not required in production installs). Referenced by issue MarkUsProject#162.
@benjaminvialle
Copy link
Member

Thank you guys for testing this.

Here are my comments :

1&3) It is a known 'issue' on both Debian/Ubuntu systems. /var/lib/gems is not in the path. We could consider that is not a bug as ruby/ror developpers should use bundler. And bundler packages everything in the $HOME of the user.
It also solves the issue you add with rake. As rake is package too with bundler. So, Severin is totally right. Users are now expected to put bundle exec before each command (rake is one of them). By putting bundle exec, we are sure we are using gems added by bundler and listed in the Gemfile.lock

  1. Yes. Strange. I agree with you. But no way to do this different. Only --without option is available.

  2. Same thing as before. Debian package will put it as a gem. So doing gem install passenger is quite the same. But maybe it is best to change this in the wiki (and use the gem version)

@jerboaa
Copy link
Member Author

jerboaa commented Jun 12, 2011

Thanks Benjamin for your thoughts.

How about we make the "Use bundle exec " note more prominent? I didn't really know this until ~2 days ago :)

benjaminvialle added a commit that referenced this issue Jun 12, 2011
Switching all rake commands to bundle exec rake.  Part of issue #162.
@mikeconley
Copy link
Member

Are we at a state where we can close this issue?

@benjaminvialle
Copy link
Member

InstallProdStable is not totally completed.

But yes, I think we can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants