User:CSteipp (WMF)/Vagrant to vm

If you need to convert a vagrant vm (including the centralauth role enabled), this should work:

  • Build the vagrant machine, `vagrant ssh`
  • Replace mounted files with local copies
  • # mkdir /vagrant-temp; mount --move /vagrant /vagrant-temp ; rsync --progress --archive --recursive /vagrant-temp/ /vagrant/ --exclude=/vagrant/logs
  • In the virtualbox console, delete all of the Shared folders
  • Avoid dealing with port forwarding by assigning each wiki on the vm to a hostname
  • Add to /etc/hosts on you host. The main wiki shouldn't have a .wiki suffix, otherwise Common.php will mess up. devwiki
  • For each of the files /vagrant/settings.d/wikis/*/wgConf.php, update $wgConf->settings['wgServer'] and $wgConf->settings['wgCanonicalServer'] to setup the new hostname for the wiki. E.g., for /vagrant/settings.d/wikis/loginwiki/wgConf.php, set
$wgConf->settings['wgServer']['loginwiki'] = '//';
$wgConf->settings['wgCanonicalServer']['loginwiki'] = '';
  • in /vagrant/settings.d/wikis/CommonSettings.php, comment out the Bug 66399 fix (if you want to run $wgSecureLogin).
  • in /var/www/w/MWMultiVersion.php, update the regex in setSiteInfoForWiki to be
$baseDomain = preg_quote( '.wiki' );