Auto-open the coordinator UI and the worker wizard from the installers
This commit is contained in:
+38
-16
@@ -16,6 +16,10 @@ $InstallDir = if ($env:SCIMESH_INSTALL_DIR) {
|
||||
} else {
|
||||
Join-Path $env:LOCALAPPDATA "SciMesh"
|
||||
}
|
||||
# Auto-start the component right after install and open its UI (the control
|
||||
# room for the coordinator, the local setup wizard for the worker). Set
|
||||
# SCIMESH_AUTO_START=0 to install only.
|
||||
$AutoStart = if ($env:SCIMESH_AUTO_START) { $env:SCIMESH_AUTO_START } else { "1" }
|
||||
|
||||
switch ($Component) {
|
||||
"coordinator" { $Binary = "coordinator" }
|
||||
@@ -60,21 +64,39 @@ Write-Host "SciMesh $Component installed: $Target"
|
||||
& $Target --version
|
||||
Write-Host ""
|
||||
if ($Component -eq "coordinator") {
|
||||
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."
|
||||
if ($AutoStart -eq "1") {
|
||||
Write-Host "Starting the platform and opening the control room in your browser..."
|
||||
Write-Host "(stop it with Ctrl-C; it keeps your data in ~\.scimesh)"
|
||||
Write-Host ""
|
||||
& $Target serve --open
|
||||
} else {
|
||||
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."
|
||||
}
|
||||
} else {
|
||||
Write-Host "The worker needs Python 3 with the scimesh package, then a coordinator"
|
||||
Write-Host "to connect to. Run it with environment variables:"
|
||||
Write-Host ""
|
||||
Write-Host " set COORDINATOR_URL=http://COORDINATOR_HOST:8080"
|
||||
Write-Host " set WORKER_AUTH_TOKEN=<worker token from the coordinator>"
|
||||
Write-Host " set WORK_DIR=%USERPROFILE%\scimesh-worker"
|
||||
Write-Host " $Target"
|
||||
Write-Host ""
|
||||
Write-Host "For a coordinator started with 'coordinator serve', the worker token is"
|
||||
Write-Host "in ~\.scimesh\worker.token on that machine. Set SCIMESH_PIP_PACKAGE to"
|
||||
Write-Host "install scimesh into a managed venv, or install it yourself:"
|
||||
Write-Host " pip install scimesh"
|
||||
if ($AutoStart -eq "1") {
|
||||
Write-Host "Starting the local setup wizard in your browser..."
|
||||
Write-Host "(stop it with Ctrl-C; it keeps the configuration in ~\.scimesh-worker)"
|
||||
Write-Host ""
|
||||
& $Target setup
|
||||
} else {
|
||||
Write-Host "The worker needs Python 3 with the scimesh package, then a coordinator"
|
||||
Write-Host "to connect to. Point the local wizard at it:"
|
||||
Write-Host ""
|
||||
Write-Host " $Target setup"
|
||||
Write-Host ""
|
||||
Write-Host "Or run it with environment variables:"
|
||||
Write-Host ""
|
||||
Write-Host " set COORDINATOR_URL=http://COORDINATOR_HOST:8080"
|
||||
Write-Host " set WORKER_AUTH_TOKEN=<worker token from the coordinator>"
|
||||
Write-Host " set WORK_DIR=%USERPROFILE%\scimesh-worker"
|
||||
Write-Host " $Target"
|
||||
Write-Host ""
|
||||
Write-Host "For a coordinator started with 'coordinator serve', the worker token is"
|
||||
Write-Host "in ~\.scimesh\worker.token on that machine. Set SCIMESH_PIP_PACKAGE to"
|
||||
Write-Host "install scimesh into a managed venv, or install it yourself:"
|
||||
Write-Host " pip install scimesh"
|
||||
}
|
||||
}
|
||||
|
||||
+23
-1
@@ -16,6 +16,10 @@ REPO="emil28092005/SciMesh"
|
||||
COMPONENT="${1:-coordinator}"
|
||||
VERSION="${SCIMESH_VERSION:-latest}"
|
||||
INSTALL_DIR="${SCIMESH_INSTALL_DIR:-$HOME/.local/bin}"
|
||||
# Auto-start the component right after install and open its UI (the control
|
||||
# room for the coordinator, the local setup wizard for the worker). Set
|
||||
# SCIMESH_AUTO_START=0 to install only.
|
||||
AUTO_START="${SCIMESH_AUTO_START:-1}"
|
||||
|
||||
case "$COMPONENT" in
|
||||
coordinator) BINARY="coordinator" ;;
|
||||
@@ -71,15 +75,33 @@ if [ -n "$INSTALLED_VERSION" ] && [ "$INSTALLED_VERSION" != "${VERSION#v}" ]; th
|
||||
fi
|
||||
|
||||
if [ "$COMPONENT" = "coordinator" ]; then
|
||||
if [ "$AUTO_START" = "1" ]; then
|
||||
echo
|
||||
echo "Starting the platform and opening the control room in your browser..."
|
||||
echo "(stop it with Ctrl-C; it keeps your data in ~/.scimesh)"
|
||||
echo
|
||||
exec "$TARGET" serve --open
|
||||
fi
|
||||
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."
|
||||
else
|
||||
if [ "$AUTO_START" = "1" ]; then
|
||||
echo
|
||||
echo "Starting the local setup wizard in your browser..."
|
||||
echo "(stop it with Ctrl-C; it keeps the configuration in ~/.scimesh-worker)"
|
||||
echo
|
||||
exec "$TARGET" setup
|
||||
fi
|
||||
echo
|
||||
echo "The worker needs Python 3 with the scimesh package, then a coordinator"
|
||||
echo "to connect to. Run it with environment variables:"
|
||||
echo "to connect to. Point the local wizard at it:"
|
||||
echo
|
||||
echo " $TARGET setup"
|
||||
echo
|
||||
echo "Or run it with environment variables:"
|
||||
echo
|
||||
echo " export COORDINATOR_URL=http://COORDINATOR_HOST:8080"
|
||||
echo " export WORKER_AUTH_TOKEN=<worker token from the coordinator>"
|
||||
|
||||
+5
-6
@@ -46,17 +46,16 @@ local workers — is embedded in a single binary; no PostgreSQL, no Docker, no
|
||||
Python setup.
|
||||
|
||||
```bash
|
||||
# Linux / macOS
|
||||
# Linux / macOS — installs and opens the control room automatically
|
||||
curl -fsSL https://raw.githubusercontent.com/emil28092005/SciMesh/main/install.sh | bash
|
||||
coordinator serve --open
|
||||
|
||||
# Windows (PowerShell)
|
||||
powershell -ExecutionPolicy Bypass -c "irm https://raw.githubusercontent.com/emil28092005/SciMesh/main/install.ps1 | iex"
|
||||
coordinator serve --open
|
||||
```
|
||||
|
||||
The first start prints the admin login (also stored under `~/.scimesh`), and
|
||||
`--open` opens the UI in the browser. `coordinator serve --workers 2`
|
||||
The installer starts the platform and opens the control room in your browser
|
||||
(set `SCIMESH_AUTO_START=0` to install only). The first start prints the admin
|
||||
login (also stored under `~/.scimesh`). `coordinator serve --workers 2`
|
||||
spawns two local workers; `SCIMESH_PIP_PACKAGE` points the managed venv at
|
||||
your scimesh wheel so scientific workloads can run.
|
||||
|
||||
@@ -98,7 +97,7 @@ chmod +x coordinator
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/emil28092005/SciMesh/main/install.sh | bash -s worker
|
||||
worker-agent setup # opens http://127.0.0.1:12700 in your browser
|
||||
# the installer opens the local wizard at http://127.0.0.1:12700 automatically
|
||||
```
|
||||
|
||||
The wizard collects the coordinator URL and token (or worker key), runs a
|
||||
|
||||
@@ -56,7 +56,7 @@ and starts the worker for you:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/emil28092005/SciMesh/main/install.sh | bash -s worker
|
||||
worker-agent setup # local wizard at http://127.0.0.1:12700
|
||||
# the installer opens the local wizard at http://127.0.0.1:12700 automatically
|
||||
```
|
||||
|
||||
Or configure by hand:
|
||||
|
||||
Reference in New Issue
Block a user