コード例 #1
0
ファイル: hyper.py プロジェクト: zahedbri/buildbot
    def checkConfig(self,
                    name,
                    password,
                    hyper_host,
                    hyper_accesskey,
                    hyper_secretkey,
                    image,
                    hyper_size="s3",
                    masterFQDN=None,
                    **kwargs):

        DockerBaseWorker.checkConfig(self,
                                     name,
                                     password,
                                     image=image,
                                     masterFQDN=masterFQDN,
                                     **kwargs)

        if not Hyper:
            config.error(
                "The python modules 'docker>=2.0' and 'hyper_sh' are needed to use a"
                " HyperLatentWorker")

        if not IRenderable.providedBy(
                hyper_size) and hyper_size not in self.ALLOWED_SIZES:
            config.error("Size is not valid {!r} vs {!r}".format(
                hyper_size, self.ALLOWED_SIZES))
コード例 #2
0
ファイル: kubernetes.py プロジェクト: OXTbuilders/builder2019
    def checkConfig(self,
                    name,
                    image='buildbot/buildbot-worker',
                    namespace=None,
                    masterFQDN=None,
                    kube_config=None,
                    **kwargs):

        DockerBaseWorker.checkConfig(self, name, None, **kwargs)
        kubeclientservice.KubeClientService.checkAvailable(
            self.__class__.__name__)
コード例 #3
0
ファイル: hyper.py プロジェクト: Cray/buildbot
    def checkConfig(self, name, password, hyper_host,
                    hyper_accesskey, hyper_secretkey, image, hyper_size="s3", masterFQDN=None, **kwargs):

        DockerBaseWorker.checkConfig(self, name, password, image=image, masterFQDN=masterFQDN, **kwargs)

        if not Hyper:
            config.error("The python modules 'docker-py>=1.4' and 'hyper_sh' are needed to use a"
                         " HyperLatentWorker")

        if not IRenderable.providedBy(hyper_size) and hyper_size not in self.ALLOWED_SIZES:
            config.error("Size is not valid {!r} vs {!r}".format(
                hyper_size, self.ALLOWED_SIZES))
コード例 #4
0
    def checkConfig(self, name, password, hyper_host,
                    hyper_accesskey, hyper_secretkey, image, hyper_size="s3", masterFQDN=None, **kwargs):

        DockerBaseWorker.checkConfig(self, name, password, image=image, masterFQDN=masterFQDN, **kwargs)

        if not Hyper:
            config.error("The python modules 'docker-py>=1.4' and 'hyper_sh' are needed to use a"
                         " HyperLatentWorker")

        if hyper_size not in self.ALLOWED_SIZES:
            config.error("Size is not valid %s vs %r".format(
                hyper_size, self.ALLOWED_SIZES))
コード例 #5
0
    def checkConfig(self,
                    name,
                    marathon_url,
                    image,
                    marathon_auth=None,
                    marathon_extra_config=None,
                    marathon_app_prefix="buildbot-worker/",
                    masterFQDN=None,
                    **kwargs):

        DockerBaseWorker.checkConfig(
            self, name, image=image, masterFQDN=masterFQDN, **kwargs)
        HTTPClientService.checkAvailable(self.__class__.__name__)
コード例 #6
0
ファイル: marathon.py プロジェクト: dinatale2/buildbot
    def checkConfig(self,
                    name,
                    marathon_url,
                    image,
                    marathon_auth=None,
                    marathon_extra_config=None,
                    marathon_app_prefix="buildbot-worker/",
                    masterFQDN=None,
                    **kwargs):

        DockerBaseWorker.checkConfig(
            self, name, image=image, masterFQDN=masterFQDN, **kwargs)
        HTTPClientService.checkAvailable(self.__class__.__name__)
コード例 #7
0
    def reconfigService(self,
                        name,
                        marathon_url,
                        image,
                        marathon_auth=None,
                        marathon_extra_config=None,
                        marathon_app_prefix="buildbot-worker/",
                        masterFQDN=None,
                        **kwargs):

        # Set build_wait_timeout to 0s if not explicitly set: Starting a
        # container is almost immediate, we can afford doing so for each build.

        if 'build_wait_timeout' not in kwargs:
            kwargs['build_wait_timeout'] = 0
        yield DockerBaseWorker.reconfigService(self,
                                               name,
                                               image=image,
                                               masterFQDN=masterFQDN,
                                               **kwargs)

        self._http = yield HTTPClientService.getService(self.master,
                                                        marathon_url,
                                                        auth=marathon_auth)
        if marathon_extra_config is None:
            marathon_extra_config = {}
        self.marathon_extra_config = marathon_extra_config
        self.marathon_app_prefix = marathon_app_prefix
