Esempio n. 1
0
    def task_install(self):
        """
        Install t-web, a Twisted Web based server.
        """
        # Bootstrap a new service environment
        self.bootstrap()

        # Add to www-data group. Mailman depends on this.
        sudo('/usr/sbin/usermod -a -g www-data -G t-web {}'.format(self.serviceUser))

        # Setup authbind
        authbind.allow(self.serviceUser, 80)
        authbind.allow(self.serviceUser, 443)
        
        # Install httpd equiv, so apt doesn't try to install apache ever
        equivs.installEquiv(self.serviceName, 'httpd')

        with settings(user=self.serviceUser):
            run('/bin/ln -nsf {}/start {}/start'.format(self.configDir, self.binDir))
            run('/bin/ln -nsf {}/start-maintenance {}/start-maintenance'.format(self.configDir, self.binDir))
            self.update()
            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))

            run('/bin/mkdir -p ~/data')
            if env.get('installPrivateData'): 
                self.task_installSSLKeys() 
                run('/usr/bin/touch {}/production'.format(self.configDir))
            else:
                run('/bin/rm -f {}/production'.format(self.configDir))
Esempio n. 2
0
    def task_install(self):
        """
        Install trac.
        """
        self.bootstrap(python='system')

        # FIXME: Make these idempotent.
        postgres.createUser('trac')
        postgres.createDb('trac', 'trac')

        with settings(user=self.serviceUser):
            pip.install('psycopg2 pygments', python='system')
            self.update(_installDeps=True)
            # Note that this has to be after trac is installed, to get the right version
            pip.install('TracAccountManager==0.4.3', python='system')

            run('/bin/mkdir -p ~/svn')
            run('/bin/ln -nsf ~/svn {}/trac-env/svn-repo'.format(self.configDir))

            run('/bin/mkdir -p ~/attachments')
            run('/bin/ln -nsf ~/attachments {}/trac-env/files/attachments'.format(
                self.configDir))

            run('/bin/ln -nsf ~/website/trac-files {}/trac-env/htdocs'.format(
                self.configDir))

            run('/bin/ln -nsf {} {}/trac-env/log'.format(self.logDir, self.configDir))

            run('/bin/ln -nsf {}/start {}/start'.format(self.configDir, self.binDir))

            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))
Esempio n. 3
0
    def task_install(self):
        """
        Install trac.
        """
        self.bootstrap()

        with settings(user=self.serviceUser):

            self.update()

            run('/bin/mkdir -p ~/attachments')
            run('/bin/ln -nsf ~/attachments {}/trac-env/files/attachments'.
                format(self.configDir))

            run('/bin/ln -nsf {} {}/trac-env/log'.format(
                self.logDir, self.configDir))

            run('/bin/ln -nsf {}/start {}/start'.format(
                self.configDir, self.binDir))

            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))

        # FIXME: Make these idempotent.
        postgres.createUser('trac')
        postgres.createDb('trac', 'trac')
Esempio n. 4
0
    def task_install(self):
        """
        Install trac.
        """
        self.bootstrap(python='system')

        # FIXME: Make these idempotent.
        postgres.createUser('trac')
        postgres.createDb('trac', 'trac')

        with settings(user=self.serviceUser):
            pip.install('psycopg2 pygments', python='system')
            self.update(_installDeps=True)
            # Note that this has to be after trac is installed, to get the right version
            pip.install('TracAccountManager==0.4.3', python='system')

            run('/bin/mkdir -p ~/svn')
            run('/bin/ln -nsf ~/svn {}/trac-env/svn-repo'.format(self.configDir))

            run('/bin/mkdir -p ~/attachments')
            run('/bin/ln -nsf ~/attachments {}/trac-env/attachments'.format(
                self.configDir))

            run('/bin/ln -nsf ~/website/trac-files {}/trac-env/htdocs'.format(
                self.configDir))

            run('/bin/ln -nsf {} {}/trac-env/log'.format(self.logDir, self.configDir))

            run('/bin/ln -nsf {}/start {}/start'.format(self.configDir, self.binDir))

            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))
Esempio n. 5
0
    def task_install(self):
        """
        Install trac.
        """
        self.bootstrap()

        with settings(user=self.serviceUser):

            self.update()

            run('/bin/mkdir -p ~/attachments')
            run('/bin/ln -nsf ~/attachments {}/trac-env/files/attachments'.format(
                self.configDir))

            run('/bin/ln -nsf {} {}/trac-env/log'.format(self.logDir, self.configDir))

            run('/bin/ln -nsf {}/start {}/start'.format(self.configDir, self.binDir))

            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))

        # FIXME: Make these idempotent.
        postgres.createUser('trac')
        postgres.createDb('trac', 'trac')

        # We don't have a braid rule for highscore,
        # so I am just hacking this here to have a functional restore.
        postgres.createUser('highscore')
        postgres.grantRead('trac', 'highscore')
        # amptrack has a dedicated braid, but is better to have it here
        # so that dump and restore don't depend on it.
        postgres.createUser('amptrac')
        postgres.grantRead('trac', 'amptrac')
