コード例 #1
0
ファイル: platform.py プロジェクト: pombredanne/flytekit
from __future__ import absolute_import

from flytekit.configuration import common as _config_common
from flytekit.common import constants as _constants

URL = _config_common.FlyteRequiredStringConfigurationEntry('platform', 'url')
INSECURE = _config_common.FlyteBoolConfigurationEntry('platform',
                                                      'insecure',
                                                      default=False)
CLOUD_PROVIDER = _config_common.FlyteStringConfigurationEntry(
    'platform', 'cloud_provider', default=_constants.CloudProvider.AWS)
コード例 #2
0
from __future__ import absolute_import

from flytekit.configuration import common as _config_common

S3_SHARD_FORMATTER = _config_common.FlyteRequiredStringConfigurationEntry(
    'aws', 's3_shard_formatter')

S3_SHARD_STRING_LENGTH = _config_common.FlyteIntegerConfigurationEntry(
    'aws', 's3_shard_string_length', default=2)

S3_ENDPOINT = _config_common.FlyteStringConfigurationEntry('aws',
                                                           'endpoint',
                                                           default=None)

S3_ACCESS_KEY_ID = _config_common.FlyteStringConfigurationEntry(
    'aws', 'access_key_id', default=None)

S3_SECRET_ACCESS_KEY = _config_common.FlyteStringConfigurationEntry(
    'aws', 'secret_access_key', default=None)

S3_ACCESS_KEY_ID_ENV_NAME = 'AWS_ACCESS_KEY_ID'

S3_SECRET_ACCESS_KEY_ENV_NAME = 'AWS_SECRET_ACCESS_KEY'

S3_ENDPOINT_ARG_NAME = '--endpoint-url'
コード例 #3
0
TODO: Explain how this would be used to extend the SDK
"""

LOCAL_SANDBOX = _config_common.FlyteStringConfigurationEntry('sdk', 'local_sandbox', default="/tmp/flyte")
"""
This is the path where SDK will place files during local executions and testing.  The SDK will not automatically
clean up data in these directories.
"""

SDK_PYTHON_VENV = _config_common.FlyteStringListConfigurationEntry('sdk', 'python_venv', default=[])
"""
This is a list of commands/args which will be prefixed to the entrypoint command by SDK.
"""

ROLE = _config_common.FlyteRequiredStringConfigurationEntry('sdk', 'role')
"""
This is the role the SDK will use by default to execute workflows.  For example, in AWS this should be an IAM role
string.
"""

NAME_FORMAT = _config_common.FlyteStringConfigurationEntry('sdk', 'name_format', default='{module}.{name}')
"""
This is a Python format string which the SDK will use to generate names for discovered entities.  The default is
'{module}.{name}' which will result in strings like 'package.module.name'.  Any template portion of the string can only
include 'module' or 'name'.  So '{name}' is valid, but '{key}' is not.
"""

TASK_NAME_FORMAT = _config_common.FlyteStringConfigurationEntry('sdk', 'task_name_format', fallback=NAME_FORMAT)
"""
This is a Python format string which the SDK will use to generate names for tasks. Any template portion of the
コード例 #4
0
TODO: Explain how this would be used to extend the SDK
"""

LOCAL_SANDBOX = _config_common.FlyteStringConfigurationEntry("sdk", "local_sandbox", default="/tmp/flyte")
"""
This is the path where SDK will place files during local executions and testing.  The SDK will not automatically
clean up data in these directories.
"""

SDK_PYTHON_VENV = _config_common.FlyteStringListConfigurationEntry("sdk", "python_venv", default=[])
"""
This is a list of commands/args which will be prefixed to the entrypoint command by SDK.
"""

ROLE = _config_common.FlyteRequiredStringConfigurationEntry("sdk", "role")
"""
This is the role the SDK will use by default to execute workflows.  For example, in AWS this should be an IAM role
string.
"""

NAME_FORMAT = _config_common.FlyteStringConfigurationEntry("sdk", "name_format", default="{module}.{name}")
"""
This is a Python format string which the SDK will use to generate names for discovered entities.  The default is
'{module}.{name}' which will result in strings like 'package.module.name'.  Any template portion of the string can only
include 'module' or 'name'.  So '{name}' is valid, but '{key}' is not.
"""

TASK_NAME_FORMAT = _config_common.FlyteStringConfigurationEntry("sdk", "task_name_format", fallback=NAME_FORMAT)
"""
This is a Python format string which the SDK will use to generate names for tasks. Any template portion of the
コード例 #5
0
from flytekit.configuration import common as _config_common

