-
Notifications
You must be signed in to change notification settings - Fork 29
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
Move asynchronous tasks from web app container to dedicated MediaWiki maintenance container #33
Comments
I am not sure how to work on this task, but If I could get some pointers on how this could be done, I might be able to work on this. |
Hi @jeffw16 I want to work on this issue. Can you provide a small description about this issue and from where to kick-start ! |
Can you please elaborate on what you mean by |
Basically, anything that
|
Thank you. That makes sense. From what I understand, the main purpose of this container will be to run maintenance scripts
Do correct me if I am wrong I would like to work on this. Can I please have this assigned? |
Assigned. Can I ask why we need a shared volume called |
Once the An example where maintenance might need access to something like mw_home: I would expect jobs like the one mentioned above to require access to MW_HOME to perform as expected. Please correct me if I am wrong. |
The maintenance container would need a reduced subset of what the web container (basically, the remaining Canasta container) would need:
The major changes are:
It may seem wasteful to duplicate the MediaWiki container's storage, but I think using a volume to store the shared MediaWiki code would make things messy. We don't want any chance of mixing code for computation (i.e. the MediaWiki core code + maintenance scripts, extensions, skins) with items actually meant for persistent storage, such as media files and MySQL databases. Volumes are meant for the latter, so we should shy away from mixing the two. |
Makes sense. Noted. |
Any progress on this @Ayman161803? |
Ok, since it has been 2 weeks, this task has been released to other potential contributors. |
I would like to work on this issue, can I please have it assigned.
It seems that the Jobs Please correct me if I have misunderstood something |
@PiyushRaj927 okay, feel free to work on it; it's yours. Thanks for your observation of the |
Hi @jeffw16, I had a question about the new container that we're working on. |
@PiyushRaj927 Great question. I just made a repo that you may submit here: https://github.com/CanastaWiki/Canasta-Maintenance |
Hi @jeffw16, I have submitted the Related PRs for this issue Canasta-Maintenance#1, Canasta#266 Canasta-DockerCompose#42 |
I do not believe Canasta should create a completely different image (dockerfile) for running asynchronous scripts. Quoting from factor XII of the Twelve-Factor App:
https://12factor.net/admin-processes The exact method depends on the type of deplyment (is it AWS Fargate? local docker-compose?) Scripts can either be run from the REPL (e.g. |
Example entrypoint script stanza, based on an environment variable named # If LocalSettings.php exists, then attempt to run the update.php maintenance
# script. If already up to date, it won't do anything, otherwise it will
# migrate the database if necessary on container startup. It also will
# verify the database connection is working.
if [ -e "LocalSettings.php" -a "$MEDIAWIKI_UPDATE" = 'true' -a ! -f "$MEDIAWIKI_SHARED/update.lock" ]; then
touch $MEDIAWIKI_SHARED/update.lock
echo >&2 'info: Running maintenance/update.php';
php maintenance/update.php --quick --conf ./LocalSettings.php
rm $MEDIAWIKI_SHARED/update.lock
fi |
I think it's safe to close this issue - the consensus now seems to be that it's better to keep the maintenance scripts in the same container as MediaWiki. Which in turn means that the Canasta-Maintenance repository can probably be removed. My apologies to the people who worked on this, especially @PiyushRaj927 - sometimes plans just change, unfortunately. |
No problem! It's natural for plans to shift. Thank you for the update. |
No description provided.
The text was updated successfully, but these errors were encountered: