TODO NOW:
-- Make sure massmigrate cleanly ignores already migrated
- installs
- Push su code to migrate, not mass-migrate (only do it
as root, this serves as a safe guard)
-- Move migration code into Wizard, since we already deal
- with installation there anyway (this TODO has been updated
- accordingly)
- Make parallel-find.pl use `sudo -u username git describe --tags`
to determine version
-- Remove .scripts/version generation in install script
- Make the installer use 'wizard install' /or/ do a migration
after doing a normal install (the latter makes it easier
for mass-rollbacks).
- The great initial deploy:
- Turn on mediawiki new autoinstaller
- Migrate all mediawiki installs
+ - Build research scripts, determine if a re-migration is necessary
+
+- Make upgrade and install take version as a parameter
- Redo Wordpress conversion, with an eye for automating everything
possible (such as downloading the tarball and unpacking)
import re
import os
-from wizard import app, deploy, install, util
+from wizard import app, deploy, install, shell, util
from wizard.app import php
def make_filename_regex(var):
pass
os.chmod("config", 0777) # XXX: vaguely sketchy
+
postdata = {
'Sitename': options.title,
'EmergencyContact': options.email,
if result.find("Installation successful") == -1:
raise install.Failure()
os.rename('config/LocalSettings.php', 'LocalSettings.php')
+ def upgrade(self, options):
+ sh = shell.Shell()
+ sh.call("php", "maintenance/update.php")
repo = open(".git/WIZARD_REPO", "r").read()
version = open(".git/WIZARD_UPGRADE_VERSION", "r").read()
command.chdir(sh.eval("git", "config", "remote.origin.url"))
+ d = make_deployment_from_cwd()
else:
d = make_deployment_from_cwd()
repo = d.application.repository(options.srv_path)
# - merge could fail (race); that's /really/ dangerous.
sh.call("git", "pull", temp_wc_dir, "master")
# run update script
- sh.call(".scripts/update")
+ d.application.upgrade(options)
# XXX: frob .htaccess to make site accessible
# XXX: - check if .htaccess changed, first. Upgrade
# process might have frobbed it. Don't be
subs = subst(deployment)
if not subs and key not in self.deprecated_keys:
logging.warning("No substitutions for %s" % key)
+ def install(self, options):
+ """
+ Run for 'wizard configure' (and, by proxy, 'wizard install')
+ to configure an application.
+ """
+ raise NotImplemented
+ def upgrade(self, options):
+ """
+ Run for 'wizard upgrade' to upgrade database schemas and other
+ non-versioned data in an application.
+ """
+ raise NotImplemented
@property
def extractors(self):
"""