Esempio n. 6
0
    def task_install(self):
        """
        Install trac.
        """
        self.bootstrap(python='system')

        with settings(user=self.serviceUser):
            pip.install('psycopg2', python='system')
            self.update(_installDeps=True)

            run('/bin/mkdir -p ~/svn')
            run('/bin/ln -nsf ~/svn {}/trac-env/svn-repo'.format(self.configDir))

            run('/bin/mkdir -p ~/attachments')
            run('/bin/ln -nsf ~/attachments {}/trac-env/files/attachments'.format(
                self.configDir))

            run('/bin/ln -nsf {} {}/trac-env/log'.format(self.logDir, self.configDir))

            run('/bin/ln -nsf {}/start {}/start'.format(self.configDir, self.binDir))

            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))

            # Create an empty password file if not present.
            run('/usr/bin/touch config/htpasswd')

        # FIXME: Make these idempotent.
        postgres.createUser('trac')
        postgres.createDb('trac', 'trac')
Esempio n. 7
0
    def task_install(self):
        """
        Install kenaan, an irc bot.
        """
        # Bootstrap a new service environment
        self.bootstrap()

        with settings(user=self.serviceUser):
            run('/bin/ln -nsf {}/start {}/start'.format(self.configDir, self.binDir))
            for bin in ['alert', 'message', 'ticket']:
                run('/bin/ln -nsf {1}/{0} {2}/{0}'.format(bin, self.configDir, self.binDir))
            execute(self.update)
            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))
Esempio n. 8
0
    def task_install(self):
        """
        Install buildbot.
        """
        self.bootstrap()

        with settings(user=self.serviceUser):
            execute(self.update, _installDeps=True)
            run('/bin/ln -nsf {}/start {}/start'.format(self.configDir, self.binDir))
            run('/bin/mkdir -p ~/data')
            run('/bin/mkdir -p ~/data/build_products')
            run('/bin/ln -nsf ~/data/build_products {}/master/public_html/builds'.format(self.configDir))
            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))
Esempio n. 9
0
    def task_install(self):
        """
        Install amptrac.
        """
        # Bootstrap a new service environment
        self.bootstrap()

        postgres.createUser('amptrac')
        postgres.grantRead('trac', 'amptrac')

        with settings(user=self.serviceUser):
            run('/bin/ln -nsf {}/start {}/start'.format(self.configDir, self.binDir))
            self.update()
            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))
Esempio n. 10
0
    def task_install(self):
        """
        Install t-names, a Twisted Names based DNS server.
        """
        # Bootstrap a new service environment
        self.bootstrap()

        # Setup authbind
        authbind.allow(self.serviceUser, 53)

        with settings(user=self.serviceUser):
            run('/bin/ln -nsf {}/start {}/start'.format(self.configDir, self.binDir))
            execute(self.update)
            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))
Esempio n. 11
0
    def task_install(self):
        """
        Install codespeed, a benchmark reporting tool
        """
        # Bootstrap a new service environment
        self.bootstrap()

        self.update()

        with settings(user=self.serviceUser):
            run('/bin/ln -nsf {}/start {}/start'.format(self.configDir, self.binDir))
            run('mkdir -p ~/data')
            execute(self.update)
            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))
            self.task_generateSecretKey()
Esempio n. 12
0
    def task_install(self):
        """
        Install diffresource.
        """
        # Bootstrap a new service environment
        self.bootstrap()

        package.install(['diffstat'])

        with settings(user=self.serviceUser):
            run('/bin/ln -nsf {}/start {}/start'.format(self.configDir, self.binDir))
            self.update()
            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))

            run('PYTHONPATH=~/divmod/Combinator COMBINATOR_PROJECTS=~/Projects ~/divmod/Combinator/bin/chbranch Twisted trunk svn://svn.twistedmatrix.com/svn/Twisted/trunk')
Esempio n. 13
0
    def task_install(self):
        """
        Install t-names, a Twisted Names based DNS server.
        """
        # Bootstrap a new service environment
        self.bootstrap()

        # Setup authbind
        authbind.allow(self.serviceUser, 53)

        with settings(user=self.serviceUser):
            run('/bin/ln -nsf {}/start {}/start'.format(
                self.configDir, self.binDir))
            execute(self.update)
            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))
Esempio n. 14
0
    def task_install(self):
        """
        Install t-names, a Twisted Names based DNS server.
        """
        # Bootstrap a new service environment
        self.bootstrap()

        # Setup authbind
        # Fix authbid, for now I just went with the generic setcap.
        authbind.allow(self.serviceUser, 53)
        #sudo('setcap cap_net_bind_service=+ep /srv/t-names/virtualenv/bin/pypy')

        with settings(user=self.serviceUser):
            run('/bin/ln -nsf {}/start {}/start'.format(
                self.configDir, self.binDir))
            execute(self.update)
            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))
