diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2013-01-13 23:01:07 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2013-01-13 23:01:07 (GMT) |
commit | 4bb6a8a54965895e6db1886e5a7267999b7bb02e (patch) | |
tree | db81ce5623fbc5adffc7973f53a3ad8727c5ce24 | |
parent | 08bd585df6f9182a4d335173be00447b070316a8 (diff) |
Update to the new slaves
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | fabfile/common.py | 19 | ||||
-rw-r--r-- | fabfile/slave.py | 7 |
3 files changed, 15 insertions, 13 deletions
@@ -21,7 +21,7 @@ http://docs.fabfile.org/en/1.5/usage/fab.html * buildbot user with passwordless, ttyless sudo access. * ssh access with public key authentication -* git, virtualenv, gcc, make +* git, virtualenv, gcc, make, python development = Creating a kvm slave = diff --git a/fabfile/common.py b/fabfile/common.py index 3ab7b7f..1d7fa31 100644 --- a/fabfile/common.py +++ b/fabfile/common.py @@ -28,18 +28,13 @@ instances = {"production": "sub_repos_changes": False, "web_port": 8081}}} -slaves = {"buildbot@debian-wheezy-32bit.local": "debian-wheezy-32bit", - "buildbot@debian-wheezy-64bit.local": "debian-wheezy-64bit", - "buildbot@fedora-17-32bit.local": "fedora-17-32bit", - "buildbot@fedora-17-64bit.local": "fedora-17-64bit", - "buildbot@fedora-18-32bit.local": "fedora-18-32bit", - "buildbot@fedora-18-64bit.local": "fedora-18-64bit", - "buildbot@ubuntu-12-10-32bit.local": "ubuntu-12-10-32bit", - "buildbot@ubuntu-12-10-64bit.local": "ubuntu-12-10-64bit"} - -docs_slave = "fedora-18-64bit" - -slave_gateway = "dnarvaez@bender.sugarlabs.org" +slaves = {"buildbot@bs-wheezy-amd64.local": "wheezy-amd64", + "buildbot@bs-quantal-amd64.local": "quantal-amd64", + "buildbot@bs-sphcow-x86-64.local": "sphcow-x86-64"} + +docs_slave = "sphcow-x86-64" + +slave_gateway = "dnarvaez@freedom.sugarlabs.org" _instance_name = None diff --git a/fabfile/slave.py b/fabfile/slave.py index 3a56132..1f8e7ad 100644 --- a/fabfile/slave.py +++ b/fabfile/slave.py @@ -9,6 +9,7 @@ from fabric.api import env from fabric.api import prefix from fabric.api import put from fabric.api import roles +from fabric.api import sudo from fabric.api import with_settings from fabric.contrib.files import append @@ -87,3 +88,9 @@ def restart(instance_name=get_instance_name()): def add_key(filename): with open(filename) as f: append(".ssh/authorized_keys", f.read()) + +@task +@roles("slave") +@with_settings(**settings) +def shutdown(): + sudo("shutdown -h now") |