This guide deploys LLM Harbor CLI and its dependencies (Docker, Docker Compose) on Debian 10 to latest stable, Ubuntu LTS, and RHEL 9+ compatible hosts.
Important: Harbor is a CLI tool that manages Docker Compose stacks. It is not deployed as a container itself. This playbook installs the Harbor CLI and Docker prerequisites, then uses Harbor commands to manage services.
- name: Deploy LLM Harbor
hosts: llm-harbor
become: true
vars:
docker_apt_release_channel: stable
docker_compose_plugin_version: "2.23.1"
harbor_python_package: llm-harbor
tasks:
- name: Install prerequisites (Debian/Ubuntu)
apt:
name:
- python3
- python3-pip
- curl
- git
state: present
update_cache: true
when: ansible_os_family == "Debian"
- name: Install prerequisites (RHEL family)
dnf:
name:
- python3
- python3-pip
- curl
- git
state: present
when: ansible_os_family == "RedHat"
- name: Install Docker on Debian/Ubuntu
apt:
name:
- docker.io
- docker-compose-plugin
state: present
update_cache: true
when: ansible_os_family == "Debian"
- name: Install Docker on RHEL family
dnf:
name:
- docker
- docker-compose-plugin
state: present
when: ansible_os_family == "RedHat"
- name: Enable and start Docker
service:
name: docker
state: started
enabled: true
- name: Add user to docker group (optional, for non-root docker access)
user:
name: "{{ ansible_user }}"
groups: docker
append: true
- name: Install Harbor CLI via pip
pip:
name: "{{ harbor_python_package }}"
state: present
become: false
- name: Verify Harbor installation
command: harbor --version
become: false
register: harbor_version
changed_when: false
- name: Display Harbor version
debug:
var: harbor_version.stdout
become: false
- name: Run Harbor doctor to verify setup
command: harbor doctor
become: false
register: harbor_doctor
changed_when: false
failed_when: false
- name: Display Harbor doctor results
debug:
var: harbor_doctor.stdout_lines
become: false
After running the playbook, Harbor is installed and ready to use:
# Start default services (Open WebUI + Ollama)
harbor up
# Start with additional services
harbor up searxng speaches
# View service status
harbor doctor
# Access WebUI
harbor open
To automatically start Harbor services on deployment:
- name: Start default Harbor services
command: harbor up
become: false
register: harbor_up
changed_when: "'started' in harbor_up.stdout or 'running' in harbor_up.stdout"
failed_when: false
- name: Install NVIDIA Container Toolkit (Debian/Ubuntu)
apt:
name:
- nvidia-container-toolkit
state: present
when:
- ansible_os_family == "Debian"
- enable_nvidia_gpu | default(false)
- name: Restart Docker for NVIDIA GPU
service:
name: docker
state: restarted
when: enable_nvidia_gpu | default(false)
- name: Configure AMD GPU runtime
command: amd-ctk runtime configure
when: enable_amd_gpu | default(false)
- name: Restart Docker for AMD GPU
service:
name: docker
state: restarted
when: enable_amd_gpu | default(false)
Any questions?
Feel free to contact us. Find all contact information on our contact page.