Colleagues: I'm looking for some "best practices" advice here.
I have three Wikis, Dev, Test, and Prod. Dev is the sandbox. Test is for user-acceptance. Prod is the public face - exactly what you would expect.
For the most part, these Wikis share an identical code base on Git branch "master." Development is done in branches that are pulled into master as user acceptance is completed.
There are differences between the Wikis environments, and so I've got three LocalSettings.php files. I can't just pull the Dev into Test or the Test into Prod because of differences in the LocalSettings (database connections, error_reporting, etc). Right now I'm doing a manual process outside of Git control. This makes me itch.
I would like to keep LocalSettings.php under Git version control with the rest of the code, but that means three files with the same name.
Would I be on firm ground if I modified LocalSettings.php to automatically detect which Wiki is in play and adjust its own settings? How do others handle issues like this?
Hi Ray,
we have published our LocalSettings.php and simply excluded the "secrets" which are in a separated folder (and excluded with .gitignore)
see Line 44 for example: https://github.com/dennisroczek/TDFWIKI_settings/blob/master/TDFWIKI_LocalSe...
You can include with such a constellation everything you need.
Regards,
Dennis Roczek
Am 20.01.2016 um 15:56 schrieb Ray Paseur:
Colleagues: I'm looking for some "best practices" advice here.
I have three Wikis, Dev, Test, and Prod. Dev is the sandbox. Test is for user-acceptance. Prod is the public face - exactly what you would expect.
For the most part, these Wikis share an identical code base on Git branch "master." Development is done in branches that are pulled into master as user acceptance is completed.
There are differences between the Wikis environments, and so I've got three LocalSettings.php files. I can't just pull the Dev into Test or the Test into Prod because of differences in the LocalSettings (database connections, error_reporting, etc). Right now I'm doing a manual process outside of Git control. This makes me itch.
I would like to keep LocalSettings.php under Git version control with the rest of the code, but that means three files with the same name.
Would I be on firm ground if I modified LocalSettings.php to automatically detect which Wiki is in play and adjust its own settings? How do others handle issues like this? _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On Wed, Jan 20, 2016 at 7:56 AM, Ray Paseur ray.paseur@armedia.com wrote:
Colleagues: I'm looking for some "best practices" advice here.
I have three Wikis, Dev, Test, and Prod. Dev is the sandbox. Test is for user-acceptance. Prod is the public face - exactly what you would expect.
For the most part, these Wikis share an identical code base on Git branch "master." Development is done in branches that are pulled into master as user acceptance is completed.
There are differences between the Wikis environments, and so I've got three LocalSettings.php files. I can't just pull the Dev into Test or the Test into Prod because of differences in the LocalSettings (database connections, error_reporting, etc). Right now I'm doing a manual process outside of Git control. This makes me itch.
I would like to keep LocalSettings.php under Git version control with the rest of the code, but that means three files with the same name.
Would I be on firm ground if I modified LocalSettings.php to automatically detect which Wiki is in play and adjust its own settings? How do others handle issues like this?
One public and non-trivial example of wiki farm configuration is the configuration system used for the Wikimedia production and beta wiki farms [0]. The heart of this system is MWMultiVersion [1] and the configuration files [2] that populate and use a SiteConfiguration [3] object that chooses different settings based on the information provided by MWMultiVersion. Besides the public configuration data shown in the git repository [0] there are private settings [4] which are only committed locally on the deployment server and distributed from there to all of the MediaWiki servers. This system is pretty complicated and likely to be overkill the majority of wiki farms, but it does show some techniques for managing complex configuration.
A much more simple solution could be just to replace LocalSettings.php's contents with an include of common settings and conditional include of environment specific settings that you keep in separate files (e.g. LocalSettings.dev.php).
[0]: https://phabricator.wikimedia.org/diffusion/OMWC/ [1]: https://wikitech.wikimedia.org/wiki/Heterogeneous_deployment#mediawiki-stagi... [2]: https://wikitech.wikimedia.org/wiki/Heterogeneous_deployment#mediawiki-stagi... [3]: https://doc.wikimedia.org/mediawiki-core/master/php/classSiteConfiguration.h... [4]: https://phabricator.wikimedia.org/diffusion/OMWC/browse/master/private/Priva...
Bryan
I have a setup using puppet and combined all the differences in a template
$env = '<%= @aws_appbranch %>';
$wgSitename = ""; $GLOBALS["siteName"] = ""; $wgMetaNamespace = ""; $wgScriptPath = ""; $wgServer = ""; $wgDBserver = ""; $wgDBname = ""; $wgTmpDirectory = ""; $smwgSparqlQueryEndpoint = ""; $smwgSparqlUpdateEndpoint = ""; $smwgSparqlDataEndpoint = ""; $wgDebugLogGroups['NA'] = ""; #$wgArticlePath = "/wiki/$1";
if ($env === "development") { $wgSitename = "site name"; $GLOBALS["siteName"] = $wgSitename; $wgMetaNamespace = ""; $wgLogo = ""; $wgScriptPath = ""; $wgServer = ""; $wgDBserver = ""; $wgDBname = ""; $wgTmpDirectory = "$IP/images/temp"; $wgDebugLogGroups['NA'] = '$IP/ldap_debug'; $wgFavicon = "$wgScriptPath/ex.ico"; // $wgDebugToolbar = true; $wgAllowImageTag = true; } else if ($env === "staging") { $wgSitename = ""; $GLOBALS["siteName"] = $wgSitename; $wgMetaNamespace = ""; $wgLogo = "/skins/chameleon/ex.png"; $wgScriptPath = ""; $wgServer = ""; $wgDBserver = ""; $wgDBname = ""; $wgTmpDirectory = "$IP/images/temp"; $wgDebugLogGroups['NA'] = '"$IP/ldap_debug'; $wgFavicon = "$wgScriptPath/ex.ico"; $wgAllowImageTag = true; #$wgDebugToolbar = true; }
-----Original Message----- From: MediaWiki-l [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Ray Paseur Sent: Wednesday, January 20, 2016 9:57 AM To: mediawiki-l@lists.wikimedia.org Cc: ray.paseur@gmail.com Subject: [MediaWiki-l] Three Wikis, three LocalSettings.php
Colleagues: I'm looking for some "best practices" advice here.
I have three Wikis, Dev, Test, and Prod. Dev is the sandbox. Test is for user-acceptance. Prod is the public face - exactly what you would expect.
For the most part, these Wikis share an identical code base on Git branch "master." Development is done in branches that are pulled into master as user acceptance is completed.
There are differences between the Wikis environments, and so I've got three LocalSettings.php files. I can't just pull the Dev into Test or the Test into Prod because of differences in the LocalSettings (database connections, error_reporting, etc). Right now I'm doing a manual process outside of Git control. This makes me itch.
I would like to keep LocalSettings.php under Git version control with the rest of the code, but that means three files with the same name.
Would I be on firm ground if I modified LocalSettings.php to automatically detect which Wiki is in play and adjust its own settings? How do others handle issues like this? _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
I personally would use the .gitignore to not push the settings file to the repository and the just keep manual backups.
Sent from my iPhone
On 20 Jan 2016, at 15:56, Ray Paseur ray.paseur@armedia.com wrote:
Colleagues: I'm looking for some "best practices" advice here.
I have three Wikis, Dev, Test, and Prod. Dev is the sandbox. Test is for user-acceptance. Prod is the public face - exactly what you would expect.
For the most part, these Wikis share an identical code base on Git branch "master." Development is done in branches that are pulled into master as user acceptance is completed.
There are differences between the Wikis environments, and so I've got three LocalSettings.php files. I can't just pull the Dev into Test or the Test into Prod because of differences in the LocalSettings (database connections, error_reporting, etc). Right now I'm doing a manual process outside of Git control. This makes me itch.
I would like to keep LocalSettings.php under Git version control with the rest of the code, but that means three files with the same name.
Would I be on firm ground if I modified LocalSettings.php to automatically detect which Wiki is in play and adjust its own settings? How do others handle issues like this? _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Labai prasau lietuviskai paaiskinkite... 2016 sau. 21 23:38 "Jonathan Aquilina" eagles051387@gmail.com rašė:
I personally would use the .gitignore to not push the settings file to the repository and the just keep manual backups.
Sent from my iPhone
On 20 Jan 2016, at 15:56, Ray Paseur ray.paseur@armedia.com wrote:
Colleagues: I'm looking for some "best practices" advice here.
I have three Wikis, Dev, Test, and Prod. Dev is the sandbox. Test is
for user-acceptance. Prod is the public face - exactly what you would expect.
For the most part, these Wikis share an identical code base on Git
branch "master." Development is done in branches that are pulled into master as user acceptance is completed.
There are differences between the Wikis environments, and so I've got
three LocalSettings.php files. I can't just pull the Dev into Test or the Test into Prod because of differences in the LocalSettings (database connections, error_reporting, etc). Right now I'm doing a manual process outside of Git control. This makes me itch.
I would like to keep LocalSettings.php under Git version control with
the rest of the code, but that means three files with the same name.
Would I be on firm ground if I modified LocalSettings.php to
automatically detect which Wiki is in play and adjust its own settings? How do others handle issues like this?
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org