Repository navigation
Serve the one-line installer from rossoctl.dev instead of raw.githubusercontent.com #1354
Description
Problem
The documented one-line install is:
curl -fsSL https://raw.githubusercontent.com/rossoctl/cortex/main/scripts/install.sh | shIt works, but it reads as plumbing rather than a product. It leaks the org, the repo, the branch and the directory layout into the thing we most want people to copy-paste and trust. raw.githubusercontent.com is also the domain every sketchy curl | sh in the world uses, which is the opposite of the signal we want on a tool that installs a TLS-intercepting proxy and a CA.
We own rossoctl.dev. Proposal is to front the installer with something like:
curl -fsSL https://rossoctl.dev/cortex/install.sh | shOpening this to pick an approach before anyone writes code — there are real trade-offs, and one hard constraint (install stats) worth agreeing on first.
What already exists
Worth knowing before we design anything, because more is in place than it looks:
rossoctl.devapex resolves to199.46.34.76, an IBM redirector (x-ibm-from-redirect: Yes), which 301s tohttps://www.rossoctl.dev/.www.rossoctl.devis a CNAME torossoctl.github.io— GitHub Pages, serving a Docusaurus v3.10.1 site built from therossoctl/.githubrepo (static/CNAME, deployed by.github/workflows/deploy.yaml, Pagesbuild_type: workflow). HTTPS cert approved through 2026-12-19. Netlify is PR deploy previews only.- DNS is on NS1 (
dns*.p05.nsone.net).
So we do not need to stand up hosting. We need to decide how a plain-text shell script gets served from a Docusaurus site, and from which repo.
Heads-up: that URL already returns HTTP 200
https://rossoctl.dev/cortex/install.sh returns 200 today — but it is serving the 29 KB Docusaurus homepage as text/html. The SPA answers 200 for every path (/definitely-not-a-real-path-xyz returns 200 too). Two consequences:
- We cannot use a 404 to detect that the file is missing. Any verification must check the content, not the status code.
- If we publish the new command before the file genuinely exists, users pipe HTML into
sh. Harmless in effect, but a confusing first impression of a security tool. The docs change and the file landing must be the same change, or the file must land first.
Hard constraint: install stats must keep working
We estimate installs from GitHub Release asset download counts (scripts/collect-install-stats.sh, .github/workflows/install-stats.yaml), summed per platform with successful release-smoke-linux.yaml runs subtracted as CI.
Good news: a vanity front door does not touch this. The counted downloads come from the asset path, which is hardcoded independently of the installer URL:
base="https://github.com/${REPO}/releases/download/${version}"
# agentop_*.tar.gz, cortex_*.tar.gz, checksums.txtWhoever serves install.sh, the script still pulls its tarballs and checksums.txt from GitHub Releases. The series stays continuous and comparable across the change — no backfill gap, no recalibration.
Two things to protect, though:
- The
checksums.txtcross-check.checksums.txtis fetched exactly once per install regardless of platform, which is what validates the whole series (on v0.8.1 its 43 matcheddarwin_arm64+linux_amd64= 12 + 31). Any approach that caches, mirrors or proxies asset downloads would break this. None of the options below do — let's keep it that way. - Don't expect a second counter. Pages gives us no server-side request logs, so the vanity URL cannot itself be counted. That is fine, but it means nobody should plan on "hits on install.sh" being available later. Asset downloads stay the single source of truth.
The complication: install.sh re-executes itself
scripts/install.sh is ~84 KB and does not run the copy you fetched. By default it resolves the newest release and re-downloads itself:
url="https://raw.githubusercontent.com/${REPO}/${want_ref}/scripts/install.sh"
# 404-fallback to ${want_ref}/install.sh, then ${want_ref}/authbridge/install.shThe fallbacks exist for refs predating the #1134 flatten. The rationale is deliberate and documented in the header: a curl | sh should run a released installer, not whatever is on main.
This means a vanity URL is a front door, not a redirect of the whole flow. The bootstrap keeps fetching from raw.githubusercontent.com — which is arguably correct, since that is what makes --ref=vX.Y.Z pinning and the legacy fallbacks work. Worth deciding explicitly whether we are happy with that, or whether we want the re-exec rewritten too (bigger change, and it would need its own legacy story).
The URL is also hardcoded in three user-facing strings that must be updated together:
scripts/install.sh:4— header commentscripts/install.sh:197—usage()heredocscripts/install.sh:1429— the upgrade/--refhint printed at the end
Plus README.md Quick Start, and anywhere the docs site repeats it.
Options
A. Commit the script as a static asset in the site repo
Drop install.sh into rossoctl/.github at static/cortex/install.sh. Docusaurus copies static/ verbatim, so it ships as a real file.
- Simple, no new infrastructure, correct
content-type, works on apex and www. - Two copies of an 84 KB script that will drift, and the one users pipe to
shwould be the stale one. This is the option that fails quietly and badly. If we pick it, it needs a CI drift check — at which point it is close to option C anyway.
B. Redirect /cortex/install.sh → raw.githubusercontent.com
Single source of truth, zero drift.
- GitHub Pages has no server-side redirect support. Docusaurus'
client-redirectsplugin emits an HTML page with a JS/meta refresh, whichcurl | shcannot follow — it would pipe HTML to the shell. So plain Pages cannot do this. - Two possible escapes, both needing someone to check feasibility:
- The IBM apex redirector. It already 301s
/→ www. Can it do a path-scoped 301 to an arbitrary external URL? If yes, this is the cheapest correct answer. Needs someone with access to confirm — not determinable from outside. - A small Cloudflare Worker / equivalent on a subdomain or path, issuing a real 301/302. Correct and cheap, but adds a component and a second place DNS can break.
- The IBM apex redirector. It already 301s
- Note
curl -fsSLdoes follow redirects (-L), so a real HTTP redirect is fine. Only the HTML kind is not.
C. CI-synced copy on release
A workflow in cortex pushes scripts/install.sh to the site repo (or a gh-pages path) on every release.
- No drift, real
text/plain, and it naturally publishes the released installer — which matches the script's own "install a release, notmain" philosophy better than frontingmaindoes. - Costs cross-repo CI and a token with write access to the site repo. We already run a similar cross-repo pattern (
install-stats.yamlpushes togh-pages), so this is familiar ground rather than something new.
Decisions I'd like the team's view on
- Which option — A, B, or C? My read: C is the most robust and best matches the released-installer guarantee; B is the most elegant if the IBM redirector can do path-based 301s; A is a trap without a drift check.
- Apex or www?
https://rossoctl.dev/...is the nicer URL but routes the install through the IBM redirector.https://www.rossoctl.dev/...hits Pages directly — one less hop, one less owner in the install path. Do we want IBM infrastructure in acurl | sh? - Path shape.
/cortex/install.shscales to other tools (/moca/install.sh) and is my preference. Alternatives:/install.sh(shortest, but claims the root for one tool) or/cortex/install(no extension — prettier, less obviously a script). - Keep
raw.githubusercontent.comworking? I'd say yes, indefinitely — it is in the wild, in people's notes, and in the re-exec fallbacks. Vanity URL as the documented front door, raw URL as a permanent unadvertised alias. - Does the re-exec stay as-is? I lean yes for now — it is what makes
--refpinning work — but it means the vanity URL is cosmetic past the first hop. Flagging it so nobody is surprised later. - Verification. Given the SPA-200 problem, any CI check must assert on content (e.g. first line is
#!/bin/sh) rather than status. Worth a smoke check that the published URL serves a real script.
Scope note
This is deliberately not a plan to rewrite the installer. The change is: pick a hosting approach, land the file, update three strings in install.sh plus the README and docs, keep the old URL alive, and add a content-based check. Install stats need no change.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fix: log published cortex commit; update sync scope comments
Feat: serve cortex installer at /cortex/install.sh (#130)
esnible commentedon Oct 14, 2026
rossoctl/.github#130 has merged and deployed. The installer is now served from the site:
curl -fsSL https://www.rossoctl.dev/cortex/install.sh | shIt returns
200withContent-Type: application/x-sh, and the body is the real script (#!/bin/sh). It is synced fromrossoctl/cortex:scripts/install.sh(main) on every site deploy: pushes torossoctl/.github, the daily 06:17 UTC rebuild, or a manual run. The deploy log records which cortex commit went live.The bare domain does not work yet.
https://rossoctl.dev/cortex/install.sh(nowww.) goes through the IBM redirector. It drops the path and sends every request to the home page:So
curl -fsSLon that URL gets the HTML home page with a200. Supporting the URL withoutwww.needs someone with access to the redirector to make it keep the path (redirect tohttps://www.rossoctl.dev/<path>). Until then, the docs should use thewww.URL.Follow-up in this repo: update the hard-coded
raw.githubusercontent.comURLs inscripts/install.sh(header,usage(), upgrade hint) and the README to thewww.URL.docs: Document the installer at www.rossoctl.dev (#1397)
huang195 commentedon Oct 14, 2026
is this done? can we close? @esnible