(Migrated) How to setup more than one environment

(This message has been automatically imported from the retired mailing list)

Dear Zato’s team,

I have tried to setup two environments working separately on the same
machine.

What has been done:

  1. Two ODB databases and different users have been created.
  2. Two environmets have been created using “zato quickstart create” (env1,
    env2).
  3. All config files of env2 environment have been reviewed in order to
    change default port numbers.
  4. All config files of env2’s servers have been reviewed in order to change
    KVDB form 0 to 1.

After all, it seems to work. I have two different environments and Data
Dictionaries are also separated.

Unfortuantely, there is one issue… Loading *.py files into
env1/server1/pickup-dir makes that they are loaded also into env2… I can
see this in env2/server1/logs/server.log.

How can I fix this issue?

Thank you for your help in advance.

–=20
Pozdrawiam / BRegards,

Jan Skowro=C5=84ski

Direct phone: +48 505 018 351
E-mail: jan.skowronski@dsr.com.pl

–=20

On 01/06/2015 11:59, Skowroński, Jan wrote:

  1. Two ODB databases and different users have been created.
    Do you also have two different redis databases listening on different
    ports? Or using two different database IDs in the same redis instance?

If not, that might be why both clusters are picking up the new python
files, since there’s a publish/subscribe mechanism to notify all servers
when a configuration change is required.

Regards,

Brian.

On 01/06/2015 12:30, Skowro=C5=84ski, Jan wrote:

I just use two different redis database IDs. id =3D 0 in env1 and id =3D=
1 in
env2.
That would have been my first approach too, but I believe that gives=20
insufficient isolation. See this page:
http://redis.io/topics/pubsub


Database & Scoping

Pub/Sub has no relation to the key space. It was made to not interfere=20
with it on any level, including database numbers.

Publishing on db 10, will be heard by a subscriber on db 1.

If you need scoping of some kind, prefix the channels with the name of=20
the environment (test, staging, production, …).


I don’t know if Zato lets you prefix the pub/sub channels.

Regards,

Brian.

I just use two different redis database IDs. id =3D 0 in env1 and id =3D 1 =
in
env2.

I will try to setup a new redis database listening on different port.

2015-06-01 13:25 GMT+02:00 Brian Candler b.candler@pobox.com:

On 01/06/2015 11:59, Skowro=C5=84ski, Jan wrote:

  1. Two ODB databases and different users have been created.

Do you also have two different redis databases listening on different
ports? Or using two different database IDs in the same redis instance?

If not, that might be why both clusters are picking up the new python
files, since there’s a publish/subscribe mechanism to notify all servers
when a configuration change is required.

Regards,

Brian.

–=20
Pozdrawiam / BRegards,

Jan Skowro=C5=84ski

Direct phone: +48 505 018 351
E-mail: jan.skowronski@dsr.com.pl

–=20

Gentlemen,

Thank you very much for your quick help:)

The best solution was to install a new instance of redis database listening
on different port.

Now it works great!:slight_smile:

2015-06-01 15:05 GMT+02:00 Coeuz coeuz@coeuz.net:

Hi,

El 01/06/15 a les 13:35, Brian Candler ha escrit:

On 01/06/2015 12:30, Skowro=C5=84ski, Jan wrote:

I just use two different redis database IDs. id =3D 0 in env1 and id =
=3D 1
in

env2.
That would have been my first approach too, but I believe that gives
insufficient isolation. See this page:
http://redis.io/topics/pubsub

Bear in mind that, given the single-threaded nature of Redis, the usage
of multiple databases within the same Redis Instance is discouraged and
actually might soon be deprecated.
So, even if you could manage to configure your multi-zato environment
within the same instance, I recommend you to follow the other path.

Some references:

https://redislabs.com/blog/benchmark-shared-vs-dedicated-redis-instances#=
.VWxXyrz7ss8
https://groups.google.com/forum/#!topic/redis-db/x3-6GByC3xE

Regards,
Carles

–=20
Pozdrawiam / BRegards,

Jan Skowro=C5=84ski

Direct phone: +48 505 018 351
E-mail: jan.skowronski@dsr.com.pl

–=20