Add one-command installers and serve/agent make targets
This commit is contained in:
@@ -72,7 +72,10 @@ jobs:
|
|||||||
|
|
||||||
- uses: softprops/action-gh-release@v2
|
- uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
files: artifacts/*
|
files: |
|
||||||
|
artifacts/*
|
||||||
|
install.sh
|
||||||
|
install.ps1
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
|
|
||||||
image:
|
image:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.DEFAULT_GOAL := help
|
.DEFAULT_GOAL := help
|
||||||
|
|
||||||
.PHONY: help build run test test-integration vet lint tidy check migrate-up migrate-down up down down-clean logs ps rebuild psql smoke agent coordinator setup workloads-export demo-ui demo-down demo-reset demo-logs
|
.PHONY: help build run test test-integration vet lint tidy check migrate-up migrate-down up down down-clean logs ps rebuild psql smoke agent coordinator setup serve workloads-export demo-ui demo-down demo-reset demo-logs
|
||||||
|
|
||||||
# `check` deliberately uses its own Compose project and host ports. This keeps
|
# `check` deliberately uses its own Compose project and host ports. This keeps
|
||||||
# it from connecting to or replacing a developer's local PostgreSQL instance.
|
# it from connecting to or replacing a developer's local PostgreSQL instance.
|
||||||
@@ -57,6 +57,11 @@ coordinator:
|
|||||||
setup: coordinator
|
setup: coordinator
|
||||||
./bin/coordinator setup $(SETUP_ARGS)
|
./bin/coordinator setup $(SETUP_ARGS)
|
||||||
|
|
||||||
|
# The single-binary mode: everything embedded (sqlite + userservice + local
|
||||||
|
# workers), no PostgreSQL or Docker. SETUP_ARGS=--workers 2 --open.
|
||||||
|
serve: coordinator
|
||||||
|
./bin/coordinator serve $(SETUP_ARGS)
|
||||||
|
|
||||||
workloads-export:
|
workloads-export:
|
||||||
cd .. && .venv/bin/scimesh workload export -o coordinator/$(WORKLOADS_JSON)
|
cd .. && .venv/bin/scimesh workload export -o coordinator/$(WORKLOADS_JSON)
|
||||||
|
|
||||||
|
|||||||
+46
@@ -0,0 +1,46 @@
|
|||||||
|
# SciMesh installer for Windows: downloads the coordinator binary for this
|
||||||
|
# machine from the latest GitHub release and installs it under %LOCALAPPDATA%.
|
||||||
|
#
|
||||||
|
# powershell -ExecutionPolicy Bypass -c "irm https://raw.githubusercontent.com/emil28092005/SciMesh/main/install.ps1 | iex"
|
||||||
|
#
|
||||||
|
# Then run:
|
||||||
|
#
|
||||||
|
# coordinator serve --open
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
$Repo = "emil28092005/SciMesh"
|
||||||
|
$Version = if ($env:SCIMESH_VERSION) { $env:SCIMESH_VERSION } else { "latest" }
|
||||||
|
$InstallDir = if ($env:SCIMESH_INSTALL_DIR) {
|
||||||
|
$env:SCIMESH_INSTALL_DIR
|
||||||
|
} else {
|
||||||
|
Join-Path $env:LOCALAPPDATA "SciMesh"
|
||||||
|
}
|
||||||
|
|
||||||
|
$Arch = switch ($env:PROCESSOR_ARCHITECTURE) {
|
||||||
|
"AMD64" { "amd64" }
|
||||||
|
"ARM64" { "arm64" }
|
||||||
|
default { throw "unsupported architecture: $env:PROCESSOR_ARCHITECTURE" }
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($Version -eq "latest") {
|
||||||
|
Write-Host "Resolving the latest SciMesh release..."
|
||||||
|
$Url = "https://github.com/$Repo/releases/latest/download/coordinator-windows-$Arch.exe"
|
||||||
|
} else {
|
||||||
|
$Url = "https://github.com/$Repo/releases/download/$Version/coordinator-windows-$Arch.exe"
|
||||||
|
}
|
||||||
|
|
||||||
|
New-Item -ItemType Directory -Force -Path $InstallDir | Out-Null
|
||||||
|
$Target = Join-Path $InstallDir "coordinator.exe"
|
||||||
|
|
||||||
|
Write-Host "Downloading $Url"
|
||||||
|
Invoke-WebRequest -Uri $Url -OutFile "$Target.tmp"
|
||||||
|
Move-Item -Force "$Target.tmp" $Target
|
||||||
|
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host "SciMesh installed: $Target"
|
||||||
|
& $Target --version
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host "Start the platform (one command, everything embedded):"
|
||||||
|
Write-Host " $Target serve --open"
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host "Your data lives in ~\.scimesh. The admin login is printed on first start."
|
||||||
+51
@@ -0,0 +1,51 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# SciMesh installer: downloads the coordinator binary for this OS/architecture
|
||||||
|
# from the latest GitHub release and installs it locally. One command, no
|
||||||
|
# picking from a list of files:
|
||||||
|
#
|
||||||
|
# curl -fsSL https://raw.githubusercontent.com/emil28092005/SciMesh/main/install.sh | bash
|
||||||
|
#
|
||||||
|
# Installed to ~/.local/bin/coordinator (Linux/macOS). Then run:
|
||||||
|
#
|
||||||
|
# coordinator serve --open
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
REPO="emil28092005/SciMesh"
|
||||||
|
VERSION="${SCIMESH_VERSION:-latest}"
|
||||||
|
INSTALL_DIR="${SCIMESH_INSTALL_DIR:-$HOME/.local/bin}"
|
||||||
|
|
||||||
|
case "$(uname -s)" in
|
||||||
|
Linux) OS="linux" ;;
|
||||||
|
Darwin) OS="darwin" ;;
|
||||||
|
*) echo "unsupported OS: $(uname -s)" >&2; exit 1 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$(uname -m)" in
|
||||||
|
x86_64|amd64) ARCH="amd64" ;;
|
||||||
|
aarch64|arm64) ARCH="arm64" ;;
|
||||||
|
*) echo "unsupported architecture: $(uname -m)" >&2; exit 1 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ "$VERSION" = "latest" ]; then
|
||||||
|
echo "Resolving the latest SciMesh release..."
|
||||||
|
URL="https://github.com/${REPO}/releases/latest/download/coordinator-${OS}-${ARCH}"
|
||||||
|
else
|
||||||
|
URL="https://github.com/${REPO}/releases/download/${VERSION}/coordinator-${OS}-${ARCH}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$INSTALL_DIR"
|
||||||
|
TARGET="$INSTALL_DIR/coordinator"
|
||||||
|
|
||||||
|
echo "Downloading $URL"
|
||||||
|
curl -fsSL -o "$TARGET.tmp" "$URL"
|
||||||
|
chmod +x "$TARGET.tmp"
|
||||||
|
mv "$TARGET.tmp" "$TARGET"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "SciMesh installed: $TARGET"
|
||||||
|
"$TARGET" --version
|
||||||
|
echo
|
||||||
|
echo "Start the platform (one command, everything embedded):"
|
||||||
|
echo " $TARGET serve --open"
|
||||||
|
echo
|
||||||
|
echo "Your data lives in ~/.scimesh. The admin login is printed on first start."
|
||||||
Reference in New Issue
Block a user