Example #1
0
    def checkConfig(self,
                    name,
                    password,
                    hyper_host,
                    hyper_accesskey,
                    hyper_secretkey,
                    image,
                    hyper_size="s3",
                    masterFQDN=None,
                    **kwargs):

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

        if 'build_wait_timeout' not in kwargs:
            kwargs['build_wait_timeout'] = 0

        AbstractLatentWorker.checkConfig(self, name, password, **kwargs)

        if not Hyper:
            config.error(
                "The python modules 'docker-py>=1.4' and 'hypercompose' 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))
Example #2
0
    def checkConfig(self, name, password=None, api_username=None, api_password=None, image=None,
                    hostconfig=None, base_url=DEFAULT_BASE_URL, masterFQDN=None, **kwargs):

        if image is None or api_username is None or api_password is None:
            config.error("UpcloudLatentWorker: You need to specify at least"
                         " an image name, zone, api_username and api_password")

        AbstractLatentWorker.checkConfig(self, name, password, **kwargs)
Example #3
0
    def checkConfig(self, name, password=None, image=None,
                    masterFQDN=None, **kwargs):

        # Set build_wait_timeout to 0 if not explicitely set: Starting a
        # container is almost immediate, we can affort doing so for each build.
        if 'build_wait_timeout' not in kwargs:
            kwargs['build_wait_timeout'] = 0
        if image is not None and not isinstance(image, str):
            if not hasattr(image, 'getRenderingFor'):
                config.error("image must be a string")

        AbstractLatentWorker.checkConfig(self, name, password, **kwargs)
Example #4
0
    def checkConfig(self, name, password=None, image=None,
                    masterFQDN=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 image is not None and not isinstance(image, str):
            if not hasattr(image, 'getRenderingFor'):
                config.error("image must be a string")

        AbstractLatentWorker.checkConfig(self, name, password, **kwargs)
Example #5
0
    def checkConfig(self, name, password, hyper_host,
                    hyper_accesskey, hyper_secretkey, image, hyper_size="s3", masterFQDN=None, **kwargs):

        AbstractLatentWorker.checkConfig(self, name, password, **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))
Example #6
0
    def checkConfig(self, name, password, hyper_host,
                    hyper_accesskey, hyper_secretkey, image, hyper_size="xs", masterFQDN=None, **kwargs):

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

        if 'build_wait_timeout' not in kwargs:
            kwargs['build_wait_timeout'] = 0

        AbstractLatentWorker.checkConfig(self, name, password, **kwargs)

        if not Hyper:
            config.error("The python modules 'docker-py>=1.4' and 'hypercompose' 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))
Example #7
0
    def checkConfig(self,
                    name,
                    password,
                    hyper_host,
                    hyper_accesskey,
                    hyper_secretkey,
                    image,
                    hyper_size="s3",
                    masterFQDN=None,
                    **kwargs):

        AbstractLatentWorker.checkConfig(self, name, password, **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))
Example #8
0
    def checkConfig(self,
                    name,
                    run_task_kwargs,
                    container_name='buildbot',
                    boto3_session=None,
                    master_host=None,
                    build_wait_timeout=0,
                    **kwargs):
        if 'cluster' not in run_task_kwargs:
            config.error(
                "You must specify a cluster in the ECSWorker run_task_kwargs")

        if 'taskDefinition' not in run_task_kwargs:
            config.error(
                "You must specify a taskDefinition in the ECSWorker run_task_kwargs"
            )

        return AbstractLatentWorker.checkConfig(
            self,
            name,
            password=None,
            build_wait_timeout=build_wait_timeout,
            **kwargs)
Example #9
0
 def checkConfig(self, name, _, **kwargs):
     AbstractLatentWorker.checkConfig(
         self, name, None,
         build_wait_timeout=self._controller.build_wait_timeout,
         **kwargs)
Example #10
0
 def checkConfig(self, name, _, **kwargs):
     AbstractLatentWorker.checkConfig(self, name, None, **kwargs)
Example #11
0
 def checkConfig(self, name, _, **kwargs):
     AbstractLatentWorker.checkConfig(self, name, None, **kwargs)