Use Homebrew to install cortextool in the getting-started guides - #7783
Open
CharlieTLe wants to merge 1 commit into
Open
Use Homebrew to install cortextool in the getting-started guides#7783CharlieTLe wants to merge 1 commit into
CharlieTLe wants to merge 1 commit into
Conversation
The `cortexproject/homebrew-tap` tap now publishes `cortextool`, so the getting-started guides can install it with a single command instead of downloading a pinned release binary or running it in Docker. A host-installed `cortextool` reaches Cortex on `localhost` on every platform, which lets the single-binary guide drop its duplicated Linux vs macOS/Windows command blocks: one command now works everywhere. Docker is kept as a fallback since it is the only option for native Windows without WSL2. Also: - Bump the retained Docker fallbacks from v0.17.0 to v0.21.1. - Drop the `wget`/`chmod`/`sudo mv` install blocks in the microservices guide, which pinned v0.17.0 and downloaded the x86_64 macOS binary even on Apple Silicon. - Fix the Compose network name in the single-binary guide. Compose v2 derives the project name from the project directory's basename, and Step 1 has users `cd cortex/docs/getting-started`, so the network is `getting-started_default`, not `cortex-docs-getting-started_default`. - Replace the "cortextool fails on macOS/Windows" troubleshooting entry, which is obsolete now that Homebrew is the primary path, with one covering what can actually go wrong. Signed-off-by: Charlie Le <charlie_le@apple.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
The
cortexproject/homebrew-taptap now publishescortextool, so the getting-started guides can install it with one command:No
brew tapand nobrew trustneeded —brew installauto-installs the tap and auto-trusts a fully-qualified formula name.Before this, the guides installed
cortextoolthe hard way:microservices.mdhad per-OSwget+chmod +x+sudo mvblocks pinned to v0.17.0 (current is v0.21.1). The macOS block downloadedcortextool_0.17.0_mac-os_x86_64even on Apple Silicon, despite amac-os_arm64asset existing.single-binary.mdnever installedcortextoolat all — it ran it in Docker, and because a container has to reach Cortex, every command was duplicated into a Linux block and a macOS/Windows block (4 code blocks for 2 commands).A host-installed
cortextoolreaches Cortex athttp://localhost:9009(single-binary) andhttp://localhost:8080(microservices, viakubectl port-forward) on every platform. That collapses the Linux/macOS fork insingle-binary.mdto one command per step and retires the--network hosttroubleshooting entry.Docker is kept as a single fallback in both guides — it is already a hard prerequisite and is the only path for native Windows without WSL2. Those fallbacks are bumped to v0.21.1.
Drive-by fix: Compose network name
single-binary.mddocumented the network ascortex-docs-getting-started_default, but Compose v2 derives the project name from the basename of the project directory, and Step 1 has userscd cortex/docs/getting-started.docker-compose.yamlsets noname:and.envsets noCOMPOSE_PROJECT_NAME, so the real network isgetting-started_default. Confirmed withdocker network ls:This is a pre-existing bug, not one introduced here — anyone who followed the macOS/Windows instructions got
network cortex-docs-getting-started_default not found.Testing
Ran both guides' commands against a live stack with
cortextool 0.21.1installed from the tap:Also smoke-tested the Docker fallback with the corrected network name and
--address http://cortex:9009— bothrules syncandalertmanager loadsucceed.misspell -error docsand thecheck-white-noisemarkdown check both pass.Note on a separate breakage
docker compose up -donmastercurrently leavescortexin a restart loop, unrelated to this PR:.envpinsCORTEX_VERSION=v1.21.1, butruntime-config.yamlusesruler_external_urlandruler_alert_generator_url_template, which do not exist in v1.21.1:I verified the commands above with those per-tenant overrides temporarily blanked (they are irrelevant to
cortextoolreachability) and leftruntime-config.yamluntouched in this PR. Happy to file a separate issue/PR for the version pin.Which issue(s) this PR fixes
N/A
Checklist
Add entry to CHANGELOG.md— docs-only, matching Restructure and enhance getting started documentation #7113 which created these guides