Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Croptool tool to the Kubernetes buildservice architecture #192

Merged
merged 39 commits into from
Feb 3, 2024

Conversation

sohomdatta1
Copy link
Contributor

@sohomdatta1 sohomdatta1 commented Jan 31, 2024

Notable changes

  • Migrated tool to php8.2 (which entailed migration from Slim 3 to Slim 4 !)
  • config.dev.ini and config.prod.ini are two different files now, config.dev.ini should be used for development, config.prod.ini for Toolforge
  • Lighttpd config has been updated to be (mostly) self sufficient due to a absence of the default config on the built instance
  • Updated deployment notes in README.md
  • Added Aptfile to install required packages during build
    (etc)

Issues

  • Tests are currently broken (I'll try and fix them once I'm confident the rest works)
    (Please squash and merge this pull request)

@sohomdatta1
Copy link
Contributor Author

A live version of this deployment can be found at https://soda-test.toolforge.org

scripts/startserver.sh Outdated Show resolved Hide resolved
config.prod.ini Outdated Show resolved Hide resolved
jobs/cleanup.sh Outdated Show resolved Hide resolved
Aptfile Show resolved Hide resolved
Aptfile Outdated Show resolved Hide resolved
@david-caro
Copy link

This is awesome! \o/ thanks a lot for working on this.
I added a couple comments that might help speed up the building phase, totally optional though.

composer.json Outdated Show resolved Hide resolved
@sohomdatta1
Copy link
Contributor Author

Ack, I'll see if I'm able to make some of the changes (particularly shifting to apache2) :)

@sohomdatta1 sohomdatta1 marked this pull request as draft January 31, 2024 12:00
@sohomdatta1 sohomdatta1 marked this pull request as ready for review February 2, 2024 12:32
@sohomdatta1
Copy link
Contributor Author

Apache2 migration worked and fixed a bunch of the other issues as well :)

Copy link
Owner

@danmichaelo danmichaelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! Unfortunately I haven't had time to play around with the new Buildpacks stuff on Toolforge, but this looks really neat 👏 Will try to deploy it later today or tomorrow

.gitignore Show resolved Hide resolved
Comment on lines +111 to +114
$app->get('/api/server-cleanup', function ($request, $response) {
exec( ROOT_PATH . '/scripts/cleanup.sh &');
$response->getBody()->write('STARTED');
return $response->withStatus(200);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clever way to migrate the cleanup part 👍

@danmichaelo danmichaelo merged commit 5e02882 into danmichaelo:master Feb 3, 2024
1 check passed
@thiemowmde
Copy link

Unfortunately the magic border detection is still broken after this update. We believe the fix is surprisingly trivial, see danmichaelo/php-coma#3 or alternatively danmichaelo/php-coma#2. Please let us know how else we can help. Many in the Wikimedia Commons community rely quite heavily on the CropTool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants