hgmo
author Gregory Szorc <gps@mozilla.com>
Mon, 09 Mar 2015 22:20:17 -0700
changeset 360510 b6aded8e5fada0248b593d2e6de65ca3daf935cd
permissions -rwxr-xr-x
testing: vastly improve support for running hg.mozilla.org clusters Support for running an hg.mozilla.org has been vastly improved. An "hgmo" mach driver for controlling hg.mozilla.org instances has been created. There is a new API behind it for controlling instances. The hgmaster Docker environment has been greatly improved. It now integrates with an OpenLDAP server. OpenSSH LPK is installed and SSH logins are processed through LDAP lookups. It "just works." SSH requests into the container result in pash successfully being invoked. Support for running hgweb containers has been added. It isn't super well-tested right now. But the master container can SSH into hgweb containers as the hg user and get the desired mirror-pull behavior. Although, things have not been tested to verify mirror-pull and other various SSH connectivity works as expected. Things are probably significantly broken.

#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

import os
import sys

HERE = os.path.abspath(os.path.dirname(__file__))

def main(args):
    if 'VIRTUAL_ENV' not in os.environ:
        activate = os.path.join(HERE, 'venv', 'bin', 'activate_this.py')
        execfile(activate, dict(__file__=activate))
        sys.executable = os.path.join(HERE, 'venv', 'bin', 'python')

    from mach.main import Mach

    m = Mach(os.getcwd())

    m.define_category('hgmo', 'hg.mozilla.org',
        'Control and Interact with an hg.mozilla.org cluster', 50)
    import vcttesting.hgmo_mach_commands

    return m.run(args)

if __name__ == '__main__':
    sys.exit(main(sys.argv[1:]))