bulk move applications to another deployment zone

hi all,

we have a lot of applications in a certain deployment zone which I want to get rid of and just use the Global zone. This is on our Test environment and there is no use anymore for different zones. We have hundreds of applications in this internal zone and I would like to perform a bulk move to the Global zone. It is not possible to delete this 'internal' zone with modules still in it. Does anybody know if there is a short cut for not having to manually move each module to the Global zone?

When looking at the database there is a ZONE_ID field in the [ossys_espace] table but not all espaces in the internal zone have the same ID and don't seem to relate to the [ossys_zone] table.


any help is appreciated.


cheers,

Frank

Hi Frank,

I found myself in the same situation once where I wanted to move applications/modules in bulk to a different deployment zone, but unfortunately I did not find a way of doing that. So I had to move each module manually to a different deployment zone.

I did created an idea for it, even though it is not very common to bulk move applications to different zones, it is still a useful feature to have in Service Center in my opinion.

You can vote on it here:

Since you are talking about the Ossys_Zone table, I assume you are still on OutSystems 10 right? Because in OutSystems 11, you have the possibility to change a zone on application level so it would have saved you some time.

Regards,

Nordin

Hi,


The info you need is stored in ossys_platformconfig. Thaven't tried changing this via the database myself so first try with 1 module ...


First, you need to find the instance keys of the different zones:

select * from ossys_platformconfig where name = 'Application Deployment Configuration';


The following query will give you as list of the zone every module is in:

select * from ossys_platformconfig where name = 'Configured Application Deploy';

The value attributes hold the zone instance key (1st query).

The scopeid value is a reference to the espace/module. The link with the espace/module can be found in ossys_scope

select * from ossys_espace

where ss_key in (

    select modulekey from ossys_platformconfig c, ossys_scope s

    where value like '56769bf6-0916-41e8-855c-7c9977a1b38b' --> put here the actual instancekey

    and name = 'Configured Application Deploy'

    and s.id = c.scopeid 


)


So basically, you need to update ossys_platformconfig records with 'Application Deployment Configuration' and put the new instancekey as value.

As I said, haven't tried it yet so no guarntees.

And I would suggest applying these changes afterwards via a solution that holds all moved components (or all) and pressing "Apply Settings". Don't know if this will be enough. Other a full publish will be needed.



Hi Kurt,

Thanks for sharing this! All the more reason for OutSystems to analyze this further and incorporate this feature inside Service Center don't you think?

AFAIK the ossys_platformconfig table only exists inside an OutSystems 11 Platform Database. 

Since Frank is talking about the ossys_zone table, I believe his case concerns OutSystems 10 because the ossys_zone table does not exist anymore in OutSystems 11. All the zone configurations have been moved to the ossys_platformconfig table you mentioned.

Cheers,

Nordin

Indeed, my reply is for version 11. But the ossys_zone table still exists. But it's not used anymore.

In version 10, the zone was indicated in the ossys_espace table but Frank indicated the info was not there so I assumed it was version 11


hi Kurt, Nordin,

version is indeed 11, I'm gonna try your suggested solution. I think an apply settings will not suffice, when moving an application in Service Center an application publish is also needed.
I will let you know how it turns out.



Kurt Vandevelde wrote:

Indeed, my reply is for version 11. But the ossys_zone table still exists. But it's not used anymore.

In version 10, the zone was indicated in the ossys_espace table but Frank indicated the info was not there so I assumed it was version 11


Ah yes, that is where I got confused. The ossys_zone table does still exist, but is not used anymore in OutSystems 11. 

Thanks for reminding me Kurt!

 

Hi Kurt,


Do you know what the records in the OSSYS_PLATFORMCONFIG table are for with NAME = 'Previous Deployment Zone Key' and NAME = 'Previous Deployment Zone Used'?

with the suggestions you made I've created an update query which seems to do the job but I'm curious what the beforementioned records are for and also if they are essential for the platform?


maybe for use for other people here's the query to move all modules from one zone to another

update  ossys_platformconfig

set VALUE = (select INSTANCEKEY 

 from ossys_platformconfig 

 where NAME = 'Application Deployment Configuration' 

 and PARAMETERNAME = 'NAME' 

 and VALUE = 'XXXXX')   -- name of the zone where to move to

where id in (select ID from OSSYS_PLATFORMCONFIG where name = 'Configured Application Deploy' and Value = (select INSTANCEKEY 

 from ossys_platformconfig 

 where NAME = 'Application Deployment Configuration' 

 and PARAMETERNAME = 'NAME' 

 and VALUE = 'YYYYYY') )  -- name of the zone where to move from