Migrating services from version 5 to 6

416 views
Skip to first unread message

fjannin4

unread,
Mar 30, 2022, 10:43:58 AM3/30/22
to cas-...@apereo.org
Hi,

I need to migrate JPA service registry  from Apereo CAS  5.2.2 to 6.4,
but in this last version , data structures seem to have been replaced by
just one table with flat JSON field in a column : no more relationnal
structure, or I missed something.
Has anyone here observe the same ?
If the JPA migration is not possible, does it mean I have to use JSON in
any way ?

The best hit had met my searches till now is this page :
https://fawnoos.com/2021/01/19/cas53-service-registry-migration-to-cas63/
But its content is pretty elliptic and I don't see where to apply the
snippet showed in it :  I have an installation based on cas-overlay, 
there is no  java file named RegisteredServicesReportController to
override...

In short my purpose is as follow : migration services from JPA to JSON

Does anyone faced the same issue ?

Thanks a lot for any clue.


Pablo Vidaurri

unread,
Mar 31, 2022, 10:32:29 AM3/31/22
to CAS Community, fjan...@gmail.com
There is no need to migrate the data. These tables are for various type of tickets. Worst case when you cut over to v6.4 your users will have to login again.

-psv


Richard Frovarp

unread,
Mar 31, 2022, 11:35:59 AM3/31/22
to cas-...@apereo.org
The tables in the post are for the service registry. If you don't migrate those, you will have to reconfigure from scratch.

I do not know what the plans are for the project with respect to the service registry. It's changed a bit between versions, and usually seems like a pain. We made the change in a previous upgrade to just drop JSON files on the filesystem and have CAS pick those up. It keeps us free of changes in the JPA method (which we had been using), and free from management app changes. In addition, we can keep service configuration in git, which is extremely nice.

What I gather from that post is you are going to need to change the source code of RegisteredServicesReportController either changing that method, or adding that method. Looks like it is adding the method. Compile, put into your deployment (or download your DB and run locally), and then hit that point to get the exported JSON services. If you are running the management application in 5.3, I think you can export services as JSON as well, just by clicking a bunch of times and possibly doing copy and paste. Depending on your number of services, it might be simpler to just export via the management application, which I'm assuming that you are using. That would save you from editing code and having to deploy a new class file.

Richard
--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/133c5bb4-c6cd-4ec6-bf46-e1deaad1ffc4n%40apereo.org.


Pablo Vidaurri

unread,
Mar 31, 2022, 11:55:00 AM3/31/22
to CAS Community, richard.frovarp
Ah, sorry ... service registry, not ticket registry.

I keep service JSON files so I dont have to deal with table changes. I never saw the benefit of loading services in DB as I don't want others with access to fudge with the config and placing the services files in git is convenient for disaster recovery and tracking changes. 

fjannin4

unread,
Mar 31, 2022, 1:54:41 PM3/31/22
to cas-...@apereo.org

Thank you for the response.

We actually use CAS Management application, and I will follow your suggestion.

We have a bunch of services  to migrate : 140+, with their own contacts, policies and release attriibute settings.

I have tried the actuator end point /services from CAS Server , wich export all services in one file, but  JSON format seems different from the import format used in CAS 6.4.

i will try the management application way, with hopefully more success...

Best regards

Francois

Trevor Fong

unread,
Jun 10, 2022, 1:45:36 PM6/10/22
to CAS Community, fjan...@gmail.com
Hi Francois,

Just wondering if you were able to resolve your situation and if so, how?  I'm also facing a similar thing.  

Thanks a lot,
Trev

fjannin4

unread,
Jun 15, 2022, 11:29:38 AM6/15/22
to Trevor Fong, CAS Community

Hi Trev

Alas I didn't found anything to simply convert structured data from JPA to JSON... It was too tedious and time consuming and I gave up... None of cues and hints was working.

