6 Replies Latest reply on Feb 10, 2014 2:07 AM by Graham Bird

    Can RhoConnect v4 be deployed alongside v3?

    Graham Bird

      We have a Linux server that is currently set up to run the older version 3 of RhoConnect.

      We have a requirement to deploy RhoConnect version 4 for a new application.

       

      What I would like to get confirmed is whether it is possible to have the two versions of RhoConnect running on the same Linux box and if so are there any pitfalls that we should watch out for?

       

      Kind regards,

      Graham Bird.

        • Re: Can RhoConnect v4 be deployed alongside v3?
          Jon Tara

          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.

          1 of 1 people found this helpful
            • Re: Can RhoConnect v4 be deployed alongside v3?
              Graham Bird

              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,

               

              Graham.

              • Re: Can RhoConnect v4 be deployed alongside v3?
                Graham Bird

                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.

                 

                Kind regards,

                Graham.

              • Re: Can RhoConnect v4 be deployed alongside v3?
                Kutir Mobility

                Graham,

                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 ?

                 

                Visnupriya R

                Kutir Mobility

                • Re: Can RhoConnect v4 be deployed alongside v3?
                  Graham Bird

                  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.

                  RVM: Ruby Version Manager - Using God with RVM

                   

                  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=/home/<user>/.rvm/bin/bootup_thin

                  DAEMON2=/home/<user>/.rvm/bin/bootup_thin400

                  ...

                  CONFIG_PATH=/etc/thin

                  CONFIG_PATH2=/etc/thin400

                  ...

                  $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.

                   

                  Regards,

                  Graham Bird.