You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@syncope.apache.org by syncope developer <sy...@gmail.com> on 2020/03/20 18:11:23 UTC

Deploying mapping and topology changes - without MasterContent.xml

Syncope support,
I have a question on deploying or transferring the topology changes (either
in mapping or some configuration ) made in one environment into another.

If it is a new environment i can copy the MasterContent.xml from one
environment (export) and into another. And restart syncope (tomcat).
But if there is a syncope instance that is functioning (there is already
users in the realm)- I am not able to copy the MasterContent.xml. Because,
once the tasks table has data - syncope startup is not reading the
MasterContent.xml and deploying the modified/later changes.

How would you recommend deploying such topology changes to a functioning
syncope instant?

Thanks
Really appreciate your support.
Lat

Re: Deploying mapping and topology changes - without MasterContent.xml

Posted by Maco Di Sabatino Di Diodoro <md...@apache.org>.
Hi

Il 20/03/20 19:11, syncope developer ha scritto:
> Syncope support,
> I have a question on deploying or transferring the topology changes 
> (either in mapping or some configuration ) made in one environment 
> into another.
>
> If it is a new environment i can copy the MasterContent.xml from one 
> environment (export) and into another. And restart syncope (tomcat).
> But if there is a syncope instance that is functioning (there is 
> already users in the realm)- I am not able to copy the 
> MasterContent.xml. Because, once the tasks table has data - syncope 
> startup is not reading the MasterContent.xml and deploying the 
> modified/later changes.
>
> How would you recommend deploying such topology changes to a 
> functioning syncope instant?

You can use swagger [1] / curl to export configurations and import them 
to another instance
For example if you need to export connector configurations:

Export:

curl -X GET 
"https://syncope-vm.apache.org/syncope/rest/connectors/connector_key" 
-H  "accept: application/json" -H  "X-Syncope-Domain: Master" -H  
"Authorization: Basic YWRtaW46cGFzc3dvcmQ="

take the json and update the connector in the other env:

