Skip to content

Commit

Permalink
Merge pull request #338 from PrefectHQ/update-metadata-01-09-2024
Browse files Browse the repository at this point in the history
Update metadata for collection releases
  • Loading branch information
zzstoatzz authored Jan 9, 2024
2 parents e51e6d6 + da057f8 commit 3d56d0b
Show file tree
Hide file tree
Showing 6 changed files with 2,130 additions and 27 deletions.
110 changes: 110 additions & 0 deletions collections/prefect-docker/blocks/v0.4.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"prefect-docker": {
"block_types": {
"docker-host": {
"name": "Docker Host",
"slug": "docker-host",
"logo_url": "https://images.ctfassets.net/gm98wzqotmnx/2IfXXfMq66mrzJBDFFCHTp/6d8f320d9e4fc4393f045673d61ab612/Moby-logo.png?h=250",
"documentation_url": null,
"description": "Store settings for interacting with a Docker host. This block is part of the prefect-docker collection. Install prefect-docker with `pip install prefect-docker` to use this block.",
"code_example": "Get a Docker Host client.\n```python\nfrom prefect_docker import DockerHost\n\ndocker_host = DockerHost(\nbase_url=\"tcp://127.0.0.1:1234\",\n max_pool_size=4\n)\nwith docker_host.get_client() as client:\n ... # Use the client for Docker operations\n```",
"block_schema": {
"checksum": "sha256:bf0961e9f2d88fd81bca2c7b78c025bd289776ad84ae8ef22d8f3db8b9561478",
"fields": {
"title": "DockerHost",
"description": "Store settings for interacting with a Docker host.",
"type": "object",
"properties": {
"base_url": {
"title": "Base URL",
"description": "URL to the Docker host.",
"example": "unix:///var/run/docker.sock",
"type": "string"
},
"version": {
"title": "Version",
"description": "The version of the API to use",
"default": "auto",
"type": "string"
},
"timeout": {
"title": "Timeout",
"description": "Default timeout for API calls, in seconds.",
"type": "integer"
},
"max_pool_size": {
"title": "Max Pool Size",
"description": "The maximum number of connections to save in the pool.",
"type": "integer"
},
"client_kwargs": {
"title": "Additional Configuration",
"description": "Additional keyword arguments to pass to `docker.from_env()` or `DockerClient`.",
"type": "object"
}
},
"block_type_slug": "docker-host",
"secret_fields": [],
"block_schema_references": {}
},
"capabilities": [],
"version": "0.4.2"
}
},
"docker-registry-credentials": {
"name": "Docker Registry Credentials",
"slug": "docker-registry-credentials",
"logo_url": "https://images.ctfassets.net/gm98wzqotmnx/2IfXXfMq66mrzJBDFFCHTp/6d8f320d9e4fc4393f045673d61ab612/Moby-logo.png?h=250",
"documentation_url": null,
"description": "Store credentials for interacting with a Docker Registry. This block is part of the prefect-docker collection. Install prefect-docker with `pip install prefect-docker` to use this block.",
"code_example": "Log into Docker Registry.\n```python\nfrom prefect_docker import DockerHost, DockerRegistryCredentials\n\ndocker_host = DockerHost()\ndocker_registry_credentials = DockerRegistryCredentials(\n username=\"my_username\",\n password=\"my_password\",\n registry_url=\"registry.hub.docker.com\",\n)\nwith docker_host.get_client() as client:\n docker_registry_credentials.login(client)\n```",
"block_schema": {
"checksum": "sha256:79c2e94bef9297ccd49000f66e7919ee915c97495720b41fba8420786dbf2c58",
"fields": {
"title": "DockerRegistryCredentials",
"description": "Store credentials for interacting with a Docker Registry.",
"type": "object",
"properties": {
"username": {
"title": "Username",
"description": "The username to log into the registry with.",
"type": "string"
},
"password": {
"title": "Password",
"description": "The password to log into the registry with.",
"type": "string",
"writeOnly": true,
"format": "password"
},
"registry_url": {
"title": "Registry Url",
"description": "The URL to the registry. Generally, \"http\" or \"https\" can be omitted.",
"example": "registry.hub.docker.com",
"type": "string"
},
"reauth": {
"title": "Reauth",
"description": "Whether or not to reauthenticate on each interaction.",
"default": true,
"type": "boolean"
}
},
"required": [
"username",
"password",
"registry_url"
],
"block_type_slug": "docker-registry-credentials",
"secret_fields": [
"password"
],
"block_schema_references": {}
},
"capabilities": [],
"version": "0.4.2"
}
}
}
}
}
3 changes: 3 additions & 0 deletions collections/prefect-docker/flows/v0.4.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"prefect-docker": {}
}
131 changes: 131 additions & 0 deletions collections/prefect-docker/workers/v0.4.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
{
"prefect-docker": {
"docker": {
"default_base_job_configuration": {
"job_configuration": {
"command": "{{ command }}",
"env": "{{ env }}",
"labels": "{{ labels }}",
"name": "{{ name }}",
"image": "{{ image }}",
"image_pull_policy": "{{ image_pull_policy }}",
"networks": "{{ networks }}",
"network_mode": "{{ network_mode }}",
"auto_remove": "{{ auto_remove }}",
"volumes": "{{ volumes }}",
"stream_output": "{{ stream_output }}",
"mem_limit": "{{ mem_limit }}",
"memswap_limit": "{{ memswap_limit }}",
"privileged": "{{ privileged }}"
},
"variables": {
"description": "Configuration class used by the Docker worker.\n\nAn instance of this class is passed to the Docker worker's `run` method\nfor each flow run. It contains all the information necessary to execute the\nflow run as a Docker container.\n\nAttributes:\n name: The name to give to created Docker containers.\n command: The command executed in created Docker containers to kick off\n flow run execution.\n env: The environment variables to set in created Docker containers.\n labels: The labels to set on created Docker containers.\n image: The image reference of a container image to use for created jobs.\n If not set, the latest Prefect image will be used.\n image_pull_policy: The image pull policy to use when pulling images.\n networks: Docker networks that created containers should be connected to.\n network_mode: The network mode for the created containers (e.g. host, bridge).\n If 'networks' is set, this cannot be set.\n auto_remove: If set, containers will be deleted on completion.\n volumes: Docker volumes that should be mounted in created containers.\n stream_output: If set, the output from created containers will be streamed\n to local standard output.\n mem_limit: Memory limit of created containers. Accepts a value\n with a unit identifier (e.g. 100000b, 1000k, 128m, 1g.) If a value is\n given without a unit, bytes are assumed.\n memswap_limit: Total memory (memory + swap), -1 to disable swap. Should only be\n set if `mem_limit` is also set. If `mem_limit` is set, this defaults to\n allowing the container to use as much swap as memory. For example, if\n `mem_limit` is 300m and `memswap_limit` is not set, containers can use\n 600m in total of memory and swap.\n privileged: Give extended privileges to created containers.",
"type": "object",
"properties": {
"command": {
"title": "Command",
"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"
},
"env": {
"title": "Environment Variables",
"description": "Environment variables to set when starting a flow run.",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"labels": {
"title": "Labels",
"description": "Labels applied to infrastructure created by the worker using this job configuration.",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"name": {
"title": "Name",
"description": "Name given to infrastructure created by the worker using this job configuration.",
"type": "string"
},
"image": {
"title": "Image",
"description": "The image reference of a container image to use for created jobs. If not set, the latest Prefect image will be used.",
"example": "docker.io/prefecthq/prefect:2-latest",
"type": "string"
},
"image_pull_policy": {
"title": "Image Pull Policy",
"description": "The image pull policy to use when pulling images.",
"enum": [
"IfNotPresent",
"Always",
"Never"
],
"type": "string"
},
"networks": {
"title": "Networks",
"description": "Docker networks that created containers should be connected to.",
"type": "array",
"items": {
"type": "string"
}
},
"network_mode": {
"title": "Network Mode",
"description": "The network mode for the created containers (e.g. host, bridge). If 'networks' is set, this cannot be set.",
"type": "string"
},
"auto_remove": {
"title": "Auto Remove",
"description": "If set, containers will be deleted on completion.",
"default": false,
"type": "boolean"
},
"volumes": {
"title": "Volumes",
"description": "A list of volume to mount into created containers.",
"example": [
"/my/local/path:/path/in/container"
],
"type": "array",
"items": {
"type": "string"
}
},
"stream_output": {
"title": "Stream Output",
"description": "If set, the output from created containers will be streamed to local standard output.",
"default": true,
"type": "boolean"
},
"mem_limit": {
"title": "Memory Limit",
"description": "Memory limit of created containers. Accepts a value with a unit identifier (e.g. 100000b, 1000k, 128m, 1g.) If a value is given without a unit, bytes are assumed.",
"type": "string"
},
"memswap_limit": {
"title": "Memory Swap Limit",
"description": "Total memory (memory + swap), -1 to disable swap. Should only be set if `mem_limit` is also set. If `mem_limit` is set, this defaults toallowing the container to use as much swap as memory. For example, if `mem_limit` is 300m and `memswap_limit` is not set, containers can use 600m in total of memory and swap.",
"type": "string"
},
"privileged": {
"title": "Privileged",
"description": "Give extended privileges to created container.",
"default": false,
"type": "boolean"
}
}
}
},
"description": "Execute flow runs within Docker containers. Works well for managing flow execution environments via Docker images. Requires access to a running Docker daemon.",
"display_name": "Docker",
"documentation_url": "https://prefecthq.github.io/prefect-docker/worker/",
"install_command": "pip install prefect-docker",
"is_beta": false,
"logo_url": "https://images.ctfassets.net/gm98wzqotmnx/2IfXXfMq66mrzJBDFFCHTp/6d8f320d9e4fc4393f045673d61ab612/Moby-logo.png?h=250",
"type": "docker"
}
}
}
Loading

0 comments on commit 3d56d0b

Please sign in to comment.