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.

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.

@tab RHEL/Rocky Linux

  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

@tab Ubuntu

  1. Configure static IP addresses and a DNS server:

    Terminal window
    sudo vi /etc/netplan/50-cloud-init.yaml
  2. Apply the network configuration:

    Terminal window
    sudo netplan apply
  3. Disable the firewall:

    Terminal window
    sudo ufw disable
  4. Optional: disable AppArmor as needed:

    Terminal window
    sudo systemctl disable apparmor && sudo systemctl stop apparmor
  5. Restart the operating system for the configuration to take effect:

    Terminal window
    sudo reboot

@tab RHEL/Rocky Linux

  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

@tab Ubuntu

  1. Update the package index:

    Terminal window
    sudo apt-get update
    sudo apt-get -y install ca-certificates curl
  2. Add the Docker GPG key:

    Terminal window
    sudo install -m 0755 -d /etc/apt/keyrings
    sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
    sudo chmod a+r /etc/apt/keyrings/docker.asc
  3. Add the Docker repository:

    Terminal window
    echo \
    "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
    $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
    sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  4. Install Docker CE:

    Terminal window
    sudo apt-get update
    sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
  5. Start the Docker service:

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

    Terminal window
    docker --version

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.1.0 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 arm64.

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

    @tab Load the image to the local environment

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

    @tab Upload images to a remote registry

    Terminal window
    ./neutree-cli-<arch> import controlplane \
    --package <controlplane_package> \
    --mirror-registry <mirror_registry> \
    [--registry-project <registry_project>] \
    --registry-username <registry_username> \
    --registry-password <registry_password>
    ParameterDescription
    <arch>The server’s CPU architecture: amd64 or arm64.
    <controlplane_package>The control plane offline image name, in the format neutree-controlplane-v1.1.0-enterprise-<arch>.tar.gz.
    <mirror_registry>The registry address. Enter an OCI-compatible registry address without the https:// prefix.
    [--registry-project <registry_project>]Optional. The project name in the registry. Ensure the corresponding project has been created in advance.
    <registry_username>The registry user’s username. The user must have permission to upload images.
    <registry_password>The registry user’s login password or access key (such as a token).

The monitoring components provide observability support for the entire platform.

  1. Start the monitoring component service:

    @tab Pull images from local

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

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

    @tab Pull images from a remote registry

    Terminal window
    ./neutree-cli-<arch> launch obs-stack \
    --mirror-registry <mirror_registry> \
    [--registry-project <registry_project>]
    ParameterDescription
    <arch>The server’s CPU architecture: amd64 or arm64.
    <mirror_registry>The registry address. Enter an OCI-compatible registry address without the https:// prefix.
    [--registry-project <registry_project>]Optional. The project name in the registry. Ensure the corresponding project has been created in advance.
  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.

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 '='
  2. Start the control plane service:

    @tab Pull images from local

    Terminal window
    ./neutree-cli-<arch> launch neutree-core \
    --version=v1.1.0-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 arm64.
    <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 the 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.

    @tab Pull images from a remote registry

    Terminal window
    ./neutree-cli-<arch> launch neutree-core \
    --version=v1.1.0-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> \
    --mirror-registry=<mirror_registry> \
    [--registry-project <registry_project>]
    ParameterDescription
    <arch>The server’s CPU architecture: amd64 or arm64.
    <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 the 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.
    <mirror_registry>The registry address. Enter an OCI-compatible registry address without the https:// prefix.
    [--registry-project <registry_project>]Optional. The project name in the registry. Ensure the corresponding project has been created in advance.
  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.