Docker
How to run GridGain Control Center with Docker, using docker-compose to start the Control Center Frontend and Backend containers.
This page describes how to run Control Center with Docker.
GridGain provides two docker images: Control Center Frontend and Control Center Backend. The easiest way to start Control Center in Docker is to use docker-compose, which enables you to start multi-container applications with a single configuration file.
Prerequisites
Docker and Docker compose
Compose File
Docker Compose needs a configuration files that defines an application. In our case, the application consists of two containers: Control Center Backend and Control Center Frontend. The frontend uses nginx to redirect user requests and, therefore, needs an nginx configuration file.
The docker-compose file must define the following actions:
Pull docker images for Control Center Frontend and Control Center Backend:
docker image pull gridgain/control-center-frontend:latest docker image pull gridgain/control-center-backend:latestMount nginx configuration file
control-center.conf, which is used by the frontend to handle user requests (see below for a sample nginx configuration file).upstream backend { server control-center-backend:3000; } server { listen 8008; server_name _; set $ignite_console_dir /data/www; root $ignite_console_dir; error_page 500 502 503 504 /50x.html; location / { try_files $uri /index.html = 404; } location /api/v1 { proxy_pass http://backend; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass_header X-XSRF-TOKEN; } location /agents { proxy_pass http://backend; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Origin http://backend; } location /browsers { proxy_pass http://backend; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Origin http://backend; proxy_pass_header X-XSRF-TOKEN; } location = /50x.html { root $ignite_console_dir/error_page; } }Set configuration parameters via environment variables.
Start the backend and frontend containers and bind the frontend to port
8008.docker compose up -d
Following is an example docker-compose file:
Optionally, to introduce a custom ignite-config.xml file, mount the config map as follows:
Launching Control Center
Put docker-compose.yaml and control-center.conf into a directory and run the following command in that directory:
The command starts two containers and binds the frontend container to port 8008. Run the following command to verify that the containers launched successfully:
In the above example, Control Center is running on port 8008.
You have to launch Control Center from the admin account, which needs to be created:
Navigate to the Control Center backend log and find the "admin account" link:

Copy the link to your browser. Replace
3000with8008and follows the link.In the Control Center UI that appears, sign in the admin account and add the Control Center license.
The cluster will try to connect to the default Control Center URI (http://localhost:3000), which is the expected behavior. You can change the Control Center port using the management script:
See Control Center URI for details.
Configuration Parameters
You can set Control Center configuration parameters by providing environment variables in the docker-compose.yaml file.
For a complete list of parameters, see Configuration Parameters.
How to Add HTTPS to Control Center in Docker
To add HTTPS to Control Center, you need to prepare your the docker-compose file and nginx configuration for it to use:
Create a
docker-compose.yamlfile that uses certificate files:Create a
control-center.confnginx configuration file with the following content:Generate your certificate files:
server.crtandserver.key.Start Control Center:
Upgrading from a Previous Control Center Version
To migrate data from an existing Control Center installation to a new version:
Mount the
workdirectory for the old installation.Use the same work directory in the new Control Center version.
Do one of the following:
Add the following property to application.properties or application.yaml:
Launch Control Center with the following JVM_OPTS environment variable:
For example, you can launch it from the command line like this:
Next Steps
Change Configuration Parameters - make sure you optimize the disk space utilization
Connect a GridGain cluster or an Apache Ignite cluster
Last updated
Was this helpful?

