Config#
- pydantic settings mobu.config.Config#
Configuration for mobu.
- Parameters:
_nested_model_default_partial_update (
bool
|None
, default:None
)_env_file (
Union
[Path
,str
,Sequence
[Union
[Path
,str
]],None
], default:PosixPath('.')
)_cli_parse_args (
bool
|list
[str
] |tuple
[str
,...
] |None
, default:None
)_cli_settings_source (
Optional
[CliSettingsSource
[Any
]], default:None
)_cli_shortcuts (
Mapping
[str
,str
|list
[str
]] |None
, default:None
)_secrets_dir (
Union
[Path
,str
,Sequence
[Union
[Path
,str
]],None
], default:None
)values (
Any
)
Show JSON schema
{ "title": "Config", "description": "Configuration for mobu.", "type": "object", "properties": { "slackAlerts": { "default": false, "description": "Whether to enable Slack alerts. If true, ``alert_hook`` must also be set.", "title": "Enable Slack alerts", "type": "boolean" }, "MOBU_ALERT_HOOK": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": null, "description": "Slack incoming webhook to which to send alerts", "examples": [ "https://slack.example.com/ADFAW1452DAF41/" ], "title": "Slack alert webhook URL" }, "MOBU_ENVIRONMENT_URL": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Used to create URLs to other services, such as Gafaelfawr and JupyterHub. This is only optional to make writing the test suite easier. If it is not set to a valid URL, mobu will abort during startup.", "examples": [ "https://data.example.org/" ], "title": "Base URL of the Science Platform environment" }, "MOBU_SENTRY_DSN": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The Sentry DSN: https://docs.sentry.io/platforms/python/#configure", "examples": [ "https://foo@bar.ingest.us.sentry.io/123456" ], "title": "Sentry DSN" }, "MOBU_SENTRY_TRACES_SAMPLE_CONFIG": { "anyOf": [ { "type": "number" }, { "const": "errors", "type": "string" } ], "default": 0, "description": "Set the Sentry sampling strategy for traces. If this is a float, it will be passed as the traces_sample_rate: https://docs.sentry.io/platforms/python/configuration/sampling/#configuring-the-transaction-sample-rate If this is set to \"errors\", then all transactions during which an error occurred will be sent.", "examples": [ 0, 0.5, "errors" ], "title": "Sentry traces sample config" }, "MOBU_SENTRY_ENVIRONMENT": { "description": "The Sentry environment: https://docs.sentry.io/concepts/key-terms/environments/", "title": "Sentry environment", "type": "string" }, "MOBU_GAFAELFAWR_TOKEN": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "This token is used to make an admin API call to Gafaelfawr to get a token for the user. This is only optional to make writing tests easier. mobu will abort during startup if it is not set.", "examples": [ "gt-vilSCi1ifK_MyuaQgMD2dQ.d6SIJhowv5Hs3GvujOyUig" ], "title": "Gafaelfawr admin token" }, "gafaelfawrTimeout": { "anyOf": [ { "$ref": "#/$defs/HumanTimedelta" }, { "type": "null" } ], "default": null, "description": "The time to set for all httpx timeouts. If this None, then the timeouts will be set to the default timeouts from the Safir http client dependency.", "examples": [ "3m", 45, "45", "1.4s" ], "title": "Gafaelfawr client timeout" }, "availableServices": { "default": [], "description": "Names of services available in the current environment. For now, this list is manually maintained in the mobu config in Phalanx. When we have a service discovery mechanism in place, it should be used here.", "examples": [ [ "tap", "ssotap", "butler" ] ], "items": { "type": "string" }, "title": "Available platform services", "type": "array", "uniqueItems": true }, "name": { "default": "mobu", "description": "Doubles as the root HTTP endpoint path.", "title": "Name of application", "type": "string" }, "autostart": { "default": [], "description": "Configuration of flocks of monkeys that will run businesses repeatedly as long as Mobu is running.", "items": { "$ref": "#/$defs/FlockConfig" }, "title": "Autostart config", "type": "array" }, "pathPrefix": { "default": "/mobu", "title": "URL prefix for application API", "type": "string" }, "profile": { "$ref": "#/$defs/Profile", "default": "development", "title": "Application logging profile" }, "logLevel": { "$ref": "#/$defs/LogLevel", "default": "INFO", "title": "Log level of the application's logger" }, "logMonkeysToFile": { "default": true, "description": "Log monkey messages to a file instead of doing whatever the normal global logger does", "title": "Log monkey messages to a file", "type": "boolean" }, "MOBU_REPLICA_COUNT": { "description": "The number of instances of that this StatefulSet will be running. If this is more than one, then only user_spec user definitions will be allowed.", "title": "Replica count", "type": "integer" }, "MOBU_REPLICA_INDEX": { "description": "Mobu is deployed as a StatefulSet. Every replica is assigned an integer index, starting with 0 and counting up. This value is this instance's assigned index.", "title": "Replica index", "type": "integer" }, "metrics": { "$ref": "#/$defs/MetricsConfiguration", "title": "Metrics configuration" }, "githubCiApp": { "anyOf": [ { "$ref": "#/$defs/GitHubCiAppConfig" }, { "type": "null" } ], "default": null, "description": "Configuration for GitHub CI app functionality", "title": "GitHub CI app config" }, "githubRefreshApp": { "anyOf": [ { "$ref": "#/$defs/GitHubRefreshAppConfig" }, { "type": "null" } ], "default": null, "description": "Configuration for GitHub refresh app functionality", "title": "GitHub refresh app config" } }, "$defs": { "BusinessOptions": { "additionalProperties": false, "description": "Options for monkey business.", "properties": { "error_idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "examples": [ 600 ], "title": "How long to wait after an error before restarting" }, "idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "description": "After each loop executing monkey business, the monkey will pause for this long", "examples": [ 60 ], "title": "How long to wait between business executions" }, "log_level": { "$ref": "#/$defs/LogLevel", "default": "INFO", "title": "Log level for this monkey business" } }, "title": "BusinessOptions", "type": "object" }, "CollectionRule": { "description": "A set of patterns to filter the list of notebooks to run in a repo.", "properties": { "type": { "description": "intersect_union_of will evaluate the intersection of the current collection in the rule evaluation chain with union of all of the patterns in this rule. 'exclude_union_of' will subtract the union of the notebooks found by any pattern in this rule from the current current collection in the rule chain.", "enum": [ "intersect_union_of", "exclude_union_of" ], "title": "Collection rule type", "type": "string" }, "patterns": { "description": "A set of Python pathlib glob patterns: https://docs.python.org/3/library/pathlib.html#pattern-language This rule will gather all of the notebooks matched by any pattern in this list to either intersect or exclude.", "items": { "type": "string" }, "title": "patterns", "type": "array", "uniqueItems": true } }, "required": [ "type", "patterns" ], "title": "CollectionRule", "type": "object" }, "DisabledMetricsConfiguration": { "description": "Metrics configuration when metrics reporting is disabled.", "properties": { "appName": { "description": "The name of the application that is emitting these metrics", "title": "Application name", "type": "string" }, "events": { "$ref": "#/$defs/EventsConfiguration", "title": "Events configuration" }, "enabled": { "description": "If set to false, no events will be sent and all calls to publish events will be no-ops.", "title": "Whether to send events", "type": "boolean" } }, "required": [ "appName", "enabled" ], "title": "DisabledMetricsConfiguration", "type": "object" }, "EmptyLoopConfig": { "additionalProperties": false, "description": "Configuration specialization for EmptyLoop.\n\nThis business class does nothing, successfully. It is used primarily for\ntesting mobu.", "properties": { "type": { "const": "EmptyLoop", "title": "Type of business to run", "type": "string" }, "options": { "$ref": "#/$defs/BusinessOptions", "title": "Options for the monkey business" }, "restart": { "default": false, "examples": [ true ], "title": "Restart business after failure", "type": "boolean" } }, "required": [ "type" ], "title": "EmptyLoopConfig", "type": "object" }, "EventsConfiguration": { "additionalProperties": false, "description": "Configuration for emitting events.", "properties": { "topicPrefix": { "default": "lsst.square.metrics.events", "description": "You probably should use the default here. It could be useful in development scenarios to change this.", "title": "Metrics topic prefix", "type": "string" } }, "title": "EventsConfiguration", "type": "object" }, "FlockConfig": { "description": "Configuration for a flock of monkeys.\n\nA flock must all share the same business and options, but may contain any\nnumber of individual monkeys, which will all run as different users.", "properties": { "name": { "examples": [ "autostart" ], "title": "Name of the flock", "type": "string" }, "count": { "description": "The total number of monkeys to run, split as evenly as possible among all replicas of this Mobu StatefulSet. If this value is 100, and there are 4 replicas, then each replica will run 25 monkeys.", "examples": [ 100 ], "title": "How many monkeys to run", "type": "integer" }, "start_batch_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The number of monkeys to start in each batch. If not provided, all monkeys will be started at the same time. This is the total number of monkeys to start concurrently across all replicas, so if there are multiple replicas, each replica will only start a fraction of this batch.", "title": "Start batch size" }, "start_batch_wait": { "anyOf": [ { "$ref": "#/$defs/HumanTimedelta" }, { "type": "null" } ], "default": null, "description": "The amount of time to wait before starting each batch of monkeys. Must be provided if start_batch_size is provided.", "title": "Start batch wait" }, "users": { "anyOf": [ { "items": { "$ref": "#/$defs/User" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Run as the specific list of users. If specified, the length of the list must equal the count of monkeys to run. Specify either this or user_spec but not both.", "title": "Explicit list of users to run as" }, "user_spec": { "anyOf": [ { "$ref": "#/$defs/UserSpec" }, { "type": "null" } ], "default": null, "description": "Specify either this or users but not both", "title": "Specification to generate users" }, "scopes": { "description": "Must include all scopes required to run the business", "examples": [ [ "exec:notebook", "read:tap" ] ], "items": { "type": "string" }, "title": "Token scopes", "type": "array" }, "business": { "discriminator": { "mapping": { "EmptyLoop": "#/$defs/EmptyLoopConfig", "GitLFS": "#/$defs/GitLFSConfig", "NotebookRunnerCounting": "#/$defs/NotebookRunnerCountingConfig", "NotebookRunnerInfinite": "#/$defs/NotebookRunnerInfiniteConfig", "NotebookRunnerList": "#/$defs/NotebookRunnerListConfig", "NubladoPythonLoop": "#/$defs/NubladoPythonLoopConfig", "SIAQuerySetRunner": "#/$defs/SIAQuerySetRunnerConfig", "TAPQueryRunner": "#/$defs/TAPQueryRunnerConfig", "TAPQuerySetRunner": "#/$defs/TAPQuerySetRunnerConfig" }, "propertyName": "type" }, "oneOf": [ { "$ref": "#/$defs/TAPQueryRunnerConfig" }, { "$ref": "#/$defs/GitLFSConfig" }, { "$ref": "#/$defs/NotebookRunnerCountingConfig" }, { "$ref": "#/$defs/NotebookRunnerListConfig" }, { "$ref": "#/$defs/NotebookRunnerInfiniteConfig" }, { "$ref": "#/$defs/NubladoPythonLoopConfig" }, { "$ref": "#/$defs/TAPQuerySetRunnerConfig" }, { "$ref": "#/$defs/SIAQuerySetRunnerConfig" }, { "$ref": "#/$defs/EmptyLoopConfig" } ], "title": "Business to run" } }, "required": [ "name", "count", "scopes", "business" ], "title": "FlockConfig", "type": "object" }, "GitHubCiAppConfig": { "additionalProperties": false, "description": "Configuration for GitHub CI app functionality if it is enabled.", "properties": { "MOBU_GITHUB_CI_APP_ID": { "description": "Found on the GitHub app's settings page (NOT the installation configuration page). For example: https://github.com/organizations/lsst-sqre/settings/apps/mobu-ci-data-dev-lsst-cloud", "examples": [ 123456 ], "title": "Github CI app id", "type": "integer" }, "MOBU_GITHUB_CI_APP_PRIVATE_KEY": { "description": "Generated when the GitHub app was set up. This should NOT be base64 enocded, and will contain newlines. You can find this in 1Password; check the Phalanx mobu values for more details.", "examples": [ "\n-----BEGIN RSA PRIVATE KEY-----\nabc123MeowMeow456abc123MeowMeow456abc123MeowMeow456abc123MeowMeo\nabc123MeowMeow456abc123MeowMeow456abc123MeowMeow456abc123MeowMeo\nabc123MeowMeow456abc123MeowMeow456abc123MeowMeow456abc123MeowMeo\netc, etc\n-----END RSA PRIVATE KEY-----\n" ], "title": "Github CI app private key", "type": "string" }, "MOBU_GITHUB_CI_APP_WEBHOOK_SECRET": { "description": "Generated when the GitHub app was set up. You can find this in 1Password; check the Phalanx mobu values for more details.", "title": "Github CI app webhook secret", "type": "string" }, "users": { "description": "Must be prefixed with 'bot-', like all mobu users. In environments without Firestore, users have to be provisioned by environment admins, and their usernames, uids, and guids must be specified here. In environments with firestore, only usernames need to be specified, but you still need to explicitly specify as many users as needed to get the amount of concurrency that you want.", "items": { "$ref": "#/$defs/User" }, "title": "Environment users for CI jobs to run as.", "type": "array" }, "scopes": { "description": "A list of Gafaelfawr scopes that will be granted to the user when running notebooks for a GitHub CI app check.", "items": { "type": "string" }, "title": "Gafaelfawr Scopes", "type": "array" }, "acceptedGithubOrgs": { "default": [], "description": "Any webhook payload request from a repo in an organization not in this list will get a 403 response.", "items": { "type": "string" }, "title": "Allowed GitHub organizations.", "type": "array" } }, "required": [ "MOBU_GITHUB_CI_APP_ID", "MOBU_GITHUB_CI_APP_PRIVATE_KEY", "MOBU_GITHUB_CI_APP_WEBHOOK_SECRET", "users", "scopes" ], "title": "GitHubCiAppConfig", "type": "object" }, "GitHubRefreshAppConfig": { "additionalProperties": false, "description": "Configuration for GitHub refresh app functionality.", "properties": { "MOBU_GITHUB_REFRESH_APP_WEBHOOK_SECRET": { "description": "Generated when the GitHub app was set up. You can find this in 1Password; check the Phalanx mobu values for more details.", "title": "Github refresh app webhook secret", "type": "string" }, "acceptedGithubOrgs": { "default": [], "description": "Any webhook payload request from a repo in an organization not in this list will get a 403 response.", "items": { "type": "string" }, "title": "Allowed GitHub organizations.", "type": "array" } }, "required": [ "MOBU_GITHUB_REFRESH_APP_WEBHOOK_SECRET" ], "title": "GitHubRefreshAppConfig", "type": "object" }, "GitLFSBusinessOptions": { "additionalProperties": false, "description": "Options for business that runs git LFS operations.", "properties": { "error_idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "examples": [ 600 ], "title": "How long to wait after an error before restarting" }, "idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "description": "After each loop executing monkey business, the monkey will pause for this long", "examples": [ 60 ], "title": "How long to wait between business executions" }, "log_level": { "$ref": "#/$defs/LogLevel", "default": "INFO", "title": "Log level for this monkey business" }, "lfs_read_url": { "title": "LFS read URL for Git-LFS enabled repo", "type": "string" }, "lfs_write_url": { "title": "LFS write URL for Git-LFS enabled repo", "type": "string" } }, "required": [ "lfs_read_url", "lfs_write_url" ], "title": "GitLFSBusinessOptions", "type": "object" }, "GitLFSConfig": { "additionalProperties": false, "description": "Configuration specialization for GitLFS.", "properties": { "type": { "const": "GitLFS", "title": "Type of business to run", "type": "string" }, "options": { "$ref": "#/$defs/GitLFSBusinessOptions", "title": "Options for the GitLFS Business" }, "restart": { "default": false, "examples": [ true ], "title": "Restart business after failure", "type": "boolean" } }, "required": [ "type", "options" ], "title": "GitLFSConfig", "type": "object" }, "Group": { "description": "Configuration for the group memberships of a user.", "properties": { "name": { "examples": [ "g_special_users" ], "minLength": 1, "pattern": "^g_", "title": "Name of the group", "type": "string" }, "id": { "examples": [ 123181 ], "title": "Numeric GID of the group", "type": "integer" } }, "required": [ "name", "id" ], "title": "Group", "type": "object" }, "HumanTimedelta": { "format": "duration", "type": "string" }, "KafkaConnectionSettings": { "additionalProperties": false, "description": "Settings for connecting to Kafka.\n\nThis settings model supports different authentication methods, which each\nhave different sets of required settings. All of these settings can be\nprovided in ``KAFKA_`` prefixed environment variables. Instances of this\nmodel have properties that can be used to construct different types of\nkafka clients:\n\n.. code-block:: python\n\n from faststream.broker import KafkaBroker\n\n from safir.kafka import KafkaConnectionSettings\n\n\n config = KafkaConnectionSettings()\n kafka_broker = KafkaBroker(**config.faststream_broker_params)\n\nWhen using this model directly, The ``validated`` property enforces at\nruntime that the correct settings were provided for the desired\nauthentication method, and returns models to access those settings in a\ntype-safe way:\n\n.. code-block:: python\n\n from pathlib import Path\n\n\n # ValidationError at runtime: ``client_key_path`` is not provided\n config = KafkaConnectionSettings(\n bootstrap_servers=\"something:1234\",\n security_protocol=KafkaSecurityProtocol.SSL,\n cluster_ca_path=Path(\"/some/cert.crt\"),\n client_cert_path=Path(\"/some/other/cert.crt\"),\n )\n\n config = KafkaConnectionSettings(\n bootstrap_servers=\"something:1234\",\n security_protocol=KafkaSecurityProtocol.SSL,\n cluster_ca_path=Path(\"/some/path/ca.crt\"),\n client_cert_path=Path(\"/some/path/user.crt\"),\n client_key_path=Path(\"/some/path/user.key\"),\n )\n\n blah = config.validated.sasl_username # Static type error", "properties": { "bootstrapServers": { "description": "A comma-separated list of Kafka brokers to connect to. This should be a list of hostnames or IP addresses, each optionally followed by a port number, separated by commas.", "examples": [ "kafka-1:9092,kafka-2:9092,kafka-3:9092", "kafka:9092" ], "title": "Kafka bootstrap servers", "type": "string" }, "securityProtocol": { "$ref": "#/$defs/SecurityProtocol", "description": "The authentication and encryption mode for the connection.", "title": "Security Protocol" }, "clusterCaPath": { "anyOf": [ { "format": "file-path", "type": "string" }, { "type": "null" } ], "default": null, "description": "The path to the PEM-formatted CA certificate file to use for verifying the broker's certificate. This is only needed for SSL and SASL_SSL security protocols, andeven in those cases, only when the broker's certificate is not signed by a CA trusted by the operating system.", "examples": [ "/some/dir/ca.crt" ], "title": "Path to CA certificate file" }, "clientCertPath": { "anyOf": [ { "format": "file-path", "type": "string" }, { "type": "null" } ], "default": null, "description": "The path to the PEM-formated client certificate file to use for authentication. This is only needed if the broker is configured to require SSL client authentication.", "examples": [ "/some/dir/user.crt" ], "title": "Path to client certificate file" }, "clientKeyPath": { "anyOf": [ { "format": "file-path", "type": "string" }, { "type": "null" } ], "default": null, "description": "The path to the PEM-formatted client key file to use for authentication. This is only needed if for the SSL securityprotocol.", "examples": [ "/some/dir/user.key" ], "title": "Path to client key file" }, "saslMechanism": { "anyOf": [ { "$ref": "#/$defs/SaslMechanism" }, { "type": "null" } ], "default": null, "description": "The SASL mechanism to use for authentication. This is only needed for the SASL_SSL and SASL_PLAINTEXT securityprotocols.", "title": "SASL mechanism" }, "saslUsername": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The username to use for SASL authentication. This is only needed for the SASL_SSL and SASL_PLAINTEXT securityprotocols.", "title": "SASL username" }, "saslPassword": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": null, "description": "The password to use for SASL authentication. This is only needed for the SASL_SSL and SASL_PLAINTEXT securityprotocols.", "title": "SASL password" } }, "required": [ "bootstrapServers", "securityProtocol" ], "title": "KafkaConnectionSettings", "type": "object" }, "KafkaMetricsConfiguration": { "additionalProperties": false, "description": "Metrics configuration when enabled, including Kafka configuration.", "properties": { "appName": { "description": "The name of the application that is emitting these metrics", "title": "Application name", "type": "string" }, "events": { "$ref": "#/$defs/EventsConfiguration", "title": "Events configuration" }, "enabled": { "default": true, "description": "If set to false, no events will be sent and all calls to publish events will be no-ops.", "title": "Whether to send events", "type": "boolean" }, "kafka": { "$ref": "#/$defs/KafkaConnectionSettings", "title": "Kafka connection settings" }, "schemaManager": { "$ref": "#/$defs/SchemaManagerSettings", "title": "Kafka schema manager settings" }, "raiseOnError": { "default": false, "description": "True if we should raise an exception whenever there is an error with the metrics system dependencies, like Kafka or the Schema Manager. False if we should just log an error instead. This should be False for most production apps so that issues with the metrics infrastructure don't bring down the app.", "title": "Raise on error", "type": "boolean" }, "backoffInterval": { "$ref": "#/$defs/HumanTimedelta", "default": "PT5M", "description": "The amount of time to wait until further operations are attempted when the event manager is in an error state.", "title": "Backoff interval" } }, "required": [ "appName" ], "title": "KafkaMetricsConfiguration", "type": "object" }, "LogLevel": { "description": "Python logging level.\n\nAny case variation is accepted when converting a string to an enum value\nvia the class constructor.", "enum": [ "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL" ], "title": "LogLevel", "type": "string" }, "MetricsConfiguration": { "anyOf": [ { "$ref": "#/$defs/MockMetricsConfiguration" }, { "$ref": "#/$defs/DisabledMetricsConfiguration" }, { "$ref": "#/$defs/KafkaMetricsConfiguration" } ] }, "MockMetricsConfiguration": { "description": "Metrics configuration when metrics publishing is mocked.", "properties": { "appName": { "description": "The name of the application that is emitting these metrics", "title": "Application name", "type": "string" }, "events": { "$ref": "#/$defs/EventsConfiguration", "title": "Events configuration" }, "enabled": { "description": "If set to false, no events will be sent and all calls to publish events will be no-ops.", "title": "Whether to send events", "type": "boolean" }, "mock": { "description": "If set to true, all event publishers will be unittest.mock.MagicMock instances which will record all calls to their publish methods.", "title": "Mock publishers", "type": "boolean" } }, "required": [ "appName", "enabled", "mock" ], "title": "MockMetricsConfiguration", "type": "object" }, "NotebookRunnerCountingConfig": { "additionalProperties": false, "description": "Configuration specialization for NotebookRunnerCounting.", "properties": { "type": { "const": "NotebookRunnerCounting", "title": "Type of business to run", "type": "string" }, "options": { "$ref": "#/$defs/NotebookRunnerCountingOptions", "title": "Options for the monkey business" }, "restart": { "default": false, "examples": [ true ], "title": "Restart business after failure", "type": "boolean" } }, "required": [ "type" ], "title": "NotebookRunnerCountingConfig", "type": "object" }, "NotebookRunnerCountingOptions": { "additionalProperties": false, "description": "Options to specify a fixed number of notebooks to run per session.", "properties": { "exclude_dirs": { "default": [], "description": "DEPRECATED: use collection_rules instead. If both exclude_dirs and collection_rules are set, exclude_dirs will be added as exclude rules to the collection_rules. These directories are relative to the repo root. Any notebooks in child directories of these directories will also be excluded. Only used by the NotebookRunner businesses.", "examples": [ "some-dir", "some-dir/some-other-dir" ], "items": { "format": "path", "type": "string" }, "title": "Any notebooks in these directories will not be run", "type": "array", "uniqueItems": true }, "collection_rules": { "default": [], "description": "A set of rules describing which notebooks in a repo to run. Only used by NotebookRunner businesses.", "items": { "$ref": "#/$defs/CollectionRule" }, "title": "Collection rules", "type": "array" }, "error_idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "examples": [ 600 ], "title": "How long to wait after an error before restarting" }, "idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "description": "After each loop executing monkey business, the monkey will pause for this long", "examples": [ 60 ], "title": "How long to wait between business executions" }, "log_level": { "$ref": "#/$defs/LogLevel", "default": "INFO", "title": "Log level for this monkey business" }, "delete_lab": { "default": true, "description": "By default, the lab is deleted and recreated after each iteration of monkey business. Set this to false to keep the same lab.", "examples": [ true ], "title": "Whether to delete the lab between iterations", "type": "boolean" }, "delete_timeout": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "examples": [ 60 ], "title": "Timeout for deleting a lab" }, "execution_idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1S", "description": "Used by NubladoPythonLoop and NotebookRunner", "examples": [ 1 ], "title": "How long to wait between cell executions" }, "get_node": { "default": true, "description": "Used by NubladoPythonLoop and its subclasses. Requires the lab have lsst.rsp pre-installed.", "title": "Whether to get the node name for error reporting", "type": "boolean" }, "image": { "anyOf": [ { "$ref": "#/$defs/NubladoImageByClass" }, { "$ref": "#/$defs/NubladoImageByReference" }, { "$ref": "#/$defs/NubladoImageByTag" } ], "title": "Nublado lab image to use" }, "jitter": { "$ref": "#/$defs/HumanTimedelta", "default": "PT0S", "description": "If set to a non-zero value, pause for a random interval between 0 and that interval before logging in to JupyterHub, and between each iteration of the core execution loop. Use this when running lots of monkeys for load testing to spread their execution sequence out more realistically and avoid a thundering herd problem.", "examples": [ 60 ], "title": "Maximum random time to pause" }, "jupyter_timeout": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "description": "Used as the connect, read, and write timeout for talking to either JupyterHub or Jupyter lab.", "title": "HTTP client timeout for Jupyter requests" }, "max_websocket_message_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 10485760, "description": "This has to be large enough to hold HTML and image output from executing notebook cells, even though we discard that data. Set to ``null`` for no limit.", "title": "Maximum length of WebSocket message (in bytes)" }, "spawn_settle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT10S", "description": "Wait this long after triggering a lab spawn before starting to poll its progress. KubeSpawner 1.1.0 has a bug where progress queries prior to starting the spawn will fail with an exception that closes the progress EventStream.", "examples": [ 10 ], "title": "How long to wait before polling spawn progress" }, "spawn_timeout": { "$ref": "#/$defs/HumanTimedelta", "default": "PT10M10S", "examples": [ 610 ], "title": "Timeout for spawning a lab" }, "url_prefix": { "default": "/nb/", "title": "URL prefix for JupyterHub", "type": "string" }, "working_directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "examples": [ "notebooks/tutorial-notebooks" ], "title": "Working directory when running code" }, "repo_ref": { "default": "prod", "description": "Only used by the NotebookRunner", "examples": [ "main", "03cd564dd2025bf17054d9ebfeeb5c5a266e3484" ], "title": "Git ref of notebook repository to execute", "type": "string" }, "repo_url": { "default": "https://github.com/lsst-sqre/notebook-demo.git", "description": "Only used by the NotebookRunner", "title": "Git URL of notebook repository to execute", "type": "string" }, "notebook_idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT0S", "description": "Used by NotebookRunner businesses", "examples": [ "30s" ], "title": "How long to wait between notebook executions" }, "max_executions": { "default": 25, "description": " NotebookRunnerCounting goes through the directory of notebooks one-by-one, running the entirety of each one and starting again at the beginning of the list when it runs out, until it has executed a total of `max_executions` notebooks. It then closes the session (and optionally deletes and recreates the lab, controlled by `delete_lab`), and then picks up where it left off.", "examples": [ 25 ], "minimum": 1, "title": "How much to execute in a given lab and session", "type": "integer" } }, "title": "NotebookRunnerCountingOptions", "type": "object" }, "NotebookRunnerInfiniteConfig": { "additionalProperties": false, "description": "Configuration specialization for NotebookRunner.", "properties": { "type": { "const": "NotebookRunnerInfinite", "title": "Type of business to run", "type": "string" }, "options": { "$ref": "#/$defs/NotebookRunnerOptions", "title": "Options for the monkey business" }, "restart": { "default": false, "examples": [ true ], "title": "Restart business after failure", "type": "boolean" } }, "required": [ "type" ], "title": "NotebookRunnerInfiniteConfig", "type": "object" }, "NotebookRunnerListConfig": { "additionalProperties": false, "description": "Configuration specialization for NotebookRunnerList.", "properties": { "type": { "const": "NotebookRunnerList", "title": "Type of business to run", "type": "string" }, "options": { "$ref": "#/$defs/NotebookRunnerOptions", "title": "Options for the monkey business" }, "restart": { "default": false, "examples": [ true ], "title": "Restart business after failure", "type": "boolean" } }, "required": [ "type" ], "title": "NotebookRunnerListConfig", "type": "object" }, "NotebookRunnerOptions": { "additionalProperties": false, "description": "Options for all types NotebookRunner monkey business.", "properties": { "exclude_dirs": { "default": [], "description": "DEPRECATED: use collection_rules instead. If both exclude_dirs and collection_rules are set, exclude_dirs will be added as exclude rules to the collection_rules. These directories are relative to the repo root. Any notebooks in child directories of these directories will also be excluded. Only used by the NotebookRunner businesses.", "examples": [ "some-dir", "some-dir/some-other-dir" ], "items": { "format": "path", "type": "string" }, "title": "Any notebooks in these directories will not be run", "type": "array", "uniqueItems": true }, "collection_rules": { "default": [], "description": "A set of rules describing which notebooks in a repo to run. Only used by NotebookRunner businesses.", "items": { "$ref": "#/$defs/CollectionRule" }, "title": "Collection rules", "type": "array" }, "error_idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "examples": [ 600 ], "title": "How long to wait after an error before restarting" }, "idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "description": "After each loop executing monkey business, the monkey will pause for this long", "examples": [ 60 ], "title": "How long to wait between business executions" }, "log_level": { "$ref": "#/$defs/LogLevel", "default": "INFO", "title": "Log level for this monkey business" }, "delete_lab": { "default": true, "description": "By default, the lab is deleted and recreated after each iteration of monkey business. Set this to false to keep the same lab.", "examples": [ true ], "title": "Whether to delete the lab between iterations", "type": "boolean" }, "delete_timeout": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "examples": [ 60 ], "title": "Timeout for deleting a lab" }, "execution_idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1S", "description": "Used by NubladoPythonLoop and NotebookRunner", "examples": [ 1 ], "title": "How long to wait between cell executions" }, "get_node": { "default": true, "description": "Used by NubladoPythonLoop and its subclasses. Requires the lab have lsst.rsp pre-installed.", "title": "Whether to get the node name for error reporting", "type": "boolean" }, "image": { "anyOf": [ { "$ref": "#/$defs/NubladoImageByClass" }, { "$ref": "#/$defs/NubladoImageByReference" }, { "$ref": "#/$defs/NubladoImageByTag" } ], "title": "Nublado lab image to use" }, "jitter": { "$ref": "#/$defs/HumanTimedelta", "default": "PT0S", "description": "If set to a non-zero value, pause for a random interval between 0 and that interval before logging in to JupyterHub, and between each iteration of the core execution loop. Use this when running lots of monkeys for load testing to spread their execution sequence out more realistically and avoid a thundering herd problem.", "examples": [ 60 ], "title": "Maximum random time to pause" }, "jupyter_timeout": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "description": "Used as the connect, read, and write timeout for talking to either JupyterHub or Jupyter lab.", "title": "HTTP client timeout for Jupyter requests" }, "max_websocket_message_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 10485760, "description": "This has to be large enough to hold HTML and image output from executing notebook cells, even though we discard that data. Set to ``null`` for no limit.", "title": "Maximum length of WebSocket message (in bytes)" }, "spawn_settle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT10S", "description": "Wait this long after triggering a lab spawn before starting to poll its progress. KubeSpawner 1.1.0 has a bug where progress queries prior to starting the spawn will fail with an exception that closes the progress EventStream.", "examples": [ 10 ], "title": "How long to wait before polling spawn progress" }, "spawn_timeout": { "$ref": "#/$defs/HumanTimedelta", "default": "PT10M10S", "examples": [ 610 ], "title": "Timeout for spawning a lab" }, "url_prefix": { "default": "/nb/", "title": "URL prefix for JupyterHub", "type": "string" }, "working_directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "examples": [ "notebooks/tutorial-notebooks" ], "title": "Working directory when running code" }, "repo_ref": { "default": "prod", "description": "Only used by the NotebookRunner", "examples": [ "main", "03cd564dd2025bf17054d9ebfeeb5c5a266e3484" ], "title": "Git ref of notebook repository to execute", "type": "string" }, "repo_url": { "default": "https://github.com/lsst-sqre/notebook-demo.git", "description": "Only used by the NotebookRunner", "title": "Git URL of notebook repository to execute", "type": "string" }, "notebook_idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT0S", "description": "Used by NotebookRunner businesses", "examples": [ "30s" ], "title": "How long to wait between notebook executions" } }, "title": "NotebookRunnerOptions", "type": "object" }, "NubladoImageByClass": { "description": "Spawn the recommended image.", "properties": { "image_class": { "default": "recommended", "enum": [ "recommended", "latest-release", "latest-weekly", "latest-daily" ], "title": "Class of image to spawn", "type": "string" }, "size": { "$ref": "#/$defs/NubladoImageSize", "default": "Large", "description": "Must be one of the sizes understood by Nublado.", "title": "Size of image to spawn" }, "description": { "default": "", "title": "Human-readable image description", "type": "string" }, "debug": { "default": false, "title": "Whether to enable lab debugging", "type": "boolean" } }, "title": "NubladoImageByClass", "type": "object" }, "NubladoImageByReference": { "description": "Spawn an image by full Docker reference.", "properties": { "image_class": { "const": "by-reference", "default": "by-reference", "title": "Class of image to spawn", "type": "string" }, "size": { "$ref": "#/$defs/NubladoImageSize", "default": "Large", "description": "Must be one of the sizes understood by Nublado.", "title": "Size of image to spawn" }, "description": { "default": "", "title": "Human-readable image description", "type": "string" }, "debug": { "default": false, "title": "Whether to enable lab debugging", "type": "boolean" }, "reference": { "title": "Docker reference of lab image to spawn", "type": "string" } }, "required": [ "reference" ], "title": "NubladoImageByReference", "type": "object" }, "NubladoImageByTag": { "description": "Spawn an image by image tag.", "properties": { "image_class": { "const": "by-tag", "default": "by-tag", "title": "Class of image to spawn", "type": "string" }, "size": { "$ref": "#/$defs/NubladoImageSize", "default": "Large", "description": "Must be one of the sizes understood by Nublado.", "title": "Size of image to spawn" }, "description": { "default": "", "title": "Human-readable image description", "type": "string" }, "debug": { "default": false, "title": "Whether to enable lab debugging", "type": "boolean" }, "tag": { "title": "Tag of image to spawn", "type": "string" } }, "required": [ "tag" ], "title": "NubladoImageByTag", "type": "object" }, "NubladoImageSize": { "description": "Acceptable sizes of images to spawn.", "enum": [ "Fine", "Diminutive", "Tiny", "Small", "Medium", "Large", "Huge", "Gargantuan", "Colossal" ], "title": "NubladoImageSize", "type": "string" }, "NubladoPythonLoopConfig": { "additionalProperties": false, "description": "Configuration specialization for NubladoPythonLoop.", "properties": { "type": { "const": "NubladoPythonLoop", "title": "Type of business to run", "type": "string" }, "options": { "$ref": "#/$defs/NubladoPythonLoopOptions", "title": "Options for the monkey business" }, "restart": { "default": false, "examples": [ true ], "title": "Restart business after failure", "type": "boolean" } }, "required": [ "type" ], "title": "NubladoPythonLoopConfig", "type": "object" }, "NubladoPythonLoopOptions": { "additionalProperties": false, "description": "Options for NubladoPythonLoop monkey business.", "properties": { "error_idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "examples": [ 600 ], "title": "How long to wait after an error before restarting" }, "idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "description": "After each loop executing monkey business, the monkey will pause for this long", "examples": [ 60 ], "title": "How long to wait between business executions" }, "log_level": { "$ref": "#/$defs/LogLevel", "default": "INFO", "title": "Log level for this monkey business" }, "delete_lab": { "default": true, "description": "By default, the lab is deleted and recreated after each iteration of monkey business. Set this to false to keep the same lab.", "examples": [ true ], "title": "Whether to delete the lab between iterations", "type": "boolean" }, "delete_timeout": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "examples": [ 60 ], "title": "Timeout for deleting a lab" }, "execution_idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1S", "description": "Used by NubladoPythonLoop and NotebookRunner", "examples": [ 1 ], "title": "How long to wait between cell executions" }, "get_node": { "default": true, "description": "Used by NubladoPythonLoop and its subclasses. Requires the lab have lsst.rsp pre-installed.", "title": "Whether to get the node name for error reporting", "type": "boolean" }, "image": { "anyOf": [ { "$ref": "#/$defs/NubladoImageByClass" }, { "$ref": "#/$defs/NubladoImageByReference" }, { "$ref": "#/$defs/NubladoImageByTag" } ], "title": "Nublado lab image to use" }, "jitter": { "$ref": "#/$defs/HumanTimedelta", "default": "PT0S", "description": "If set to a non-zero value, pause for a random interval between 0 and that interval before logging in to JupyterHub, and between each iteration of the core execution loop. Use this when running lots of monkeys for load testing to spread their execution sequence out more realistically and avoid a thundering herd problem.", "examples": [ 60 ], "title": "Maximum random time to pause" }, "jupyter_timeout": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "description": "Used as the connect, read, and write timeout for talking to either JupyterHub or Jupyter lab.", "title": "HTTP client timeout for Jupyter requests" }, "max_websocket_message_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 10485760, "description": "This has to be large enough to hold HTML and image output from executing notebook cells, even though we discard that data. Set to ``null`` for no limit.", "title": "Maximum length of WebSocket message (in bytes)" }, "spawn_settle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT10S", "description": "Wait this long after triggering a lab spawn before starting to poll its progress. KubeSpawner 1.1.0 has a bug where progress queries prior to starting the spawn will fail with an exception that closes the progress EventStream.", "examples": [ 10 ], "title": "How long to wait before polling spawn progress" }, "spawn_timeout": { "$ref": "#/$defs/HumanTimedelta", "default": "PT10M10S", "examples": [ 610 ], "title": "Timeout for spawning a lab" }, "url_prefix": { "default": "/nb/", "title": "URL prefix for JupyterHub", "type": "string" }, "working_directory": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "examples": [ "notebooks/tutorial-notebooks" ], "title": "Working directory when running code" }, "code": { "default": "print(2+2, end=\"\")", "examples": [ "print(2+2, end=\"\")" ], "title": "Python code to execute", "type": "string" }, "max_executions": { "default": 25, "description": "The number of code snippets to execute before restarting the lab.", "examples": [ 25 ], "minimum": 1, "title": "How much to execute in a given lab and session", "type": "integer" } }, "title": "NubladoPythonLoopOptions", "type": "object" }, "Profile": { "description": "Logging profile for the application.", "enum": [ "production", "development" ], "title": "Profile", "type": "string" }, "SIAQuerySetRunnerConfig": { "additionalProperties": false, "description": "Configuration specialization for SIAQuerySetRunner.", "properties": { "type": { "const": "SIAQuerySetRunner", "title": "Type of business to run", "type": "string" }, "options": { "$ref": "#/$defs/SIAQuerySetRunnerOptions", "title": "Options for the monkey business" }, "restart": { "default": false, "examples": [ true ], "title": "Restart business after failure", "type": "boolean" } }, "required": [ "type" ], "title": "SIAQuerySetRunnerConfig", "type": "object" }, "SIAQuerySetRunnerOptions": { "additionalProperties": false, "description": "Options for SIAQuerySetRunner monkey business.", "properties": { "error_idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "examples": [ 600 ], "title": "How long to wait after an error before restarting" }, "idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "description": "After each loop executing monkey business, the monkey will pause for this long", "examples": [ 60 ], "title": "How long to wait between business executions" }, "log_level": { "$ref": "#/$defs/LogLevel", "default": "INFO", "title": "Log level for this monkey business" }, "query_set": { "default": "dp02", "examples": [ "dp02" ], "title": "Which query template set to use for a SIAQuerySetRunner", "type": "string" } }, "title": "SIAQuerySetRunnerOptions", "type": "object" }, "SaslMechanism": { "description": "Kafka SASL mechanisms.", "enum": [ "PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512" ], "title": "SaslMechanism", "type": "string" }, "SchemaManagerSettings": { "additionalProperties": false, "description": "Settings for constructing a `~safir.kafka.PydanticSchemaManager`.", "properties": { "registryUrl": { "description": "URL of a a Confluent-compatible schema registry", "format": "uri", "minLength": 1, "title": "Schema registry URL", "type": "string" }, "suffix": { "default": "", "description": "A suffix that is added to the schema name (and thus the subject name). The suffix creates alternate subjects in the Schema Registry so schemas registered during testing and staging don't affect the compatibility continuity of a production subject. For production, it's best to not set a suffix.", "examples": [ "_dev1" ], "title": "Suffix", "type": "string" } }, "required": [ "registryUrl" ], "title": "SchemaManagerSettings", "type": "object" }, "SecurityProtocol": { "description": "Kafka SASL security protocols.", "enum": [ "SASL_PLAINTEXT", "SASL_SSL", "PLAINTEXT", "SSL" ], "title": "SecurityProtocol", "type": "string" }, "TAPQueryRunnerConfig": { "additionalProperties": false, "description": "Configuration specialization for TAPQueryRunner.", "properties": { "type": { "const": "TAPQueryRunner", "title": "Type of business to run", "type": "string" }, "options": { "$ref": "#/$defs/TAPQueryRunnerOptions", "title": "Options for the monkey business" }, "restart": { "default": false, "examples": [ true ], "title": "Restart business after failure", "type": "boolean" } }, "required": [ "type", "options" ], "title": "TAPQueryRunnerConfig", "type": "object" }, "TAPQueryRunnerOptions": { "additionalProperties": false, "description": "Options for TAPQueryRunner monkey business.", "properties": { "error_idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "examples": [ 600 ], "title": "How long to wait after an error before restarting" }, "idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "description": "After each loop executing monkey business, the monkey will pause for this long", "examples": [ 60 ], "title": "How long to wait between business executions" }, "log_level": { "$ref": "#/$defs/LogLevel", "default": "INFO", "title": "Log level for this monkey business" }, "sync": { "default": true, "description": "By default, queries to TAP are run via the sync endpoint. Set this to false to run as an async query.", "examples": [ true ], "title": "Whether to run TAP queries as sync or async", "type": "boolean" }, "queries": { "description": "List of queries to be run", "examples": [ [ "SELECT TOP 10 * FROM TAP_SCHEMA.schemas", "SELECT TOP 10 * FROM MYDB.MyTable" ] ], "items": { "type": "string" }, "title": "TAP queries", "type": "array" } }, "required": [ "queries" ], "title": "TAPQueryRunnerOptions", "type": "object" }, "TAPQuerySetRunnerConfig": { "additionalProperties": false, "description": "Configuration specialization for TAPQuerySetRunner.", "properties": { "type": { "const": "TAPQuerySetRunner", "title": "Type of business to run", "type": "string" }, "options": { "$ref": "#/$defs/TAPQuerySetRunnerOptions", "title": "Options for the monkey business" }, "restart": { "default": false, "examples": [ true ], "title": "Restart business after failure", "type": "boolean" } }, "required": [ "type" ], "title": "TAPQuerySetRunnerConfig", "type": "object" }, "TAPQuerySetRunnerOptions": { "additionalProperties": false, "description": "Options for TAPQueryRunner monkey business.", "properties": { "error_idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "examples": [ 600 ], "title": "How long to wait after an error before restarting" }, "idle_time": { "$ref": "#/$defs/HumanTimedelta", "default": "PT1M", "description": "After each loop executing monkey business, the monkey will pause for this long", "examples": [ 60 ], "title": "How long to wait between business executions" }, "log_level": { "$ref": "#/$defs/LogLevel", "default": "INFO", "title": "Log level for this monkey business" }, "sync": { "default": true, "description": "By default, queries to TAP are run via the sync endpoint. Set this to false to run as an async query.", "examples": [ true ], "title": "Whether to run TAP queries as sync or async", "type": "boolean" }, "query_set": { "default": "dp0.1", "examples": [ "dp0.2" ], "title": "Which query template set to use for a TapQueryRunner", "type": "string" } }, "title": "TAPQuerySetRunnerOptions", "type": "object" }, "User": { "description": "Configuration for the user whose credentials the monkey will use.", "properties": { "username": { "description": "Must start with 'bot-mobu'", "examples": [ "bot-mobu-testuser" ], "pattern": "^bot-mobu", "title": "Username", "type": "string" }, "uidnumber": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "If omitted, Gafaelfawr will assign a UID. (Gafaelfawr UID assignment requires Firestore be configured.)", "examples": [ 60001 ], "title": "Numeric UID" }, "gidnumber": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "If omitted but a UID was specified, use a GID equal to the UID. If both are omitted, Gafaelfawr will assign a UID and GID. (Gafaelfawr UID and GID assignment requires Firestore and synthetic user private groups to be configured.)", "examples": [ 60001 ], "title": "Primary GID" }, "groups": { "default": [], "description": "Groups of which the user is a member", "items": { "$ref": "#/$defs/Group" }, "title": "Groups", "type": "array" } }, "required": [ "username" ], "title": "User", "type": "object" }, "UserSpec": { "description": "Configuration to generate a set of users.", "properties": { "username_prefix": { "description": "Each user will be formed by appending a number to this", "examples": [ "bot-mobu-lsptestuser" ], "title": "Prefix for usernames", "type": "string" }, "uid_start": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Users will be given consecutive UIDs starting with this. If omitted, Gafaelfawr will assign UIDs. (Gafaelfawr UID assignment requires Firestore be configured.)", "examples": [ 60000 ], "title": "Starting UID" }, "gid_start": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Users will be given consecutive primary GIDs starting with this. If omitted but UIDs were given, the GIDs will be equal to the UIDs. If both are omitted, Gafaelfawr will assign UIDs and GIDs (which requires Firestore and synthetic user private groups to be configured).", "examples": [ 60000 ], "title": "Starting GID" }, "groups": { "default": [], "description": "Groups of which each user is a member", "items": { "$ref": "#/$defs/Group" }, "title": "Groups", "type": "array" } }, "required": [ "username_prefix" ], "title": "UserSpec", "type": "object" } }, "additionalProperties": false, "required": [ "MOBU_SENTRY_ENVIRONMENT", "MOBU_REPLICA_COUNT", "MOBU_REPLICA_INDEX" ] }
- Config:
alias_generator: function = <function to_camel at 0x7ff7ca93a340>
validate_by_name: bool = True
- Fields:
- field alert_hook: SecretStr | None = None (alias 'alertHook')#
Slack incoming webhook to which to send alerts
- field autostart: list[FlockConfig] = []#
Configuration of flocks of monkeys that will run businesses repeatedly as long as Mobu is running.
- field available_services: set[str] = {} (alias 'availableServices')#
Names of services available in the current environment. For now, this list is manually maintained in the mobu config in Phalanx. When we have a service discovery mechanism in place, it should be used here.
- field environment_url: HttpUrl | None = None (alias 'environmentUrl')#
Used to create URLs to other services, such as Gafaelfawr and JupyterHub. This is only optional to make writing the test suite easier. If it is not set to a valid URL, mobu will abort during startup.
- field gafaelfawr_timeout: HumanTimedelta | None = None (alias 'gafaelfawrTimeout')#
The time to set for all httpx timeouts. If this None, then the timeouts will be set to the default timeouts from the Safir http client dependency.
- field gafaelfawr_token: str | None = None (alias 'gafaelfawrToken')#
This token is used to make an admin API call to Gafaelfawr to get a token for the user. This is only optional to make writing tests easier. mobu will abort during startup if it is not set.
- field github_ci_app: GitHubCiAppConfig | None = None (alias 'githubCiApp')#
Configuration for GitHub CI app functionality
- field github_refresh_app: GitHubRefreshAppConfig | None = None (alias 'githubRefreshApp')#
Configuration for GitHub refresh app functionality
- field log_level: LogLevel = LogLevel.INFO (alias 'logLevel')#
- field log_monkeys_to_file: bool = True (alias 'logMonkeysToFile')#
Log monkey messages to a file instead of doing whatever the normal global logger does
- field metrics: MetricsConfiguration [Optional]#
- field name: str = 'mobu'#
Doubles as the root HTTP endpoint path.
- field path_prefix: str = '/mobu' (alias 'pathPrefix')#
- field profile: Profile = Profile.development#
- field replica_count: int [Required] (alias 'replicaCount')#
The number of instances of that this StatefulSet will be running. If this is more than one, then only user_spec user definitions will be allowed.
- field replica_index: int [Required] (alias 'replicaIndex')#
Mobu is deployed as a StatefulSet. Every replica is assigned an integer index, starting with 0 and counting up. This value is this instance’s assigned index.
- field sentry_dsn: str | None = None (alias 'sentryDsn')#
The Sentry DSN: https://docs.sentry.io/platforms/python/#configure
- field sentry_environment: str [Required] (alias 'sentryEnvironment')#
The Sentry environment: https://docs.sentry.io/concepts/key-terms/environments/
- field sentry_traces_sample_config: float | Literal['errors'] = 0 (alias 'sentryTracesSampleConfig')#
Set the Sentry sampling strategy for traces. If this is a float, it will be passed as the traces_sample_rate: https://docs.sentry.io/platforms/python/configuration/sampling/#configuring-the-transaction-sample-rate If this is set to “errors”, then all transactions during which an error occurred will be sent.
- field slack_alerts: bool = False (alias 'slackAlerts')#
Whether to enable Slack alerts. If true,
alert_hook
must also be set.