Serve the one-line installer from rossoctl.dev instead of raw.githubusercontent.com
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 12/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- github-actions, shell
- Ambito
- devops, documentation
Direzione di ricerca
This is a design discussion, not a ready task: the maintainers still need to choose a hosting option (A, B or C) and whether the apex or www domain is used. Read the URL strings at scripts/install.sh lines 4, 197 and 1429, the README Quick Start, and scripts/collect-install-stats.sh with .github/workflows/install-stats.yaml to see what must not change. Done means a decision is recorded on the issue before any implementation starts.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
The documented one-line install is:
curl -fsSL https://raw.githubusercontent.com/rossoctl/cortex/main/scripts/install.sh | sh
It 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 | sh
Opening 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.txt
Whoever 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.sh
The 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.
- Lingua principale
- Go
- Stelle
- 16
- Fork
- 41
- Merge medio
- 11h 40m
- PR unite (30g)
- 246
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rossoctl/cortex
-
Feedback: Rename "[P] pipeline" to "[P] plugins"Forse già presa Una pull request collegata a questa issue è aperta o già unita. Apertafeedback laptop
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
rossoctl/cortex#1212 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
rossoctl/cortex#1116 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 6/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di rossoctl/cortex
Issue simili
-
difficulty: easy documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
scaleway_lb_frontend: updating a frontend with external_acls = true deletes all scaleway_lb_aclAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
scaleway/terraform-provider-scaleway#4485 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100