コード例 #8
0
    def reconfigService(self,
                        name,
                        image='buildbot/buildbot-worker',
                        namespace=None,
                        masterFQDN=None,
                        kube_extra_spec=None,
                        kube_config=None,
                        **kwargs):

        # Set build_wait_timeout to 0 if not explicitly set: Starting a
        # container is almost immediate, we can afford doing so for each build.
        if 'build_wait_timeout' not in kwargs:
            kwargs['build_wait_timeout'] = 0
        if masterFQDN is None:
            masterFQDN = self.get_ip
        if callable(masterFQDN):
            masterFQDN = masterFQDN()
        yield DockerBaseWorker.reconfigService(self,
                                               name,
                                               image=image,
                                               masterFQDN=masterFQDN,
                                               **kwargs)
        self._kube = yield kubeclientservice.KubeClientService.getService(
            self.master, kube_config=kube_config)
        self.namespace = namespace or self._kube.namespace
        self.kube_extra_spec = kube_extra_spec or {}
コード例 #9
0
ファイル: hyper.py プロジェクト: Cray/buildbot
    def reconfigService(self, name, password, hyper_host,
                        hyper_accesskey, hyper_secretkey, image, hyper_size="s3", masterFQDN=None, **kwargs):
        yield DockerBaseWorker.reconfigService(self, name, password, image=image,
                                               masterFQDN=masterFQDN, **kwargs)

        self.manager = yield HyperLatentManager.getService(self.master, hyper_host, hyper_accesskey,
                                                           hyper_secretkey)
        self.size = hyper_size
コード例 #10
0
    def reconfigService(self, name, password, hyper_host,
                        hyper_accesskey, hyper_secretkey, image, hyper_size="s3", masterFQDN=None, **kwargs):
        yield DockerBaseWorker.reconfigService(self, name, password, image=image,
                                               masterFQDN=masterFQDN, **kwargs)

        self.manager = yield HyperLatentManager.getService(self.master, hyper_host, hyper_accesskey,
                                                           hyper_secretkey)
        self.size = hyper_size
コード例 #11
0
ファイル: hyper.py プロジェクト: wallrj/buildbot
    def reconfigService(self, name, password, hyper_host,
                        hyper_accesskey, hyper_secretkey, image, hyper_size="s3", masterFQDN=None, **kwargs):
        yield DockerBaseWorker.reconfigService(self, name, password, image=image,
                                               masterFQDN=masterFQDN, **kwargs)

        self.manager = yield HyperLatentManager.getService(self.master, hyper_host, hyper_accesskey,
                                                           hyper_secretkey)
        self.masterhash = hashlib.sha1(self.master.name).hexdigest()[:6]
        self.size = hyper_size

        self.image = image
        if not masterFQDN:  # also match empty string (for UI)
            masterFQDN = socket.getfqdn()
        self.masterFQDN = masterFQDN
コード例 #12
0
ファイル: marathon.py プロジェクト: dinatale2/buildbot
    def reconfigService(self,
                        name,
                        marathon_url,
                        image,
                        marathon_auth=None,
                        marathon_extra_config=None,
                        marathon_app_prefix="buildbot-worker/",
                        masterFQDN=None,
                        **kwargs):

        # Set build_wait_timeout to 0s if not explicitly set: Starting a
        # container is almost immediate, we can afford doing so for each build.

        if 'build_wait_timeout' not in kwargs:
            kwargs['build_wait_timeout'] = 0
        yield DockerBaseWorker.reconfigService(
            self, name, image=image, masterFQDN=masterFQDN, **kwargs)

        self._http = yield HTTPClientService.getService(
            self.master, marathon_url, auth=marathon_auth)
        if marathon_extra_config is None:
            marathon_extra_config = {}
        self.marathon_extra_config = marathon_extra_config
        self.marathon_app_prefix = marathon_app_prefix