Esempio n. 15
0
    def task_install(self):
        """
        Install buildbot.
        """
        self.bootstrap()

        # Setup authbind to be used by HTTP to HTTPS redirection and by
        # the HTTPS proxy.
        authbind.allow(self.serviceUser, 80)
        authbind.allow(self.serviceUser, 443)

        with settings(user=self.serviceUser):
            self.update(_installDeps=True)
            run('/bin/ln -nsf {}/start {}/start'.format(self.configDir, self.binDir))
            run('/bin/mkdir -p ~/data')
            run('/bin/mkdir -p ~/data/build_products')
            run('/bin/ln -nsf ~/data/build_products {}/public_html/builds'.format(self.configDir))
            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))
Esempio n. 16
0
    def task_install(self):
        """
        Install codespeed, a benchmark reporting tool
        """
        # Bootstrap a new service environment
        self.bootstrap(python='system')

        package.install(['python-svn'])

        with settings(user=self.serviceUser):
            run('/bin/ln -nsf {}/start {}/start'.format(self.configDir, self.binDir))
            run('mkdir -p ~/data')
            pip.install('Django==1.2.7', python='system')
            self.update()
            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))
            if env.get('installTestData'):
                self.task_installTestData()
            self.task_generateSecretKey()
Esempio n. 17
0
    def task_install(self):
        """
        Install kenaan, an irc bot.
        """
        # Bootstrap a new service environment
        self.bootstrap()

        with settings(user=self.serviceUser):
            pip.install('amptrac')
            run('/bin/ln -nsf {}/start {}/start'.format(self.configDir, self.binDir))
            for bin in ['alert', 'commit', 'message', 'ticket']:
                run('/bin/ln -nsf {1}/{0} {2}/{0}'.format(bin, self.configDir, self.binDir))
            self.update()
            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))
            if env.get('installTestData'):
                self.task_installTestData()
            elif env.get('installPrivateData'):
                self.task_installPrivateData()
    def task_install(self):
        """
        Install buildbot.
        """
        self.bootstrap()

        with settings(user=self.serviceUser):
            pip.install('sqlalchemy==0.7.10')
            self.update(_installDeps=True)
            run('/bin/ln -nsf {}/start {}/start'.format(self.configDir, self.binDir))
            run('/bin/mkdir -p ~/data')
            run('/bin/mkdir -p ~/data/build_products')
            run('/bin/ln -nsf ~/data/build_products {}/master/public_html/builds'.format(self.configDir))

            # TODO: install dependencies
            if env.get('installTestData'):
                self.task_installTestData()

            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))
Esempio n. 19
0
    def task_install(self):
        """
        Install buildbot.
        """
        self.bootstrap()

        # Setup authbind to be used by HTTP to HTTPS redirection and by
        # the HTTPS proxy.
        authbind.allow(self.serviceUser, 80)
        authbind.allow(self.serviceUser, 443)

        with settings(user=self.serviceUser):
            self.update(_installDeps=True)
            run('/bin/ln -nsf {}/start {}/start'.format(
                self.configDir, self.binDir))
            run('/bin/mkdir -p ~/data')
            run('/bin/mkdir -p ~/data/build_products')
            run('/bin/ln -nsf ~/data/build_products {}/public_html/builds'.
                format(self.configDir))
            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))
    def task_install(self):
        """
        Install buildbot.
        """
        self.bootstrap()

        with settings(user=self.serviceUser):
            pip.install('sqlalchemy==0.7.10')
            self.update(_installDeps=True)
            run('/bin/ln -nsf {}/start {}/start'.format(
                self.configDir, self.binDir))
            run('/bin/mkdir -p ~/data')
            run('/bin/mkdir -p ~/data/build_products')
            run('/bin/ln -nsf ~/data/build_products {}/master/public_html/builds'
                .format(self.configDir))

            # TODO: install dependencies
            if env.get('installTestData'):
                self.task_installTestData()

            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))
Esempio n. 21
0
    def task_install(self):
        """
        Install trac.
        """
        self.bootstrap()

        with settings(user=self.serviceUser):

            self.update()

            run('/bin/mkdir -p ~/attachments')
            run('/bin/ln -nsf ~/attachments {}/trac-env/files/attachments'.format(
                self.configDir))

            run('/bin/ln -nsf {} {}/trac-env/log'.format(self.logDir, self.configDir))

            run('/bin/ln -nsf {}/start {}/start'.format(self.configDir, self.binDir))

            cron.install(self.serviceUser, '{}/crontab'.format(self.configDir))

        # FIXME: Make these idempotent.
        postgres.createUser('trac')
        postgres.createDb('trac', 'trac')