Project:Develop and Test Mediawiki Code on Production: Difference between revisions
From MaRDI portal
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
To test changes on MediaWiki-Extensions on production system IntellJ IDE's can be setup to synchronize | |||
files automatically with remote-connections. This shows how to enable such a setup on base of the example of | |||
* ssh | creating a development setup wih MathSearch-Mediawiki extension to mardi01. | ||
* server | |||
* | ===== Prerequisites: ===== | ||
* | |||
* Working ssh connection to mardi01 on your development machine, in many cases this includes VPN access. | |||
* Git and IntelliJ installed on development machine | |||
===== Information Sources: ===== | |||
* Most steps regarding the IDE setup are described [https://www.jetbrains.com/help/idea/creating-a-remote-server-configuration.html here] | |||
===== Steps for the setup: ===== | |||
====== For IDE ====== | |||
*Create an ssh configuration in IntellIJ Idea for mardi01: "File | Settings | Tools | SSH Configurations" (host: mardi01, user:your-username, ....) | |||
*In IDE configuration in "File | Settings | Build, Execution, Deployment | Deployment" create a new setup for mardi01 with SFTP (there probably other options, but this one worked in test) | |||
**Set the root path and the folder mappings here according to the extensions which shall get synced on the server | |||
**For the mappings of exension its recommended to specify a path in your users directory so there are permissions to modify the files. | |||
*In IDE configuration in "File | Settings | Build, Execution, Deployment | Deployment | Options", in the setting "Upload changed files .." uploading behaviour can be set | |||
**Recommendation is to set it here to "On explicit save action", so files are not synced while writing and cause the portal to crash because typos | |||
*To upload all files from exension-folder once initially, folder can be clicked and 'deployment->upload to mardi01' can be pressed | |||
On Mardi01 | |||
* login to mardi01 with mardi-test-user | |||
* edit the file (or similar) /home/mardi-test-user/portal-compose/docker-compose.override.yml | |||
* add a volumes-mapping entry for wikibase which maps your local changes to exensions (example: - /home/jstegemu/development/MathSearch:/var/www/html/extensions/MathSearch) | |||
* restart wikibase, eventually it can take up to 10 minutes (check with crontab -e) until the override is read by portal-compose |
Revision as of 12:58, 15 June 2022
To test changes on MediaWiki-Extensions on production system IntellJ IDE's can be setup to synchronize
files automatically with remote-connections. This shows how to enable such a setup on base of the example of
creating a development setup wih MathSearch-Mediawiki extension to mardi01.
Prerequisites:
- Working ssh connection to mardi01 on your development machine, in many cases this includes VPN access.
- Git and IntelliJ installed on development machine
Information Sources:
- Most steps regarding the IDE setup are described here
Steps for the setup:
For IDE
- Create an ssh configuration in IntellIJ Idea for mardi01: "File | Settings | Tools | SSH Configurations" (host: mardi01, user:your-username, ....)
- In IDE configuration in "File | Settings | Build, Execution, Deployment | Deployment" create a new setup for mardi01 with SFTP (there probably other options, but this one worked in test)
- Set the root path and the folder mappings here according to the extensions which shall get synced on the server
- For the mappings of exension its recommended to specify a path in your users directory so there are permissions to modify the files.
- In IDE configuration in "File | Settings | Build, Execution, Deployment | Deployment | Options", in the setting "Upload changed files .." uploading behaviour can be set
- Recommendation is to set it here to "On explicit save action", so files are not synced while writing and cause the portal to crash because typos
- To upload all files from exension-folder once initially, folder can be clicked and 'deployment->upload to mardi01' can be pressed
On Mardi01
- login to mardi01 with mardi-test-user
- edit the file (or similar) /home/mardi-test-user/portal-compose/docker-compose.override.yml
- add a volumes-mapping entry for wikibase which maps your local changes to exensions (example: - /home/jstegemu/development/MathSearch:/var/www/html/extensions/MathSearch)
- restart wikibase, eventually it can take up to 10 minutes (check with crontab -e) until the override is read by portal-compose