Environments
Each environment links a Git repository to a Pullbase deployment target.Create via web UI
Configure Git
- Repository URL:
https://github.com/your-org/configs.git - Branch:
main - Deploy path:
environments/staging/config.yaml - Auto-reconcile: enabled by default
After saving, the environment appears in the list. If webhooks are configured, Pullbase receives push events; otherwise it polls periodically.
Create via API
Servers
Servers represent managed nodes (VMs, bare-metal hosts, or containers) that run the Pullbase agent.Register via API
AGENT_TOKEN for the agent deployment.
List servers and status
Remove a server
Agent tokens
Tokens authenticate agents; each server can have multiple active tokens for rotation.Token management via CLI
- List:
pullbasectl tokens list --server-url http://localhost:8080 --admin-token $ADMIN_JWT --server-id web-01 - Create:
pullbasectl tokens create --server-url http://localhost:8080 --admin-token $ADMIN_JWT --server-id web-01 --description "blue-green" --expires-in 30 - Revoke:
pullbasectl tokens revoke --server-url http://localhost:8080 --admin-token $ADMIN_JWT --server-id web-01 --token-id 17
Token fields
| Field | Description |
|---|---|
id | Token identifier used for revocation |
description | Free-form label (“staging deployment”, “ansible integration”) |
expires_at | Expiration timestamp (optional) |
is_active | Indicates whether the token can be used |
last_used_at | Last time the token was used for authentication |
Automatic vs manual reconciliation
- Auto-reconcile enabled: Pullbase notifies agents of new commits. Agents reconcile on their next poll automatically.
- Auto-reconcile disabled: Pullbase records the new commit, but agents observe without applying changes until auto-reconcile is re-enabled.
POST /api/v1/environments/{id}/toggle-auto-reconcile).
Rollbacks
Rollback from the environment detail page or viaPOST /api/v1/environments/{id}/rollback:
Webhook notifications
Pullbase can send HTTP notifications when drift is detected or apply errors occur. Configure webhooks per environment.Configure via API
Webhook payload
drift_detected: Agent detected configuration driftapply_error: Agent encountered an error applying configurationtest: Sent when testing the webhook endpoint
Test webhook
Verify your webhook configuration before relying on it:Retry behavior
Failed webhook deliveries are retried 3 times with exponential backoff (1s, 2s, 4s). If the server is shutting down or the request context is cancelled, retries stop early.Best practices
- Use descriptive
server_idvalues (for example,prod-api-01) to simplify searches. - Rotate agent tokens regularly; maintain at least two active tokens during rotation to avoid downtime.
- Keep environment branches protected and enforce pull-request reviews.
- Tag production commits so rollbacks are easy to target.
- Configure webhook notifications for critical environments to get alerted on drift.