How to use the deployfish.aws.systems_manager.ParameterStore 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 / dplycli.py View on Github external
interpolate=False,
            use_aws_section=False
        )
        try:
            section_yml = config.get_section_item(section, section_name)
        except KeyError:
            click.echo("Our container's deployfish config file '{}' does not have section '{}' in '{}'".format(
                ctx.obj['CONFIG_FILE'] or 'deployfish.yml',
                section_name,
                section
            ))
            sys.exit(1)
        parameter_store = []
        if 'config' in section_yml:
            parameter_name = parameter_prefix + section_name
            parameter_store = ParameterStore(parameter_name, cluster_name, yml=section_yml['config'])
            parameter_store.populate()
        if not dry_run:
            for param in parameter_store:
                if param.exists:
                    if param.should_exist:
                        os.environ[param.key] = param.aws_value
                    else:
                        print(
                            "event='deploy.entrypoint.parameter.ignored.not_in_deployfish_yml' section='{}' parameter='{}'".format(
                                section_name, param.name))
                else:
                    print("event='deploy.entrypoint.parameter.ignored.not_in_aws' section='{}' parameter='{}'".format(
                        section_name, param.name))
        else:
            exists = []
            notexists = []
github caltechads / deployfish / deployfish / aws / systems_manager.py View on Github external
def __init__(self, service, cluster, yml=[]):
        super(ParameterStore, self).__init__()
        self.service = service
        self.cluster = cluster
        self.yml = yml
        self.populated = False
github caltechads / deployfish / deployfish / aws / ecs / Task.py View on Github external
self.placementStrategy = yml['placement_strategy']
        if 'count' in yml:
            self.desired_count = yml['count']
        if 'platform_version' in yml:
            self.platform_version = yml['platform_version']
        self.desired_task_definition = TaskDefinition(yml=yml)
        deployfish_environment = {
            "DEPLOYFISH_TASK_NAME": yml['name'],
            "DEPLOYFISH_ENVIRONMENT": yml.get('environment', 'undefined'),
            "DEPLOYFISH_CLUSTER_NAME": self.clusterName
        }
        self.desired_task_definition.inject_environment(deployfish_environment)
        parameters = []
        if 'config' in yml:
            parameters = yml['config']
        self.parameter_store = ParameterStore("task-{}".format(self.taskName), self.clusterName, yml=parameters)
        if 'schedule' in yml:
            self.schedule_expression = yml['schedule']
        if 'schedule_role' in yml:
            self.schedule_role = yml['schedule_role']
        if 'group' in yml:
            self.group = yml['group']

        self._get_cluster_arn()
github caltechads / deployfish / deployfish / aws / ecs / Service.py View on Github external
self.desired_task_definition = TaskDefinition(yml=yml)
        deployfish_environment = {
            "DEPLOYFISH_SERVICE_NAME": yml['name'],
            "DEPLOYFISH_ENVIRONMENT": yml.get('environment', 'undefined'),
            "DEPLOYFISH_CLUSTER_NAME": yml['cluster']
        }
        self.desired_task_definition.inject_environment(deployfish_environment)
        self.tasks = {}
        if 'tasks' in yml:
            for task in yml['tasks']:
                t = HelperTask(yml['cluster'], yml=task)
                self.tasks[t.family] = t
        parameters = []
        if 'config' in yml:
            parameters = yml['config']
        self.parameter_store = ParameterStore(self._serviceName, self._clusterName, yml=parameters)