curl -X PUT "https://newenv/syncope/rest/connectors/key" -H  "accept: 
*/*" -H  "X-Syncope-Domain: Master" -H  "Authorization: Basic 
YWRtaW46cGFzc3dvcmQ=" -H  "Content-Type: application/json" -d 
"{\"key\":\"string\",\"adminRealm\":\"string\",\"location\":\"string\",\"connectorName\":\"string\",\"bundleName\":\"string\",\"version\":\"string\",\"displayName\":\"string\",\"connRequestTimeout\":0,\"poolConf\":{\"maxObjects\":0,\"minIdle\":0,\"maxIdle\":0,\"maxWait\":0,\"minEvictableIdleTimeMillis\":0},\"conf\":[{\"schema\":{\"name\":\"string\",\"displayName\":\"string\",\"helpMessage\":\"string\",\"type\":\"string\",\"required\":true,\"order\":0,\"confidential\":true,\"defaultValues\":[{}]},\"overridable\":true,\"values\":[{}]}],\"capabilities\":[\"AUTHENTICATE\"]}"

Regards
M
>
> Thanks
> Really appreciate your support.
> Lat

-- 
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 0859111173
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/


Re: Deploying mapping and topology changes - without MasterContent.xml

Posted by Marco Di Sabatino Di Diodoro <ma...@tirasa.net>.
Il 03/04/20 18:18, syncope developer ha scritto:
> Thank you for your response!
> Doing what you were suggesting would require that we KNOW what the 
> changes are in the source Syncope instance. Following your example, we 
> would need to know what connectors (keys) we have in the source 
> instance and have one REST call for each connector. Is there a set of 
> the individual REST API calls that would, in total, allow us to 
> propagate all the changes (to topology) in source Syncope instance to 
> a target Syncope instance?
On this link [1], you can discovery all services that are implemented 
for Connectors.

You can try to implement a client that read the connector from one 
instance and propagate the configuration to another.
To check if there have been any changes it might be useful to check the 
history of the changes. Take a look at "Connector Instances and External 
Resources Configuration History Management"

Regards
M

[1] https://syncope-vm2.apache.org/syncope/swagger/#/Connectors


> Thanks
>
> On Fri, Mar 20, 2020 at 4:09 PM Marco Di Sabatino Di Diodoro 
> <marco.disabatino@tirasa.net <ma...@tirasa.net>> wrote:
>
>     Hi
>
>     Il 20/03/20 19:11, syncope developer ha scritto:
>>     Syncope support,
>>     I have a question on deploying or transferring the topology
>>     changes (either in mapping or some configuration ) made in one
>>     environment into another.
>>
>>     If it is a new environment i can copy the MasterContent.xml from
>>     one environment (export) and into another. And restart syncope
>>     (tomcat).
>>     But if there is a syncope instance that is functioning (there is
>>     already users in the realm)- I am not able to copy the
>>     MasterContent.xml. Because, once the tasks table has data -
>>     syncope startup is not reading the MasterContent.xml and
>>     deploying the modified/later changes.
>>
>>     How would you recommend deploying such topology changes to a
>>     functioning syncope instant?
>
>     You can use swagger [1] / curl to export configurations and import
>     them to another instance
>     For example if you need to export connector configurations:
>
>     Export:
>
>     curl -X GET
>     "https://syncope-vm.apache.org/syncope/rest/connectors/connector_key"
>     <https://syncope-vm.apache.org/syncope/rest/connectors/connector_key>
>     -H  "accept: application/json" -H  "X-Syncope-Domain: Master" -H 
>     "Authorization: Basic YWRtaW46cGFzc3dvcmQ="
>
>     take the json and update the connector in the other env:
>
>     curl -X PUT "https://newenv/syncope/rest/connectors/key"
>     <https://newenv/syncope/rest/connectors/key> -H  "accept: */*" -H 
>     "X-Syncope-Domain: Master" -H "Authorization: Basic
>     YWRtaW46cGFzc3dvcmQ=" -H "Content-Type: application/json" -d
>     "{\"key\":\"string\",\"adminRealm\":\"string\",\"location\":\"string\",\"connectorName\":\"string\",\"bundleName\":\"string\",\"version\":\"string\",\"displayName\":\"string\",\"connRequestTimeout\":0,\"poolConf\":{\"maxObjects\":0,\"minIdle\":0,\"maxIdle\":0,\"maxWait\":0,\"minEvictableIdleTimeMillis\":0},\"conf\":[{\"schema\":{\"name\":\"string\",\"displayName\":\"string\",\"helpMessage\":\"string\",\"type\":\"string\",\"required\":true,\"order\":0,\"confidential\":true,\"defaultValues\":[{}]},\"overridable\":true,\"values\":[{}]}],\"capabilities\":[\"AUTHENTICATE\"]}"
>
>     Regards
>     M
>
>     [1] https://syncope-vm.apache.org/syncope/swagger/
>
>>
>>     Thanks
>>     Really appreciate your support.
>>     Lat
>
>     -- 
>     Dott. Marco Di Sabatino Di Diodoro
>     Tel. +39 3939065570
>
>     Tirasa S.r.l.
>     Viale Vittoria Colonna, 97 - 65127 Pescara
>     Tel +39 0859116307 / FAX +39 0859111173
>     http://www.tirasa.net
>
>     Apache Syncope PMC Member
>     http://people.apache.org/~mdisabatino/
>
-- 
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale Vittoria Colonna, 97 - 65127 Pescara
Tel +39 0859116307 / FAX +39 0859111173
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/


Re: Deploying mapping and topology changes - without MasterContent.xml

Posted by syncope developer <sy...@gmail.com>.
Thank you for your response!
Doing what you were suggesting would require that we KNOW what the changes
are in the source Syncope instance. Following your example, we would need
to know what connectors (keys) we have in the source instance and have one
REST call for each connector. Is there a set of the individual REST API
calls that would, in total, allow us to propagate all the changes (to
topology) in source Syncope instance to a target Syncope instance?
Thanks

On Fri, Mar 20, 2020 at 4:09 PM Marco Di Sabatino Di Diodoro <
marco.disabatino@tirasa.net> wrote:

