v6 Upgrade Instructions from v4 / v5
- 1.1 Summary
- 2 Estimating progress of SqlCacheInitialPopulator
- 2.1 1. Daemon's own log line (start here)
- 2.2 2. Progress of the early PIT backfill UPDATEs
- 2.3 3. Progress of STEP 3 (inserts into grouper_sql_cache_group)
- 2.4 4. Progress of STEP 6 (per‑batch membership sync — the long one)
- 2.5 5. Membership row throughput
- 2.6 6. What is it actually doing right now (DB‑specific)
- 2.6.1 PostgreSQL
- 2.7 Most likely culprit if jstack shows a PIT query
- 2.8 Upgrade from v4 to v6
- 2.9 Experience at Penn
- 2.9.1 SOAP
- 2.9.2 UI Authentication
- 2.9.3 Single process container
- 2.9.4 Provisioning
- 2.9.5 After all these steps were done in v4, do the upgrade
- 2.10 See Also
Summary
Many things have changed in v6. You should prepare v4 and make changes in v4 before going to v6. You do not need to upgrade to v5 while going from v4 to v6. Configure Grouper in v4 to be able to be upgrade with no major configuration or functionality changes when you switch to v6. v4 can run with only tomcat (no apache or shib sp), all the v6 provisioners, no soap. In v4, to have container logs work, you need to run supervisor and the log pipes. In v6, supervisor and logpipes go away.
Upgrading from v5: Since most of the major changes in v6 are already incorporated into v5, there are only a few areas of concern. When upgrading from v5 to v6, you can skip the v4-specific preparation above (membership cache, single-process container, and UI authentication) and focus on the items that also apply from v5: the removed unsupported legacy features, the removed installer jar, the Java library changes, and the removed Lite UI.
You must upgrade to v6 from v4. The membership cache must have an initial run (does not need to be exact, can run before the upgrade e.g. a week before).
If the membership cache is not populated in v6, there can be negative consequences, so by default v6 will not start if there are groups in Grouper and the membership cache is not there. See this jira.
You must upgrade from v4 (latest) to v6+. You will encounter DDL related issues if you upgrade from before v4.19 to v6.
When on v4 (latest), run the OTHER_JOB_sqlCacheInitialPopulator daemon before upgrading to v6. This will populate the membership cache. Depending on the size of your Grouper deployment (number of groups, memberships, etc) and your database performance/latency/etc, this job may be relatively quick or may take up to a day or two. This must be run within a week of upgrading. If you run it, and a week goes by, and you do not upgrade, run it again within a week of upgrading. Note, Grouper is in read/write mode while this job is running.
Check progressThere is an upgrade task in v6 which will true up the membership cache table
Tomcat is a single process in the container, there is no apache, shib, supervisor, logpipes
Adjust UI authentication in v4, and run tomcat as a single process in the container. You can either
Use the built-in OIDC
Use the Unicon pacj4 authentication plugin that does SAML/CAS
Install apache/shib/supervisor in your derived image
Run an authentication container separate from Grouper and reverse proxy
If you are doing apache WS authn (LDAP or htaccess) you need to:
Migrate to Grouper LDAP or built-in users
You might want to set GROUPER_TOMCAT_REMOTE_IP_VALVE=true, read the docs, there are other related settings too
Make sure you only have traffic from the load balancer or external web server and not allowed directly to tomcat (if shouldnt be allowed)
Since Apache isn't used, the /status_grouper/status health check endpoint no longer works. Adjust your health checks to use /grouper/status or /grouper-ws/status
Since Apache isn't used, hosting static files outside of the /grouper or /grouper-ws base no longer works
Migrate from legacy provisioners to the provisioning framework
pspng
googleapps
grouperAtlassianConnector
grouper-azure
grouper-box
grouper-duo
grouperKimConnector
grouper-shib (use SQL or LDAP)
Migrate from unsupported legacy features, unlikely in use. The other legacy provisioners were already gone from v5, but these are additionally removed in v6.
grouperScim (legacy unsupported version of SCIM, not the supported one)
grouperActivemq (legacy unsupported version of activeMq for a specific use case)
grouper-aws-changelog (legacy unsupported version of AWS for a specific use case)
grouper-tierApiAuthz-connector, tierInstrumentationCollector (unused legacy function)
grouper-messaging-activemq (removed since v5.1.0)
grouper-messaging-aws (removed since v5.1.0)
grouper-messaging-rabbitmq (removed since v5.1.0)
If someone is using SOAP (there are logs to alert you if so), migrate to REST
The installer jar (grouper-installer-a.b.c.jar) has been removed. If you have a workflow task that was using it, migrate off of it
Some Java libraries have significant upgrades or have been removed. Check your gsh scripts (templates, daemon jobs, batch scripts) and custom Java code for usage of:
commons-httpclient (classes org.apache.commons.httpclient.*)
json-lib (classes net.sf.json.*) - migrate to Jackson
commons-lang (classes org.apache.commons.lang.*) - migrate to commons-lang3, this is common in many scripts
ldaptive V1 and ldaptive-unboundid (migrate to ldaptive V2, major API changes)
org.json (classes org.json.*)
okhttp3 and Retrofit2 (only used by the removed legacy azure provisioner)
The Lite UI is totally removed in V6. If you were relying on legacy functionality from it, migrate to other solutions
Upgrade from v4 to v6
Turn off the daemon server of the old version and other servers connecting to Grouper
Make sure the change log temp in the old version is empty by running CHANGE_LOG_changeLogTempToChangeLog from GSH
loaderRunOneJob("CHANGE_LOG_changeLogTempToChangeLog");
Change this property in grouper.hibernate.properties, run the GSH container in the v6 version, it will upgrade your database
GROUPER_AUTO_DDL_UPTOVERSION=6.*.*
You can run this to see if you have everything, do not run the generated script though
(v6 version) gsh.sh -registry -check -runscript
Do not turn on the daemon server until the following tasks are complete:
Run the OTHER_JOB_upgradeTasks daemon from a GSH terminal, and see that it runs successfully. This will make sure all the data is setup in the v6 way. Note: this should happen on a GSH startup, but you can also run this job
loaderRunOneJob("OTHER_JOB_upgradeTasks");
Run this job via GSH (with lots of memory): OTHER_JOB_sqlCacheFullSync job. This will make sure the membership cache tables are setup correctly. Note: this should happen on a GSH startup, but you can also run this job
edu.internet2.middleware.grouper.app.loader.GrouperLoader.scheduleJobs();
loaderRunOneJob("OTHER_JOB_sqlCacheFullSync");
Make sure ports are listening as expected, e.g. if you expect AJP 8009 you need to set the env variable: GROUPER_TOMCAT_AJP_PORT=8009. If you do not want tomcat ssl to listen, set GROUPER_TOMCAT_HTTPS_PORT=false
Ideally if apache in v4 was listening on 443, you would change your load balancer to point to 8443 instead and have tomcat listen on that port.
If you want to have tomcat listen on 443 it needs to run as root since 443 is a privileged port. Running tomcat as root is not a good security posture.
If you make no changes, then the load balancer will not be pointing to the Grouper port.
If you are using Tomcat with https, it is a self-signed certificate. If you are using curl on localhost for health checks, you can add
--insecureto get past the self-signed certificate error. In AWS ECS, update the health check (add--insecure) at the level of the UI and WS task definition
Custom Java
You should check to see if your Java still compiles. It should, but check anyways. Tweak it if you need to or ask for advice on slack. You might want to rebuild anyways. See above for the list of changes in other libraries.
There are no logpipes in the logging anymore, if you customized logging, make sure you use the std out/err appender and not e.g. <AppenderRef ref="logpipe_grouper_daemon"/>
remove GROUPER_LOG_TO_PIPE=true
Note: You will lose logging in 4 but logpipes are no longer in 6