Source: factory.deploy/extend.build/ObjConfig.py
Configuration and cluster orchestration with full substrate integration.
Features:
| Method | Signature | Description |
|---|---|---|
| docker | docker() |
|
| parse_yaml | parse_yaml(package: str, config_file: str = 'config.yaml') -> Dict[str, Any] |
Parse YAML configuration with validation. |
| build_config | build_config(package: str, yaml_config: Dict[str, Any]) -> bool |
Build configuration files from YAML. |
| create_container_from_template | create_container_from_template(name: str, image: str, resources: Optional[ResourceLimits] = None, networks: Optional[List[NetworkConfig]] = None, environment: Optional[Dict[str, str]] = None, volumes: Optional[List[Dict[str, str]]] = None) -> bool |
Create a Docker container using InstanceTemplate (substrate pattern). |
| create_redis_container | create_redis_container(package: str) -> bool |
Create Redis container using substrate template. |
| create_portainer_container | create_portainer_container() -> bool |
Create Portainer container using substrate template. |
| health_check_all_components | health_check_all_components() -> Dict[str, Dict[str, Any]] |
Perform health checks on all components. |
| get_metrics | get_metrics() -> Dict[str, Any] |
Collect metrics from all components. |
| build_cloudflare | build_cloudflare(yaml_config: Dict[str, Any]) -> bool |
Setup Cloudflare DNS (delegates to ObjDNSManager). |
| setup_prometheus | setup_prometheus(package: str, metricset: str) -> bool |
Setup Prometheus monitoring with modern subprocess calls. |
| build | build(package: str = '', stage: str = '') -> None |
Main build orchestration with full substrate integration. |
| pre_flight | pre_flight() -> None |
Pre-flight checks before build. |
| read | read(section: str, name: str, level: int = 5) -> None |
Read configuration from database. |
| get_value | get_value(section: str, name: str, level: int = 5) -> str |
Get configuration value. |
| create | create(section: str, name: str, level: int = 5) -> None |
Create configuration entry. |
| write | write(section: str, name: str, value: str, level: int = 5, context: str = '') -> None |
Write configuration value. |
| transform | transform() -> None |
Transform hook for updates. |
| update | update() -> str |
Update configuration in database. |
| trim_config | trim_config(package: str, config_path: str = 'config.yaml') -> list |
Trim config.yaml to only the sections needed at runtime. |
| validate_config | validate_config(package: str, config_path: str = 'config.yaml') -> bool |
Validate config.yaml is configured for the target package. |
In-memory cached configuration (unchanged).
| Method | Signature | Description |
|---|---|---|
| get_value | get_value(section: str, name: str, level: int = 5) -> str |
Get cached configuration value. |
| get_value_int | get_value_int(section: str, name: str, level: int = 5) -> int |
Get cached configuration value as integer. |