Based on Docker Compose
Basic Requirements
- The deployment server should reserve at least 2 CPUs and 4GB of memory, with at least 50GB of available disk space.
- To reduce deployment complexity, it is recommended to deploy the Ops Platform on an existing HAP server.
- When using external components, pass the relevant connection information to the
agent
service via environment variables.
Start Deployment
Pull Images (Offline Package Download)
docker pull nocoly/ops-gateway:1.1.0
docker pull nocoly/ops-prometheus:1.1.0
docker pull nocoly/ops-agent:1.1.0
docker pull nocoly/ops-nodeagent:1.0.0
Create Configuration File
cat > /data/hap/script/ops.yaml <<\EOF
version: '3'
services:
gateway:
image: nocoly/ops-gateway:1.1.0
ports:
- "48881:48881"
environment: &common_env
TZ: "Asia/Shanghai"
ENV_OPS_TOKEN: "SS9PobGG7SDTpcyfSZ1VVmn3gCmy2P52tYk" # Adjust this for the first deployment, this environment variable is the access authentication key for the Ops Platform
ENV_PROMETHEUS_HOST: "hap_1/192.168.1.12:59100" # Adjust to the actual internal IP of the deployment server for the first deployment, port fixed at 59100
ENV_PROMETHEUS_KAFKA: "kafka_1/agent:9308"
ENV_PROMETHEUS_ELASTICSEARCH: "elasticsearch_1/agent:9114"
ENV_PROMETHEUS_REDIS: "redis_1/agent:9121"
ENV_PROMETHEUS_MONGODB: "mongodb_1/agent:9216"
ENV_PROMETHEUS_MYSQL: "mysql_1/agent:9104"
# If external components are used or the default passwords are changed, adjust the related environment variables below
ENV_MYSQL_HOST: "sc"
ENV_MYSQL_PORT: "3306"
ENV_MYSQL_USERNAME: "root"
ENV_MYSQL_PASSWORD: "123456"
ENV_MONGODB_URI: "mongodb://sc:27017"
ENV_MONGODB_OPTIONS: ""
ENV_REDIS_HOST: "sc"
ENV_REDIS_PORT: "6379"
ENV_REDIS_PASSWORD: "123456"
ENV_KAFKA_ENDPOINTS: "sc:9092"
ENV_ELASTICSEARCH_ENDPOINTS: "sc:9200"
ENV_ELASTICSEARCH_PASSWORD: "md:ESPassWD1234"
ENV_FLINK_URL: "http://flink:8081" # Comment this environment variable if Flink Web for data integration is not deployed or needed
prometheus:
image: nocoly/ops-prometheus:1.1.0
environment: *common_env
volumes:
- ./volume/data/:/data/
agent:
image: nocoly/ops-agent:1.1.0
environment: *common_env
nodeagent:
image: nocoly/ops-nodeagent:1.0.0
environment: *common_env
volumes:
- /:/host:ro,rslave
network_mode: host
pid: host
networks:
script_default:
external: true
EOF
Start Services
docker-compose -f /data/hap/script/ops.yaml up -d
To stop services, use the following command:
docker-compose -f /data/hap/script/ops.yaml down
Access the Ops Platform
Access URL:
http://<deployment-server-IP>:48881
- The login token is the value of the
ENV_OPS_TOKEN
environment variable inops.yaml
.