CHORE: Fix infrastructure folder naming artifacts
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 2s

This commit is contained in:
2026-04-21 12:46:57 -04:00
parent 94a8a0ab0b
commit 8e48d057fa
10 changed files with 0 additions and 51 deletions

View File

@@ -0,0 +1,46 @@
#!/bin/bash
# opencortex: Bare Metal Installation Script
# This script sets up the opencortex daemon on a Linux host (Debian/Fedora).
set -e
echo "--- opencortex: Bare Metal Installation ---"
# 1. Check Dependencies
echo "[1/4] Checking dependencies..."
for cmd in sbcl curl git ripgrep; do
if ! command -v $cmd &> /dev/null; then
echo "Error: $cmd is not installed. Please install it first."
exit 1
fi
done
# 2. Setup Quicklisp
if [ ! -d "$HOME/quicklisp" ]; then
echo "[2/4] Quicklisp not found. Installing..."
curl -O https://beta.quicklisp.org/quicklisp.lisp
sbcl --non-interactive --load quicklisp.lisp --eval '(quicklisp-quickstart:install)'
rm quicklisp.lisp
echo "Quicklisp installed."
else
echo "[2/4] Quicklisp already installed."
fi
# 3. Build standalone binary
echo "[3/4] Building standalone binary..."
PROJECT_ROOT=$(pwd)/../..
sbcl --non-interactive \
--eval "(push \"$PROJECT_ROOT/\" asdf:*central-registry*)" \
--eval "(ql:quickload :opencortex)" \
--eval "(asdf:make :opencortex)"
echo "Binary built: $PROJECT_ROOT/opencortex-server"
# 4. Instructions for Systemd
echo "[4/4] Installation complete."
echo ""
echo "To run as a systemd service:"
echo "1. Edit opencortex.service to set correct paths."
echo "2. sudo cp opencortex.service /etc/systemd/system/"
echo "3. sudo systemctl daemon-reload"
echo "4. sudo systemctl enable --now opencortex"

View File

@@ -0,0 +1,18 @@
[Unit]
Description=opencortex: Probabilistic-Deterministic Lisp Machine Kernel
After=network.target
[Service]
Type=simple
# Update User and WorkingDirectory to match your local setup
User=amr
WorkingDirectory=/home/amr/.openclaw/workspace/memex/5_projects/opencortex
ExecStart=/home/amr/.openclaw/workspace/memex/5_projects/opencortex/opencortex-server
Restart=always
RestartSec=10
# Environment variables can be loaded from the .env file
EnvironmentFile=/home/amr/.openclaw/workspace/memex/5_projects/opencortex/.env
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,44 @@
FROM debian:bookworm-slim
# Install SBCL, ripgrep, and build dependencies
RUN apt-get update && \
apt-get install -y sbcl build-essential curl git ripgrep libsqlite3-dev lynx python3 python3-pip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install Quicklisp globally
RUN curl -O https://beta.quicklisp.org/quicklisp.lisp && \
sbcl --non-interactive \
--load quicklisp.lisp \
--eval '(quicklisp-quickstart:install :path "/opt/quicklisp")' \
--eval '(ql-util:without-prompting (ql:add-to-init-file))' && \
rm quicklisp.lisp
# Set up the working directory
WORKDIR /app
# Copy source code and system definition
COPY opencortex.asd /app/
COPY src/ /app/src/
# Ensure we aren't using a stale binary from the host
RUN rm -f /app/opencortex-server
# Build the standalone binary natively inside the container
# This ensures GLIBC compatibility with the runtime environment.
RUN sbcl --non-interactive \
--eval '(push "/app/" asdf:*central-registry*)' \
--eval '(ql:quickload :opencortex)' \
--eval '(asdf:make :opencortex)'
# Ensure the binary is executable
RUN chmod +x /app/opencortex-server
# Expose the communication protocol and Web Dashboard ports
EXPOSE 9105 8080
# The app expects the memex to be mounted here
VOLUME /memex
# Run the natively compiled standalone daemon
CMD ["./opencortex-server"]

