From 68d66a83ab061ace226ad230bce0dc291dfa0134 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Mon, 16 Mar 2015 12:25:21 +0200 Subject: [PATCH 1/4] Ruby upgraded to 2.2.1 --- .ruby-version | 2 +- CHANGELOG.md | 4 ++++ README.md | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.ruby-version b/.ruby-version index ccbccc3dc..c043eea77 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.2.0 +2.2.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index cc0bd3e74..df7e8ae92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +16.03.2015 + +* ruby upgraded to version 2.2.1 + 27.02.2015 * Simplified config/application-example.yml, diff --git a/README.md b/README.md index 0380f6a75..189d41793 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Manual demo install and database setup: cd /home/registry git clone git@github.com:internetee/registry.git demo-registry cd demo-registry - rbenv local 2.2.0 + rbenv local 2.2.1 bundle cp config/application-example.yml config/application.yml # and edit it cp config/database-example.yml config/database.yml # and edit it From 5810901e68d2c2e3813fb169c23fdbbba10893c9 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Mon, 16 Mar 2015 12:35:11 +0200 Subject: [PATCH 2/4] Added RBENV upgrade doc --- CHANGELOG.md | 2 +- doc/application_build_doc.md | 2 +- doc/debian_build_doc.md | 69 ++++++++++++++++++++---------------- 3 files changed, 40 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df7e8ae92..bf3ba9b79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ 16.03.2015 -* ruby upgraded to version 2.2.1 +* ruby upgraded to version 2.2.1, added RBENV upgrade howto to debian doc at: doc/debian_build_doc.md 27.02.2015 diff --git a/doc/application_build_doc.md b/doc/application_build_doc.md index 53c93415b..79da11bcb 100644 --- a/doc/application_build_doc.md +++ b/doc/application_build_doc.md @@ -22,7 +22,7 @@ Deploy overview: (database schema should be loaded and seeds should be present) # at your local machine git clone git@github.com:internetee/registry.git cd registry - rbenv local 2.2.0 # more info about rbenv at debian doc + rbenv local 2.2.1 # more info about rbenv at debian doc gem install mina mina pr setup # one time, only creates missing directories ssh registry diff --git a/doc/debian_build_doc.md b/doc/debian_build_doc.md index c7531b504..c05814d0e 100644 --- a/doc/debian_build_doc.md +++ b/doc/debian_build_doc.md @@ -4,8 +4,46 @@ System build All systems should run on Debian 7 or newer, however officially Debian 7 is supported and tested. +### Manual build + +* Consider using [RBENV](https://github.com/sstephenson/rbenv) +* Compile requried [ruby version](https://github.com/internetee/registry/blob/master/.ruby-version) +* [Phusion passenger](https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html) +* [Postgresql](http://www.postgresql.org/docs/) + +Registry application is not tested with multi-threaded system (such as Puma) and +it's not officially supported. Please use multi-process system instead (Passenger, Unicorn, Mongrel) + +Use Phusion Passenger [official debian packages](https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#install_on_debian_ubuntu) NB! Passenger runtime does not depend on ruby version, thus you can use multiple different ruby version apps with same passenger install. + +We also recommend to investigate +[Passenger Optimization Guide](https://www.phusionpassenger.com/documentation/ServerOptimizationGuide.html) for proper configuration. + + +### For building gem libs + +Please install following lib, otherwise your bundler install might not be successful. + + sudo apt-get install libxml2-dev + +### RBENV install + + cd /home/registry + git clone https://github.com/sstephenson/rbenv.git /home/registry/.rbenv + git clone https://github.com/sstephenson/ruby-build.git /home/registry/.rbenv/plugins/ruby-build + +### RBENV upgrade + + cd .rbenv + git pull origin master + cd plugins/ruby-build + git pull origin master + + ### Using babushka autoscripts +Alternatively you can build servers up using scripts such as babushka. + You can use or find ideas how to build up production servers using sysadmin tool [Babushka](https://github.com/benhoskings/babushka). @@ -27,34 +65,3 @@ Please inspect those scripts before running anything, they might not be complete or might have serious bugs. You are free to fork it. -### Manual build - -Alternatively you can build up everything manually, required components: - -* Consider using [RBENV](https://github.com/sstephenson/rbenv) -* Compile requried [ruby version](https://github.com/internetee/registry/blob/master/.ruby-version) -* [Phusion passenger](https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html) -* [Postgresql](http://www.postgresql.org/docs/) - -Registry application is not tested with multi-threaded system (such as Puma) and -it's not officially supported. Please use multi-process system instead (Passenger, Unicorn, Mongrel) - -Use Phusion Passenger [official debian packages](https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#install_on_debian_ubuntu) NB! Passenger runtime does not depend on ruby version, thus you can use multiple different ruby version apps with same passenger install. - -We also recommend to investigate -[Passenger Optimization Guide](https://www.phusionpassenger.com/documentation/ServerOptimizationGuide.html) for proper configuration. - - -### For building gem libs - -Please install following lib, otherwise your bundler install might not be successful. - - sudo apt-get install libxml2-dev - - -### RBENV install - - cd /home/registry - git clone https://github.com/sstephenson/rbenv.git /home/registry/.rbenv - git clone https://github.com/sstephenson/ruby-build.git /home/registry/.rbenv/plugins/ruby-build - From 3a243f7ac645cf78c9268f533a8e86337284065c Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Mon, 16 Mar 2015 13:03:03 +0200 Subject: [PATCH 3/4] Robot now installs bundler if missing --- bin/robot | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/robot b/bin/robot index 9134a9137..13ef239df 100755 --- a/bin/robot +++ b/bin/robot @@ -19,7 +19,12 @@ cp config/application-example.yml config/application.yml cp config/secrets-example.yml config/secrets.yml cp config/database-robot.yml config/database.yml -# under jenkins use rbenv-plugin wrapper +# Under jenkins admin interface use rbenv-plugin wrapper +# rbenv does not have bundler by default +if echo gem list --local bundler | grep -q "bundler" + then echo '' + else gem install bundler +fi bundle install RAILS_ENV=test bundle exec rake db:all:drop From da05c6b45182f2e7a2d6d5cafc1d79fdfdd757dd Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Mon, 16 Mar 2015 13:06:35 +0200 Subject: [PATCH 4/4] Updated robot script --- bin/robot | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/robot b/bin/robot index 13ef239df..943b44a90 100755 --- a/bin/robot +++ b/bin/robot @@ -22,8 +22,10 @@ cp config/database-robot.yml config/database.yml # Under jenkins admin interface use rbenv-plugin wrapper # rbenv does not have bundler by default if echo gem list --local bundler | grep -q "bundler" - then echo '' - else gem install bundler + then echo 'bundler ok: already installed' + else + echo 'Installing bundler...' + gem install bundler fi bundle install