mirror of
https://github.com/shinyobjectz/raea.git
synced 2026-12-01 21:03:47 -10:00
- sdk/cloud/deploy/sprites/setup.sh: everything a box needs, run on the Sprite as
bash -s -- NAME RAEA_VERSION AGENTS [REF] < setup.sh: packages, Node, raea's Linux release (sha256-checked),
sdk/cloud's server (a tarball box.sh sends, or the public repo at REF), the ACP agents, the box's token, the farm's
env, the skills, and the raea-cloud service. box.sh up runs it by hand (RAEA_CLOUD_REF for a commit instead of the
local tree), and raea cloud's agents run the same script through the Sprites API, so the two can't differ (CR11).
Tested on two throwaway Sprites, one each way: both ready in about 50 s with the same /v1/health.
- sdk/cloud/deploy/sprites/org.sh: the org guard box.sh had, shared: the org only from
~/.config/raea-cloud/sprites.env, refused when private/cloud/sprites-denied.txt lists it.
- tools/linux-box.sh: makes and completes the Linux test Sprite raea-linux (RAEA_LINUX_BOX picks another) in that
org: build packages, the toolchain, the public repo, and an ubuntu 24.04 root /srv/noble for builds at glibc 2.39.
tools/linux-check.sh uses it by default; its first check passed at 5194d34ef (raea-cli in 726 s, raea-render
without default features in 134 s).
- tools/denied.sh: fails on any name from the private Sprites deny list found outside it, in the whole working tree;
with no private checkout (public CI) there's nothing to check. L1 runs it.
15 lines
1.2 KiB
Bash
15 lines
1.2 KiB
Bash
# shellcheck shell=bash
|
|
# The Sprites org raea's machines go in, sourced by deploy/sprites/box.sh, tools/linux-box.sh and tools/linux-check.sh
|
|
# (it sets ORG). The org is the one raea owns, written once in ~/.config/raea-cloud/sprites.env (RAEA_SPRITES_ORG=...),
|
|
# never taken from the environment, and never one listed in private/cloud/sprites-denied.txt (orgs that belong to other
|
|
# businesses). (No apostrophe may go in a ${VAR:?message}: it opens a quote that swallows the lines after it, as it
|
|
# once did this guard's, and a box went into the wrong org.)
|
|
SPRITES_CONF=${RAEA_SPRITES_ENV:-$HOME/.config/raea-cloud/sprites.env}
|
|
ORG=$( [ -f "$SPRITES_CONF" ] && sed -n 's/^RAEA_SPRITES_ORG=//p' "$SPRITES_CONF" | tail -1 || true)
|
|
[ -n "$ORG" ] || { echo "sprites: write RAEA_SPRITES_ORG=<the Sprites org raea owns> in $SPRITES_CONF (sprite org list)"; exit 2; }
|
|
SPRITES_DENIED=$(git -C "$(dirname "${BASH_SOURCE[0]}")" rev-parse --show-toplevel 2>/dev/null)/private/cloud/sprites-denied.txt
|
|
if [ -f "$SPRITES_DENIED" ] && grep -qxF "$ORG" "$SPRITES_DENIED"; then
|
|
echo "sprites: $ORG belongs to another business ($SPRITES_DENIED); raea machines go in an org raea owns"
|
|
exit 2
|
|
fi
|