> Hi
> Il 20/03/20 19:11, syncope developer ha scritto:
>
> Syncope support,
> I have a question on deploying or transferring the topology changes
> (either in mapping or some configuration ) made in one environment into
> another.
>
> If it is a new environment i can copy the MasterContent.xml from one
> environment (export) and into another. And restart syncope (tomcat).
> But if there is a syncope instance that is functioning (there is already
> users in the realm)- I am not able to copy the MasterContent.xml. Because,
> once the tasks table has data - syncope startup is not reading the
> MasterContent.xml and deploying the modified/later changes.
>
> How would you recommend deploying such topology changes to a functioning
> syncope instant?
>
> You can use swagger [1] / curl to export configurations and import them to
> another instance
> For example if you need to export connector configurations:
>
> Export:
>
> curl -X GET
> "https://syncope-vm.apache.org/syncope/rest/connectors/connector_key"
> <https://syncope-vm.apache.org/syncope/rest/connectors/connector_key> -H
> "accept: application/json" -H  "X-Syncope-Domain: Master" -H
> "Authorization: Basic YWRtaW46cGFzc3dvcmQ="
>
> take the json and update the connector in the other env:
>
> curl -X PUT "https://newenv/syncope/rest/connectors/key"
> <https://newenv/syncope/rest/connectors/key> -H  "accept: */*" -H
> "X-Syncope-Domain: Master" -H  "Authorization: Basic YWRtaW46cGFzc3dvcmQ="
> -H  "Content-Type: application/json" -d
> "{\"key\":\"string\",\"adminRealm\":\"string\",\"location\":\"string\",\"connectorName\":\"string\",\"bundleName\":\"string\",\"version\":\"string\",\"displayName\":\"string\",\"connRequestTimeout\":0,\"poolConf\":{\"maxObjects\":0,\"minIdle\":0,\"maxIdle\":0,\"maxWait\":0,\"minEvictableIdleTimeMillis\":0},\"conf\":[{\"schema\":{\"name\":\"string\",\"displayName\":\"string\",\"helpMessage\":\"string\",\"type\":\"string\",\"required\":true,\"order\":0,\"confidential\":true,\"defaultValues\":[{}]},\"overridable\":true,\"values\":[{}]}],\"capabilities\":[\"AUTHENTICATE\"]}"
>
> Regards
> M
>
> [1] https://syncope-vm.apache.org/syncope/swagger/
>
>
> Thanks
> Really appreciate your support.
> Lat
>
> --
> Dott. Marco Di Sabatino Di Diodoro
> Tel. +39 3939065570
>
> Tirasa S.r.l.
> Viale Vittoria Colonna, 97 - 65127 Pescara
> Tel +39 0859116307 / FAX +39 0859111173http://www.tirasa.net
>
> Apache Syncope PMC Memberhttp://people.apache.org/~mdisabatino/
>
>

Re: Deploying mapping and topology changes - without MasterContent.xml

Posted by Francesco Chicchiriccò <il...@apache.org>.
Hi,
please find my replies in-line below.

Regards.

On 14/05/20 15:11, syncope developer wrote:
> Good day everyone,
> Subject/Regarding - deployment instructions (to deploy in other Syncope instances) regarding configuration and provision mapping changes.
>
> How can i figure out what all Rest calls need to be captured/executed - so that i can replicate certain UI configuration (or provision mapping) related operations i do using the syncope console? 
> Like there is a way to check the recent tasks executed (<URL>/rest/tasks/executions/recent?max=9)  - is there way to check for configuration changes?

The simplest way to accomplish this is by first setting level to DEBUG for org.apache.cxf under Configuration -> Logs -> Console, then watching console.log while performing the desired operations via Console UI.

> Also - is it ok to figure out what records are added in what tables and try to insert those during deployment in another Instances.

Looking at database changes is an option but you should take into account that it might be not straightforward to map REST objects down to db records.

> On Fri, Mar 20, 2020 at 4:09 PM Marco Di Sabatino Di Diodoro <marco.disabatino@tirasa.net <ma...@tirasa.net>> wrote:
>
>     Hi
>
>     Il 20/03/20 19:11, syncope developer ha scritto:
>>     Syncope support,
>>     I have a question on deploying or transferring the topology changes (either in mapping or some configuration ) made in one environment into another. 
>>
>>     If it is a new environment i can copy the MasterContent.xml from one environment (export) and into another. And restart syncope (tomcat).
>>     But if there is a syncope instance that is functioning (there is already users in the realm)- I am not able to copy the MasterContent.xml. Because, once the tasks table has data - syncope startup is not reading the MasterContent.xml and deploying the modified/later changes.
>>
>>     How would you recommend deploying such topology changes to a functioning syncope instant?
>
>     You can use swagger [1] / curl to export configurations and import them to another instance
>     For example if you need to export connector configurations:
>
>     Export:
>
>     curl -X GET "https://syncope-vm.apache.org/syncope/rest/connectors/connector_key" <https://syncope-vm.apache.org/syncope/rest/connectors/connector_key> -H  "accept: application/json" -H  "X-Syncope-Domain: Master" -H  "Authorization: Basic YWRtaW46cGFzc3dvcmQ="
>
>     take the json and update the connector in the other env:
>
>     curl -X PUT "https://newenv/syncope/rest/connectors/key" <https://newenv/syncope/rest/connectors/key> -H  "accept: */*" -H  "X-Syncope-Domain: Master" -H  "Authorization: Basic YWRtaW46cGFzc3dvcmQ=" -H  "Content-Type: application/json" -d "{\"key\":\"string\",\"adminRealm\":\"string\",\"location\":\"string\",\"connectorName\":\"string\",\"bundleName\":\"string\",\"version\":\"string\",\"displayName\":\"string\",\"connRequestTimeout\":0,\"poolConf\":{\"maxObjects\":0,\"minIdle\":0,\"maxIdle\":0,\"maxWait\":0,\"minEvictableIdleTimeMillis\":0},\"conf\":[{\"schema\":{\"name\":\"string\",\"displayName\":\"string\",\"helpMessage\":\"string\",\"type\":\"string\",\"required\":true,\"order\":0,\"confidential\":true,\"defaultValues\":[{}]},\"overridable\":true,\"values\":[{}]}],\"capabilities\":[\"AUTHENTICATE\"]}"
>
>     Regards
>     M
>
>     [1] https://syncope-vm.apache.org/syncope/swagger/
>
>>
>>     Thanks
>>     Really appreciate your support.
>>     Lat
>
-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/


