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

Installation page #101

Open
awd-switzerland opened this issue Apr 27, 2012 · 2 comments
Open

Installation page #101

awd-switzerland opened this issue Apr 27, 2012 · 2 comments

Comments

@awd-switzerland
Copy link

Is it intentional, that your installation page (http://bigtuna.appelier.com/installation.html) does not actually tell how to install big tuna?

@awd-switzerland
Copy link
Author

Here is a complete guide to how I installed big-tuna. Comments & suggestions welcome:

INSTALLING BigTuna

Assumptions:

  • you're using github
  • you're using rvm on the server
  • your server has access to the internet, to clone the github repo and install gems
  • the installation directory on your server is /bigtunapath/, replace with whatever path you really
    use
  • the apache & ssh username is your_apache_user, replace with whatever is appropriate in your scenario

Important bits (TL;DR):

  • The current server setup script "forgets" to create the shared/builds directory
  • The current capistrano recipes don't care about your config, you have to copy that yourself

On github.com

clone https://github.com/appelier/bigtuna

On your local machine

  • clone https://github.com/your_account/bigtuna.git
  • cd bigtuna
  • git checkout -b deploy # create a separate branch containing your changes (configs, bundled gems, etc.)
  • git push -u origin deploy
  • Remove config/deploy.rb from .gitignore
  • Create config/deploy.rb (see an example diff at the bottom, it shows what part of it you should change)
  • Create config/database.yml
  • Create config/bigtuna.yml
  • Create config/email.yml
  • Add capistrano to the Gemfile # we run capistrano using bundle exec, if you want that, then it must be part of the Gemfile
  • bundle --without test development
  • bundle package # this step is only needed if your server does not have access to the internet
  • git add .
  • git push

On the server

  • Install rvm
  • rvm install 1.9.3-p194 # or whatever ruby version you want to run it on
  • prepare apache config # passenger (http://www.modrails.com/) has good docs on that

On your local machine

  • cap deploy:setup # this command is only needed once, it sets up all basic directories
  • scp config/*.yml [email protected]:/bigtunapath/shared/config

On the server

  • mkdir /bigtunapath/shared/builds

On your local machine

  • cap deploy

Example diff for config/deploy.rb:
--- config/deploy.rb.sample
+++ config/deploy.rb
@@ -1,16 +1,25 @@
+$:.unshift(File.expand_path('lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path.
+require "rvm/capistrano"
require "bundler/capistrano"

-set :application, "bigtuna"
-set :domain, "your.domain"
-set :repository, "[email protected]:big_tuna.git"
-set :use_sudo, false
-set :deploy_to, "/your/apps/#{application}"
-set :scm, :git

-set :user, "user_running_apps"

-role :app, domain
-role :web, domain
-role :db, domain, :primary => true
+set :application, "BIGTUNA"
+set :domain, "YOUR.DOMAIN.COM"
+set :scm, :git
+set :repository, "[email protected]:big_tuna.git"
+set :branch, "deploy"
+set :use_sudo, false
+set :deploy_to, "/bigtuna/#{application}"
+set :user, "your_apache_user"
+set :rvm_ruby_string, '1.9.3-p194'
+set :rvm_type, :user
+
+role :app, domain
+role :web, domain
+role :db, domain, :primary => true

@kke
Copy link

kke commented Jun 20, 2012

Why go through all that trouble? For BigTuna dev's maybe, but for someone who just wants to use it, i guess something like this should do the trick:

cd /opt
git clone https://github.com/your_account/bigtuna.git
cd bigtuna
bundle update

then tweak the config ymls and set up passenger or whatever (thin/unicorn with daemonize?)

to upgrade, run git pull in the /opt/bigtuna dir perhaps?

RANT:
Looks like there's currently no ruby CI being actively developed. If you take a look at https://www.ruby-toolbox.com/categories/continuous_integration the state of the projects looks kind of sad. None of them seems to install cleanly on up to date linux, have bad documentation and share quite identical features and the mantra "why use this instead of other ci's? we're keeping it simple!".

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

No branches or pull requests

2 participants