Page MenuHomePhabricator

Migrate vcat from Toolforge GridEngine to Toolforge Kubernetes
Closed, ResolvedPublic

Description

Kindly migrate your tool(https://grid-deprecation.toolforge.org/t/vcat) from Toolforge GridEngine to Toolforge Kubernetes.

Toolforge GridEngine is getting deprecated.
See: https://techblog.wikimedia.org/2022/03/14/toolforge-and-grid-engine/

Please note that a volunteer may perform this migration if this has not been done after some time.
If you have already migrated this tool, kindly mark this as resolved.

If you would rather shut down this tool, kindly do so and mark this as resolved.

Useful Resources:
Migrating Jobs from GridEngine to Kubernetes
https://wikitech.wikimedia.org/wiki/Help:Toolforge/Jobs_framework#Grid_Engine_migration
Migrating Web Services from GridEngine to Kubernetes
https://wikitech.wikimedia.org/wiki/News/Toolforge_Stretch_deprecation#Move_a_grid_engine_webservice
Python
https://wikitech.wikimedia.org/wiki/News/Toolforge_Stretch_deprecation#Rebuild_virtualenv_for_python_users

Event Timeline

My apologies if this ticket comes as a surprise to you. In order to ensure WMCS can provide a stable, secure and supported platform, it’s important we migrate away from GridEngine. I want to assure you that while it is WMCS’s intention to shutdown GridEngine as outlined in the blog post https://techblog.wikimedia.org/2022/03/14/toolforge-and-grid-engine/, a shutdown date for GridEngine has not yet been set. The goal of the migration is to migrate as many tools as possible onto kubernetes and ensure as smooth a transition as possible for everyone. Once the majority of tools have migrated, discussion on a shutdown date is more appropriate. See T314664: [infra] Decommission the Grid Engine infrastructure.

As noted in https://techblog.wikimedia.org/2022/03/16/toolforge-gridengine-debian-10-buster-migration/ some use cases are already supported by kubernetes and should be migrated. If your tool can migrate, please do plan a migration. Reach out if you need help or find you are blocked by missing features. Most of all, WMCS is here to support you.

However, it’s possible your tool needs a mixed runtime environment or some other features that aren't yet present in https://techblog.wikimedia.org/2022/03/18/toolforge-jobs-framework/. We’d love to hear of this or any other blocking issues so we can work with you once a migration path is ready. Thanks for your hard work as volunteers and help in this migration!

I have migrated a cronjob for regular cleanups to toolforge-jobs. However I cannot migrate my backend, a perl script that communicates with the Java frontend using Redis. The script can run (/data/project/vcat/bin/gridserver) using the tf-perl532 image, but it does not work because Graphviz is not installed.

The required packages were installed globally for me back in 2013/2014 so they were available in GridEngine. I think I found the commits that contained the configuration changes to install Graphviz (https://phabricator.wikimedia.org/rOPUP8df13f97487044fc55e2583b1d15a34e5b7edbdf) and some fonts (https://phabricator.wikimedia.org/rOPUP6c1b6ec0c64c9d90b3618a9c6c7cf1e16353fa04#change-DJMMgi3f1EXd) I need.

I know the Dockerfiles for the images are in Git somewhere, so I could probably write a Dockerfile myself to create an image based on tf-perl543 with the packages I need. It is the simplest way I see to get this working, but I doubt the WMCS team wants to offer individual images for tools this way.

@Dapete Custom images for tools is a potential option in the future with the development of T194332: [Epic,builds-api,components-api,webservice,jobs-api] Make Toolforge a proper platform as a service with push-to-deploy and build packs. This work is still on-going, but it sounds like this might be the easiest migration path for you.

I have migrated a cronjob for regular cleanups to toolforge-jobs. However I cannot migrate my backend, a perl script that communicates with the Java frontend using Redis. The script can run (/data/project/vcat/bin/gridserver) using the tf-perl532 image, but it does not work because Graphviz is not installed.

We are testing out buildpacks on Toolforge. Can you take a look to see if it can help you migrate using a custom image?
There's a short quickstart here.
Kindly take a look and let us know.

We are testing out buildpacks on Toolforge. Can you take a look to see if it can help you migrate using a custom image?
There's a short quickstart here.
Kindly take a look and let us know.

I am leaving for a 4 week vacation today. I have set a reminder to look into this as soon as possible when I'm back home.

I have now completely moved vcat over to Kubernetes, using an image built by the Build Service for both my Java-based web application and the Perl-based worker jobs. At the same time I changed the web application from a WAR to a standalone JAR based on Quarkus.

The following is mostly for myself to document what I did, but it may be helpful to others.

What I had to do to get Heroku to build the Java application and the image successfully:

  • Use system.properties to get the JDK version I need (17).
  • Switch to the Maven wrapper script mvnw so I can use a current version of Maven. The latest Heroku can offer is 3.6.2, and the Quarkus plugin needs at least 3.6.3.

The worker jobs took a bit more work. After adding the additional Linux packages I needed using an Aptfile, as well as my original Perl script, I needed a new wrapper script to do the following (see https://github.com/dapete42/vcat/blob/main/bin/gridserver):

  • Redirect the output to a log file.
  • Run dot -c to fully configure the Graphviz plugins. This is usually done during installation, but I assume it does not work due to the way the Heroku build works with the additional APT layer.
  • Set PERL5LIB=/layers/fagiani_apt/apt/usr/share/perl5 so Perl finds the modules in the APT layer.
  • Make Graphviz use the fonts from the APT layer. I do this by making symlinks in $HOME/.fonts/.