Automated Deployment
Fully automated, Infrastructure-as-Code deployment of GridGain Control Center using its REST API, with JSON configuration files for users, teams, clusters, notifications, and alerts.
Control Center provides a comprehensive REST API that enables fully automated, Infrastructure-as-Code (IaC) deployment and configuration. This allows you to manage Control Center resources declaratively, integrate with CI/CD pipelines, and maintain reproducible deployments following GitOps patterns.
Overview
With automated deployment, you can programmatically manage:
Users - Create and update user accounts with profiles and admin privileges
Teams - Create teams and manage team membership
Clusters - Attach GridGain 9 or Apache Ignite 3 clusters and configure sharing with teams or users
Notification Channels - Set up EMAIL, SMS, and WEBHOOK notification endpoints
Alert Configurations - Define metric-based alerts with thresholds and notification routing
This approach enables you to:
Define your desired Control Center state in configuration files
Apply changes automatically and repeatably
Detect configuration drift (resources not defined in your configuration)
Integrate Control Center setup into your deployment automation
Demo Project
GridGain provides a complete working example demonstrating automated deployment:
Control Center Automated Deployment Demo
The demo includes:
Docker Compose setup with Control Center and sample Ignite clusters
Example configuration files defining users, teams, clusters, notifications, and alerts
Deployment scripts in both Bash and Python
OpenAPI specification for all REST API endpoints
Use this demo as a starting point for your own automation scripts.
Deployment Workflow
The automated deployment follows this sequence:
Health Check - Wait for Control Center to be available
Authentication - Obtain a JWT token using admin credentials
User Synchronization - Create or update user accounts
Team Synchronization - Create teams and manage memberships
Cluster Synchronization - Attach clusters and configure sharing
Notification Channels - Configure notification endpoints per cluster
Alert Configurations - Set up metric-based alerts per cluster
Each step uses a create-or-update pattern, making the deployment idempotent and safe to re-run.
Prerequisites
Before running automated deployment, you must configure the administrator account and license. In a fully automated scenario, these are set up before Control Center starts, eliminating the need for manual UI interaction.
Administrator Account
In automated deployments, you configure the default administrator account via Control Center configuration parameters instead of creating it through the UI. Set these parameters before starting Control Center:
account.admin.email
Email address for the administrator account
account.admin.password
Password for the administrator account
You can provide these values via:
Configuration file (
application.propertiesorapplication.yml)Environment variables (
ACCOUNT_ADMIN_EMAILandACCOUNT_ADMIN_PASSWORD)Java system properties
The demo uses environment variables, which is the recommended approach for containerized deployments:
This administrator account is used by your deployment scripts to authenticate with the REST API and perform all configuration tasks.
License Management
Control Center requires a valid license to operate. For automated deployments, you have several options to provide the license without manual UI interaction.
Mount License File (Recommended for Containers)
The simplest approach for containerized deployments is to mount the license file directly to Control Center's license directory. The demo uses this method:
On startup, Control Center automatically loads the license from its license/ folder.
File Watcher for Dynamic Updates
For environments where you need to update the license without restarting Control Center, enable the file watcher:
When enabled, Control Center monitors the specified path and automatically applies license updates.
REST API Upload
These examples are for demonstration purposes only. In production, manage credentials using secure mechanisms such as secrets managers, environment variables, or encrypted vaults. Do not store credentials in plain text or embed them directly in commands.
You can also upload or update the license programmatically via the REST API:
For detailed license management options, see Managing Licenses.
Health Check
Before running deployment scripts, verify that Control Center is fully started and ready to accept requests. The demo script polls the health endpoint until Control Center reports a healthy status:
Response when Control Center is ready:
This health check ensures that Control Center has completed initialization and is ready to process API requests before your deployment script attempts to authenticate and configure resources.
Configuration Files
Define your desired state using JSON configuration files. The following sections show the structure for each resource type.
Users Configuration
These examples use plain-text credentials on the command line for simplicity. In production, manage credentials using secure mechanisms such as secrets managers, environment variables, or encrypted vaults. Do not store credentials in plain text or embed them directly in commands.
Define user accounts with their profiles:
Teams Configuration
Define teams and their members:
Clusters Configuration
Define clusters to attach and configure their sharing settings:
The shareWith field accepts team names or individual usernames.
Notification Channels Configuration
Define notification endpoints for each cluster:
Supported notification types:
EMAIL- Send alerts to email addressesWEBHOOK- POST alerts to a webhook URLSMS- Send SMS messages to phone numbers
Alert Configurations
Define metric-based alerts with conditions and notification routing:
Condition types include:
LESS_THAN- Alert when metric falls below thresholdGREATER_THAN- Alert when metric exceeds thresholdEQUALS- Alert when metric equals threshold
The gracePeriod (in milliseconds) prevents alert flapping by requiring the condition to persist before triggering. The optional autoClosePeriod automatically closes alerts when the condition is no longer met.
Getting Started
To implement automated deployment for your environment:
Clone the demo repository
Review the OpenAPI specification
The
openapi/directory contains the complete API specification. Use this as a reference for all available endpoints and their parameters.Create your configuration files
Define your users, teams, clusters, notification channels, and alerts in JSON files following the structures shown above.
Implement your deployment script
Use the demo's Bash or Python scripts as a starting point. The key patterns are:
Authenticate first to obtain a JWT token
Use create-or-update patterns for idempotency
Process resources in dependency order (users before teams, clusters before notifications)
Handle errors gracefully and report results
Integrate with your CI/CD pipeline
Run your deployment script as part of your infrastructure automation to ensure consistent Control Center configuration across environments.
REST API Reference
The automated deployment uses Control Center's REST API. Key endpoint categories include:
/rest/v1/authentication- Authentication and JWT management/rest/v1/users- User management/rest/v1/teams- Team management/rest/v1/clusters- Cluster attachment and sharing/rest/v1/clusters/{connectionId}/notifications- Notification channels/rest/v1/clusters/{connectionId}/alert-configurations- Alert configurations/rest/v1/clusters/{connectionId}/health- Cluster health reports
For detailed API documentation, refer to the OpenAPI specification.
Last updated
Was this helpful?