GCS_PREFIX = _config_common.FlyteRequiredStringConfigurationEntry(
    "gcp", "gcs_prefix")
GSUTIL_PARALLELISM = _config_common.FlyteBoolConfigurationEntry(
    "gcp", "gsutil_parallelism", default=False)
コード例 #6
0
from __future__ import absolute_import

from flytekit.configuration import common as _config_common

GCS_PREFIX = _config_common.FlyteRequiredStringConfigurationEntry(
    'gcp', 'gcs_prefix')
コード例 #7
0
from __future__ import absolute_import

import re

from flytekit.configuration import common as _common_config

IMAGE = _common_config.FlyteRequiredStringConfigurationEntry(
    'internal', 'image')
# This configuration option specifies the path to the file that holds the configuration options.  Don't worry,
# there will not be cycles because the parsing of the configuration file intentionally will not read and settings
# in the [internal] section.
# The default, if you want to use it, should be a file called flytekit.config, located in wherever your python
# interpreter originates.
CONFIGURATION_PATH = _common_config.FlyteStringConfigurationEntry(
    'internal', 'configuration_path', default='flytekit.config')

# Project, Domain and Version represent the values at registration time.
PROJECT = _common_config.FlyteStringConfigurationEntry('internal',
                                                       'project',
                                                       default="")
DOMAIN = _common_config.FlyteStringConfigurationEntry('internal',
                                                      'domain',
                                                      default="")
NAME = _common_config.FlyteStringConfigurationEntry('internal',
                                                    'name',
                                                    default="")
VERSION = _common_config.FlyteStringConfigurationEntry('internal',
                                                       'version',
                                                       default="")

# Project, Domain and Version represent the values at registration time.
コード例 #8
0
ファイル: internal.py プロジェクト: ybubnov/flytekit
import re

from flytekit.configuration import common as _common_config

IMAGE = _common_config.FlyteRequiredStringConfigurationEntry(
    "internal", "image")
# This configuration option specifies the path to the file that holds the configuration options.  Don't worry,
# there will not be cycles because the parsing of the configuration file intentionally will not read and settings
# in the [internal] section.
# The default, if you want to use it, should be a file called flytekit.config, located in wherever your python
# interpreter originates.
CONFIGURATION_PATH = _common_config.FlyteStringConfigurationEntry(
    "internal", "configuration_path", default="flytekit.config")

# Project, Domain and Version represent the values at registration time.
PROJECT = _common_config.FlyteStringConfigurationEntry("internal",
                                                       "project",
                                                       default="")
DOMAIN = _common_config.FlyteStringConfigurationEntry("internal",
                                                      "domain",
                                                      default="")
NAME = _common_config.FlyteStringConfigurationEntry("internal",
                                                    "name",
                                                    default="")
VERSION = _common_config.FlyteStringConfigurationEntry("internal",
                                                       "version",
                                                       default="")

# Project, Domain and Version represent the values at registration time.
TASK_PROJECT = _common_config.FlyteStringConfigurationEntry("internal",
                                                            "task_project",
コード例 #9
0
from flytekit.common import constants as _constants
from flytekit.configuration import common as _config_common

URL = _config_common.FlyteRequiredStringConfigurationEntry("platform", "url")

HTTP_URL = _config_common.FlyteStringConfigurationEntry("platform", "http_url", default=None)
"""
If not starting with either http or https, this setting should begin with // as per the urlparse library and
https://tools.ietf.org/html/rfc1808.html, otherwise the netloc will not be properly parsed.

Currently the only use-case for this configuration setting is for Auth discovery. This setting supports the case where
Flyte Admin's gRPC and HTTP points are deployed on different ports.
"""

INSECURE = _config_common.FlyteBoolConfigurationEntry("platform", "insecure", default=False)

CLOUD_PROVIDER = _config_common.FlyteStringConfigurationEntry(
    "platform", "cloud_provider", default=_constants.CloudProvider.AWS
)

AUTH = _config_common.FlyteBoolConfigurationEntry("platform", "auth", default=False)
"""
This config setting should not normally be filled in. Whether or not an admin server requires authentication should be
something published by the admin server itself (typically by returning a 401). However, to help with migration, this
config object is here to force the SDK to attempt the auth flow even without prompting by Admin.
"""