Skip to content
Neutree Documentation

Deploying with Docker Compose

Neutree supports deploying monitoring components and the control plane to servers or virtual machines using Docker. It is recommended to deploy the monitoring components and the control plane on separate servers or virtual machines on different hosts to improve platform availability and performance.

Configuring the operating system

Based on the operating system type of your server or virtual machine, follow the corresponding section to configure the system and install Docker as the container runtime.

System configuration

  1. Configure static IP addresses:

    Terminal window
    sudo vi /etc/sysconfig/network-scripts/ifcfg-<interface>

    Replace <interface> with the network interface name, for example eth0.

  2. Configure the DNS server:

    Terminal window
    sudo vi /etc/resolv.conf
  3. Disable the firewall:

    Terminal window
    sudo systemctl stop firewalld && sudo systemctl disable firewalld
  4. Disable SELinux:

    Terminal window
    echo -e "SELINUX=disabled\nSELINUXTYPE=targeted" | sudo tee /etc/selinux/config
    sudo setenforce 0

Installing Docker

  1. Install Docker CE:

    Terminal window
    sudo dnf -y install dnf-plugins-core
    sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
    sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
  2. Start the Docker service:

    Terminal window
    sudo systemctl enable --now docker
  3. Confirm that Docker is successfully installed:

    Terminal window
    docker --version
  4. Restart the operating system for the configuration to take effect:

    Terminal window
    sudo reboot

Loading control plane offline images

Log in to the server or virtual machine where the control plane and monitoring components will be deployed, and load the control plane offline images.

  1. Download version 1.0.1 of the Neutree CLI tool and the control plane offline image according to the server’s CPU architecture.

  2. Grant executable permission to the CLI tool:

    Terminal window
    chmod +x neutree-cli-<arch>

    Replace <arch> with the server’s CPU architecture: amd64 or aarch64.

  3. Load the control plane offline images using the CLI tool:

    Information

    If your environment has internet access and supports pulling container images from Docker Hub, skip this step.

    Terminal window
    ./neutree-cli-<arch> import controlplane \
    --package <controlplane_package> \
    --local
    ParameterDescription
    <arch>The server’s CPU architecture: amd64 or aarch64.
    <controlplane_package>The control plane offline image name, in the format neutree-controlplane-v1.0.1-enterprise-<arch>.tar.gz.

Deploying monitoring components

The monitoring components provide observability support for the entire platform.

  1. Start the monitoring component service:

    Terminal window
    ./neutree-cli-<arch> launch obs-stack

    Replace <arch> with the server’s CPU architecture: amd64 or aarch64.

  2. Go to http://<obstack_ip>:3030/. If the Grafana login page is displayed, the monitoring components have been deployed successfully.

    Replace <obstack_ip> with the IP address of the server where the monitoring components are deployed.

Deploying the control plane

The control plane provides core functions such as platform management, user interface, and API services.

  1. Run the following command in a terminal to generate a random JWT secret:

    Terminal window
    openssl rand -base64 32 | tr '+/' '-_' | tr -d '='

    Information

    Neutree uses JWT (JSON Web Token) for authentication and authorization. The JWT secret is used to ensure the security of JWTs.

  2. Start the control plane service:

    Terminal window
    ./neutree-cli-<arch> launch neutree-core \
    --version=v1.0.1-enterprise \
    --metrics-remote-write-url=http://<obstack_ip>:8480/insert/0/prometheus/ \
    --jwt-secret=<jwt_secret> \
    --grafana-url=http://<obstack_ip>:3030 \
    --admin-password=<admin_password> \
    ParameterDescription
    <arch>The server’s CPU architecture: amd64 or aarch64.
    <obstack_ip>The IP address of the server where the monitoring components are deployed.
    <jwt_secret>The JWT secret string generated in step 1.
    <admin_password>The initial password for Neutree administrator. Optional. It is recommended to set a custom initial password. If left blank, the system generates one automatically; retrieve it after deployment via docker logs -f post-migration-hook.
  3. Check the service status:

    Terminal window
    docker ps
  4. Go to http://<control_plane_ip>:3000 using the administrator account admin@neutree.local and the initial password. If the Neutree management interface is accessible, the deployment is successful.

    Replace <control_plane_ip> with the IP address of the server where the control plane is deployed.