feat: add FreeCAD and Rommie MCP server configurations and deployment playbooks
This commit is contained in:
32
ansible/rommie/.env.j2
Normal file
32
ansible/rommie/.env.j2
Normal file
@@ -0,0 +1,32 @@
|
||||
# Rommie Environment Configuration
|
||||
# MCP server wrapping Agent S for GUI automation
|
||||
|
||||
# ============================================================================
|
||||
# Required for Agent S
|
||||
# ============================================================================
|
||||
HF_TOKEN=0000
|
||||
OPENAI_API_KEY=0000
|
||||
DISPLAY={{ rommie_display }}
|
||||
|
||||
# ============================================================================
|
||||
# Agent S Model Configuration
|
||||
# ============================================================================
|
||||
ROMMIE_MODEL={{ rommie_model }}
|
||||
ROMMIE_MODEL_URL={{ rommie_model_url }}
|
||||
ROMMIE_PROVIDER={{ rommie_provider | default('openai') }}
|
||||
|
||||
# ============================================================================
|
||||
# Grounding Model Configuration
|
||||
# ============================================================================
|
||||
ROMMIE_GROUND_PROVIDER={{ rommie_ground_provider | default('huggingface') }}
|
||||
ROMMIE_GROUND_URL={{ rommie_ground_url }}
|
||||
ROMMIE_GROUND_MODEL={{ rommie_ground_model }}
|
||||
ROMMIE_GROUNDING_WIDTH={{ rommie_grounding_width | default(1024) }}
|
||||
ROMMIE_GROUNDING_HEIGHT={{ rommie_grounding_height | default(1024) }}
|
||||
|
||||
# ============================================================================
|
||||
# Server Configuration
|
||||
# ============================================================================
|
||||
ROMMIE_HOST={{ rommie_host | default('0.0.0.0') }}
|
||||
ROMMIE_PORT={{ rommie_port }}
|
||||
ROMMIE_ALLOWED_HOSTS={{ rommie_allowed_hosts }}
|
||||
82
ansible/rommie/deploy.yml
Normal file
82
ansible/rommie/deploy.yml
Normal file
@@ -0,0 +1,82 @@
|
||||
---
|
||||
- name: Deploy Agent S (Rommie dependency)
|
||||
import_playbook: ../agent_s/deploy.yml
|
||||
|
||||
- name: Deploy Rommie MCP Server
|
||||
hosts: caliban
|
||||
become: yes
|
||||
vars:
|
||||
rommie_venv: "/home/{{principal_user}}/env/rommie"
|
||||
rommie_repo: "/home/{{principal_user}}/rommie"
|
||||
|
||||
tasks:
|
||||
- name: Create Rommie application directory
|
||||
become_user: "{{principal_user}}"
|
||||
file:
|
||||
path: "{{rommie_repo}}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Transfer and extract Rommie
|
||||
become_user: "{{principal_user}}"
|
||||
ansible.builtin.unarchive:
|
||||
src: "~/rel/rommie_{{rommie_rel}}.tar"
|
||||
dest: "{{rommie_repo}}"
|
||||
|
||||
- name: Create Rommie virtual environment
|
||||
become_user: "{{principal_user}}"
|
||||
command: python3 -m venv --system-site-packages {{rommie_venv}}
|
||||
args:
|
||||
creates: "{{rommie_venv}}/bin/activate"
|
||||
|
||||
- name: Install Rommie into virtual environment
|
||||
become_user: "{{principal_user}}"
|
||||
pip:
|
||||
name: "{{rommie_repo}}"
|
||||
extra_args: "-e"
|
||||
virtualenv: "{{rommie_venv}}"
|
||||
state: present
|
||||
|
||||
- name: Deploy Rommie environment file
|
||||
become_user: "{{principal_user}}"
|
||||
template:
|
||||
src: .env.j2
|
||||
dest: "{{rommie_repo}}/.env"
|
||||
mode: '0600'
|
||||
|
||||
- name: Deploy Rommie systemd service
|
||||
template:
|
||||
src: rommie.service.j2
|
||||
dest: /etc/systemd/system/rommie.service
|
||||
mode: '0644'
|
||||
notify:
|
||||
- Reload systemd
|
||||
- Restart rommie
|
||||
|
||||
- name: Enable and start Rommie service
|
||||
systemd:
|
||||
name: rommie
|
||||
enabled: yes
|
||||
state: started
|
||||
daemon_reload: yes
|
||||
|
||||
- name: Verify Rommie MCP endpoint is reachable
|
||||
ansible.builtin.uri:
|
||||
url: "http://localhost:{{rommie_port}}/mcp"
|
||||
method: GET
|
||||
status_code: [200, 405]
|
||||
timeout: 15
|
||||
register: rommie_health
|
||||
retries: 5
|
||||
delay: 3
|
||||
until: rommie_health.status in [200, 405]
|
||||
|
||||
handlers:
|
||||
- name: Reload systemd
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
|
||||
- name: Restart rommie
|
||||
systemd:
|
||||
name: rommie
|
||||
state: restarted
|
||||
18
ansible/rommie/rommie.service.j2
Normal file
18
ansible/rommie/rommie.service.j2
Normal file
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=Rommie MCP Server (Agent S GUI Automation)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User={{ principal_user }}
|
||||
WorkingDirectory=/home/{{ principal_user }}/rommie
|
||||
EnvironmentFile=/home/{{ principal_user }}/rommie/.env
|
||||
ExecStart=/home/{{ principal_user }}/env/rommie/bin/rommie
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=rommie
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user