Hotfix release available: 2025-05-14b "Librarian". upgrade now! [56.2] (what's this?)
Hotfix release available: 2025-05-14a "Librarian". upgrade now! [56.1] (what's this?)
New release available: 2025-05-14 "Librarian". upgrade now! [56] (what's this?)
Hotfix release available: 2024-02-06b "Kaos". upgrade now! [55.2] (what's this?)
Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
Hotfix release available: 2023-04-04b "Jack Jackrum". upgrade now! [54.2] (what's this?)
Hotfix release available: 2023-04-04a "Jack Jackrum". upgrade now! [54.1] (what's this?)
New release available: 2023-04-04 "Jack Jackrum". upgrade now! [54] (what's this?)
Hotfix release available: 2022-07-31b "Igor". upgrade now! [53.1] (what's this?)
Hotfix release available: 2022-07-31a "Igor". upgrade now! [53] (what's this?)
New release available: 2022-07-31 "Igor". upgrade now! [52.2] (what's this?)
New release candidate 2 available: rc2022-06-26 "Igor". upgrade now! [52.1] (what's this?)
New release candidate available: 2022-06-26 "Igor". upgrade now! [52] (what's this?)
Hotfix release available: 2020-07-29a "Hogfather". upgrade now! [51.4] (what's this?)
New release available: 2020-07-29 "Hogfather". upgrade now! [51.3] (what's this?)
New release candidate 3 available: 2020-06-09 "Hogfather". upgrade now! [51.2] (what's this?)
New release candidate 2 available: 2020-06-01 "Hogfather". upgrade now! [51.1] (what's this?)
New release candidate available: 2020-06-01 "Hogfather". upgrade now! [51] (what's this?)
Hotfix release available: 2018-04-22c "Greebo". upgrade now! [50.3] (what's this?)
Hotfix release available: 2018-04-22b "Greebo". upgrade now! [50.2] (what's this?)
setup_ruby_upgraded_server

Setup upgraded Ruby server

Hardware Details

OS - CENTOS 6.5 64-bit 

Instructions

General Server setup

Please follow the instructions from the link below, except for ruby, rubygems, passenger and capistrano.

https://wiki.exphosted.com/doku.php/setup_an_app_server

If the same server is being used as db please install mysql and solr.

https://wiki.exphosted.com/doku.php/setup_db_server

https://wiki.exphosted.com/doku.php/qastageandproductiondeployment#installing_solr_tomcat_on_search_server

If the same server is being used for Chat please install juggernaut and node.

https://wiki.exphosted.com/doku.php/setup_other_roles#chat_role

Install memcache if it is not shared with any other server.

https://wiki.exphosted.com/doku.php/setup_other_roles#memcached_role

Install ruby 1.9.3

Remove previous verions of ruby

First , remove any existing ruby versions. On our app servers REE1.8.7 could have been installed. So, please remove them. If ruby was installed through the instructions mentioned above. All, you need to do is

sudo mv /opt/ruby-enterprise-1.8.7-2011.03 ruby-enterprise-1.8.7-2011.03_removed

Otherwise, please remove all the executables of ruby, gem, rake, irb, passenger and etc..

Install ruby 1.9.3

Make yourself root

su root
#update or install libyaml
yum insyall libyaml

#Install ruby
cd /opt
wget http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p550.tar.gz
tar xzvf ruby-1.9.3-p550.tar.gz
cd ruby-1.9.3-p550

./configure --prefix=/opt/ruby-1.9.3
make
make install

echo 'pathmunge /opt/ruby-1.9.3/bin' >> /etc/profile.d/crossbow.sh
logout

Now login and verify if ruby -v returns the correct version.

Update rubygems
gem update --system 1.8.29

Install passenger

gem install passenger -v=4.0.44

Make changes to the apache config file. (Config file remains same as the one used for ruby 1.8.7 REE's passenger 3 but the following lines need to be modified.

#LoadModule passenger_module /opt/ruby-enterprise-1.8.7-2011.03/lib/ruby/gems/1.8/gems/passenger-3.0.9/ext/apache2/mod_passenger.so
LoadModule passenger_module /opt/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/passenger-4.0.44/buildout/apache2/mod_passenger.so
LoadModule upload_progress_module modules/mod_upload_progress.so
<IfModule mod_passenger.c>
     PassengerRoot /opt/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/passenger-4.0.44
     PassengerDefaultRuby /opt/ruby-1.9.3/bin/ruby
</IfModule>

#RailsFrameworkSpawnerIdleTime 0
PassengerMaxPreloaderIdleTime 0
#RailsAppSpawnerIdleTime 0 
PassengerMaxPreloaderIdleTime 0
### End Passenger tuning##
#RailsAutoDetect off

Update the gem versions of the components

If the following gems are already installed, please uinstall them using “gem uninstall <gemname>” command and reinstall.

gem install bundler -v=1.6.2

gem install rack -v "1.5.2"

gem install god -v=0.13.3

gem install capistrano -v=2.15.4

gem install capistrano-ext -v=1.2.1

Update ruby path as needed

  • For God - Change ruby path in /deplo/systasks/god.sh and /etc/init.d/god
  • For Capistrano - Change ruby path in /home/expdev01/crossbow/config/deploy.rb and /home/expdev01/crossbow/runcap.sh

Install needed gems before hand

Nokogiri
yum install libxml2 libxml2-devel (2.9.0-4)

bundle config build.nokogiri --use-system-libraries

gem install nokogiri -- --use-system-libraries -v='1.6.3.1'
RedCloth
bundle config build.RedCloth --with-cflags=-w

gem install RedCloth -v='4.2.9'

Database config file change

Change /deploy/crossbow/shared/config/database.yml “adapter” to mysql2 in all the needed stanzas.

God configuration changes

Change /deploy/crossbow/shared/config/god/generic_monitoring.god to update the bundle paths to /opt/ruby-1.9.3/bin/bundle from /usr/local/bin/bundle

Capistrano

Please update the capistrano config files as needed. Refer the link below for more information.

https://wiki.exphosted.com/doku.php/qastageandproductiondeployment#deployment_steps

Run db:seed

If you are using a fresh database for the current app setup, run the following task in the app directory

bundle exec rake db:seed RAILS_ENV=<environment>
setup_ruby_upgraded_server.txt · Last modified: 2018/08/31 16:16 (external edit)