View File

@@ -0,0 +1,18 @@
version: '3.8'
services:
opencortex:
build:
context: ../..
dockerfile: deploy/docker/Dockerfile
container_name: opencortex
restart: unless-stopped
ports:
- "${ORG_AGENT_DAEMON_PORT:-9105}:${ORG_AGENT_DAEMON_PORT:-9105}"
- "${ORG_AGENT_WEB_PORT:-8080}:${ORG_AGENT_WEB_PORT:-8080}"
volumes:
- /memex:/memex
networks:
sandbox-net:
driver: bridge

View File

@@ -0,0 +1,14 @@
;; opencortex: Guix Environment Manifest
;; Usage: guix shell -m manifest.scm -- sbcl --eval ...
(specifications->manifest
'("sbcl"
"sbcl-cl-json"
"sbcl-bordeaux-threads"
"sbcl-usocket"
"sbcl-dexador"
"sbcl-cl-ppcre"
"ripgrep"
"git"
"curl"
"sqlite"))

View File

@@ -0,0 +1,33 @@
#+TITLE: LXC / Systemd-nspawn Deployment Guide
#+AUTHOR: opencortex
* Overview
For users who prefer containerization without the overhead or dependency on the Docker daemon, `opencortex` can be run within a standard Linux Container (LXC) or a systemd-nspawn container.
* Systemd-nspawn Setup (Fastest for Linux users)
1. **Create the container root:**
#+begin_src bash
sudo debootstrap --arch=amd64 bookworm /var/lib/machines/opencortex
#+end_src
2. **Start and enter the container:**
#+begin_src bash
sudo systemd-nspawn -D /var/lib/machines/opencortex
#+end_src
3. **Install dependencies (inside container):**
#+begin_src bash
apt-get update && apt-get install -y sbcl curl git ripgrep libsqlite3-dev build-essential
#+end_src
4. **Bind mount the Memex directory:**
Add this to your container startup or use the `--bind` flag:
#+begin_src bash
sudo systemd-nspawn -D /var/lib/machines/opencortex --bind /home/amr/.openclaw/workspace/memex
#+end_src
* Proxmox LXC Setup
1. Create a new LXC container using the Debian 12 template.
2. Ensure the network is bridged so Emacs can reach it.
3. Run the `deploy/bare-metal/install.sh` script inside the container.

22
infrastructure/vms/debian/Vagrantfile vendored Normal file
View File

@@ -0,0 +1,22 @@
Vagrant.configure("2") do |config|
config.vm.box = "debian/bookworm64"
config.vm.network "forwarded_port", guest: 9105, host: 9105
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
vb.cpus = 2
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y sbcl curl git ripgrep libsqlite3-dev build-essential
# Setup for opencortex
mkdir -p /home/vagrant/opencortex
cp -r /vagrant/* /home/vagrant/opencortex/
chown -R vagrant:vagrant /home/vagrant/opencortex
# Build binary natively
sudo -u vagrant bash -c "cd /home/vagrant/opencortex && ./deploy/bare-metal/install.sh"
SHELL
end

21
infrastructure/vms/fedora/Vagrantfile vendored Normal file
View File

@@ -0,0 +1,21 @@
Vagrant.configure("2") do |config|
config.vm.box = "fedora/39-cloud-base"
config.vm.network "forwarded_port", guest: 9105, host: 9105
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
vb.cpus = 2
end
config.vm.provision "shell", inline: <<-SHELL
dnf install -y sbcl curl git ripgrep sqlite-devel make gcc
# Setup for opencortex
mkdir -p /home/vagrant/opencortex
cp -r /vagrant/* /home/vagrant/opencortex/
chown -R vagrant:vagrant /home/vagrant/opencortex
# Build binary natively
sudo -u vagrant bash -c "cd /home/vagrant/opencortex && ./deploy/bare-metal/install.sh"
SHELL
end