How to use the deployfish.aws.ecs.Task.ContainerDefinition function in deployfish

To help you get started, we’ve selected a few deployfish examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github caltechads / deployfish / deployfish / aws / ecs / Task.py View on Github external
def from_yaml(self, yml):
        self.family = yml['family']
        if 'task_role_arn' in yml:
            self.taskRoleArn = yml['task_role_arn']
        if 'network_mode' in yml:
            self.networkMode = yml['network_mode']
        if 'cpu' in yml:
            self.cpu = yml['cpu']
        if 'memory' in yml:
            self.memory = yml['memory']
        if 'volumes' in yml:
            self.volumes = yml['volumes']
        self.containers = [ContainerDefinition(yml=c_yml) for c_yml in yml['containers']]
        if 'launch_type' in yml and yml['launch_type'] == 'FARGATE':
            self.executionRoleArn = yml['execution_role']
            self.requiresCompatibilities = ['FARGATE']
github caltechads / deployfish / deployfish / aws / ecs / Task.py View on Github external
#           'autoprovision': True|False,
                #           'driver': 'string',
                #           'driverOpts': {
                #               'string': 'string'
                #           },
                #           'labels': {
                #               'string': 'string'
                #           }
                #       }
                #   }

        self.containers = []
        for cd in self.__aws_task_definition['containerDefinitions']:
            if sourceVolumes:
                cd['sourceVolumes'] = sourceVolumes
            self.containers.append(ContainerDefinition(cd))
github caltechads / deployfish / deployfish / aws / ecs / Task.py View on Github external
'entryPoint',
            'environment',
            'essential',
            'image',
            'links',
            'memory',
            'memoryReservation',
            'name',
            'ulimits',
            'cap_add',
            'cap_drop',
            'tmpfs',
        ]:
            setattr(self, "_" + attr, value)
        else:
            super(ContainerDefinition, self).__setattr__(attr, value)