Re: Deploying mapping and topology changes - without MasterContent.xml

Posted by syncope developer <sy...@gmail.com>.
  Good day everyone,
Subject/Regarding - deployment instructions (to deploy in other Syncope
instances) regarding configuration and provision mapping changes.

How can i figure out what all Rest calls need to be captured/executed - so
that i can replicate certain UI configuration (or provision mapping)
related operations i do using the syncope console?
Like there is a way to check the recent tasks executed
(<URL>/rest/tasks/executions/recent?max=9)  - is there way to check for
configuration changes?
Also - is it ok to figure out what records are added in what tables and try
to insert those during deployment in another Instances.

On Fri, Mar 20, 2020 at 4:09 PM Marco Di Sabatino Di Diodoro <
marco.disabatino@tirasa.net> wrote:

> Hi
> Il 20/03/20 19:11, syncope developer ha scritto:
>
> Syncope support,
> I have a question on deploying or transferring the topology changes
> (either in mapping or some configuration ) made in one environment into
> another.
>
> If it is a new environment i can copy the MasterContent.xml from one
> environment (export) and into another. And restart syncope (tomcat).
> But if there is a syncope instance that is functioning (there is already
> users in the realm)- I am not able to copy the MasterContent.xml. Because,
> once the tasks table has data - syncope startup is not reading the
> MasterContent.xml and deploying the modified/later changes.
>
> How would you recommend deploying such topology changes to a functioning
> syncope instant?
>
> You can use swagger [1] / curl to export configurations and import them to
> another instance
> For example if you need to export connector configurations:
>
> Export:
>
> curl -X GET
> "https://syncope-vm.apache.org/syncope/rest/connectors/connector_key"
> <https://syncope-vm.apache.org/syncope/rest/connectors/connector_key> -H
> "accept: application/json" -H  "X-Syncope-Domain: Master" -H
> "Authorization: Basic YWRtaW46cGFzc3dvcmQ="
>
> take the json and update the connector in the other env:
>
> curl -X PUT "https://newenv/syncope/rest/connectors/key"
> <https://newenv/syncope/rest/connectors/key> -H  "accept: */*" -H
> "X-Syncope-Domain: Master" -H  "Authorization: Basic YWRtaW46cGFzc3dvcmQ="
> -H  "Content-Type: application/json" -d
> "{\"key\":\"string\",\"adminRealm\":\"string\",\"location\":\"string\",\"connectorName\":\"string\",\"bundleName\":\"string\",\"version\":\"string\",\"displayName\":\"string\",\"connRequestTimeout\":0,\"poolConf\":{\"maxObjects\":0,\"minIdle\":0,\"maxIdle\":0,\"maxWait\":0,\"minEvictableIdleTimeMillis\":0},\"conf\":[{\"schema\":{\"name\":\"string\",\"displayName\":\"string\",\"helpMessage\":\"string\",\"type\":\"string\",\"required\":true,\"order\":0,\"confidential\":true,\"defaultValues\":[{}]},\"overridable\":true,\"values\":[{}]}],\"capabilities\":[\"AUTHENTICATE\"]}"
>
> Regards
> M
>
> [1] https://syncope-vm.apache.org/syncope/swagger/
>
>
> Thanks
> Really appreciate your support.
> Lat
>
> --
> Dott. Marco Di Sabatino Di Diodoro
> Tel. +39 3939065570
>
> Tirasa S.r.l.
> Viale Vittoria Colonna, 97 - 65127 Pescara
> Tel +39 0859116307 / FAX +39 0859111173http://www.tirasa.net
>
> Apache Syncope PMC Memberhttp://people.apache.org/~mdisabatino/
>
>