tg-init-trustgraph
Initializes Pulsar with TrustGraph tenant, namespaces, and configuration settings.
Synopsis
tg-init-trustgraph [options]
Description
The tg-init-trustgraph command initializes the Apache Pulsar messaging system with the required tenant, namespaces, policies, and configuration needed for TrustGraph operation. This is a foundational setup command that must be run before TrustGraph can operate properly.
Note: This command is intended for system initialization and deployment automation. End users should not need to run this command directly - it is typically executed during initial system setup or by deployment scripts.
Options
Optional Arguments
| Option | Default | Description |
|---|---|---|
-p, --pulsar-admin-url URL | http://pulsar:8080 | Pulsar admin URL |
--pulsar-host HOST | pulsar://pulsar:6650 | Pulsar host for client connections |
--pulsar-api-key KEY | (none) | Pulsar API key for authentication |
-c, --config CONFIG | (none) | Initial configuration JSON to load |
-t, --tenant TENANT | tg | Tenant name |
Examples
Basic Initialization
tg-init-trustgraph
Custom Pulsar Configuration
tg-init-trustgraph \
--pulsar-admin-url http://localhost:8080 \
--pulsar-host pulsar://localhost:6650
With Initial Configuration
tg-init-trustgraph \
--config '{"prompt": {"system": "You are a helpful AI assistant"}}'
Custom Tenant
tg-init-trustgraph --tenant production-tg
What It Creates
The command creates a TrustGraph tenant with the following namespaces:
tg/flow: Processing workflows and flow definitionstg/request: Incoming API requests and commandstg/response: API responses and resultstg/metrics: System metrics and monitoring datatg/config: Configuration storage
Each namespace is configured with appropriate retention policies for TrustGraph operation.
Prerequisites
- Apache Pulsar must be running and accessible
- Pulsar admin tools must be available
- Network connectivity to Pulsar admin and client ports
Notes
This command is typically run once during initial TrustGraph deployment. Re-running the command is safe and will update existing configurations without data loss.
API Integration
This command uses Pulsar Admin API to create tenants, namespaces, and policies.