The whole online documentation of CAS 5.x has been removed (i have never seen so many Google results issueing 404 errors... dunno why they don't remove links ?) , to enforce difficulty to find relevant informations, and I mess up working with partial remains in webarchives.

Instead I am going to replace my fine tuned granularity of service descriptions with one wildcard by domains name of internal applications, in JSON format, the only one that really has support from CAS Team and documented.

Doing this therefore, I will lost all level of details for each service : descriptions, logo and contacts, thas was before used in CAS and CAS management application... 

High price to paid, just for CAS developpers team's taste to follow the fahsion for JSON and unilateral deprec    tion for JPA ...

So, to keep your CAS installation working is a question of chance : if you bet on the good techno that wil survive to annual elegation, you won... We bet on JPA and lost...

Good luck !
Regards

Trevor Fong

unread,
Jun 15, 2022, 12:43:23 PM6/15/22
to fjannin4, CAS Community
Thanks a lot for your reply Francois.

Dammit - that sucks that we both had such a poor experience!   
I fear you might be right and I'll have to abandon the 300+ rules we've built up over the years due to inadequate support and documentation; it's not like they discontinued support for JPA - they just didn't provide any support at all for migration, which feels worse!  It's like saying "Sure you can do it, see all the cool things you can do" and not say how to do it. 
I'll give myself to the end of the week and "cut bait" if I can't find a way out.  I'll reply if I should find anything of use.

Thanks again,
Trev

Dave Steiner

unread,
Jun 28, 2022, 5:14:27 PM6/28/22
to CAS Community, Trevor Fong, CAS Community, fjan...@gmail.com
We are currently upgrading from v5 to v6 and use JPA like you are.  What we are doing is to use the CAS5 endpoint  /status/services/export to get a zip file of all our Service entries (~1000-1500).  We then need to make a minor change to those and will be using the CAS6 endpoint  /actuator/registeredServices/import to import each json file individually (we tried giving it a new zip file but it was duplicating entries for some reason).  I'm currently playing with this on Dev and will hopefully do this on Test in a few weeks.

-ds

Andrea Colajacomo

unread,
Oct 13, 2022, 5:52:15 AM10/13/22
to CAS Community, steine...@gmail.com, Trevor Fong, CAS Community, fjan...@gmail.com
Hi Steine, does it works your test ?

mohsen saeedi

unread,
Dec 17, 2023, 5:32:02 AM12/17/23
to CAS Community, Dave Steiner, Trevor Fong, CAS Community, fjan...@gmail.com
Can you explain more about what was your minor change on exported Service entries? I want to do same thing for migrating from cas 5.3 to 6.6

atilling

unread,
Jan 1, 2024, 12:51:49 AMJan 1
to CAS Community, mohsen saeedi, Dave Steiner, Trevor Fong, CAS Community, fjan...@gmail.com
The documentation for 5.1.x is all off-line now, can you tell us how to enable the /status/services/export endpoint? We have the status dashboard endpoint but the services/export gives a 404 error. We're in the same process of moving from 5.1.5 to 6.6.13 and any help moving the services would be a huge help saving us a ton of re-entry.

Mohsen Saeedi

unread,
Jan 1, 2024, 1:45:50 AMJan 1
to cas-...@apereo.org, fjan...@gmail.com
But i meant tables for service registry. What is the best method to migrate all services stored on mysql db from 5.3 to 6.6. I know we can export each service to json format and probably (maybe some changes is required) we can import them to 6.6. We can do it from cas management dashboards or put services json file into cas services directory and it will imported automatically.

The question is precisely and clearly is: How we can migrate all services defined in cas 5.3 under mysql service registry to cas 6.6 mysql db. because table schema has been changed.

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/133c5bb4-c6cd-4ec6-bf46-e1deaad1ffc4n%40apereo.org.


--
Seyyed Mohsen Saeedi
سید محسن سعیدی

atilling

unread,
Jan 19, 2024, 3:13:57 PMJan 19
to CAS Community, Dave Steiner, Trevor Fong, CAS Community, fjan...@gmail.com
Dave Steiner,

Could you share your cas.properties file or a snippet of it so I can see how you enabled /status/services/export ? The CAS 5 documentation has been removed from GIT so I'm not finding information on how to enable.

Mohamed Amdouni

unread,
Jan 20, 2024, 12:16:15 AMJan 20
to cas-...@apereo.org, Dave Steiner, Trevor Fong, fjan...@gmail.com
Hello,
I didn’t find such a service in cas 5 but there is this blog post that explains service migration solution. It’s the blog of Misagh so could be used as a reference.


For me I will use manual export import because it s a only about less than 15.

For now I’m searching how to enable import endpoint on cas 6 :) 

Best regards 



Ray Bon

unread,
Jan 20, 2024, 12:16:15 AMJan 20
to cas-...@apereo.org, steine...@gmail.com, tjf...@gmail.com, fjan...@gmail.com
To get a list of all properties (and some defunct ones) run:

./gradlew exportConfigMetadata

During startup, cas logs properties that are deprecated and prints out the current property key.

You are upgrading to 7 and not 6, right?

Ray

On Fri, 2024-01-19 at 11:23 -0800, atilling wrote:
Notice: This message was sent from outside the University of Victoria email system. Please be cautious with links and sensitive information.

Mohamed Amdouni

unread,
Jan 20, 2024, 2:44:37 AMJan 20
to cas-...@apereo.org
Hello,

For me it is a migration from 5.x to 6.x.

I think that enabling export services needs also some spring management properties to be added ( in addition to cas if it exists )


Best regards 

Ray Bon

unread,
Jan 22, 2024, 12:23:42 PMJan 22
to cas-...@apereo.org
Mohamed,

You can move to version 7 without going through 6 first.

Ray

Mohamed Amdouni

unread,
Jan 22, 2024, 2:57:27 PMJan 22
to cas-...@apereo.org
Ray, thank you for your advice.

Yes I’m just finishing validating 6.6.15. But will move to 7 soonly.

The registeredServices endpoints are now available in my installation. I moved the management.endpoint.* properties from application.properties to cas.properties and they become available. I have put them in application because, for me, they was related to spring not to cas… anyway it’s ok now 😊

Best regards.

Reply all
Reply to author
Forward
0 new messages