===Profile Information
Name: Piyush Raj
Web Profile: [[ https://github.com/PiyushRaj927 | GitHub]] [[ https://www.linkedin.com/in/piyush-raj-3ba1b0229/| LinkedIn]]
Blog: https://piyushraj927.github.io/
Location: Dhanbad, India
Typical working hours: 5 AM to 7 AM and 8 PM to 12 PM (UTC +05:30)
===Synopsis
The project aims to add wiki farms support for the Canasta project, i.e. the ability to run multiple wikis in a single Canasta instance
- Canasta cannot currently run multiple wikis without having multiple Canasta installations.
- Multiple wikis running on the same container will consume fewer resources
- Related wikis can run in a single instance and can share resources
- This project will achieve the following objective
-- running and maintaining multiple wikis should be made simple for the end user
-- provide a simple, user-friendly interface for Canasta users to achieve the above by adding features to the Canasta CLI
Possible Mentors @JeffreyWang, @Yaron_Koren
Have you contacted your mentors already? Yes
===Deliverables
- Modify the Canasta Image
-- to handle multiple wikis with proper persistent storage and backup facility for each wiki in the family
- Canasta maintenance
-- to run maintenance scripts of wikis in the family
- Ability to run multiple containers, each with there own wiki farm
- Implementing logging for wiki farms
- Improving on [[https://github.com/CanastaWiki/Canasta-DockerCompose/pull/26 | CanastaWiki/Canasta-DockerCompose#26 ]] to integrate Traefik into the stack for routing the requests to the appropriate wiki
- The ability to map wikis in a family
-- to a different directory (e.g. `example.com/a`, `example.com/b`)
-- a different subdomain (e.g.`a.example.com`, `b.example.com`)
-- different domains for each wiki (`example1.com`, `example2.com`)
-- or maybe a combination of above
- Canasta CLI
-- Create/Import/backup wiki farms
-- CLI support for all the farm instances to manage
--- Skins
--- Extensions
--- Maintenance
-- The CLI will provide complete manageability of all Canasta wiki farms, eliminating the need for manual installation. However, I will ensure that those who require manual installation have the option while keeping the process as simple as possible.
-- Ability to select a specific version for each wiki farm
- Canasta Documentation
-- Update the documentation for the newly added features
===Timeline
| **Period** | **Task** |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| May 4 - 28 May | Community Bonding Period. Get to know the community and mentors. Research and discuss with mentors the implementation details of the project |
| 29 May - 4 June | Work on adding support for wiki farm in canasta image |
| 5 June - 11 June | Continue adding work on canasta and refining the changes |
| 12 June - 18 June | Implement different Routing options for the wiki family with Traefik |
| 19 June - 25 June | Test ways to handle persistent storage for wiki farms like shared assets and tables and implement it in the stack |
| 26 June - 2 July | Add support for wiki farms on maintenance image |
| 3 July - 9 July | Test and update the documentation of the above changes. Prepare for Midterm evaluation.
|
| 10 July - 14 July | Midterm evaluation |
| 15 July - 23 July | Add functionality for creating wiki farms in Canasta CLI |
| 24 July - 30 July | Add commands to manage to route and provide configuration options for wiki setup
|
| 31 July - 6 August | Implement backup and import options in the CLI |
| 7 August - 13 August | Extend support for the remaining CLI commands |
| 14 August - 20 August | Test the complete stack and add improvements and fix any issues that emerge |
| 21 August - 4 September | Continue testing and update the CLI documentation. Prepare for final evaluation. |
| 5 September | Initial result for Google Summer of Code 2023 announced |
===Participation
Describe how you plan to communicate progress and ask for help, where you plan to publish your source code, etc
- The Communication about the project will be done on [[https://github.com/CanastaWiki | Canasta]] GitHub on relevant issues and PRs
- Code will be on forked repositories, and PRs will be submitted when features are ready to be submitted
- The email will be primarily for private discussion. I will be available by email even outside my available hours.
- I will be writing a blog about the project, and my experience and will try to provide a summary of tasks done and reasoning behind decisions made during the project
===About Me
- Your education (completed or in progress)
Currently, studying Bachelor of Technology in Electrical Engineering at the Indian Institute of Technology (Indian School of Mines), Dhanbad. (2021-2025)
- How did you hear about this program?
-- I heard about Gsoc from r/opensource on reddit like this [[https://www.reddit.com/r/opensource/comments/svci8b/we_are_the_guys_behind_wikipedia_and_more_offline/|post]] from **Kiwix**.
- Will you have any other time commitments, such as school work, another job, planned vacation, etc., during the program?
-- During the coding period of Gsoc, my Summer Vacation will coincide only with the final ten days. I also belong to the web team of my institute's alumni cell. As no work will be assigned during the summer holidays, I can dedicate a significant amount of time to Gsoc, even while attending classes. Rest assured, I will prioritize my commitments and provide ample time and effort towards my Gsoc project.
- We advise all candidates eligible for Google Summer of Code and Outreachy to apply for both programs. Are you planning to apply to both programs and if so, with what organization(s)?
-- I have only applied for Google Summer of Code.
- What does making this project happen mean to you?
-- As I developed a Laravel API for my institute, I discovered the significance of software solutions that prioritize both user-friendliness and ease of installation, maintenance, and upgrading. Throughout this project, I honed my expertise in Linux, Docker, and PHP, which enabled me to efficiently achieve my objectives. Creating a support system for Wiki farms that simplifies the upkeep of numerous wikis for the Casanta community would be a significant achievement for me, and it would demonstrate my development skills while aiding me in my professional growth.
===Past Experience
- Please add links to any feature or bug fix you have written for a Wikimedia project during the application phase.
- [[https://github.com/CanastaWiki/Canasta/issues/54| CanastaWiki/Canasta#54 ]] Switch to using PHP-FPM and mpm_event [Status: Closed]
-- [[https://github.com/CanastaWiki/Canasta/pull/222 | CanastaWiki/Canasta#222]] [Status: Merged]
-- [[ https://github.com/CanastaWiki/Canasta-DockerCompose/pull/41 | CanastaWiki/Canasta-DockerCompose#41 ]] [Status: Open]
- [[https://github.com/CanastaWiki/Canasta/issues/33 | CanastaWiki/Canasta#33]] Move asynchronous tasks from web app container to dedicated MediaWiki maintenance container [Status: Open]
-- [[ https://github.com/CanastaWiki/Canasta/pull/226 | CanastaWiki/Canasta#226]] [Status: Open]
-- [[ https://github.com/CanastaWiki/Canasta-Maintenance/pull/1 | CanastaWiki/Canasta-Maintenance#1 ]] [Status: Open]
-- [[ https://github.com/CanastaWiki/Canasta-DockerCompose/pull/42 | CanastaWiki/Canasta-DockerCompose#42 ]] [Status: Open]
- Describe any relevant projects that you've worked on previously and what knowledge you gained from working on them.
-- Through my work on an Alumni Data management API for my institute, developed using Laravel, I gained hands-on experience with REST APIs, PHP, Docker, and CI/CD pipelines. This project enabled me to recognize the value of dependable and robust software solutions, particularly for small-scale entities.
===Any Other Info
**Implementation Details**
- The proposed implementation is still in its initial stages and is a rough idea. I am open to suggestions and changes to refine and improve the solution.
- To efficiently manage multiple wikis within the Canasta image, I intend to employ [[https://www.mediawiki.org/wiki/Extension:MediaWikiFarm | MediaWikiFarm ]] or a comparable custom solution. This solution will first check the domain name and then the different paths on each domain to load the corresponding settings file, as shown in [[ https://www.mediawiki.org/wiki/Manual:Wiki_family | Manual:Wiki family ]]. By doing so, we can handle a farm's routing requirements.
-- All wiki farm configurations will be stored in a single YAML file to enable fast manual creation, importing, and backup of wiki farm settings.
- The startup process will be something like
-- An init container, as shown in https://github.com/docker/compose/issues/1510#issuecomment-505424908, will parse the YAML and related files to generate files like docker compose files for the wiki farm with appropriate labels for traefik and proper mounts for each wiki, PHP scripts which will handle routing and DB scripts to add multiple databases to the MySQL container.
-- Separate compose files will be used as suggested in this comment https://github.com/CanastaWiki/Canasta-DockerCompose/pull/26#discussion_r1045089787 which will make the stack modular
-- [[ https://docs.docker.com/compose/profiles/ | profiles]] will be used in compose to only start needed containers, like running containers related to maintenance work.
-- The reason to add these logics in scripts instead of Cansta CLI is so that the manual installation can be viable
- Here is what a sample config file may look like
```lang=YAML, name=TestFarm.yml
farms:
example-farm:
wiki1:
server-url: "example.com/wiki1" # for routing web request to appropriate wiki
wikiID: "wiki1-example" # passed to the maintenance scripts
extensions: "./wiki1/extensions"
skin: "./wiki1/skins"
upload-dir: "./wiki1/images"
database: "./wiki1/db"
config: "./wiki1/config"
wiki2:
server-url: "example.com/wiki2"
wikiID: "wiki2-example"
extensions: "./wiki2/extensions"
skin: "./wiki2/skins"
upload-dir: "./wiki2/images"
database: "./wiki2/db"
config: "./wiki2/config"
```