SonarQube Product Model, Editions, Components, and Architecture: Guided Hands-On Workflow
Run one disposable Community Build analysis and prove every transition from Git revision through scanner/report, Compute Engine task, durable result, and gate evidence.
Learning objectives
- Create a synthetic, local-only analysis fixture.
- Record source, product, scanner/runtime, endpoint, project, and token-scope assumptions before execution.
- Preserve report/task metadata and correlate it to server-side processing.
- Inspect durable project/policy state after Compute Engine completion.
- Map the workflow to commercial Server, DCE, Cloud, and IDE boundaries without requiring paid features.
1. Safe lab contract
Reuse the disposable Community Build pattern from Chapter 01. The target must be loopback or private lab infrastructure; source must be synthetic; credentials must be fake/rotatable and injected at runtime. Record the exact Community Build version/image/package and current scanner/runtime rather than assuming them from memory.
export SONAR_HOST_URL="http://127.0.0.1:9000"
export SONAR_PROJECT_KEY="sq-arch-lab"
# Keep SONAR_TOKEN in an interactive/temporary secret source.
# Never commit or echo it.
2. Create a revision you can prove
mkdir sq-arch-lab && cd sq-arch-lab
git init
printf 'def ratio(total, count):
return total / count
' > app.py
git add app.py
git commit -m "lab: architecture baseline"
git rev-parse HEAD
git status --short
Record the SHA and clean/dirty status. Revision identity is part of analysis evidence, not decorative Git metadata.
3. Inventory before mutation
| Evidence | Example | Owner | Purpose |
|---|---|---|---|
| Product | Community Build 26.9.0.129388 | Server | Pins product/edition behavior |
| Endpoint | http://127.0.0.1:9000 | Network | Proves trust boundary |
| Project key | sq-arch-lab | SonarQube project | Correlates task/result |
| Revision | Git SHA | SCM | Identifies source |
| Scanner/runtime | actual command output | Scanner process | Pins client compatibility |
| Plugins/integrations | recorded inventory | Server/external | Explains analyzer/provider behavior |
Use supported UI/API/system-information surfaces. Do not query or edit internal database/search state directly.
4. Run the smallest analysis
Use the current scanner documented for the sample. Record its version and JRE/runtime behavior because JRE auto-provisioning and scanner packaging evolve. Keep configuration minimal and explicit.
sonar.projectKey=sq-arch-lab
sonar.sources=.
sonar.sourceEncoding=UTF-8
Run with the token injected securely. Preserve the scanner log with secrets redacted. Capture indexed-file/report-upload evidence and the metadata written to the scanner work directory. A line that resembles “execution success” proves only the client phase.
5. Correlate to Compute Engine
Preserve the task identifier emitted in the scanner/report
metadata—commonly ceTaskId in current workflows. Use
the supported background-task UI or API to observe
queued/in-progress/success/failed/canceled state. If the Web API
endpoint changes or migrates to V2, follow the current docs and
record the endpoint/version choice.
# Verify the current endpoint before automation.
curl -sS -u "$SONAR_TOKEN:" "$SONAR_HOST_URL/api/ce/task?id=$CE_TASK_ID"
6. Inspect the durable result and policy
After CE success, record analysis revision/timestamp, issue/measure summary, active quality profile, New Code definition, and quality-gate result. The evidence chain should read:
Git SHA → scanner/runtime → effective parameters → report/upload
→ ceTaskId → CE status → project analysis → profile/New Code/gate
→ UI/API/provider consumer
Do not rank developers by counts and do not infer that a green gate proves runtime correctness or complete security.
7. Map the workflow to other product choices
| Environment | Same concept | Changed ownership/capability |
|---|---|---|
| Community Build | scanner → task → project result | free feature/language set |
| Developer/Enterprise Server | same evidence chain | commercial capabilities/licensing |
| Data Center | same task/project semantics | clustered application/search topology |
| SonarQube Cloud | scanner → hosted result | Sonar operates service infrastructure |
| SonarQube for IDE | rule-driven feedback | local IDE context; no server CE task by itself |
8. Challenge: name the owner before the fix
- Upload succeeds, project never updates: inspect the CE task.
- Project analysis exists, PR has no decoration: inspect provider/integration state.
- IDE and server findings differ: compare revision/scope/connected policy.
- Expected commercial language is absent: verify current edition/language matrix.
- Search/UI is unhealthy: preserve supported health/log/resource evidence; do not delete search data blindly.
9. Verification and cleanup
- Verify SHA, task ID, and project result correlate.
- Verify no token appears in Git/log artifacts.
- Preserve redacted first-failure evidence before cleanup.
- Delete only the disposable project through supported UI/API if needed.
- Stop/remove only lab containers/volumes and synthetic files you created.
Knowledge check
What proves that server-side processing finished?
The correlated Compute Engine/background task reaches a successful terminal state and the corresponding project analysis exists.
Why record the Git SHA before scanning?
It anchors the result to the exact source revision.
The scanner says success but CE failed. Did analysis complete?
No. Upload/client execution succeeded; server-side analysis processing failed.
Should a learner edit the SonarQube database to prove persistence?
No. Use supported UI/API/log evidence.
What is the mandatory free fallback for Data Center capabilities?
A faithful topology/decision simulation; commercial cluster execution is optional only.
Official references and version notes
- SonarQube downloads and edition comparison — current Community Build, Developer, Enterprise, Data Center, and LTA identities.
- Community Build documentation — free self-managed baseline.
- SonarQube Server documentation — commercial Server behavior, operations, analysis, and integrations.
- SonarQube for IDE documentation — local analysis and connected mode.
- SonarQube Cloud documentation — hosted-product boundary.
- Release announcements — dated release cross-checks.
Rechecked 2026-09-07. The mandatory lab path uses Community Build 26.9.0.129388. SonarQube Server Developer, Enterprise, and Data Center editions are on 2026 Release 4.1, while 2026.1.5 is the active LTA patch line. Scanner/JRE provisioning, language support, APIs, plugins, and edition capabilities evolve independently; re-check current primary documentation before applying this snapshot.
SonarQube product names, editions, release trains, scanner runtimes, APIs, authentication options, and platform prerequisites can change independently. Re-check the linked SonarSource primary documentation for the exact target release before applying version-sensitive commands or operational guidance outside the disposable course environment.
Keep the academy open
Support free, practical DevOps education.
Every lesson is designed to remain readable in a browser, downloadable from GitHub, and usable without a paid learning platform. Contributions help expand and maintain the curriculum.
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0Send only Ethereum/ERC-20 compatible assets to this
address.