Running multiple instances of Sugar7 on one server

I seem to recall someone mentioning caveats to running multiple instances of SugarCRM 7 on one server (or was it multiple instances in one browser?).

I'd like to set up a copy of my development environment for user testing on the same server as dev. (I don't want them disrupted by continuous repairs and javascript typos).

Anything I need to be aware of before I do this?

thanks,
FrancescaS
  • Francesca:

    You need to make sure to change the Unique ID number in config.php file. You can change the last 4 characters of the unique_key 0-9 a-f without causing any
    issues throughout the system.


  • Hi Francesca,

    We have multiple instances running in paralel on the same server. They are installed as separate websites, with each their own unique database credentials. For us this works without any changes.

    Good Luck,
  • Francesca Shiekh I know this was old question, but how you solved this issue?

    I also need sometime to clone my production environment into some kind of sandbox, where I can test SugarCRM upgrade for example. So just wonder if just setting new fullsearch index will work(I am aware that fulltext index need to be indexed again as well as caches and rmail archiving might stop working). 

    But are there some other issues that we might expect?

    Thanks!

  • Sorry Ivica, 

    my admins set up 6 separate servers for my 3 environments. 3 Application servers (Web servers) and 3 Database servers. Elasticsearch is on its own server for Production, and is installed on each of the Application Servers for Test and Development.

    So I avoid all issues.

    FrancescaS

  • I have about 50 instances on my laptop (don't ask) and the biggest danger is really just ensuring that each instance is pointing to the appropriate DB and Elasticsearch index. The DB settings in the config.php, along with the unique_key value are important pieces to that puzzle. You should also update the site_url setting for good measure.

    The only gotcha that you have to be careful with is that depending on how you configure your web server, you might not be able to open multiple instances within the same browser window.

    For example, mine is configured such that I would access them like this:

    http://localhost/instance1

    http://localhost/instance2 

    ..and so forth.

    If I attempt to access more than 1 instance simultaneously within the same browser window the OAuth tokens get all mixed up as they are in localstorage under "localhost." That eventually causes me to get booted out of one of the instances.

  • Angel Magana Yes, I am aware of issues with OAuth token, because I am using same approach for local development as you do, so I have to close all browser tabs that are using sugarcrm on localhost.

    Angel Magana I will rephrase my question. How do you create sandboxed instance based on existing SugarCRM instance, in case you want to test some new feature on sandboxed instance or if you want to test upgrade script? And off course if we consider that we want sandbox instance to be on same server, just different domain? What I am concerned only about is unique_key(database settings and site_url need to be changed anyway.)

  • Ivica:

    You need to make sure to change the Unique ID number in config.php file after copying the Sugar File System. You should only change the last 4 characters of the unique_key. Only use "0-9" and/or "a-f" or you may cause issues throughout the cloned system.

    Best Regards,

    David

  • Hi Ivica Nedeljkovic

    I have many instances on a server and normally we restore 2 copies one to DEV and other to QA, I follow this steps:
    1.- Create a server name to the instance e.g sugardev.local ( you can do it with apache virtual host )
    2.- Add sugardev.local to system hosts file e.g on OSX modify the file /etc/hosts (add the line 127.0.0.1 sugardev.local ) and then restart apache
    3.- Create a DB
    4.- If the instance is a backup, restore the DB.
    5.- Copy the instance directory to web server directory.
    6.- Modify the config.php ( DB data, Elastic search server, host and site_url )
    7.- If the instance is a backup check if the .htaccess file exist.
    8.- Check the permissions
    9.- Open your browser and type sugardev.local

    Note.- you need to assign different host name to each instance

    I follow this steps and can open tabs with diferrent instances in the same browser.

    Hope this help

  • As others have mentioned, its usually just a matter of copying the contents of the Sugar directory and the database. The last piece would be to update the config file to reflect the new database settings, unique_key, etc. 

    The process would be pretty much the same whether you are making a sandbox on the same server where original is hosted or if the sandbox is going onto a different server.

  • One more thing I will add - make sure you clear out the job queue and campaign email queue before your turn the system back. You may also want to randomise all the email addresses as well. If you have integration interface, you may want to disable them or point to to the corresponding dev/UAT instance.