1 of 1 people found this helpful
I'd think all you have to do is run the servers on different ports and/or different IP addresses. And you'll have to manage your Gems carefully. Safest bet would be to run each one in it's own VM.
Unfortunately the separate VMs are not a quick option for us at the moment, although this may end up being the route we take if things don't pan out with what we are trying.
Thanks for the response,
We have installed RVM to see if we can accomplish this.
So far, I have installed RVM on our test system, set up the gemsets and confirmed that I can run the two instances independently using the gemsets - so that's good.
The problem I am currently facing is that the system is set up to use thin and nginx on start-up and I'm not sure how to configure these to run the rvm instances of rhoconnect that I need them to.
If anyone has any experience of thin/nginx and rvm and wants to give me some pointers, it would be greatly appreciated.
Running rhoconnect with different port ( http://www.spritle.com/blogs/2012/05/28/run-rhoconnect-on-two-different-ports/ ) is fine, It won't affect app functionality but it may merge the log which may affect your tracing.
May be you can try screen command http://kb.iu.edu/data/acuy.html
Are you also integrating it with Nginx ?
The server we have is currently running Nginx and Thin to host RhoConnect and Redis.
We've set this up before to run multiple instances of RhoConnect, but were not certain whether we could safely run two different versions of RhoConnect at the same time.
I will give things a try and report back as to how we get on.
The short answer is that this can be done using RVM, Thin and Nginx.
The following page on RVM was the key to the whole setup.
We set up RVM with the two versions of gems that we needed to use and tested that we could run the two instances under RVM independently using the relevant gemsets (i.e. using rhoconnect start in the relevant RhoConnect directory).
To create the two bootup link files we ran "rvm wrapper v1@rhoconnect400 bootup thin" and "rvm wrapper v1@rhoconnect342 bootup thin". This created the relevant directories etc. but overwrote the bootup_thin file in the home directory. As such, we then manually created a second bootup_thin link "ln -s /home/<user>/.rvm/gems/ruby-v1-p484@rhoconnect400/wrappers/thin bootup_thin400".
In the /etc/ directory, there is the "thin" directory which contains the yml files for the various instances of RhoConnect. We created a second copy of this directory to contain the 4.0.0 versions so then had "thin" for the old versions of RhoConnect and "thin400" for the new ones.
Next up, we edited the script "/etc/init.d/thin" to change where the DAEMON process was looking for the thin application and add in a second DAEMON process for the second version of thin:
$DAEMON start --all $CONFIG_PATH
$DAEMON2 start --all $CONFIG_PATH2
and so on with the other cases.
The extra version of RhoConnect needed to be added to the /opt/nginx/conf/conf.d/rhoconnect.conf in the normal fashion (no rvm references here).
We restarted nginx and thin.
We now have both versions running alongside each other on our server.