Skip to content

Commit

Permalink
Clean up the deb install script.
Browse files Browse the repository at this point in the history
  • Loading branch information
darthsteven committed Nov 18, 2011
1 parent c7ee341 commit 7b89eb8
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions aegir_6.x-1.x-deb_install.py
Expand Up @@ -39,7 +39,7 @@ def fab_add_apt_sources():
print "===> Adding apt sources"
# Add the apt-key for Koumbit.
fabric.run("curl http://debian.aegirproject.org/key.asc | apt-key add -", pty=True)
# Add the unstable Koumbit repositories, these should contain the dev version of Aegir.
# Add the unstable Aegir repositories, these should contain the dev version of Aegir.
fabric.run("echo 'deb http://debian.aegirproject.org unstable main' >> /etc/apt/sources.list", pty=True)
# Add the squeeze-backports repo for Drush.
fabric.run("echo 'deb http://backports.debian.org/debian-backports squeeze-backports main' >> /etc/apt/sources.list", pty=True)
Expand Down Expand Up @@ -76,20 +76,6 @@ def fab_hostmaster_setup():
fabric.run("su - -s /bin/sh aegir -c 'drush -y @hostmaster vset hosting_queue_tasks_frequency 1'", pty=True)
fab_run_dispatch()

# Download, import and verify platforms
def fab_install_platform(platform_name):
fabric.run("su - -s /bin/sh aegir -c 'drush make https://github.com/mig5/builds/raw/master/%s.build /var/aegir/platforms/%s'" % (platform_name, platform_name), pty=True)
fabric.run("su - -s /bin/sh aegir -c 'drush --root=\'/var/aegir/platforms/%s\' provision-save \'@platform_%s\' --context_type=\'platform\''" % (platform_name, platform_name), pty=True)
fabric.run("su - -s /bin/sh aegir -c 'drush @hostmaster hosting-import \'@platform_%s\''" % platform_name, pty=True)
fab_run_dispatch()

# Install a site
def fab_install_site(platform_name, profile):
fabric.run("su - -s /bin/sh aegir -c 'drush --uri=\'%s.mig5.net\' provision-save \'@%s.mig5.net\' --context_type=\'site\' --platform=\'@platform_%s\' --profile=\'%s\' --db_server=\'@server_localhost\''" % (platform_name, platform_name, platform_name, profile), pty=True)
fabric.run("su - -s /bin/sh aegir -c 'drush @%s.mig5.net provision-install'" % platform_name, pty=True)
fabric.run("su - -s /bin/sh aegir -c 'drush @hostmaster hosting-task @platform_%s verify'" % platform_name, pty=True)
fab_run_dispatch()

# Force the dispatcher
def fab_run_dispatch():
fabric.run("su - -s /bin/sh aegir -c 'drush @hostmaster hosting-dispatch'", pty=True)
Expand All @@ -98,18 +84,6 @@ def run_provision_tests():
print "===> Running Provision tests"
fabric.run("su - -s /bin/sh aegir -c 'drush @hostmaster provision-tests-run -y'", pty=True)

def run_platform_tests():
print "===> Installing some common platforms"
fab_install_platform('drupal6')
fab_install_platform('drupal7')
fab_install_platform('openatrium')

def run_site_tests():
print "===> Installing some sites"
fab_install_site('drupal6', 'default')
fab_install_site('drupal7', 'standard')
fab_install_site('openatrium', 'openatrium')

# Remove and purge the aegir debian install
def fab_uninstall_aegir():
fabric.run("apt-get remove --purge aegir aegir-hostmaster aegir-provision drush -y", pty=True)
Expand Down

0 comments on commit 7b89eb8

Please sign in to comment.