Deploy with Docker Compose
Neutree supports deploying monitoring components and control plane using Docker Compose. It is recommended to deploy monitoring components and control plane on separate hosts to improve platform availability and performance.
Configure Operating System
Section titled “Configure Operating System”Please refer to the following sections to configure the system and install Docker as the container runtime based on your operating system type.
System Configuration
Section titled “System Configuration”-
Configure static IP address:
Terminal window sudo vi /etc/sysconfig/network-scripts/ifcfg-<interface>Replace
<interface>with your network interface name, such aseth0. -
Configure DNS server:
Terminal window sudo vi /etc/resolv.conf -
Disable firewall:
Terminal window sudo systemctl stop firewalld && sudo systemctl disable firewalld -
Disable SELinux:
Terminal window echo -e "SELINUX=disabled\nSELINUXTYPE=targeted" | sudo tee /etc/selinux/configsudo setenforce 0
-
Configure static IP address and DNS server:
Terminal window sudo vi /etc/netplan/50-cloud-init.yaml -
Apply the network configuration:
Terminal window sudo netplan apply -
Disable firewall:
Terminal window sudo ufw disable -
Optional: Disable AppArmor as needed:
Terminal window sudo systemctl disable apparmor && sudo systemctl stop apparmor -
Reboot the operating system to apply the configuration:
Terminal window sudo reboot
Install Docker
Section titled “Install Docker”-
Install Docker CE:
Terminal window sudo dnf -y install dnf-plugins-coresudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.reposudo dnf -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -
Start Docker service:
Terminal window sudo systemctl enable --now docker -
Verify Docker installation:
Terminal window docker --version -
Reboot the operating system to apply the configuration:
Terminal window sudo reboot
-
Update package index:
Terminal window sudo apt-get updatesudo apt-get -y install ca-certificates curl -
Add Docker GPG key:
Terminal window sudo install -m 0755 -d /etc/apt/keyringssudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.ascsudo chmod a+r /etc/apt/keyrings/docker.asc -
Add 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 -
Install Docker CE:
Terminal window sudo apt-get updatesudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -
Start Docker service:
Terminal window sudo systemctl enable --now docker -
Verify Docker installation:
Terminal window docker --version
Deploy Monitoring Components
Section titled “Deploy Monitoring Components”Log in to the host where you will deploy the monitoring components.
Preparation
-
Download the Neutree CLI from GitHub Releases according to your server’s CPU architecture:
Terminal window # For amd64curl -LO https://github.com/neutree-ai/neutree/releases/download/v1.0.0/neutree-cli-amd64# For aarch64curl -LO https://github.com/neutree-ai/neutree/releases/download/v1.0.0/neutree-cli-aarch64 -
Rename and grant executable permissions to the CLI:
Terminal window mv neutree-cli-<arch> neutree-clichmod +x neutree-cliReplace
<arch>with your server’s CPU architecture:amd64oraarch64. -
Download the control plane offline image file for the specified version from GitHub Releases.
-
Load the control plane offline image using the CLI tool:
Terminal window ./neutree-cli import controlplane \--package <controlplane_package> \--localParameter Description <controlplane_package>Control plane offline image filename, format: neutree-controlplane-v1.0.0-<arch>.tar.gz.Terminal window ./neutree-cli import controlplane \--package <controlplane_package> \--mirror-registry <mirror_registry> \--registry-username <registry_username> \--registry-password <registry_password>Parameter Description <controlplane_package>Control plane offline image filename, format: neutree-controlplane-v1.0.0-<arch>.tar.gz.<mirror_registry>Image registry address. <registry_username>Image registry username with image upload permissions. <registry_password>Image registry login password or access key (e.g., token).
Steps
-
Start the monitoring service:
Terminal window ./neutree-cli launch obs-stackTerminal window ./neutree-cli launch obs-stack \--mirror-registry <mirror_registry>Parameter Description <mirror_registry>Image registry address. -
Access
http://<obstack_ip>:3030/. If the Grafana login interface appears, the monitoring components have been successfully deployed.Replace
<obstack_ip>with the IP address of the server where the monitoring components are deployed.
Deploy Control Plane
Section titled “Deploy Control Plane”Log in to the host where you will deploy the control plane.
Preparation
-
Run the following command to generate a random JWT secret:
Terminal window openssl rand -base64 32 | tr '+/' '-_' | tr -d '=' -
Download the Neutree CLI from GitHub Releases according to your server’s CPU architecture:
Terminal window # For amd64curl -LO https://github.com/neutree-ai/neutree/releases/download/v1.0.0/neutree-cli-amd64# For aarch64curl -LO https://github.com/neutree-ai/neutree/releases/download/v1.0.0/neutree-cli-aarch64 -
Rename and grant executable permissions to the CLI:
Terminal window mv neutree-cli-<arch> neutree-clichmod +x neutree-cliReplace
<arch>with your server’s CPU architecture:amd64oraarch64. -
Download the control plane offline image file for the specified version from GitHub Releases.
-
Load the control plane offline image using the CLI tool:
Terminal window ./neutree-cli import controlplane \--package <controlplane_package> \--localParameter Description <controlplane_package>Control plane offline image filename, format: neutree-controlplane-v1.0.0-<arch>.tar.gz.Terminal window ./neutree-cli import controlplane \--package <controlplane_package> \--mirror-registry <mirror_registry> \--registry-username <registry_username> \--registry-password <registry_password>Parameter Description <controlplane_package>Control plane offline image filename, format: neutree-controlplane-v1.0.0-<arch>.tar.gz.<mirror_registry>Image registry address. <registry_username>Image registry username with image upload permissions. <registry_password>Image registry login password or access key (e.g., token).
Steps
-
Start the control plane service:
Terminal window ./neutree-cli launch neutree-core \--version=v1.0.0 \--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>Parameter Description <obstack_ip>IP address of the server where the monitoring components are deployed. <jwt_secret>JWT secret string generated in the preparation step. <admin_password>Initial password for the Neutree administrator. Optional but recommended to set a custom initial password. If left empty, the system will auto-generate one, which can be retrieved after deployment using kubectl -n neutree logs -l app.kubernetes.io/component=neutree-post-migration-hook-job.Terminal window ./neutree-cli launch neutree-core \--version=v1.0.0 \--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>Parameter Description <obstack_ip>IP address of the server where the monitoring components are deployed. <jwt_secret>JWT secret string generated in the preparation step. <admin_password>Initial password for the Neutree administrator. Optional but recommended to set a custom initial password. If left empty, the system will auto-generate one, which can be retrieved after deployment using kubectl -n neutree logs -l app.kubernetes.io/component=neutree-post-migration-hook-job.<mirror_registry>Image registry address. -
Check service status:
Terminal window docker ps -
Access
http://<control_plane_ip>:3000using the administrator accountadmin@neutree.localand the initial password. Successfully accessing the Neutree management interface indicates successful deployment.Replace
<control_plane_ip>with the IP address of the server where the control plane is deployed.