diff --git a/views/aggregate-worker-metadata.json b/views/aggregate-worker-metadata.json index ac12dad6..b3d3faba 100644 --- a/views/aggregate-worker-metadata.json +++ b/views/aggregate-worker-metadata.json @@ -120,21 +120,22 @@ } ], "cpu": "{{ cpu }}", + "executionRoleArn": "{{ execution_role_arn }}", "family": "{{ family }}", - "memory": "{{ memory }}", - "executionRoleArn": "{{ execution_role_arn }}" + "memory": "{{ memory }}" }, "task_run_request": { - "launchType": "{{ launch_type }}", + "capacityProviderStrategy": "{{ capacity_provider_strategy }}", "cluster": "{{ cluster }}", + "launchType": "{{ launch_type }}", "overrides": { "containerOverrides": [ { - "name": "{{ container_name }}", "command": "{{ command }}", - "environment": "{{ env }}", "cpu": "{{ cpu }}", - "memory": "{{ memory }}" + "environment": "{{ env }}", + "memory": "{{ memory }}", + "name": "{{ container_name }}" } ], "cpu": "{{ cpu }}", @@ -142,8 +143,7 @@ "taskRoleArn": "{{ task_role_arn }}" }, "tags": "{{ labels }}", - "taskDefinition": "{{ task_definition_arn }}", - "capacityProviderStrategy": "{{ capacity_provider_strategy }}" + "taskDefinition": "{{ task_definition_arn }}" }, "configure_cloudwatch_logs": "{{ configure_cloudwatch_logs }}", "cloudwatch_logs_options": "{{ cloudwatch_logs_options }}", @@ -156,271 +156,464 @@ "vpc_id": "{{ vpc_id }}", "container_name": "{{ container_name }}", "cluster": "{{ cluster }}", - "match_latest_revision_in_family": "{{ match_latest_revision_in_family }}" + "match_latest_revision_in_family": "{{ match_latest_revision_in_family }}", + "execution_role_arn": "{{ execution_role_arn }}" }, "variables": { "description": "Variables for templating an ECS job.", - "type": "object", "properties": { "name": { - "title": "Name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "Name given to infrastructure created by a worker.", - "type": "string" + "title": "Name" }, "env": { - "title": "Environment Variables", - "description": "Environment variables to provide to the task run. These variables are set on the Prefect container at task runtime. These will not be set on the task definition.", - "type": "object", "additionalProperties": { - "type": "string" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "description": "Environment variables to provide to the task run. These variables are set on the Prefect container at task runtime. These will not be set on the task definition.", + "title": "Environment Variables", + "type": "object" }, "labels": { - "title": "Labels", - "description": "Labels applied to infrastructure created by a worker.", - "type": "object", "additionalProperties": { "type": "string" - } + }, + "description": "Labels applied to infrastructure created by a worker.", + "title": "Labels", + "type": "object" }, "command": { - "title": "Command", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "The command to use when starting a flow run. In most cases, this should be left blank and the command will be automatically generated by the worker.", - "type": "string" + "title": "Command" }, "task_definition_arn": { - "title": "Task Definition Arn", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "An identifier for an existing task definition to use. If set, options that require changes to the task definition will be ignored. All contents of the task definition in the job configuration will be ignored.", - "type": "string" + "title": "Task Definition Arn" }, "aws_credentials": { - "title": "AWS Credentials", + "$ref": "#/definitions/AwsCredentials", "description": "The AWS credentials to use to connect to ECS. If not provided, credentials will be inferred from the local environment following AWS's boto client's rules.", - "allOf": [ - { - "$ref": "#/definitions/AwsCredentials" - } - ] + "title": "AWS Credentials" }, "cluster": { - "title": "Cluster", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "The ECS cluster to run the task in. An ARN or name may be provided. If not provided, the default cluster will be used.", - "type": "string" + "title": "Cluster" }, "family": { - "title": "Family", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "A family for the task definition. If not provided, it will be inferred from the task definition. If the task definition does not have a family, the name will be generated. When flow and deployment metadata is available, the generated name will include their names. Values for this field will be slugified to match AWS character requirements.", - "type": "string" + "title": "Family" }, "launch_type": { - "title": "Launch Type", - "description": "The type of ECS task run infrastructure that should be used. Note that 'FARGATE_SPOT' is not a formal ECS launch type, but we will configure the proper capacity provider strategy if set here.", "default": "FARGATE", + "description": "The type of ECS task run infrastructure that should be used. Note that 'FARGATE_SPOT' is not a formal ECS launch type, but we will configure the proper capacity provider strategy if set here.", "enum": [ "FARGATE", "EC2", "EXTERNAL", "FARGATE_SPOT" ], + "title": "Launch Type", "type": "string" }, "capacity_provider_strategy": { - "title": "Capacity Provider Strategy", "description": "The capacity provider strategy to use when running the task. If a capacity provider strategy is specified, the selected launch type will be ignored.", - "type": "array", "items": { "$ref": "#/definitions/CapacityProvider" - } + }, + "title": "Capacity Provider Strategy", + "type": "array" }, "image": { - "title": "Image", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "The image to use for the Prefect container in the task. If this value is not null, it will override the value in the task definition. This value defaults to a Prefect base image matching your local versions.", - "type": "string" + "title": "Image" }, "cpu": { - "title": "CPU", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, "description": "The amount of CPU to provide to the ECS task. Valid amounts are specified in the AWS documentation. If not provided, a default value of 1024 will be used unless present on the task definition.", - "type": "integer" + "title": "CPU" }, "memory": { - "title": "Memory", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, "description": "The amount of memory to provide to the ECS task. Valid amounts are specified in the AWS documentation. If not provided, a default value of 2048 will be used unless present on the task definition.", - "type": "integer" + "title": "Memory" }, "container_name": { - "title": "Container Name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "The name of the container flow run orchestration will occur in. If not specified, a default value of prefect will be used and if that is not found in the task definition the first container will be used.", - "type": "string" + "title": "Container Name" }, "task_role_arn": { - "title": "Task Role ARN", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "A role to attach to the task run. This controls the permissions of the task while it is running.", - "type": "string" + "title": "Task Role ARN" }, "execution_role_arn": { - "title": "Execution Role ARN", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "An execution role to use for the task. This controls the permissions of the task when it is launching. If this value is not null, it will override the value in the task definition. An execution role must be provided to capture logs from the container.", - "type": "string" + "title": "Execution Role ARN" }, "vpc_id": { - "title": "VPC ID", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "The AWS VPC to link the task run to. This is only applicable when using the 'awsvpc' network mode for your task. FARGATE tasks require this network mode, but for EC2 tasks the default network mode is 'bridge'. If using the 'awsvpc' network mode and this field is null, your default VPC will be used. If no default VPC can be found, the task run will fail.", - "type": "string" + "title": "VPC ID" }, "configure_cloudwatch_logs": { - "title": "Configure Cloudwatch Logs", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, "description": "If enabled, the Prefect container will be configured to send its output to the AWS CloudWatch logs service. This functionality requires an execution role with logs:CreateLogStream, logs:CreateLogGroup, and logs:PutLogEvents permissions. The default for this field is `False` unless `stream_output` is set.", - "type": "boolean" + "title": "Configure Cloudwatch Logs" }, "cloudwatch_logs_options": { - "title": "Cloudwatch Logs Options", - "description": "When `configure_cloudwatch_logs` is enabled, this setting may be used to pass additional options to the CloudWatch logs configuration or override the default options. See the [AWS documentation](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html#create_awslogs_logdriver_options) for available options. ", - "type": "object", "additionalProperties": { "type": "string" - } + }, + "description": "When `configure_cloudwatch_logs` is enabled, this setting may be used to pass additional options to the CloudWatch logs configuration or override the default options. See the [AWS documentation](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html#create_awslogs_logdriver_options) for available options. ", + "title": "Cloudwatch Logs Options", + "type": "object" }, "cloudwatch_logs_prefix": { - "title": "Cloudwatch Logs Prefix", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "When `configure_cloudwatch_logs` is enabled, this setting may be used to set a prefix for the log group. If not provided, the default prefix will be `prefect-logs__`. If `awslogs-stream-prefix` is present in `Cloudwatch logs options` this setting will be ignored.", - "type": "string" + "title": "Cloudwatch Logs Prefix" }, "network_configuration": { - "title": "Network Configuration", "description": "When `network_configuration` is supplied it will override ECS Worker'sawsvpcConfiguration that defined in the ECS task executing your workload. See the [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-awsvpcconfiguration.html) for available options.", + "title": "Network Configuration", "type": "object" }, "stream_output": { - "title": "Stream Output", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, "description": "If enabled, logs will be streamed from the Prefect container to the local console. Unless you have configured AWS CloudWatch logs manually on your task definition, this requires the same prerequisites outlined in `configure_cloudwatch_logs`.", - "type": "boolean" + "title": "Stream Output" }, "task_start_timeout_seconds": { - "title": "Task Start Timeout Seconds", - "description": "The amount of time to watch for the start of the ECS task before marking it as failed. The task must enter a RUNNING state to be considered started.", "default": 300, + "description": "The amount of time to watch for the start of the ECS task before marking it as failed. The task must enter a RUNNING state to be considered started.", + "title": "Task Start Timeout Seconds", "type": "integer" }, "task_watch_poll_interval": { - "title": "Task Watch Poll Interval", - "description": "The amount of time to wait between AWS API calls while monitoring the state of an ECS task.", "default": 5.0, + "description": "The amount of time to wait between AWS API calls while monitoring the state of an ECS task.", + "title": "Task Watch Poll Interval", "type": "number" }, "auto_deregister_task_definition": { - "title": "Auto Deregister Task Definition", - "description": "If enabled, any task definitions that are created by this block will be deregistered. Existing task definitions linked by ARN will never be deregistered. Deregistering a task definition does not remove it from your AWS account, instead it will be marked as INACTIVE.", "default": false, + "description": "If enabled, any task definitions that are created by this block will be deregistered. Existing task definitions linked by ARN will never be deregistered. Deregistering a task definition does not remove it from your AWS account, instead it will be marked as INACTIVE.", + "title": "Auto Deregister Task Definition", "type": "boolean" }, "match_latest_revision_in_family": { - "title": "Match Latest Revision In Family", - "description": "If enabled, the most recent active revision in the task definition family will be compared against the desired ECS task configuration. If they are equal, the existing task definition will be used instead of registering a new one. If no family is specified the default family \"prefect\" will be used.", "default": false, + "description": "If enabled, the most recent active revision in the task definition family will be compared against the desired ECS task configuration. If they are equal, the existing task definition will be used instead of registering a new one. If no family is specified the default family \"prefect\" will be used.", + "title": "Match Latest Revision In Family", "type": "boolean" } }, + "type": "object", "definitions": { "AwsClientParameters": { - "title": "AwsClientParameters", "description": "Model used to manage extra parameters that you can pass when you initialize\nthe Client. If you want to find more information, see\n[boto3 docs](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html)\nfor more info about the possible client configurations.\n\nAttributes:\n api_version: The API version to use. By default, botocore will\n use the latest API version when creating a client. You only need\n to specify this parameter if you want to use a previous API version\n of the client.\n use_ssl: Whether or not to use SSL. By default, SSL is used.\n Note that not all services support non-ssl connections.\n verify: Whether or not to verify SSL certificates. By default\n SSL certificates are verified. If False, SSL will still be used\n (unless use_ssl is False), but SSL certificates\n will not be verified. Passing a file path to this is deprecated.\n verify_cert_path: A filename of the CA cert bundle to\n use. You can specify this argument if you want to use a\n different CA cert bundle than the one used by botocore.\n endpoint_url: The complete URL to use for the constructed\n client. Normally, botocore will automatically construct the\n appropriate URL to use when communicating with a service. You\n can specify a complete URL (including the \"http/https\" scheme)\n to override this behavior. If this value is provided,\n then ``use_ssl`` is ignored.\n config: Advanced configuration for Botocore clients. See\n [botocore docs](https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html)\n for more details.", - "type": "object", "properties": { "api_version": { - "title": "API Version", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "The API version to use.", - "type": "string" + "title": "API Version" }, "use_ssl": { - "title": "Use SSL", - "description": "Whether or not to use SSL.", "default": true, + "description": "Whether or not to use SSL.", + "title": "Use SSL", "type": "boolean" }, "verify": { - "title": "Verify", - "description": "Whether or not to verify SSL certificates.", - "default": true, "anyOf": [ { "type": "boolean" }, { - "type": "string", - "format": "file-path" + "format": "file-path", + "type": "string" + }, + { + "type": "null" } - ] + ], + "default": null, + "description": "Whether or not to verify SSL certificates.", + "title": "Verify" }, "verify_cert_path": { - "title": "Certificate Authority Bundle File Path", + "anyOf": [ + { + "format": "file-path", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "Path to the CA cert bundle to use.", - "format": "file-path", - "type": "string" + "title": "Certificate Authority Bundle File Path" }, "endpoint_url": { - "title": "Endpoint URL", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "The complete URL to use for the constructed client.", - "type": "string" + "title": "Endpoint URL" }, "config": { - "title": "Botocore Config", + "anyOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, "description": "Advanced configuration for Botocore clients.", - "type": "object" + "title": "Botocore Config" } - } + }, + "title": "AwsClientParameters", + "type": "object" }, "AwsCredentials": { - "title": "AwsCredentials", + "block_schema_references": {}, + "block_type_slug": "aws-credentials", "description": "Block used to manage authentication with AWS. AWS authentication is\nhandled via the `boto3` module. Refer to the\n[boto3 docs](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html)\nfor more info about the possible credential configurations.", - "type": "object", "properties": { "aws_access_key_id": { - "title": "AWS Access Key ID", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "A specific AWS access key ID.", - "type": "string" + "title": "AWS Access Key ID" }, "aws_secret_access_key": { - "title": "AWS Access Key Secret", + "anyOf": [ + { + "format": "password", + "type": "string", + "writeOnly": true + }, + { + "type": "null" + } + ], + "default": null, "description": "A specific AWS secret access key.", - "type": "string", - "writeOnly": true, - "format": "password" + "title": "AWS Access Key Secret" }, "aws_session_token": { - "title": "AWS Session Token", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "The session key for your AWS account. This is only needed when you are using temporary credentials.", - "type": "string" + "title": "AWS Session Token" }, "profile_name": { - "title": "Profile Name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "The profile to use when creating your session.", - "type": "string" + "title": "Profile Name" }, "region_name": { - "title": "Region Name", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "The AWS Region where you want to create new connections.", - "type": "string" + "title": "Region Name" }, "aws_client_parameters": { - "title": "AWS Client Parameters", + "$ref": "#/definitions/AwsClientParameters", "description": "Extra parameters to initialize the Client.", - "allOf": [ - { - "$ref": "#/definitions/AwsClientParameters" - } - ] + "title": "AWS Client Parameters" } }, - "block_type_slug": "aws-credentials", "secret_fields": [ "aws_secret_access_key" ], - "block_schema_references": {} + "title": "AwsCredentials", + "type": "object" }, "CapacityProvider": { - "title": "CapacityProvider", "description": "The capacity provider strategy to use when running the task.", - "type": "object", "properties": { "capacityProvider": { "title": "Capacityprovider", @@ -439,14 +632,16 @@ "capacityProvider", "weight", "base" - ] + ], + "title": "CapacityProvider", + "type": "object" } } } }, "description": "Execute flow runs within containers on AWS ECS. Works with EC2 and Fargate clusters. Requires an AWS account.", "display_name": "AWS Elastic Container Service", - "documentation_url": "https://prefecthq.github.io/prefect-aws/ecs_worker/", + "documentation_url": "https://docs.prefect.io/integrations/prefect-aws/", "install_command": "pip install prefect-aws", "is_beta": false, "logo_url": "https://cdn.sanity.io/images/3ugk85nk/production/d74b16fe84ce626345adf235a47008fea2869a60-225x225.png",