Deploying Console and Easysearch with Docker Compose #
This guide describes how to deploy INFINI Console and INFINI Easysearch as containers and enable Agent metric collection mode within the containers.
Prerequisites #
- Ensure that Docker is installed and running correctly.
- Ensure that Docker Compose is installed.
Create Docker Compose File #
Create a file named docker-compose.yml
:
mkdir -p ~/infinilabs && cd ~/infinilabs
cat << "EOF" > docker-compose.yml
services:
console:
image: infinilabs/console:1.29.4-2108
container_name: console
hostname: console
networks:
- cluster_network
ports:
- "9000:9000"
volumes:
- $PWD/console/config:/config
- $PWD/console/data:/data
- $PWD/console/logs:/log
easysearch:
image: infinilabs/easysearch:1.12.2-2106
container_name: easysearch
hostname: easysearch
networks:
- cluster_network
environment:
- "JAVA_OPTS=-Xms1g -Xmx1g"
env_file:
- .env
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- $PWD/easysearch/config:/app/easysearch/config
- $PWD/easysearch/data:/app/easysearch/data
- $PWD/easysearch/logs:/app/easysearch/logs
networks:
cluster_network:
driver: bridge
EOF
Create .env
File
#
Note: Please ensure you change the initial password to maintain security.
cat << EOF > .env
EASYSEARCH_INITIAL_ADMIN_PASSWORD=ezs_infini_console
METRICS_WITH_AGENT=true
METRICS_CONFIG_SERVER=http://console:9000
EOF
Initialize Config Directory from Image #
cd ~/infinilabs
docker run --rm -v $PWD/console:/work infinilabs/console:1.29.4-2108 cp -rf /config /work
docker run --rm --entrypoint "" -v $PWD/easysearch:/work infinilabs/easysearch:1.12.2-2106 cp -rf /app/easysearch/config /work
Start Services #
docker-compose up -d
Verifying the Deployment #
After the deployment is complete, access the Console to initialize it and adjust the cluster configuration to enable Agent metric collection mode. Also, associate the Agent with the cluster nodes. Once these operations are done, you can view the Agent collection status, data latency for various metrics, log information, and shard monitoring on the Monitoring page.
Deleting Console and Easysearch #
Use the following commands to delete Console and Easysearch:
docker-compose down
rm -rf ~/infinilabs/console ~/infinilabs/easysearch