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
This gets you to v6.X.X. Now look at the v5 upgrade steps and see which ones apply to you. Then look at the v6 upgrade steps and see which ones apply to you.
Experience at Penn
SOAP
No web service clients using SOAP, so that is a non-issue
UI Authentication
In v4, the authentication was switched from SAML to OIDC. The IdP operator registered an OIDC endpoint for PennGroups. The external system was configured, and SAML was removed from the container. It was surprisingly easy.
Container changes for authentication change
Set run shib to false: ENV GROUPER_RUN_SHIB_SP=false
Keep apache running initially so it is easy to switch back and reduce the number of changes
Comment out the apache shib configuration
#<Location /> # ShibRequestSetting REMOTE_ADDR X-Forwarded-For #</Location>There were a lot of grouperScriptHooks.sh commands to configure shibboleth, these were commented out and then deleted
Single process container
In v4 Grouper can be run in a single process container, like it will be in v6. The v6 upgrade should have as few changes as possible to reduce risk. To change v4 to be single process:
At first the ports from the load balancer were changed, so they are a privileged port: 443
So tomcat needs to run as root like apache did
&& /opt/container_files/docker-build-bin/containerDockerfileInstallPermissions.sh root root \ && chown -R root.root /opt/grouper/logs \ ENV GROUPER_TOMCAT_UID=0ENV GROUPER_RUN_APACHE=false
When apache was turned off, the health check for the grouper container needed to be adjusted to look at tomcat instead of apache
The output of tomcat is the container log, so there are no pipes
ENV GROUPER_LOG_TO_PIPE=falseRun the container and see tomcat is the only process. Not supervisor, not apache, not shib sp
Update admin docs that if the tomcat process is killed, supervisor will not start it up again, the container will end due to health check and another will start
Provisioning
There were a lot of legacy provisioners at Penn
These were configured in the provisioning framework, and the legacy provisioners were turned off
Each was done one at a time
Box
Remedy
Duo
PSPNG (was done last)
PSPNG provisioning upgrade
Configure the provisioning framework
Disable the PSPNG jobs
Export old PSPNG provisionable
select * from grouper_aval_asn_group_v gaagv where attribute_def_name_name = 'penn:etc:pspng:provision_to' ; select * from grouper_aval_asn_stem_v gaagv where attribute_def_name_name = 'penn:etc:pspng:provision_to' ;Sync up provisionable with provisioning framework
Set provisioner to readonly and run a full sync. Not much should be projected to change
Set the incremental change log pointer to current if no already (so it doesnt have to run through everything)
See no changes
Configure read/write, enable incremental
Run tests and adjust if needed
After all these steps were done in v4, do the upgrade
Make sure change log temp is empty
Turn off Grouper in all modules
Confirm change log temp is still empty
Start up a v5 and see upgrade steps complete
Turn on each module and test: Daemon, WS, UI