The Auto Bootstrap process is responsible for initializing and configuring the entire BotServer environment after installation. It ensures that all system components are installed, configured, and started automatically, and that bots are created from predefined templates.
### 1. Bootstrap Initialization
The process begins with the `BootstrapManager`, which is instantiated with an installation mode (`Local` or `Container`) and an optional tenant name. It initializes the `PackageManager`, which detects the operating system and sets up the base installation path (e.g., `/opt/gbo` or `botserver-stack`).
### 2. Component Registration and Installation
The `PackageManager` registers all system components such as:
This automatically creates bots from templates during bootstrap.
### 5. Template Upload to MinIO
After bots are created, the method `upload_templates_to_minio()` uploads all template files recursively to a MinIO bucket (S3-compatible storage).
This makes templates accessible for runtime bot operations and ensures persistence across environments.
### 6. Summary
The Auto Bootstrap process performs the following steps automatically:
1. Detects environment and installation mode.
2. Registers and installs required components.
3. Initializes the database and applies migrations.
4. Updates bot configuration records.
5. Creates bots from `.gbai` templates.
6. Uploads templates to MinIO for storage.
This process ensures that after installation, the system is fully operational with preconfigured bots derived from templates, ready to serve requests immediately.