114 Commits
Author SHA1 Message Date
zeekayandClaude Opus 4.8 d1a58feb4a fix rebrand: finish botched signoz->o11y merge (installation Spec.Signoz->O11y + HanzoO11y type, delete stale signozmolding, reconstruct foundry.New for migrated struct, systemd services flat-list + IsEnabled, foundryctl callers, fix 3 botched-merge templates, regen schema)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 22:54:04 -07:00
z 4865d2ec68 docs(brand): add hero banner 2026-06-28 20:14:41 -07:00
z aa885c9d65 chore(brand): dynamic hero banner 2026-06-28 20:14:40 -07:00
zeekay 3d2946a7b9 chore: restore upstream attribution + NOTICE (OSS compliance) 2026-06-21 02:14:21 -07:00
bf32956f4c ci: run on self-hosted ARC pool (hanzo-build-linux-amd64/deploy), not GitHub-hosted (#1)
Co-authored-by: zeekay <z@hanzo.ai>
2026-06-19 20:37:16 -07:00
Antje WorringandClaude Opus 4.8 4653c2273a docs: tidy LLM.md indexes; CLAUDE.md -> LLM.md symlink convention
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 10:08:38 -07:00
Hanzo AI 8ca9d70a37 deps: bump Go to 1.26.4 across go.mod, Dockerfiles, GH Actions
Workspace-wide sync. luxfi/node already shipped on 1.26.4 in v1.30.6
(commit 121aca1fa9); this is the cross-repo catch-up.
2026-06-07 12:11:53 -07:00
Hanzo AI 605346b11b merge: upstream/main (preserve Hanzo brand, 50 commits)
# Conflicts:
#	api/v1alpha1/casting.go
#	api/v1alpha1/installation/signoz.go
#	docs/casting.md
#	docs/examples/docker/compose/pours/deployment/configs/ingester/opamp.yaml
#	docs/examples/systemd/binary/pours/deployment/signoz-ingester.service
#	docs/examples/systemd/binary/pours/deployment/signoz-signoz.service
#	docs/examples/systemd/binary/pours/deployment/signoz-telemetrystore-migrator.service
#	docs/schemas/v1alpha1.yaml
#	internal/foundry/registry.go
#	internal/instrumentation/handler.go
#	internal/molding/signozmolding/signoz.go
2026-06-02 09:59:25 -07:00
Amin EhteramiandGitHub c4f9c01077 fix(tooler): detect both legacy docker-compose and the docker cli compose plugin (#128)
Hey, 
this is fix of pull request:
https://github.com/SigNoz/foundry/pull/126
2026-06-02 21:25:46 +05:30
Hanzo AI 1c9a452fe2 dockerfile: switch multi-arch base to ghcr.io/hanzoai/debian12:base
Replace gcr.io/distroless/base@sha256:${DISTROLESS_SHA} with the
Hanzo-mirrored ghcr.io/hanzoai/debian12:base@sha256:${DISTROLESS_SHA}.
SHA passed in via build-arg is preserved so caller pin discipline
remains identical; only the registry/path changes.

TODO flagged: CI workflows pulling this base may need a PAT secret
(GHCR_PULL_TOKEN) since the default GITHUB_TOKEN scopes to the repo's
own package only.
2026-06-02 03:41:25 -07:00
NageshbansalandGitHub bafb1697b8 chore(systemd): derive signoz asset paths from install root via env (#127)
#### Chores

- Align the signoz assets (templates, web) with the signoz tarball
structure in systemdcasting
- Update the systemdcasting to help folks with downloading binary and
with instructions on keeping things aligned


Related: https://github.com/SigNoz/platform-pod/issues/2347
2026-05-27 02:19:58 +05:30
NageshbansalandGitHub 738ae464ff refactor: better handle casting kind dispatch (#122)
#### Summary

Introduces a per-Kind `Planner` contract so Foundry can drive multiple
casting Kinds through a single pipeline. `Foundry.Forge` / `Cast` /
`Gauge` become Kind-agnostic; per-Kind state (registry, moldings,
casting strategy, enricher) lives in the Kind's own Planner.

#### Changes

- New `internal/planner` package defining the `Planner` contract.
- `Foundry` holds a `Planners` dispatch map; each casting package
implements the contract (`installation.Planner`,
`collectionagent.Planner`).
- Installation registry moves from `internal/foundry/registry.go` to
`internal/casting/installation/registry.go`.
- CollectionAgent Kind scaffolded: Planner + collector molding wired
end-to-end. No deployment castings yet.
- `MoldingKindCollector` added to `api/v1alpha1/molding_kind.go`.

Related: https://github.com/SigNoz/platform-pod/issues/1971,
https://github.com/SigNoz/platform-pod/issues/1972
2026-05-26 15:32:31 +05:30
NageshbansalandGitHub 15fe0f6aaf fix: templated signoz and ingester services with replicaIdx suffix (#121)
#### Fixes

- Templated the signoz and ingester services with a replicaIdx suffix
- Fixed volume names to respect signoz replicaIdx for the sqlite
metastore
- Fixed port collisions for replicas of signoz and ingester
2026-05-21 20:02:24 +05:30
NageshbansalandGitHub 272a49f57d fix(clickhouse): templated per-node macros and single-host client DSN (#120)
#### Fixes

- Render templated per-node macros (`shard`, `replica`) in ClickHouse
`config.yaml` so multi-shard/multi-replica clusters get unique Keeper
paths instead of collisions
- Use the first TelemetryStore TCP address (not comma-joined) for
`SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN` and ingester ClickHouse DSNs

 #### Refactors
- `telemetrystore` molding now emits `config-{shard}-{replica}.yaml` per
node (mirrors `telemetrykeeper` per-replica pattern)

Related: https://github.com/SigNoz/platform-pod/issues/1332
2026-05-20 17:48:14 +05:30
NageshbansalandGitHub ec05e38657 feat(scripts): show progress bar while downloading foundryctl tarball (#119)
#### Features

- Adds progress bar flag for curl to show progress bar while downloading
foundryctl tarball
2026-05-18 13:33:36 +05:30
PandeyandGitHub 998092f8cd refactor(foundryctl): silent-by-default logs, typed exit codes, ban fmt.Errorf (#118)
## Summary

Reshape foundryctl's output contract so it composes with agents and
shell pipelines. Three changes that fall out of the same observation:
**stdout, stderr, and exit codes should be a stable contract — today
they're conflated.**

- **Logger to stderr, silent by default.** `instrumentation.NewLogger`
writes to `os.Stderr` (was `os.Stdout`) and uses `slog.DiscardHandler`
unless `--debug` is set. Matches helm/aws CLI convention. stdout is now
reserved for command results.
- **Typed exit codes.** `internal/errors.typ` carries a `code int`
field; `errors.ExitCode(err)` walks the wrap chain via `errors.As` and
returns a deterministic code: `InvalidInput=2, NotFound=3,
Unsupported=4, Internal=5, Fatal=6`, untyped=1, nil=0. Compact 1-6
scheme rather than sysexits.h because sysexits would collapse `Internal`
and `Fatal` into the same `EX_SOFTWARE (70)`, losing a distinction we
care about (Fatal = recovered panic; Internal = expected-but-failed
path). `cmd/foundryctl/main.go` now exits with `errors.ExitCode(err)`.
- **`fmt.Errorf` forbidden by lint.** New forbidigo rules in
`.golangci.yml` ban `fmt.Errorf` and `fmt.Print*` / `print` / `println`.
168 call sites across 38 files converted to `errors.Newf` /
`errors.Wrapf` with contextually-chosen types. Narrow exception for
`internal/errors/error_test.go` so the ExitCode wrap-chain test stays
authentic.

Sites of note for review:
- `internal/errors/type.go` — exit code mapping table (one source of
truth)
- `internal/errors/error.go` — `ExitCode(err)` helper
- `internal/instrumentation/logger.go` — `slog.DiscardHandler` default
- `.golangci.yml` — forbidigo config + the single narrow test exclusion

## Test plan

- [x] `go build ./...`
- [x] `go test ./...` (all packages pass; new `TestExitCode` covers 9
cases: nil, untyped, each typed, fmt.Errorf-wrapped,
foundry-Wrapf-wrapped)
- [x] `golangci-lint run ./...` — 0 issues
- [x] Manual: `foundryctl forge` on a missing file exits non-zero and
emits nothing on stdout (logs hidden); `--debug` emits JSON on stderr
only
- [x] Manual: end-to-end forge + cast against the docker/compose flavor
still produces a healthy stack
2026-05-17 23:01:00 +05:30
NageshbansalandGitHub 1a72d6ac3c feat: introduce collection agent schema (#117)
#### Features

- Adds collectionAgent Casting Kind

Related: https://github.com/SigNoz/platform-pod/issues/1970
2026-05-16 19:39:35 +05:30
NageshbansalandGitHub 815889b7b7 feat: introduce casting kind (#116)
### Summary                            

- Introduce a `kind` discriminator for Casting. Existing Casting without
a kind field keep working, empty kind defaults to `Installation`
- New `api/v1alpha1/installation/` subpackage with the Installation
Casting, Spec types and holds its own JSON schema from its Go type:
`installation/casting.schema.json`
- New Machinery interface in `api/v1alpha1/machinery.go` exposes
`Kind()` and `TrackableProperties()` so Dispatcher(Getv1alpha1 and
Forge/Cast/Gauge) work across any kind without knowing its concrete
type.
- A root casting.schema.json lists every per-Kind schema to supports
IDEs completion from one schema URL
- cmd/foundryctl gen schemas reads a list of types from schemaTargets.
Adding a kind means adding one entry.
  
Related: https://github.com/SigNoz/platform-pod/issues/1970
2026-05-16 17:40:03 +05:30
Hanzo AI 7c67cf88ae go.mod: bump go directive to 1.26.3 (security advisory) 2026-05-12 21:26:11 -07:00
NageshbansalandGitHub 146dc25c0e chore: adds distribution issue template (#98)
#### Chores

- Adds template for distribution issues

Related: https://github.com/SigNoz/platform-pod/issues/2065
2026-05-07 20:13:47 +00:00
Miguel ValdesandGitHub 76d34466a7 fix(foundryctl): metastore support for sqlite (#114) 2026-05-07 13:58:43 -05:00
NageshbansalandGitHub 7efdede844 fix(domain): truncate distinct ID to 32 characters (#115)
#### Fixes

- truncate distinct ID to 32 characters
2026-05-04 23:45:49 +05:30
PandeyandGitHub 2491a71905 refactor(ledger): extract domain primitives and centralize tracking (#113)
## Summary

- Extract \`DistinctID\`, \`Event\`, and \`Properties\` value objects
from \`internal/ledger\` into \`internal/domain\` so they can be reused
without coupling callers to ledger orchestration. Move the analytics
serializer to \`api/v1alpha1\` as \`Casting.TrackableProperties()\`.
Tighten \`Ledger.Track\` to take \`domain.Event\` and
\`domain.Properties\`.
- Add \`cmd/foundryctl/root.go\` with shared
\`rootLogger\`/\`rootTracker\` initialized via \`PersistentPreRunE\`,
plus \`recoverRunE\` — a wrapper that converts panics to \`TypeFatal\`
errors and centralizes log + ledger tracking of success/failure for
every command. Each \`runX\` collapses to \`(domain.Properties, error)\`
with no in-function tracking.
- Add \`WithStacktrace\` on \`*base\` errors so the recovered panic
stack flows through the existing \`LogAttr\` machinery.
2026-05-04 23:36:04 +05:30
NageshbansalandGitHub 73ad12dd3c feat(scripts): add install.sh for foundryctl (#112)
## Summary

- Adds `scripts/install.sh` : a curl-pipe-bash installer for foundryctl,
served from `signoz.io/signoz.sh` (Vercel rewrite to this repo's
`main`).
- Detects OS/arch (darwin, linux, windows shells; amd64, arm64),
resolves the latest version via the GitHub `/releases/latest` redirect
(no API rate-limit), downloads the tarball + verifies SHA-256 against
the published checksums file, installs into `$FOUNDRY_INSTALL_DIR` →
`$XDG_BIN_HOME` → `~/.local/bin`, and runs the binary as a post-install
smoke test.
- Idempotent: same-version re-runs short-circuit early;
different-version runs prompt interactively, auto-proceed when piped
(curl-pipe-bash, CI). `-y` / `FOUNDRY_ASSUME_YES` bypasses the prompt
explicitly.
- Wires `sh-fmt` and `sh-lint` jobs into `ci.yaml` (via
`signoz/primus.workflows`) so the script is enforced against shellcheck
and shfmt on every PR.

Related: SigNoz/platform-pod#2065,
https://github.com/SigNoz/foundry/issues/96,
https://github.com/SigNoz/foundry/issues/97
2026-05-04 16:48:14 +05:30
PandeyandGitHub dfa40e2d5c refactor(domain): make Template a format-aware value object (#111)
## Summary
- `Template` now carries its `Format` end-to-end. Each format declares
its `Material` constructor inline (`FormatYAML = Format{s: "yaml", new:
...}`), so adding a format is one `var` entry — no switch in `Render`,
no per-callsite dispatch.
- New `Template.Render(data, path) (Material, error)` replaces the
`Execute` → `bytes.Buffer` → `NewXMaterial` trio duplicated across
`ecsterraformcasting`, `kuberneteskustomizecasting`, `systemdcasting`,
and `infrastructure/terraform/generator`. Net −165/+259, but most of the
+s are the new test file.
- Errors flow through `internal/errors` (`TypeInvalidInput` /
`TypeInternal` / `TypeUnsupported`) using the project's `failed to
create <X> from %q: <reason>` wording, matching the recent `Material`
and `Address` refactors.
- Drop `Get` prefix on accessors: `Name()`, `Path()`, `Format()`.
- `internal/domain/template_test.go` covers `Render` across every format
plus the unsupported-format and invalid-output paths.
2026-05-01 13:25:04 +05:30
PandeyandGitHub 9628c57b9e refactor(domain): make Address a scheme-aware value object (#110)
## Summary
- Carry scheme on `domain.Address` so the round-trip `Parse → String` is
lossless; bracket IPv6 hosts on render.
- Single construction path: `ParseAddress` delegates field validation to
`NewAddress`. Add `MustNewAddress` and rename the slice constructor
`NewAddresses` → `ParseAddresses` (it parses strings).
- Port is optional — `0` means unset and is dropped from `String`, so
`tcp://signoz` and `tcp://[::1]` round-trip cleanly.
- Drop `FormatAddress`; casting enrichers now use
`domain.MustNewAddress(...).String()`.
- Error messages aligned with the material-domain wording (`failed to
create address[ from %q]: <reason>`).
- Adds `internal/domain/address_test.go` covering hostname / IPv4 /
IPv6, port-less variants, parse round-trip, and slice error propagation.
2026-05-01 12:34:23 +05:30
PandeyandGitHub 488c9315e9 refactor(domain): split material types (#109)
## Summary
- Split material domain into writer-facing `Material` and
traversal-capable `StructuredMaterial` interfaces with concrete
`YAMLMaterial`, `JSONMaterial`, `INIMaterial`, and `BlobMaterial` types.
- Inline INI and YAML format helpers into their respective material
types and remove `format.go` and `ini.go`.
- Rename interface methods for clarity: `Contents` → `JSONContents`,
`WithContents` → `CloneWithJSONContents`, `IsMultiDoc` →
`HasMultipleDocuments`.
- Switch material constructors to `internal/errors` with
`TypeInvalidInput` for parse failures, `TypeInternal` for canonical-JSON
marshaling failures, and `TypeNotFound` for missing traversal paths.
- Add `MustNew{JSON,YAML,INI}Material` constructors and split tests into
per-type `*_material_test.go` files.
- Tighten interface doc comments to follow godoc convention (lead with
identifier, drop pure restatement, document the gjson dotted-key path
syntax).
- Move `ini.PrettyFormat = false` into a package `init()` so the global
is touched once instead of on every `FmtContents` call.
2026-05-01 12:07:26 +05:30
PandeyandGitHub ec985909a7 refactor: rename types package to domain (#108)
## Summary
- Rename internal/types to internal/domain
- Update imports and call sites to use the domain package
- Document the domain package boundaries
- Remove api/v1alpha1 dependency on internal/domain

## Tests
- GOCACHE=/private/tmp/foundry-go-cache go test ./...
2026-05-01 09:26:16 +05:30
PandeyandGitHub 383bc9d2de feat(v1alpha1): jsonschema validation for casting (#107)
## Summary
- Wires schema-based validation of `casting.yaml` at config load time.
Schema is generated from the Go types via `swaggest/jsonschema-go`,
embedded as `api/v1alpha1/schema.json`, and validated post-merge with
`google/jsonschema-go`.
- Adds field-level rules: `required`, `enum`, `pattern` (DNS-1123 name,
JSON Pointer paths, OCI image), `minimum`/`minLength`/`minItems` on the
relevant fields. `additionalProperties:false` is set on every nested
type for the published schema.
- Replaces the loose string `Platform` / `Mode` / `Flavor` on
`TypeDeployment` with typed enums following the existing `*Kind`
pattern. Bad values now fail at unmarshal with a clear "invalid
deployment …" message.
- Drops `InfrastructureProvider` in favor of `Platform` — the cloud
subset (aws, gcp, azure) drives the Terraform IaC pipeline directly.
`ResolveProvider` collapses `PlatformECS → PlatformAWS`.
- Side cleanups bundled here: typed errors in `internal/errors` with
stacktrace capture (used by yamlconfig to wrap validation failures as
`TypeInvalidInput`), and removal of the custom pretty slog handler in
`internal/instrumentation` in favor of `slog.NewJSONHandler`.

## Test plan
- [ ] `make gen-schemas` is idempotent (CI's `schemas` job stays green).
- [ ] `go test ./...` passes locally.
- [ ] Every committed example casting (`docs/examples/**/casting.yaml`,
`docs/standalone/casting.yaml`) loads without error.
- [ ] Negative cases at config load: bad `apiVersion`, missing required
fields, unknown enum values for `kind` / `mode` / `flavor` / `platform`
/ patch `op`, non-JSON-Pointer patch paths, negative `replicas`,
`shards: 0`, malformed image refs — each fails with a `TypeInvalidInput`
error pointing at the offending location.
- [ ] `foundryctl forge` against
`docs/examples/docker/compose/casting.yaml` still produces the expected
pours.
2026-05-01 09:04:53 +05:30
NageshbansalandGitHub eac4a0ba66 chore: fix the alignment in readme (#106)
#### Chores

- Fix alignment of the signoz icon in the readme
2026-05-01 01:42:10 +05:30
c0be07dcbf fix(foundryctl): docker issues (#105)
#### Fixes
- Removes health check for docker compose, causes ingester to be
unhealthy
- Removes docker compose project to allow opamp to connect to signoz
- Pins volume names to casting metadata instead of docker project.

---------

Co-authored-by: Nagesh Bansal <nageshbansal59@gmail.com>
2026-05-01 01:37:01 +05:30
Miguel ValdesandGitHub 86a0eb68b1 feat(foundryctl): migrator timeout 10m in all platforms (#104)
#### Features
- Timeout settings to 10M in all platforms (ingester, migrator) set via
ENV Vars
- K8s already has 10M default in the chart
2026-04-30 21:49:16 +05:30
Miguel ValdesandGitHub 08aba61feb feat(foundryctl): telemetrykeeper settings (#103)
#### Features
- Disable fsync
- Adjust timeout settings
- Adjust the partition size and retention
2026-04-28 13:50:19 -05:00
Miguel ValdesandGitHub 143b1b53ab feat: add sane defaults to telemetrystore (#102)
#### Features
- Disable simdjson engine to avoid issues with CPUs that do not support
AVX2
- Remove max memory server limits
- Reduce retention for system logs/tables
- Increase flush interval to help with data flushes
2026-04-28 13:38:57 -05:00
Miguel ValdesandGitHub a9ca831074 feat(foundryctl): ingester metadata pipeline (#100) 2026-04-28 19:26:21 +05:30
dependabot[bot]andGitHub 9c388bf49d chore(deps): bump helm.sh/helm/v3 from 3.20.0 to 3.20.2 (#95) 2026-04-13 20:08:07 +05:30
NageshbansalandGitHub 886d36c806 feat(ledger): use anonymousId for segementprovider (#94)
#### Features

- Add getDistinctID() using the machineid library to generate a stable,
non-reversible HMAC-SHA256 hash of the OS machine ID for Segment's
AnonymousId, enabling cross-session event correlation without collecting
PII.

Related: https://github.com/SigNoz/platform-pod/issues/1910
2026-04-07 22:45:43 +05:30
Hanzo AI 0fb878e3eb chore: symlink AGENTS.md + CLAUDE.md → LLM.md 2026-04-06 15:07:19 -07:00
NageshbansalandGitHub 6c6168c53c fix(ledger): use event parameter for track and exclude gen command (#92)
#### Fixes

- Add event parameter to Track() for explicit event naming (foundryctl:
<event>)
- Remove command from properties since it is now part of the event name
- Remove CommandProperties() and PropCommand constant
- Add nil map guard to WithSuccess and WithError
- Exclude gen command from ledger tracking

Related: https://github.com/SigNoz/platform-pod/issues/1910
2026-04-06 18:30:41 +05:30
NageshbansalandGitHub 682cdc9f63 docs: fix broken links in docs (#91)
#### Chores

- Fix Broken Links for `patches.md` in casting docs

Related: https://github.com/SigNoz/foundry/issues/90
2026-04-04 14:50:50 +00:00
Hanzo AI 0dc33b5ff0 chore: update dependencies 2026-04-01 14:23:05 -07:00
NageshbansalandGitHub 10abb403c2 fix: fix build workflow for docker-build (#88)
#### Fixes

- Fix the build flags for the docker build


Related: https://github.com/SigNoz/platform-pod/issues/1910
2026-03-30 11:02:27 +00:00
NageshbansalandGitHub 0e4e752a19 feat: introduce ledger and version (#87)
#### Features

- Introduce ledger for gathering analytics abt usage of foundryctl
- Adds version command

Related: https://github.com/SigNoz/platform-pod/issues/1910
2026-03-30 16:07:37 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a5e02386ec chore(deps): bump google.golang.org/grpc from 1.72.2 to 1.79.3 (#82)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from
1.72.2 to 1.79.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/grpc/grpc-go/releases">google.golang.org/grpc's
releases</a>.</em></p>
<blockquote>
<h2>Release 1.79.3</h2>
<h1>Security</h1>
<ul>
<li>server: fix an authorization bypass where malformed :path headers
(missing the leading slash) could bypass path-based restricted
&quot;deny&quot; rules in interceptors like <code>grpc/authz</code>. Any
request with a non-canonical path is now immediately rejected with an
<code>Unimplemented</code> error. (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8981">#8981</a>)</li>
</ul>
<h2>Release 1.79.2</h2>
<h1>Bug Fixes</h1>
<ul>
<li>stats: Prevent redundant error logging in health/ORCA producers by
skipping stats/tracing processing when no stats handler is configured.
(<a
href="https://redirect.github.com/grpc/grpc-go/pull/8874">grpc/grpc-go#8874</a>)</li>
</ul>
<h2>Release 1.79.1</h2>
<h1>Bug Fixes</h1>
<ul>
<li>grpc: Remove the <code>-dev</code> suffix from the User-Agent
header. (<a
href="https://redirect.github.com/grpc/grpc-go/pull/8902">grpc/grpc-go#8902</a>)</li>
</ul>
<h2>Release 1.79.0</h2>
<h1>API Changes</h1>
<ul>
<li>mem: Add experimental API <code>SetDefaultBufferPool</code> to
change the default buffer pool. (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8806">#8806</a>)
<ul>
<li>Special Thanks: <a
href="https://github.com/vanja-p"><code>@​vanja-p</code></a></li>
</ul>
</li>
<li>experimental/stats: Update <code>MetricsRecorder</code> to require
embedding the new <code>UnimplementedMetricsRecorder</code> (a no-op
struct) in all implementations for forward compatibility. (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8780">#8780</a>)</li>
</ul>
<h1>Behavior Changes</h1>
<ul>
<li>balancer/weightedtarget: Remove handling of <code>Addresses</code>
and only handle <code>Endpoints</code> in resolver updates. (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8841">#8841</a>)</li>
</ul>
<h1>New Features</h1>
<ul>
<li>experimental/stats: Add support for asynchronous gauge metrics
through the new <code>AsyncMetricReporter</code> and
<code>RegisterAsyncReporter</code> APIs. (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8780">#8780</a>)</li>
<li>pickfirst: Add support for weighted random shuffling of endpoints,
as described in <a
href="https://redirect.github.com/grpc/proposal/pull/535">gRFC A113</a>.
<ul>
<li>This is enabled by default, and can be turned off using the
environment variable
<code>GRPC_EXPERIMENTAL_PF_WEIGHTED_SHUFFLING</code>. (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8864">#8864</a>)</li>
</ul>
</li>
<li>xds: Implement <code>:authority</code> rewriting, as specified in <a
href="https://github.com/grpc/proposal/blob/master/A81-xds-authority-rewriting.md">gRFC
A81</a>. (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8779">#8779</a>)</li>
<li>balancer/randomsubsetting: Implement the
<code>random_subsetting</code> LB policy, as specified in <a
href="https://github.com/grpc/proposal/blob/master/A68-random-subsetting.md">gRFC
A68</a>. (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8650">#8650</a>)
<ul>
<li>Special Thanks: <a
href="https://github.com/marek-szews"><code>@​marek-szews</code></a></li>
</ul>
</li>
</ul>
<h1>Bug Fixes</h1>
<ul>
<li>credentials/tls: Fix a bug where the port was not stripped from the
authority override before validation. (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8726">#8726</a>)
<ul>
<li>Special Thanks: <a
href="https://github.com/Atul1710"><code>@​Atul1710</code></a></li>
</ul>
</li>
<li>xds/priority: Fix a bug causing delayed failover to lower-priority
clusters when a higher-priority cluster is stuck in
<code>CONNECTING</code> state. (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8813">#8813</a>)</li>
<li>health: Fix a bug where health checks failed for clients using
legacy compression options (<code>WithDecompressor</code> or
<code>RPCDecompressor</code>). (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8765">#8765</a>)
<ul>
<li>Special Thanks: <a
href="https://github.com/sanki92"><code>@​sanki92</code></a></li>
</ul>
</li>
<li>transport: Fix an issue where the HTTP/2 server could skip header
size checks when terminating a stream early. (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8769">#8769</a>)
<ul>
<li>Special Thanks: <a
href="https://github.com/joybestourous"><code>@​joybestourous</code></a></li>
</ul>
</li>
<li>server: Propagate status detail headers, if available, when
terminating a stream during request header processing. (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8754">#8754</a>)
<ul>
<li>Special Thanks: <a
href="https://github.com/joybestourous"><code>@​joybestourous</code></a></li>
</ul>
</li>
</ul>
<h1>Performance Improvements</h1>
<ul>
<li>credentials/alts: Optimize read buffer alignment to reduce copies.
(<a
href="https://redirect.github.com/grpc/grpc-go/issues/8791">#8791</a>)</li>
<li>mem: Optimize pooling and creation of <code>buffer</code> objects.
(<a
href="https://redirect.github.com/grpc/grpc-go/issues/8784">#8784</a>)</li>
<li>transport: Reduce slice re-allocations by reserving slice capacity.
(<a
href="https://redirect.github.com/grpc/grpc-go/issues/8797">#8797</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/grpc/grpc-go/commit/dda86dbd9cecb8b35b58c73d507d81d67761205f"><code>dda86db</code></a>
Change version to 1.79.3 (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8983">#8983</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/72186f163e75a065c39e6f7df9b6dea07fbdeff5"><code>72186f1</code></a>
grpc: enforce strict path checking for incoming requests on the server
(<a
href="https://redirect.github.com/grpc/grpc-go/issues/8981">#8981</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/97ca3522b239edf6813e2b1106924e9d55e89d43"><code>97ca352</code></a>
Changing version to 1.79.3-dev (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8954">#8954</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/8902ab6efea590f5b3861126559eaa26fa9783b2"><code>8902ab6</code></a>
Change the version to release 1.79.2 (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8947">#8947</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/a9286705aa689bee321ec674323b6896284f3e02"><code>a928670</code></a>
Cherry-pick <a
href="https://redirect.github.com/grpc/grpc-go/issues/8874">#8874</a> to
v1.79.x (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8904">#8904</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/06df3638c0bcee88197b1033b3ba83e1eb8bc010"><code>06df363</code></a>
Change version to 1.79.2-dev (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8903">#8903</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/782f2de44f597af18a120527e7682a6670d84289"><code>782f2de</code></a>
Change version to 1.79.1 (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8902">#8902</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/850eccbb2257bd2de6ac28ee88a7172ab6175629"><code>850eccb</code></a>
Change version to 1.79.1-dev (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8851">#8851</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/765ff056b6890f6c8341894df4e9668e9bfc18ef"><code>765ff05</code></a>
Change version to 1.79.0 (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8850">#8850</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/68804be0e78ed0365bb5a576dedc12e2168ed63e"><code>68804be</code></a>
Cherry pick <a
href="https://redirect.github.com/grpc/grpc-go/issues/8864">#8864</a> to
v1.79.x (<a
href="https://redirect.github.com/grpc/grpc-go/issues/8896">#8896</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/grpc/grpc-go/compare/v1.72.2...v1.79.3">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-27 17:23:24 +05:30
NageshbansalandGitHub 9cbc64dc40 feat: introduce catalog command (#86)
#### Feature

- Adds a dedicated catalog command to display available castings
- Removes castings.json artefact logic from the gen command



Related: https://github.com/SigNoz/platform-pod/issues/1868
2026-03-27 16:22:07 +05:30
NageshbansalandGitHub 812d676792 feat: introduce signoz-standalone and fix systemdcasting (#80)
#### Features   
- Add standalone Docker image (docs/standalone/): single container
running all SigNoz components via systemd
  casting
- Add SQLite metastore support in systemd casting (enricher, signoz
molding, forge, cast)
- Add Restart=on-failure with RestartSec=5 to migrator, ingester, and
signoz service templates to remove job readiness checks with
`After`/`Wants`/`Requires`
#### Fixes
                                                                     
- Enable all services before starting any (fixes Unit not found during
start)
- Use --no-block for systemctl start (prevents cast from blocking on
oneshot services)
 #### Refactors                                                 
- Remove inter-service dependency coupling (After=/Requires=/Wants=)
from all service templates; services manage their own readiness via
restart policies and readiness checks
- Move config material paths from configs/<component>/ to
<component>/<kind>/
- Move IsEnabled() checks to forgeCasting dispatcher instead of
individual forge methods
- Simplify discoverAndPrepareServices and startAllService, remove
service categorization map
- Render environment variables (Spec.Env) and ClickHouse DSN in
ingester, migrator, and telemetrystore templates
Related: https://github.com/SigNoz/platform-pod/issues/1522
2026-03-26 23:51:57 +05:30
NageshbansalandGitHub 4a049ac81d docs: better serve docs (#81) 2026-03-26 18:49:03 +05:30
Miguel ValdesandGitHub 6373e5dcf6 feat(terraform): inital support for infrastructure (#35) 2026-03-26 00:30:07 +05:30
NageshbansalandGitHub 6119af52de fix: fix enabled flag being ignored for moldings (#79)
## Summary

- Fix `enabled: false` being silently ignored when it's the only field
set on a molding
- Change `MoldingSpec.Enabled` from `bool` to `*bool` to distinguish
"not set" (`nil`) from "explicitly disabled" (`&false`)
- Add casting config tests covering the `enabled` field merge behavior


Related: https://github.com/SigNoz/platform-pod/issues/1868
2026-03-25 23:26:54 +05:30
NageshbansalandGitHub 21e4a74a15 chore: standardize title for the issue templates (#78)
#### Chores

- Use `[label]` instead of `()`
- Use enhancement, casting label for casting request


Related: https://github.com/SigNoz/platform-pod/issues/1868
2026-03-25 15:13:39 +05:30
NageshbansalandGitHub 88c03a80d0 feat(castings): adds ecsec2terraform casting (#75)
#### Features

- Adds forge for the ecs ec2 terraform casting
- Adds cast for terraform 
- Adds tooler for terraform

Related: https://github.com/SigNoz/platform-pod/issues/1772
2026-03-25 01:10:58 +05:30
Hanzo Dev 90c1756c33 chore: bump Go 1.26.1 2026-03-22 14:22:01 -07:00
NageshbansalandGitHub 223bfdfa35 chore: disable blank issue template (#77)
#### Chores

- disable blank issue template
2026-03-22 16:40:03 +05:30
NageshbansalandGitHub ea07760111 chore: add issues templates (#64) 2026-03-22 15:15:42 +05:30
Miguel ValdesandGitHub 5804a59fd5 feat(foundryctl): coolify initial templates (#69)
#### Features
- Includes coolify templates
- Produces the needed files to deploy in coolify
- Wires the vendor into the casting and models.
2026-03-21 00:34:03 +05:30
NageshbansalandGitHub 968c505f6d feat(casting): adds k8shelmcasting (#66)
#### Features

- Adds k8shelm casting
- Introduce foundry terms for charts

Related: https://github.com/SigNoz/platform-pod/issues/1707
2026-03-20 00:56:44 +05:30
NageshbansalandGitHub 7e8d842632 fix: fixes across dockercompose casting (#76)
#### Fixes

- Fix enricher MetaStore port from 9000 to 5432 (PostgreSQL) and
ingester port from 9000 to 4317 (OTLP
  gRPC)
- Add env var support for all services from Spec.Env (populated by
moldings) instead of hardcoding
- Use enricher-provided SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN env for
ingester and migrator instead of
hardcoded DSN in command args
- Add opamp.yaml and functions.yaml config mounts (generated by moldings
but previously not mounted)
- Update ingester command to use migrate sync check + opamp config
pattern
- Update migrator command to use ready && bootstrap && sync up && async
up pattern
- Add restart policies for ingester and signoz services
- Fix telemetrystore config template to use YAML list for replicas
(avoids duplicate key error with
replicas > 1) (mapping was broken during this
https://github.com/SigNoz/foundry/pull/27 )
- Fix telemetrystore molding getData replica count: use Replicas + 1 to
match compose template semantics
- Align config output paths to include component Kind (e.g.
telemetrykeeper/clickhousekeeper/)
2026-03-19 15:59:56 +05:30
NageshbansalandGitHub 25c2af27af feat: update LICENSE to AGPLv3 (#74)
#### Features

- update LICENSE to AGPLv3
2026-03-18 20:41:23 +05:30
NageshbansalandGitHub c76042bdc9 feat(casting): adds dockerswarm casting (#71)
#### Features

- adds docker swarm casting

Related: https://github.com/SigNoz/platform-pod/issues/1779
2026-03-18 19:46:07 +05:30
NageshbansalandGitHub f95b3cb4ce feat(casting): adds k8skustomize casting (#67)
#### Features

- adds kubernets kustomize casting
- add examples for knobs, knobs with patches, patches and default
installation

Related: https://github.com/SigNoz/platform-pod/issues/1778
2026-03-18 19:28:57 +05:30
NageshbansalandGitHub c8a34bdcef feat(casting): adds railwaytemplate casting (#70)
#### Features

- adds railwaytemplate casting
- fix merge spec and status
- allows to override moldings configuration

Related: https://github.com/SigNoz/platform-pod/issues/1777
2026-03-18 01:38:05 +05:30
NageshbansalandGitHub 6ca385232d feat: introduce spec.patches, and remove config.knobs, patch (#73)
### Summary

- Replace the three-tier model (`spec` + `config.knobs` + top-level
`patches`) with a two-tier model (`spec` + `spec.patches`)
- `spec` is the application domain (Foundry understands it),
`spec.patches` is the platform domain (Foundry applies it as-is)
- Add JSON Patch (RFC 6902) as the default patch driver with a driver
architecture for future extensibility


  ### Features

- Introduce `spec.patches` for applying JSON Patch (RFC 6902) operations
to generated materials during forge
- Add `PatchEntry` and `PatchOperation` API types with schema tags
(`default`, `example`, `examples`)
- Add `internal/patch/` package with driver interface and
`internal/patch/jsonpatch/` implementation
- Add `Patchers map[string]patch.Patch` driver registry on Foundry
struct with per-entry dispatch in forge
- Add `Material.WithContents()` for creating patched materials
preserving path and format
  - Support target matching by exact path and glob pattern


Related: https://github.com/SigNoz/platform-pod/issues/1778
2026-03-17 18:29:05 +05:30
NageshbansalandGitHub 989a3cc035 feat: introduce knobs, patches and multi-doc yaml (#68)
## Summary

- **Add `knobs` (`config.knobs`)**: per-component, platform-specific
overrides as `map[string]any`. Each casting validates supported knobs at
forge time (e.g., kustomize casting validates against `KustomizeKnobs`
struct covering resources, tolerations, nodeSelector, affinity, storage,
service config, pod annotations/labels, etc.)
- **Add `patches` (top-level patches on `Casting`)**: casting-wide
escape hatch for overriding any generated resource. For kustomize,
patches render into the root `kustomization.yaml` and are processed
natively by kustomize. Patch file paths are resolved relative to the
kustomize directory at forge time.
- **Add `toYaml` template function**: renders structured data (knobs,
patches) from Go maps into YAML within templates.
- **Add multi-doc YAML support in `Material`**: switches from
`k8s.io/apimachinery/pkg/util/yaml` to `sigs.k8s.io/kustomize/kyaml` for
correct handling of `---`-separated YAML documents (required by
clickhouse operator configmaps).
- **Add `GetPath()`/`GetName()` accessors on `Template`**: used by
kustomize casting to derive output paths from template paths.
- **Update JSON schema and casting docs**

## Design: Three-Part Override Architecture

| Layer | Purpose |
|---|---|
| `spec.<component>.spec` | Foundry-domain config (image, replicas, env,
etc.) |
| `spec.<component>.spec.config.knobs` | Platform knobs
(`map[string]any`, validated per casting) |
| `patches` | Casting-wide escape hatch (top-level, platform handles
application) |

Knobs handle the common **80%** (resources, tolerations, storage,
service type). Patches handle the remaining **20%** where knobs don't
reach - users accept they need to know the generated output structure.

## Examples

### Knobs - per-component platform overrides
```yaml
spec:
  deployment:
    mode: kubernetes
    flavor: kustomize
  signoz:
    spec:
      config:
        knobs:
          resources:
            requests:
              cpu: "500m"
              memory: "512Mi"
            limits:
              cpu: "1"
              memory: "1Gi"
          nodeSelector:
            node-role: observability
          serviceType: LoadBalancer
          storageSize: "50Gi"
          storageClass: gp3
  metastore:
    kind: postgres
    spec:
      config:
        knobs:
          storageSize: "20Gi"
```

### Patches - escape hatch for anything knobs don't cover
```yaml
patches:
  - path: patches/ingester-hpa.yaml
```

Where `patches/ingester-hpa.yaml`:
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: signoz-prod-ingester
spec:
  template:
    spec:
      containers:
        - name: ingester
          resources:
            limits:
              memory: "4Gi"
```

Related: https://github.com/SigNoz/platform-pod/issues/1707,
https://github.com/SigNoz/platform-pod/issues/1778
2026-03-16 17:16:08 +05:30
Hanzo Dev 6d043a4a2c fix: correct Go module path and broken identifiers
- Module path: github.com/o11y/foundry → github.com/hanzoai/o11y-foundry
- Fix 'Hanzo O11y' (space) → 'HanzoO11y' in Go struct/func names
- Rename signozmolding/ → o11ymolding/
- All tests pass
2026-03-12 01:49:23 -07:00
Hanzo Dev 88e4784e84 feat: rebrand SigNoz Foundry → Hanzo O11y Foundry
- Go module: github.com/SigNoz/signoz-foundry → github.com/hanzoai/o11y-foundry
- All deployment templates, configs, docs rebranded
- signoz → o11y, ClickHouse → Hanzo Datastore
- SIGNOZ_* env vars → HANZO_*
2026-03-12 00:21:35 -07:00
tuxuserandGitHub 625ff78794 docs: fix custom binary annontation for systemd casting(#63)
#### Fixes

- Syncs the yaml example of systemd-deployment metadata with the actual
field-name given in the table above.

Outdated name: `metastore-binary-path`
Updated name: `metastore-postgres-binary-path`
2026-02-19 19:41:27 +05:30
NageshbansalandGitHub b65de7afb6 docs: pin the version to latest in readme (#62)
## Docs

Pin the version to the latest for binary fetching commands in the readme
2026-02-16 20:05:40 +05:30
NageshbansalandGitHub 5ce95470e0 fix: adds pours in examples (#61)
#### Fixes

- Fixes to add pours in examples/


Related: https://github.com/SigNoz/platform-pod/issues/1594
2026-02-05 01:54:58 +05:30
NageshbansalandGitHub 20aff211c9 feat: add download binary intstructions for macos and windows (#60)
#### Features

- Adds instructions for downloading binaries for macos and Windows

Related:  https://github.com/SigNoz/platform-pod/issues/1594

_NOTE_: Pinning the version to `v0.0.1-rc.2` because the latest tag
doesn't work with pre-releases. We will remove the pinned version once
we do a release.
2026-02-04 19:14:59 +05:30
NageshbansalandGitHub b55c1a1566 fix: fix dockerfile.multi-arch (#59)
#### Fixes

- fix copy binary command in dokcerfile.multi-arch


Related: https://github.com/SigNoz/platform-pod/issues/1594
2026-02-03 23:11:59 +05:30
NageshbansalandGitHub 90dad864cd feat: add LICENSE (#58)
#### Features

- Add LICENSE

Related: https://github.com/SigNoz/platform-pod/issues/1594
2026-02-03 22:57:43 +05:30
NageshbansalandGitHub 2952de48b0 refactors: move assests and examples to docs (#57)
#### Refactors

- Move the `examples/` to `docs/examples`
- Update the references to `docs/examples`

related: https://github.com/SigNoz/platform-pod/issues/1594
2026-02-03 21:20:39 +05:30
NageshbansalandGitHub 82b4de130d feat: add windows builder and update docker tag (#55)
#### Features

- Add support for windows builder in goreleaser  pipeline
- Add `foundryctl` tag for docker images
- Include `pre-release` in badge


Related: https://github.com/SigNoz/platform-pod/issues/1594
2026-02-03 20:17:39 +05:30
NageshbansalandGitHub 786511fc1b feat: add download binary instructions in readme (#54)
#### Features

- Add curl command for downloading and extracting the binary


Related: https://github.com/SigNoz/platform-pod/issues/1594
2026-02-02 19:33:40 +05:30
NageshbansalandGitHub 5216a08d53 feat: adds Dockerfile.multi-arch (#53)
#### Features

- Add dockerfile.multi-arch

Related: https://github.com/SigNoz/platform-pod/issues/1594
2026-02-02 19:17:15 +05:30
NageshbansalandGitHub e6f5a9329c feat: add build workflow (#52)
#### Features

- Adds more description and examples to schema


Related: https://github.com/SigNoz/platform-pod/issues/1594
2026-02-02 12:59:53 +00:00
NageshbansalandGitHub 19091e58a0 feat(examples): adds guide for systemd casting usage (#47)
#### Features

- adds instructions on prerequisites or tools needed to be installed for
systemd casting

Related: https://github.com/SigNoz/platform-pod/issues/1594
2026-02-02 18:27:47 +05:30
PandeyandGitHub e753c01143 feat: add jsonschema of v1alpha1 (#51)
#### Features

- add jsonschema of v1alpha1

#### Refactors

- refactor into docs directory
2026-01-29 19:42:34 +05:30
NageshbansalandGitHub c3680cc362 fix: cleans example (#50)
#### Fix

- Cleans the docker compose examples

Related: https://github.com/SigNoz/platform-pod/issues/1594
2026-01-29 18:39:27 +05:30
Miguel ValdesandGitHub 827bcf79b1 feat(docker): include migrations for compose stack (#45)
#### Features
- Includes the migrations needed for Signoz to start properly
- Migrations depend on ClickHouse fully up and Signoz on migrations to
fully initialize

#### Fixes

- <Add Fix>

#### Refactors

- <Add Refactor>

#### Tests

- <Add Test>

#### Chores

- <Add Chore>
2026-01-28 11:01:45 -06:00
NageshbansalandGitHub f7aa768241 fix: fix examples and opamp configs (#49)
#### Fixes

- Fix opamp address across all castings
- Use annotations for binary detection
- Fix container names taking every molding address for "signoz"
identifier

Related: https://github.com/SigNoz/platform-pod/issues/1594
2026-01-28 21:51:40 +05:30
NageshbansalandGitHub 637c1e5081 feat(api): add support for annotations (#48)
#### Features

- Adds support for annotations in metadata
- Adds support for overriding the binaries path for systemd casting

Related: https://github.com/SigNoz/platform-pod/issues/1594
2026-01-28 20:02:32 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
9c823374af chore(deps): bump golang.org/x/crypto from 0.44.0 to 0.45.0 (#17)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from
0.44.0 to 0.45.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/golang/crypto/commit/4e0068c0098be10d7025c99ab7c50ce454c1f0f9"><code>4e0068c</code></a>
go.mod: update golang.org/x dependencies</li>
<li><a
href="https://github.com/golang/crypto/commit/e79546e28b85ea53dd37afe1c4102746ef553b9c"><code>e79546e</code></a>
ssh: curb GSSAPI DoS risk by limiting number of specified OIDs</li>
<li><a
href="https://github.com/golang/crypto/commit/f91f7a7c31bf90b39c1de895ad116a2bacc88748"><code>f91f7a7</code></a>
ssh/agent: prevent panic on malformed constraint</li>
<li><a
href="https://github.com/golang/crypto/commit/2df4153a0311bdfea44376e0eb6ef2faefb0275b"><code>2df4153</code></a>
acme/autocert: let automatic renewal work with short lifetime certs</li>
<li><a
href="https://github.com/golang/crypto/commit/bcf6a849efcf4702fa5172cb0998b46c3da1e989"><code>bcf6a84</code></a>
acme: pass context to request</li>
<li><a
href="https://github.com/golang/crypto/commit/b4f2b62076abeee4e43fb59544dac565715fbf1e"><code>b4f2b62</code></a>
ssh: fix error message on unsupported cipher</li>
<li><a
href="https://github.com/golang/crypto/commit/79ec3a51fcc7fbd2691d56155d578225ccc542e2"><code>79ec3a5</code></a>
ssh: allow to bind to a hostname in remote forwarding</li>
<li>See full diff in <a
href="https://github.com/golang/crypto/compare/v0.44.0...v0.45.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/crypto&package-manager=go_modules&previous-version=0.44.0&new-version=0.45.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/SigNoz/foundry/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-28 15:44:12 +05:30
NageshbansalandGitHub a05f2d2263 feat(docs): updates readme for foundry (#46)
#### Features

- Adds Readme for the foundry

Related: https://github.com/SigNoz/platform-pod/issues/1594
2026-01-28 14:30:32 +05:30
NageshbansalandGitHub 9d6dc948cf fix(casting/systemd): handle binaries path and use otel-collector for migrations (#43)
#### Fixes

- Run migrations with new signoz-otel-collector not with deprecated
schema-migrator
- Handle binaries path better with the flexibility to allow custom
binaries path

related: https://github.com/SigNoz/platform-pod/issues/1594
2026-01-28 14:28:02 +05:30
Miguel ValdesandGitHub a30857e400 fix(forge): fixes layout to use new pattern (#44)
# Fixes
- Uses the new layout for pours directory structure
- Works with the minimal examples on both docker/linux
2026-01-27 22:37:55 +05:30
NageshbansalandGitHub bc6c74b562 feat(castings/render): adds render casting (#36)
#### Features
- Adds templates for rendercasting
- Adds forge and cast for the rendercasting

Related: https://github.com/SigNoz/platform-pod/issues/1531
2026-01-27 20:16:00 +05:30
NageshbansalandGitHub ea4c17387c fix(castings/systemd): fix environment and config rendering in unit files (#42)
#### Fixes

- Fix environment handler for the ini material in case of unit files for
a stable output for example generation
- Use `Fragement Specifier` instead of abs path for abs path of the
configs


Related: https://github.com/SigNoz/platform-pod/issues/1594
2026-01-27 19:05:29 +05:30
PandeyandGitHub 235f3e9462 feat: add gen command and examples (#41)
#### Features

- add gen command for generating examples
- add CI to check generated files
2026-01-25 14:52:35 +05:30
PandeyandGitHub 69b90e6e90 fix: strongly type addresses (#40)
#### Fixes

- strongly type addresses to prevent nil pointer panics
2026-01-24 01:16:32 +05:30
PandeyandGitHub 3b81fef0e7 chore: enable more linters (#39)
#### Chores

- enable more linters
2026-01-24 00:49:14 +05:30
PandeyandGitHub 54f54be836 refactor: refactor files into more readable code (#37)
#### Refactors

- refactor files into more readable code
- separated kinds into their own files
- introduced `no-gauge` and `no-forge` option in `cast`
2026-01-23 13:01:25 -06:00
Miguel ValdesandGitHub b2e472eeb0 fix(docker): enricher lookup in gjson (#38)
#### Fixes

- Enricher for compose had invalid lookups
- Related to https://github.com/SigNoz/platform-pod/issues/1332
2026-01-24 00:29:23 +05:30
PandeyandGitHub 201bfd3667 feat: add support for lock files in config (#34)
#### Features

- add support for lock files in config
2026-01-22 04:58:06 +05:30
PandeyandGitHub 7308d9f115 chore: remove redundant files and add settings.json (#33)
#### Chores

- remove castings/ from the root package
- add go formatting instructions to settings.json
2026-01-22 02:07:01 +05:30
NageshbansalandGitHub 2f3237ba06 feat: adds systemdcasting cast command (#32)
#### Features

- Adds cast command for systemcasting 

Related: https://github.com/SigNoz/platform-pod/issues/1449
2026-01-22 01:55:08 +05:30
NageshbansalandGitHub 4dd63f278c feat: adds systemdcasting forge command (#31)
#### Features

- Adds a systemd casting, Please keep in mind currently this casting is
only meant for a single replicas and shards across components

Related: https://github.com/SigNoz/platform-pod/issues/1364
2026-01-22 01:47:07 +05:30
NageshbansalandGitHub 60b1f35d3f fix: fix poursPath flag in forge and cast (#30)
#### Fixes

- Fixes the pours path flag for forge and cast
- Pass poursPath in forge and cast being used across templates files

Related: https://github.com/SigNoz/platform-pod/issues/1449
2026-01-22 01:11:32 +05:30
Miguel ValdesandGitHub 9132f231dc feat(cast): docker cast implementation (#29)
#### Features
- Includes the cast command to run docker compose on the manifest in the output path
- Checks for either `docker compose` or `docker-compose`
- Executes a check against `/api/v1/version` and based on return code it fails or succeeds
2026-01-21 23:49:04 +05:30
Miguel ValdesandGitHub 1c699724b3 feat(docker): file generation for docker compose (#27)
#### Features
   - Forge generates compose file
   - Forge generates component files, mounted inside the compose
   - All components must start and signoz starts on port 8080
2026-01-20 19:07:56 +05:30
NageshbansalandGitHub 6174f6c97d feat: adds metastore molding (#26)
#### Features

- Adds ini format
- Adds metastore molding
- Move the configs addition to `.Status` instead of `.Spec`


Related: https://github.com/SigNoz/platform-pod/issues/1396
2026-01-19 18:57:38 +05:30
NageshbansalandGitHub 6210156f86 fix: renames the linuxcasting to systemdcasting (#24)
#### Refactors
- Renames the linuxcasting to systemdcasting


Related: https://github.com/SigNoz/platform-pod/issues/1364
2026-01-16 18:16:34 +05:30
Miguel ValdesandGitHub d8345c673a feat(casting) updating schema to support flavors (#23) 2026-01-15 23:00:44 +05:30
NageshbansalandGitHub b3b7e16c87 feat: adds adresses key for moldings (#21)
#### Features

- Adds `addresses` key in each molding to help specify the various
addresses in Status.Addresses
- Displays the `raft` and `client` addresses in telemetrykeeperstore


Related: https://github.com/SigNoz/platform-pod/issues/1396
2026-01-15 02:57:20 +05:30
NageshbansalandGitHub 6e58f48f7f fix: fix replica/shards rendering and config merge (#19)
#### Fixes

- Fix Config Merge for defaults and overrides for the forge command
- Fix replicas/shards rendering for telemetryStore and telemetryKeeper
2026-01-14 20:50:11 +05:30
NageshbansalandGitHub 88a4e23a9a feat(casting): introduce linux casting (#18)
#### Features

- Adds scaffolding for Linux casting and Go templates for Signoz,
Ingester.


Related: https://github.com/SigNoz/platform-pod/issues/1364
2026-01-13 16:54:10 +05:30
PandeyandGitHub f24792cd2e feat: introduce go types and go templating (#16)
#### Features

- introduce concrete go types
- introduce go templating
2026-01-12 22:30:20 +05:30
Miguel ValdesandGitHub 66855f48c6 feat(docker) docker-compose generation (#11)
#### Features

- **feat(docker) initial setup for docker-compose generation**
2026-01-10 01:15:06 +05:30
PandeyandGitHub fdd83275ff feat(logger): make a cmd logger (#14)
#### Features

- make a cmd logger
2026-01-09 11:42:04 -06:00
NageshbansalandGitHub 3914d17dab feat(moldings): updates schema for clickhouse keeper (#13)
#### Features

- Adds schema and defaults for ClickHouse Keeper:
    - Allows to deploy a standalone or embedded ClickHouse keeper
 - Removes the zookeeper from default, schema and generators

This should basically allows to do following:

1. Embedded Clickhouse keeper in Clickhouse server (default):
```yaml
`casting.yaml`
schemaVersion: v1
platform: linux
components:
  signoz:
    enabled: true
    replicas: 1
    version: "0.105.1"
  clickhouse:
    enabled: true
    replicas: 1
    version: "25.5.6"
  signozOtelCollector:
    enabled: true 
    replicas: 1
    version: "0.129.12"
  postgres:
    enabled: true
    replicas: 1
    version: "15.0"
    config:
      auth:
        postgres_password: "Signoz@123"

```

2. Standalone Clickhouse keeper in Clickhouse server:
```yaml
`casting.yaml`
schemaVersion: v1
platform: linux
components:
  signoz:
    enabled: true
    replicas: 1
    version: "0.105.1"
  clickhouse:
    enabled: true
    replicas: 1
    version: "25.5.6"
    config:
      keeper:  # CH Keeper
        enabled: true
        replicas: 1
  signozOtelCollector:
    enabled: true 
    replicas: 1
    version: "0.129.12"
  postgres:
    enabled: true
    replicas: 1
    version: "15.0"
    config:
      auth:
        postgres_password: "Signoz@123"

```

Related: https://github.com/SigNoz/platform-pod/issues/1373
2026-01-09 19:34:37 +05:30
NageshbansalandGitHub 6ce2e7e5a0 fix(moldings): fix clickhouse configs (#12)
#### Fixes

- The following fixes have been added to the default ClickHouse configs:
   - Remove the top `clickhouse` element from config.yaml and users.yaml
   - Set the correct path for users.yaml in config.yaml
   - Remove invalid config values from users.yaml
   - Refactor custom-function.yaml to address ClickHouse errors
   
  Related: https://github.com/SigNoz/platform-pod/issues/1373
2026-01-07 23:37:45 +05:30
NageshbansalandGitHub f3f73b4e49 feat(forge): adds forge command (#9)
## Description

Adds `forge` command to generate deployment configuration (pours) files
from `casting.yaml` definitions

- **New `forge` subcommand** for configuration generation
- **Component registry system** for managing multiple components  
- **Configurable output directory** (defaults to `./pours`)

### Usage
```bash
foundryctl forge -f casting.yaml
```
2026-01-05 18:50:48 +05:30
Miguel ValdesandGitHub 43aac4ce29 feat(foundryctl) gauge command (#8)
#### Features
- Gauge command validates dependencies
- Gauge command validates dependencies
- Includes example files for showcase and easier development
- Uses args to correctly log debug statements

Related to https://github.com/SigNoz/platform-pod/issues/1448
2025-12-29 22:32:43 +00:00
c76c9601af chore(moldings): adds moldings cue configs and casting schema (#7)
#### Features

- Adds Config Cue defaults and schema files for the following components
   - clickhouse
   - signoz
   - zookeeper
   - otel-collector
- Adds `casting.yaml` schema, incorporating the replicas, config key for
the components
 - Adds validation of `casting.yaml` with `gague` command


Related:
-  https://github.com/SigNoz/platform-pod/issues/1373
- https://github.com/SigNoz/platform-pod/issues/1375

_Notes: does not handle exporting the ports, as it will be covered in
the forge command. This PR focuses on adding defaults and schema for the
configuration files. **The exact files can be exported using the cue
export command manually**_

---------

Co-authored-by: Miguel Valdes <mvaldes@signoz.io>
2025-12-24 17:07:08 +05:30
482 changed files with 39913 additions and 1121 deletions
+126
View File
@@ -0,0 +1,126 @@
name: Bug
description: Report a runtime failure (forge/cast), unexpected behavior, a Casting config issue (merge, defaults, schema), or a Molding config issue (defaults, template rendering).
title: "[bug] <title>"
labels: ["bug"]
body:
- type: dropdown
id: category
attributes:
label: Category
description: What kind of issue is this?
options:
- Runtime (forge/cast failure, unexpected behavior)
- Casting config (merge behavior, missing defaults, schema)
- Molding config (defaults, template rendering, molding-specific)
validations:
required: true
- type: textarea
id: description
attributes:
label: Describe the defect
description: |
Runtime: what went wrong, what command failed.
Casting config: describe the merge/forge behavior, missing defaults, or schema confusion.
Molding config: describe defaults, template rendering, or molding-specific issues.
validations:
required: true
- type: textarea
id: casting_config
attributes:
label: Casting configuration
description: Paste your `casting.yaml` here (remove any sensitive values). Required for Casting/Molding config issues.
render: yaml
validations:
required: false
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: For Casting/Molding config issues, describe how to trigger the problem (e.g., run forge with this config).
placeholder: |
1.
2.
3.
validations:
required: false
- type: textarea
id: expected
attributes:
label: Expected behavior
description: What did you expect Foundry to do? For Casting/Molding config, describe the expected merge/forge result.
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual behavior
description: What actually happened? Include error output or actual `pours/` output.
render: shell
validations:
required: true
- type: textarea
id: debug_output
attributes:
label: Command output
description: Run with `--debug` and paste the full output below (helpful for runtime issues).
placeholder: "foundryctl --debug <command> -f casting.yaml"
render: shell
validations:
required: false
- type: input
id: foundry_version
attributes:
label: Foundry version
placeholder: "e.g., v0.1.0"
validations:
required: true
- type: input
id: os_arch
attributes:
label: OS / Architecture
placeholder: "e.g., macOS arm64, Ubuntu 22.04 amd64"
validations:
required: true
- type: dropdown
id: deployment_mode
attributes:
label: Deployment mode
options:
- docker
- systemd
- render
- kubernetes
- railway
- render
validations:
required: false
- type: dropdown
id: flavor
attributes:
label: Flavor
options:
- compose
- binary
- blueprint
- kustomize
- swarm
validations:
required: false
- type: textarea
id: additional_context
attributes:
label: Additional context
description: Screenshots, links, related docs, or workarounds tried.
validations:
required: false
+92
View File
@@ -0,0 +1,92 @@
name: Casting
description: Request support for a new casting (e.g., Kubernetes, Nomad, a new cloud provider).
title: "[casting] <title>"
labels: ["casting", "enhancement"]
body:
- type: input
id: platform
attributes:
label: Deployment platform
description: What new deployment platform should Foundry support?
placeholder: "e.g., AWS, GCP, Render, Railway etc."
validations:
required: false
- type: input
id: mode
attributes:
label: Deployment mode
description: What new deployment mode should Foundry support
placeholder: "e.g., Kubernetes, Docker, Systemd"
validations:
required: true
- type: input
id: flavour
attributes:
label: Deployment flavor
description: What new deployment mode should Foundry support
placeholder: "e.g., Kustomize, Compose, Binary"
validations:
required: true
- type: textarea
id: why
attributes:
label: Why this Casting?
description: Describe the use case. Who benefits and what environment does it target?
validations:
required: true
- type: textarea
id: casting_config
attributes:
label: Proposed Casting configuration
description: Show how a user would configure this deployment mode in their `casting.yaml`.
render: yaml
placeholder: |
apiVersion: v1alpha1
metadata:
name: signoz
spec:
deployment:
mode: <new-mode>
flavor: <new-flavor>
validations:
required: false
- type: textarea
id: pours_structure
attributes:
label: Expected Pours structure
description: What files would be generated under `pours/` for this deployment mode?
placeholder: |
pours/
└── deployment/
└── ...
validations:
required: false
- type: textarea
id: tooling
attributes:
label: Tooling requirements
description: What tools or CLIs need to be present (checked by `foundryctl gauge`)?
validations:
required: false
- type: textarea
id: references
attributes:
label: References
description: Links to platform docs, examples, or prior art.
validations:
required: false
- type: textarea
id: additional_context
attributes:
label: Additional context
description: Any constraints, limitations, or relevant discussion.
validations:
required: false
+8
View File
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: SigNoz Slack Community
url: https://signoz.io/slack
about: Ask questions and get help from the SigNoz community.
- name: SigNoz Documentation
url: https://signoz.io/docs/
about: Read the SigNoz docs for guides and reference material.
+48
View File
@@ -0,0 +1,48 @@
name: Distribution
description: Request a new way to install or distribute foundryctl.
title: "[distribution] <title>"
labels: ["distribution", "enhancement"]
body:
- type: input
id: platform
attributes:
label: Target platforms
description: What OS and architectures should this support?
placeholder: "e.g., Linux (amd64, arm64), macOS (amd64, arm64), Windows"
validations:
required: false
- type: textarea
id: install_command
attributes:
label: Proposed install command
description: Show how a user would install foundryctl with this method.
render: bash
placeholder: |
curl -LsSf https://signoz.io/foundry/install.sh | sh
validations:
required: false
- type: textarea
id: motivation
attributes:
label: Motivation
description: Who benefits and what problem does it solve over existing methods?
validations:
required: true
- type: textarea
id: additional_context
attributes:
label: Additional Context
description: Implementation notes, nice-to-haves, or any other relevant context.
validations:
required: false
- type: textarea
id: references
attributes:
label: References
description: Links to similar installers, package registry docs, or prior art.
validations:
required: false
+44
View File
@@ -0,0 +1,44 @@
name: Feature Request
description: Suggest a new capability, improvement, or CLI enhancement for Foundry.
title: "[enhancement] <title>"
labels: ["enhancement"]
body:
- type: textarea
id: summary
attributes:
label: Summary
description: A short, one-line description of what you'd like Foundry to do.
validations:
required: true
- type: textarea
id: motivation
attributes:
label: Motivation
description: Why is this useful? What problem does it solve or workflow does it improve?
validations:
required: true
- type: textarea
id: proposed_solution
attributes:
label: Proposed solution
description: Describe the behavior you'd like. Include example commands, flags, or config snippets if relevant.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Have you tried working around this? Are there other approaches you considered?
validations:
required: false
- type: textarea
id: additional_context
attributes:
label: Additional context
description: Any related issues, links, or screenshots.
validations:
required: false
+19
View File
@@ -0,0 +1,19 @@
name: General
description: For issues that don't fit the Bug, Feature Request, or Casting templates.
labels: ["uncategorised"]
body:
- type: textarea
id: description
attributes:
label: Description
description: Describe your issue, question, or suggestion in detail.
validations:
required: true
- type: textarea
id: additional_context
attributes:
label: Additional context
description: Any relevant links, screenshots, logs, or references.
validations:
required: false
+9
View File
@@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1280" height="640" viewBox="0 0 1280 640" role="img" aria-label="o11y-foundry">
<rect width="1280" height="640" fill="#0A0A0A"/>
<svg x="96" y="215" width="210" height="210" viewBox="0 0 67 67"><path d="M22.21 67V44.6369H0V67H22.21Z" fill="#fff"/><path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#fff"/><path d="M22.21 0H0V22.3184H22.21V0Z" fill="#fff"/><path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#fff"/><path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#fff"/></svg>
<text x="378" y="276" font-family="Inter,system-ui,-apple-system,sans-serif" font-size="78" font-weight="800" letter-spacing="-2" fill="#ffffff">o11y-foundry</text>
<text x="378" y="322" font-family="Inter,system-ui,sans-serif" font-size="30" fill="#ffffff" opacity=".66">Foundry is a centralized hub for SigNoz installation configurations and…</text>
<rect x="378" y="338" width="806" height="3" rx="1.5" fill="#ffffff" opacity=".9"/>
<text x="378" y="390" font-family="Inter,system-ui,sans-serif" font-size="24" font-weight="600" fill="#ffffff" opacity=".5">github.com/hanzoai</text>
<text x="1184" y="390" text-anchor="end" font-family="Inter,system-ui,sans-serif" font-size="24" font-weight="600" fill="#ffffff" opacity=".5">hanzo.ai</text>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

+79
View File
@@ -0,0 +1,79 @@
name: build
on:
push:
tags:
- v*
permissions:
contents: write
id-token: write
env:
MAKE: make --no-print-directory --makefile=.primus/src/make/main.mk
jobs:
prepare:
runs-on: hanzo-build-linux-amd64
outputs:
version: ${{ steps.build-info.outputs.version }}
hash: ${{ steps.build-info.outputs.hash }}
steps:
- name: self-checkout
uses: actions/checkout@v4
- id: token
name: github-token-gen
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.PRIMUS_APP_ID }}
private-key: ${{ secrets.PRIMUS_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: primus-checkout
uses: actions/checkout@v4
with:
repository: signoz/primus
ref: main
path: .primus
token: ${{ steps.token.outputs.token }}
- name: build-info
id: build-info
run: |
echo "version=$($MAKE info-version)" >> $GITHUB_OUTPUT
echo "hash=$($MAKE info-commit-short)" >> $GITHUB_OUTPUT
docker:
uses: o11y/primus.workflows/.github/workflows/go-build.yaml@main
secrets: inherit
with:
PRIMUS_REF: main
GO_BUILD_CONTEXT: ./cmd/foundryctl
GO_VERSION: 1.25
GO_BUILD_FLAGS: >-
-ldflags='-s -w
-X github.com/signoz/foundry/internal/version.version=${{ needs.prepare.outputs.version }}
-X github.com/signoz/foundry/internal/version.hash=${{ needs.prepare.outputs.hash }}
-X github.com/signoz/foundry/internal/ledger.key=YPscRxkyHv2Fn0aOucmLrMYBBVAC1AFu'
GO_NAME: foundryctl
DOCKER_BASE_IMAGES: '{"distroless":"gcr.io/distroless/base:latest"}'
DOCKER_DOCKERFILE_PATH: Dockerfile.multi-arch
DOCKER_MANIFEST: true
DOCKER_PROVIDERS: dockerhub
binary:
runs-on: hanzo-build-linux-amd64
steps:
- name: self-checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: go-install
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.GO_VERSION }}
- name: run-goreleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser-pro
version: '~> v2'
args: release --clean
workdir: ${{ matrix.workdirs }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
+68 -4
View File
@@ -13,25 +13,41 @@ jobs:
if: |
(github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) ||
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test'))
uses: signoz/primus.workflows/.github/workflows/go-fmt.yaml@main
uses: o11y/primus.workflows/.github/workflows/go-fmt.yaml@main
secrets: inherit
with:
PRIMUS_REF: main
GO_VERSION: 1.25
sh-fmt:
if: |
(github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) ||
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test'))
uses: signoz/primus.workflows/.github/workflows/sh-fmt.yaml@main
secrets: inherit
with:
PRIMUS_REF: main
lint:
if: |
(github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) ||
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test'))
uses: signoz/primus.workflows/.github/workflows/go-lint.yaml@main
uses: o11y/primus.workflows/.github/workflows/go-lint.yaml@main
secrets: inherit
with:
PRIMUS_REF: main
GO_VERSION: 1.25
sh-lint:
if: |
(github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) ||
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test'))
uses: signoz/primus.workflows/.github/workflows/sh-lint.yaml@main
secrets: inherit
with:
PRIMUS_REF: main
test:
if: |
(github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) ||
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test'))
uses: signoz/primus.workflows/.github/workflows/go-test.yaml@main
uses: o11y/primus.workflows/.github/workflows/go-test.yaml@main
secrets: inherit
with:
PRIMUS_REF: main
@@ -41,8 +57,56 @@ jobs:
if: |
(github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) ||
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test'))
uses: signoz/primus.workflows/.github/workflows/go-deps.yaml@main
uses: o11y/primus.workflows/.github/workflows/go-deps.yaml@main
secrets: inherit
with:
PRIMUS_REF: main
GO_VERSION: 1.25
examples:
if: |
(github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) ||
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test'))
runs-on: hanzo-build-linux-amd64
steps:
- name: self-checkout
uses: actions/checkout@v4
- name: go-install
uses: actions/setup-go@v5
with:
go-version: "1.26.4"
- name: gen-examples
run: |
make gen-examples
git diff --compact-summary --exit-code || (echo; echo "Unexpected difference in docs/examples/. Run 'make gen-examples' locally and commit."; exit 1)
schemas:
if: |
(github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) ||
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test'))
runs-on: hanzo-build-linux-amd64
steps:
- name: self-checkout
uses: actions/checkout@v4
- name: go-install
uses: actions/setup-go@v5
with:
go-version: "1.26.4"
- name: gen-schemas
run: |
make gen-schemas
git diff --compact-summary --exit-code || (echo; echo "Unexpected difference in docs/schemas/ directory. Run 'make gen-schemas' locally and commit."; exit 1)
docs:
if: |
(github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork && github.event.pull_request.user.login != 'dependabot[bot]' && ! contains(github.event.pull_request.labels.*.name, 'safe-to-test')) ||
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe-to-test'))
runs-on: hanzo-build-linux-amd64
steps:
- name: self-checkout
uses: actions/checkout@v4
- name: go-install
uses: actions/setup-go@v5
with:
go-version: "1.26.4"
- name: gen-docs
run: |
make gen-docs
git diff --compact-summary --exit-code || (echo; echo "Unexpected difference in README.md. Run 'make gen-docs' locally and commit."; exit 1)
+1 -1
View File
@@ -10,7 +10,7 @@ on:
jobs:
remove:
if: github.event.pull_request.head.repo.fork || github.event.pull_request.user.login == 'dependabot[bot]'
uses: signoz/primus.workflows/.github/workflows/github-label.yaml@main
uses: o11y/primus.workflows/.github/workflows/github-label.yaml@main
secrets: inherit
with:
PRIMUS_REF: main
+10
View File
@@ -56,3 +56,13 @@ Temporary Items
### Primus ###
tmp/
### Foundry ###
pours/
!docs/examples/**/pours/
### VSCode ###
!.vscode/settings.json
### Claude ###
CLAUDE.local.md
+14
View File
@@ -15,9 +15,23 @@ linters:
- unused
- staticcheck
- godot
- gocyclo
- wastedassign
- modernize
settings:
iface:
enable:
- identical
sloglint:
attr-only: true
forbidigo:
forbid:
- pattern: fmt.Errorf
- pattern: ^(fmt\.Print.*|print|println)$
exclusions:
rules:
# ExitCode tests cover the wrap-chain path that fmt.Errorf("%w", ...)
# exercises in real callers; using fmt.Errorf here keeps the test honest.
- path: internal/errors/error_test\.go$
linters:
- forbidigo
+49
View File
@@ -0,0 +1,49 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2
project_name: foundry
before:
hooks:
- go mod tidy
builds:
- id: foundryctl
binary: bin/foundryctl
main: ./cmd/foundryctl
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
goamd64:
- v1
goarm64:
- v8.0
mod_timestamp: "{{ .CommitTimestamp }}"
ldflags:
- -s -w
- -X github.com/signoz/foundry/internal/version.version=v{{ .Version }}
- -X github.com/signoz/foundry/internal/version.hash={{ .ShortCommit }}
- -X github.com/signoz/foundry/internal/ledger.key=YPscRxkyHv2Fn0aOucmLrMYBBVAC1AFu
tags:
- timetzdata
archives:
- formats:
- tar.gz
name_template: >-
{{ .ProjectName }}_{{- .Os }}_{{- .Arch }}
wrap_in_directory: true
strip_binary_directory: false
files:
- src: README.md
dst: README.md
release:
name_template: "v{{ .Version }}"
draft: false
prerelease: auto
+16
View File
@@ -0,0 +1,16 @@
#### Auto generated by make docker-version-debian. DO NOT EDIT! ####
amd64=8af0e5095f9964007f5ebd11191dfe52dcb51bf3afa2c07f055fc5451b78ba0e
unknown=aa26de2aeba103c4f2232de5efe83d2b4522c26fec20c5848c9f16f2aa244b3f
arm=159390659db54d341957fe78ef829de76e5549d0f9fcbb777287bcfc6f6da2f8
unknown=83be97aab0d6eb03517006eea2cd7ecece54c20d3acbfe312d0ff4505dd4c344
arm=0a52c3389a9a13dbeb3f3183578c15dfd712e17dad4feacbe55d224d0f459afa
unknown=728313602cf4214e7e5fd2ab88fa68f2f9a8e11118ec24b04f9f05e93fd443f0
arm64=ee5473f786ff8a4e03409277c276b459b29afa55a84268bef55342c4f705b7ad
unknown=35e1cb927bb44a86ca8799cfe3d482a9e54e31a3995c28887c28bed9c0338bdd
386=02274f94f52336abd6ab4a8471ea09966613910ebaeed622429dc7b4b780e804
unknown=3cc496e7c7df2b166481306e36070238a7644af6b230646688ca3c6f675995a2
mips64le=b5bfd550af6266602aaef6c249baebf2c9835a2d0984013a23471cd8954503ff
ppc64le=8e69db6097e3efc0901fc84af17ea906710ae90b5842d919723eda3518ea6811
unknown=d1dc187105900becbeca525ab9ef08efa3c71cdb4b8c67a2151e3aadc1f57a48
s390x=a54db69bf6707382949f777f5fb8d0651d34a1b8602111a41eee7533e4ce07d8
unknown=57ae880cf756c23f9afd4ef46b418eaae9232ea48f7c994b5c81215b58f226a7
+6
View File
@@ -0,0 +1,6 @@
#### Auto generated by make docker-version-distroless. DO NOT EDIT! ####
amd64=d3082a04d9b60f17e20572f7bbc0a37229ff8320490e943526091830b61baa53
arm64=fb8594e086157043c73a0d9e863ce28ab805e4314d1326d3bc16df66725bcea1
arm=7194d02d6b294e1d26732e949ae799323be6683a47e5d469334fb93e3d9e99e8
s390x=65be1f3507aced6d49dc3ca6b5427b14c852bf04f8c185d4378cbbd08468b815
ppc64le=22b0cd70147c656a138aff69fbea8de2f3fb7351bd1154b8e1466ac68d3c4f37
+6
View File
@@ -0,0 +1,6 @@
{
"[go]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "golang.go"
}
}
Symlink
+1
View File
@@ -0,0 +1 @@
LLM.md
Symlink
+1
View File
@@ -0,0 +1 @@
LLM.md
+19
View File
@@ -0,0 +1,19 @@
ARG DISTROLESS_SHA="pass-a-valid-docker-sha-otherwise-this-will-fail"
# Hanzo-mirrored distroless base. SHA passed in via build-arg is
# preserved verbatim — only the registry/path is changed from gcr.io/*
# to ghcr.io/hanzoai/* so caller pin discipline remains identical.
FROM ghcr.io/hanzoai/debian12:base@sha256:${DISTROLESS_SHA}
LABEL maintainer="o11y"
WORKDIR /usr/local/foundryctl
ARG OS="linux"
ARG ARCH
COPY ./target/${OS}-${ARCH}/foundryctl /usr/local/bin/foundryctl
ENTRYPOINT ["/usr/local/bin/foundryctl"]
# TODO(ghcr-auth): CI workflows building this image must `docker login`
# to ghcr.io/hanzoai with a PAT (secret: GHCR_PULL_TOKEN) — the default
# GITHUB_TOKEN scopes to the repo's own package only.
+664
View File
@@ -0,0 +1,664 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (c) SigNoz Inc.
Copyright (c) 2026 Hanzo O11y Inc.
This program is a derivative work of Foundry by SigNoz Inc.
(https://github.com/SigNoz/foundry) and is distributed under the same
GNU Affero General Public License, Version 3.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
+7
View File
@@ -0,0 +1,7 @@
# o11y-foundry
<h1 align="center" style="border-bottom: none">
<a href="https://o11y.hanzo.ai" target="_blank">
<img alt="Foundry" src="https://github.com/user-attachments/assets/ef9a33f7-12d7-4c94-8908-0a02b22f0c18" width="100" height="100">
</a>
<br>Foundry
+37
View File
@@ -0,0 +1,37 @@
.PHONY: clean gauge forge cast test gen-examples gen-schemas gen-docs docs
FOUNDRYCTL := go run ./cmd/foundryctl
GOTMPL := go run go.opentelemetry.io/build-tools/gotmpl@latest
CASTINGS_JSON = $$(cat docs/examples/castings.json)
NO_LEDGER := "--no-ledger"
clean:
cd pours/deployment && docker compose down --remove-orphans --volumes
cd ../..
rm -rf ./pours
gauge:
$(FOUNDRYCTL) gauge --debug $(NO_LEDGER) -f ./tmp/casting.yaml
forge:
$(FOUNDRYCTL) forge --debug $(NO_LEDGER) -f ./tmp/casting.yaml
cast:
$(FOUNDRYCTL) cast --debug $(NO_LEDGER) -f ./tmp/casting.yaml
test:
make forge
make docker
gen-examples:
$(FOUNDRYCTL) gen --debug $(NO_LEDGER) examples
gen-schemas:
$(FOUNDRYCTL) gen --debug $(NO_LEDGER) schemas
gen-docs:
$(FOUNDRYCTL) catalog --debug $(NO_LEDGER) --format json --output "docs/examples/castings.json"
$(GOTMPL) -b README.md.gotmpl -d "$(CASTINGS_JSON)" -o README.md
$(GOTMPL) -b docs/examples/README.md.gotmpl -d "$(CASTINGS_JSON)" -o docs/examples/README.md
docs: gen-examples gen-schemas gen-docs
+7
View File
@@ -0,0 +1,7 @@
o11y-foundry
Copyright (c) 2026 Hanzo O11y Inc.
This product includes software from Foundry (https://github.com/SigNoz/foundry),
licensed under the GNU Affero General Public License, Version 3:
Copyright (c) SigNoz Inc.
+257 -1
View File
@@ -1 +1,257 @@
# Foundry
<p align="center"><img src=".github/hero.svg" alt="o11y-foundry" width="880"></p>
<h1 align="center" style="border-bottom: none">
<a href="https://o11y.hanzo.ai" target="_blank">
<img alt="Foundry" src="https://github.com/user-attachments/assets/ef9a33f7-12d7-4c94-8908-0a02b22f0c18" width="100" height="100">
</a>
</p>
<h1 align="center" style="border-bottom: none">Foundry</h1>
<p align="center">
<img alt="GitHub Release" src="https://img.shields.io/github/v/release/o11y/foundry?include_prereleases">
<a href="https://golang.org"><img src="https://img.shields.io/badge/Go-1.25+-blue.svg" alt="Go Version"></a>
<p align="center">Foundry is a centralized hub for <a href="https://o11y.hanzo.ai">Hanzo O11y</a> installation configurations and deployments: <strong>integrations for install</strong>. Select yours, configure, and run Hanzo O11y.</p>
## Overview
Just as a metalworking foundry turns raw materials into finished products, Foundry forges your deployment from a single configuration and casts Hanzo O11y to fit your environment.
Foundry abstracts away the complexities of the installation process so you can spend time *using* Hanzo O11y rather than *installing* it.
<p align="center">
<img
src="docs/assets/cli.gif"
alt="Foundry CLI demo"
width="900"
loading="lazy"
style="border-radius: 8px; border: 1px solid #30363d;"
/>
</p>
## Features
- **Multi-platform support**: Deploy Hanzo O11y using Docker Compose, Systemd (bare metal), or Render for flexible installation across environments.
- **Single configuration file**: Configure your entire Hanzo O11y stack with one concise file.
- **Automatic dependency management**: Handles inter-service dependencies
- **Tool validation**: Verify prerequisites before deployment
## Quick start
**1. Install foundryctl**
You can install `foundryctl` by downloading a release from [GitHub Releases](https://github.com/hanzoai/o11y-foundry/releases).
To quickly get the correct binary for your architecture via the command line, run
**Linux:**
```bash
curl -L "https://github.com/Hanzo O11y/foundry/releases/latest/download/foundry_linux_$(uname -m | sed 's/x86_64/amd64/g' | sed 's/aarch64/arm64/g').tar.gz" -o foundry.tar.gz
tar -xzf foundry.tar.gz
```
See [Getting Started](docs/getting-started.md) for manual install options and PATH setup.
```bash
curl -L "https://github.com/Hanzo O11y/foundry/releases/latest/download/foundry_darwin_$(uname -m | sed 's/x86_64/amd64/g' | sed 's/arm64/arm64/g').tar.gz" -o foundry.tar.gz
tar -xzf foundry.tar.gz
```
**Windows (PowerShell):**
```bash
$ARCH = if ($env:PROCESSOR_ARCHITECTURE -eq "ARM64") { "arm64" } else { "amd64" }
Invoke-WebRequest -Uri "https://github.com/Hanzo O11y/foundry/releases/latest/download/foundry_windows_${ARCH}.tar.gz" -OutFile foundry.tar.gz -UseBasicParsing
tar -xzf foundry.tar.gz
```
After extracting, use `foundryctl` from the unpacked directory:
```bash
./foundry/bin/foundryctl <COMMAND> <OPTIONS>
```
**2. Create a Casting**
Create a `casting.yaml` file (see [How to write a casting](docs/casting.md) for the full guide). Minimal example:
```yaml
apiVersion: v1alpha1
metadata:
name: o11y
spec:
deployment:
mode: docker
flavor: compose
```
**3. Deploy**
```bash
foundryctl cast -f casting.yaml
```
Foundry uses a metalworking metaphor: you define a **Casting**, which contains **Moldings** (components), and Foundry **forges** them into **Pours** (generated files).
```mermaid
graph LR
A[📋 casting.yaml<br/>Single Config File] --> B[🔧 foundryctl gauge<br/>Validate Tools]
B --> C[⚒️ foundryctl forge<br/>Generate Deployment Files]
C --> D[🏺 pours/<br/>compose.yaml + configs]
D --> E[🔥 foundryctl cast<br/>Deploy]
E --> F[⚙️ Docker Compose /<br/>Systemd /<br/>Cloud Platform]
F --> G[✨ Hanzo O11y Running<br/>ClickHouse, PostgreSQL,<br/>OTel Collector, Hanzo O11y UI]
style A fill:#FF9900,stroke:#E68A00,stroke-width:3px,color:#000
style D fill:#FDB44B,stroke:#E68A00,stroke-width:3px,color:#000
style G fill:#4E9FFF,stroke:#2A7FD8,stroke-width:3px,color:#fff
style B fill:#1F1F1F,stroke:#FF9900,stroke-width:2px,color:#fff
style C fill:#1F1F1F,stroke:#FF9900,stroke-width:2px,color:#fff
style E fill:#1F1F1F,stroke:#FF9900,stroke-width:2px,color:#fff
style F fill:#2D2D2D,stroke:#4E9FFF,stroke-width:2px,color:#fff
```
### Casting
A Casting is a complete Hanzo O11y deployment definition: one YAML file that Foundry merges with built-in defaults. For a step-by-step guide (metadata, deployment target, moldings, config, and examples), see **[How to write a casting](docs/casting.md)**.
### Examples
| Deployment | Example |
|------------|---------|
| Docker Compose | [examples/docker/compose/](docs/examples/docker/compose/) |
| Systemd (binary) | [examples/systemd/binary/](docs/examples/systemd/binary/) |
| Render Blueprint | [examples/render/blueprint/](docs/examples/render/blueprint/) |
### Moldings
**Moldings** are the individual components that make up a Hanzo O11y deployment:
| Molding | Implementation |
|---------|----------------|
| **TelemetryStore** | ClickHouse |
| **TelemetryKeeper** | ClickHouse Keeper |
| **MetaStore** | PostgreSQL, SQLite |
| **Ingester** | Hanzo O11y OTel Collector |
| **Hanzo O11y** | Hanzo O11y |
### Pours
**Pours** are the generated deployment and configuration files. When you run `forge`, Foundry creates the `pours/` directory containing everything needed to run Hanzo O11y.
```
+-------------------------------------------------------------+
| casting.yaml |
| your single deployment config |
+-----------------------------+-------------------------------+
|
+---------------+---------------+
| | |
v v v
+-----------+ +-----------+ +----------------+
| gauge | | forge | | cast |
|-----------| |-----------| |----------------|
| validate | | generate | | gauge + forge |
| prereqs | | files | | + deploy |
+-----------+ +-----+-----+ +-------+--------+
| |
v |
+----------------------------------+ |
| pours/ | |
|----------------------------------| |
| compose.yaml manifests/ | |
| values.yaml configs/ | |
| render.yaml *.tf.json | |
+-----------------+----------------+ |
| |
+----------+---------+
v
+-------------------------------------------------------------+
| SigNoz Running |
|-------------------------------------------------------------|
| Docker Compose - Swarm - Systemd - Kubernetes - ECS |
| Render - Railway - Coolify |
+-------------------------------------------------------------+
```
`foundryctl cast` runs the full pipeline (gauge + forge + deploy) in one step.
| Term | What it means |
| --- | --- |
| **Casting** | Your deployment config. One YAML file describing what you want. [Learn more](docs/concepts/casting.md) |
| **Moldings** | The SigNoz components (ClickHouse, PostgreSQL, OTel Collector, etc.) that Foundry configures for you. [Learn more](docs/concepts/moldings.md) |
| **Pours** | The generated output files in `pours/`. Structure varies by deployment mode. See [examples](docs/examples/) |
## Examples
| Platform | Mode | Flavor | Example |
| --- | --- | --- | --- |
| - | docker | compose | [docker/compose](docs/examples/docker/compose/) |
| - | docker | swarm | [docker/swarm](docs/examples/docker/swarm/) |
| - | kubernetes | helm | [kubernetes/helm](docs/examples/kubernetes/helm/) |
| - | kubernetes | kustomize | [kubernetes/kustomize](docs/examples/kubernetes/kustomize/) |
| - | systemd | binary | [systemd/binary](docs/examples/systemd/binary/) |
| ecs | ec2 | terraform | [ecs/ec2/terraform](docs/examples/ecs/ec2/terraform/) |
| coolify | - | stack | [coolify/stack](docs/examples/coolify/stack/) |
| railway | - | template | [railway/template](docs/examples/railway/template/) |
| render | - | blueprint | [render/blueprint](docs/examples/render/blueprint/) |
## CLI reference
```
foundryctl [command]
Commands:
gauge Validate required tools for your deployment mode
forge Generate deployment and configuration files
cast Full pipeline: gauge + forge + deploy
gen Generate example casting files for all modes
Flags:
-d, --debug Enable debug logging
-f, --file string Casting file path (default "casting.yaml")
-p, --pours string Output directory (default "./pours")
```
```bash
# Validate tools
foundryctl gauge -f casting.yaml
# Generate files only
foundryctl forge -f casting.yaml
Generates deployment and configuration files based on your Casting:
```bash
foundryctl forge -f casting.yaml -p ./pours
```
### cast
Deploys Hanzo O11y to your target environment. Runs `gauge` and `forge` automatically unless skipped:
```bash
foundryctl cast -f casting.yaml
# Generate examples for all deployment modes
foundryctl gen
```
See [CLI Reference](docs/reference/cli.md) for the full command reference with all flags and examples.
## What's next
- [How to write a casting](docs/casting.md): step-by-step guide to casting files
- [Example configurations](docs/examples/): Docker, systemd, and Render
- [Hanzo O11y documentation](https://o11y.hanzo.ai/docs/): learn more about Hanzo O11y
- [Hanzo O11y Slack](https://o11y.hanzo.ai/slack): community and support
## How can I get help?
- **Issues**: [GitHub Issues](https://github.com/hanzoai/o11y-foundry/issues)
- **Documentation**: [Hanzo O11y Docs](https://o11y.hanzo.ai/docs/)
- **Community**: [Hanzo O11y Slack](https://o11y.hanzo.ai/slack)
**Made with ❤️ for the Hanzo O11y community**
+167
View File
@@ -0,0 +1,167 @@
<p align="center">
<a href="https://signoz.io" target="_blank">
<img alt="Foundry" src="https://github.com/user-attachments/assets/ef9a33f7-12d7-4c94-8908-0a02b22f0c18" width="100" height="100">
</a>
</p>
<h1 align="center" style="border-bottom: none">Foundry</h1>
<p align="center">
<img alt="GitHub Release" src="https://img.shields.io/github/v/release/signoz/foundry?include_prereleases">
<a href="https://golang.org"><img src="https://img.shields.io/badge/Go-1.25+-blue.svg" alt="Go Version"></a>
<p align="center">Foundry is a centralized hub for <a href="https://signoz.io">SigNoz</a> installation configurations and deployments: <strong>integrations for install</strong>. Select yours, configure, and run SigNoz.</p>
## Overview
Just as a metalworking foundry turns raw materials into finished products, Foundry forges your deployment from a single configuration and casts SigNoz to fit your environment.
Foundry abstracts away the complexities of the installation process so you can spend time *using* SigNoz rather than *installing* it.
<p align="center">
<img
src="docs/assets/cli.gif"
alt="Foundry CLI demo"
width="900"
loading="lazy"
style="border-radius: 8px; border: 1px solid #30363d;"
/>
</p>
## Features
- **Multi-platform support**: Deploy SigNoz using Docker Compose, Systemd (bare metal), or Render for flexible installation across environments.
- **Single configuration file**: Configure your entire SigNoz stack with one concise file.
- **Automatic dependency management**: Handles inter-service dependencies
- **Tool validation**: Verify prerequisites before deployment
## Quick start
**1. Install foundryctl**
```bash
curl -fsSL https://signoz.io/foundry.sh | bash
```
See [Getting Started](docs/getting-started.md) for manual install options and PATH setup.
**2. Create a casting**
```yaml
apiVersion: v1alpha1
metadata:
name: signoz
spec:
deployment:
mode: docker
flavor: compose
```
**3. Deploy**
```bash
foundryctl cast -f casting.yaml
```
## How it works
```
+-------------------------------------------------------------+
| casting.yaml |
| your single deployment config |
+-----------------------------+-------------------------------+
|
+---------------+---------------+
| | |
v v v
+-----------+ +-----------+ +----------------+
| gauge | | forge | | cast |
|-----------| |-----------| |----------------|
| validate | | generate | | gauge + forge |
| prereqs | | files | | + deploy |
+-----------+ +-----+-----+ +-------+--------+
| |
v |
+----------------------------------+ |
| pours/ | |
|----------------------------------| |
| compose.yaml manifests/ | |
| values.yaml configs/ | |
| render.yaml *.tf.json | |
+-----------------+----------------+ |
| |
+----------+---------+
v
+-------------------------------------------------------------+
| SigNoz Running |
|-------------------------------------------------------------|
| Docker Compose - Swarm - Systemd - Kubernetes - ECS |
| Render - Railway - Coolify |
+-------------------------------------------------------------+
```
`foundryctl cast` runs the full pipeline (gauge + forge + deploy) in one step.
| Term | What it means |
| --- | --- |
| **Casting** | Your deployment config. One YAML file describing what you want. [Learn more](docs/concepts/casting.md) |
| **Moldings** | The SigNoz components (ClickHouse, PostgreSQL, OTel Collector, etc.) that Foundry configures for you. [Learn more](docs/concepts/moldings.md) |
| **Pours** | The generated output files in `pours/`. Structure varies by deployment mode. See [examples](docs/examples/) |
## Examples
| Platform | Mode | Flavor | Example |
| --- | --- | --- | --- |
{{- range .Castings }}
| {{ or .platform "-" }} | {{ or .mode "-" }} | {{ or .flavor "-" }} | [{{ .example }}](docs/examples/{{ .example }}/) |
{{- end }}
## CLI reference
```
foundryctl [command]
Commands:
gauge Validate required tools for your deployment mode
forge Generate deployment and configuration files
cast Full pipeline: gauge + forge + deploy
gen Generate example casting files for all modes
Flags:
-d, --debug Enable debug logging
-f, --file string Casting file path (default "casting.yaml")
-p, --pours string Output directory (default "./pours")
```
```bash
# Validate tools
foundryctl gauge -f casting.yaml
# Generate files only
foundryctl forge -f casting.yaml
# Full deploy
foundryctl cast -f casting.yaml
# Generate examples for all deployment modes
foundryctl gen
```
See [CLI Reference](docs/reference/cli.md) for the full command reference with all flags and examples.
## What's next
- [Getting Started](docs/getting-started.md) - install and deploy your first SigNoz instance
- [Concepts](docs/concepts/) - understand castings, moldings, and patches
- [Examples](docs/examples/) - deployment configurations for all supported platforms
- [Reference](docs/reference/) - CLI commands and casting file spec
- [SigNoz documentation](https://signoz.io/docs/) - learn more about SigNoz
- [SigNoz Slack](https://signoz.io/slack) - community and support
## How can I get help?
- **Issues**: [GitHub Issues](https://github.com/signoz/foundry/issues)
- **Documentation**: [SigNoz Docs](https://signoz.io/docs/)
- **Community**: [SigNoz Slack](https://signoz.io/slack)
**Made with ❤️ for the SigNoz community**
+12
View File
@@ -0,0 +1,12 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Foundry Casting",
"oneOf": [
{
"$ref": "installation/casting.schema.json"
},
{
"$ref": "collectionagent/casting.schema.json"
}
]
}
+87
View File
@@ -0,0 +1,87 @@
package v1alpha1
import (
"encoding/json"
"errors"
"fmt"
"github.com/swaggest/jsonschema-go"
"go.yaml.in/yaml/v3"
)
var _ yaml.Marshaler = (*Kind)(nil)
var _ yaml.Unmarshaler = (*Kind)(nil)
var _ json.Marshaler = (*Kind)(nil)
var _ json.Unmarshaler = (*Kind)(nil)
var _ fmt.Stringer = (*Kind)(nil)
var _ jsonschema.Enum = (*Kind)(nil)
var (
KindInstallation Kind = Kind{s: "Installation"}
KindCollectionAgent Kind = Kind{s: "CollectionAgent"}
)
// Kind discriminates between top-level casting resource types.
// An empty/missing kind unmarshals to KindInstallation for backwards compatibility
// with casting files written before kind was introduced.
type Kind struct {
s string
}
func (kind Kind) String() string {
return kind.s
}
func Kinds() []Kind {
return []Kind{KindInstallation, KindCollectionAgent}
}
func (kind Kind) MarshalJSON() ([]byte, error) {
return json.Marshal(kind.String())
}
func (kind *Kind) UnmarshalJSON(text []byte) error {
var str string
if err := json.Unmarshal(text, &str); err != nil {
return err
}
return kind.UnmarshalText([]byte(str))
}
func (kind *Kind) UnmarshalText(text []byte) error {
if len(text) == 0 {
*kind = KindInstallation
return nil
}
for _, available := range Kinds() {
if available.String() == string(text) {
*kind = available
return nil
}
}
return errors.New("invalid kind: " + string(text))
}
func (kind Kind) MarshalText() ([]byte, error) {
return []byte(kind.String()), nil
}
func (kind *Kind) UnmarshalYAML(node *yaml.Node) error {
return kind.UnmarshalText([]byte(node.Value))
}
func (kind Kind) MarshalYAML() (any, error) {
return kind.String(), nil
}
func (kind Kind) Enum() []any {
kinds := []any{}
for _, kind := range Kinds() {
kinds = append(kinds, kind.String())
}
return kinds
}
+17
View File
@@ -0,0 +1,17 @@
package v1alpha1
// CastingMeta carries the apiVersion, kind, metadata, and status fields
// shared by every casting kind. Per-Kind Casting structs embed it inline.
type CastingMeta struct {
TypeVersion `json:",inline" yaml:",inline"`
Kind Kind `json:"kind" yaml:"kind" required:"true" description:"Kind of the casting resource."`
Metadata TypeMetadata `json:"metadata" yaml:"metadata" required:"true" description:"Metadata of the casting configuration"`
Status Status `json:"status,omitzero" yaml:"status,omitempty" description:"Status of the casting"`
_ struct{} `additionalProperties:"false"`
}
// Status carries the casting file's checksum.
type Status struct {
Checksum string `json:"checksum" yaml:"checksum" description:"Checksum of the casting file"`
_ struct{} `additionalProperties:"false"`
}
+75
View File
@@ -0,0 +1,75 @@
package collectionagent
import (
"github.com/hanzoai/o11y-foundry/api/v1alpha1"
"github.com/hanzoai/o11y-foundry/internal/domain"
)
// Casting is the CollectionAgent kind.
type Casting struct {
v1alpha1.CastingMeta `json:",inline" yaml:",inline"`
Spec Spec `json:"spec" yaml:"spec" required:"true" description:"CollectionAgent specification"`
_ struct{} `additionalProperties:"false"`
}
// Spec is the CollectionAgent-specific configuration.
type Spec struct {
Deployment v1alpha1.TypeDeployment `json:"deployment" yaml:"deployment" required:"true" description:"Deployment configuration for the platform"`
Patches []v1alpha1.PatchEntry `json:"patches,omitempty" yaml:"patches,omitempty" description:"Patch operations to apply to generated materials"`
Collector Collector `json:"collector,omitzero" yaml:"collector,omitempty" description:"The configuration for the collector molding"`
_ struct{} `additionalProperties:"false"`
}
var _ v1alpha1.Machinery = (*Casting)(nil)
// Default returns a CollectionAgent with the collector molding initialised
// from its default.
func Default() *Casting {
return &Casting{
CastingMeta: v1alpha1.CastingMeta{
TypeVersion: v1alpha1.TypeVersion{APIVersion: "v1alpha1"},
Kind: v1alpha1.KindCollectionAgent,
Metadata: v1alpha1.TypeMetadata{Name: "signoz"},
},
Spec: Spec{
Collector: DefaultCollector(),
},
}
}
// Example returns a minimal CollectionAgent; the forge pipeline fills in
// defaults.
func Example() *Casting {
return &Casting{
CastingMeta: v1alpha1.CastingMeta{
TypeVersion: v1alpha1.TypeVersion{APIVersion: "v1alpha1"},
Kind: v1alpha1.KindCollectionAgent,
Metadata: v1alpha1.TypeMetadata{Name: "signoz"},
},
}
}
// Kind reports the casting kind. Shadows the embedded CastingMeta.Kind field;
// the field stays reachable as c.CastingMeta.Kind.
func (c *Casting) Kind() v1alpha1.Kind {
return v1alpha1.KindCollectionAgent
}
// MergeStatusIntoSpec folds the collector molding's Status into its Spec.
func (c *Casting) MergeStatusIntoSpec() error {
if err := c.Spec.Collector.Spec.MergeStatus(c.Spec.Collector.Status.MoldingStatus); err != nil {
return err
}
return nil
}
// TrackableProperties returns analytics tags for the casting.
func (c *Casting) TrackableProperties() domain.Properties {
return domain.NewProperties().
Set("kind", v1alpha1.KindCollectionAgent.String()).
Set("platform", c.Spec.Deployment.Platform.String()).
Set("mode", c.Spec.Deployment.Mode.String()).
Set("flavor", c.Spec.Deployment.Flavor.String()).
Set("patches_count", len(c.Spec.Patches)).
Set("collector_kind", c.Spec.Collector.Kind.String())
}
@@ -0,0 +1,373 @@
{
"required": [
"apiVersion",
"kind",
"metadata",
"spec"
],
"additionalProperties": false,
"definitions": {
"CollectionagentCollector": {
"additionalProperties": false,
"properties": {
"kind": {
"$ref": "#/definitions/CollectionagentCollectorKind",
"description": "Kind of the collector to use",
"examples": [
"agent"
]
},
"spec": {
"$ref": "#/definitions/V1Alpha1MoldingSpec",
"description": "Specification for the collector"
},
"status": {
"$ref": "#/definitions/CollectionagentCollectorStatus",
"description": "Status of the collector"
}
},
"type": "object"
},
"CollectionagentCollectorKind": {
"enum": [
"agent"
],
"type": "string"
},
"CollectionagentCollectorStatus": {
"additionalProperties": false,
"properties": {
"config": {
"$ref": "#/definitions/V1Alpha1TypeConfig",
"description": "Configuration for the molding"
},
"env": {
"description": "Environment variables for the molding",
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"extras": {
"description": "Extra information about the molding",
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"type": "object"
},
"CollectionagentSpec": {
"required": [
"deployment"
],
"additionalProperties": false,
"properties": {
"collector": {
"$ref": "#/definitions/CollectionagentCollector",
"description": "The configuration for the collector molding"
},
"deployment": {
"$ref": "#/definitions/V1Alpha1TypeDeployment",
"description": "Deployment configuration for the platform"
},
"patches": {
"description": "Patch operations to apply to generated materials",
"items": {
"$ref": "#/definitions/V1Alpha1PatchEntry"
},
"type": "array"
}
},
"type": "object"
},
"V1Alpha1Flavor": {
"enum": [
"compose",
"swarm",
"binary",
"kustomize",
"helm",
"blueprint",
"stack",
"template",
"terraform"
],
"type": "string"
},
"V1Alpha1Kind": {
"enum": [
"CollectionAgent"
],
"type": "string"
},
"V1Alpha1Mode": {
"enum": [
"docker",
"systemd",
"kubernetes",
"ec2"
],
"type": "string"
},
"V1Alpha1MoldingSpec": {
"additionalProperties": false,
"properties": {
"cluster": {
"$ref": "#/definitions/V1Alpha1TypeCluster",
"description": "Cluster configuration for the molding"
},
"config": {
"$ref": "#/definitions/V1Alpha1TypeConfig",
"description": "Configuration for the molding"
},
"enabled": {
"description": "Whether the molding is enabled",
"default": true,
"type": [
"null",
"boolean"
]
},
"env": {
"description": "Environment variables for the molding",
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"image": {
"description": "Container image of the molding",
"examples": [
"ghcr.io/hanzoai/o11y:latest"
],
"type": "string"
},
"version": {
"description": "The version of the molding to use",
"examples": [
"latest"
],
"type": "string"
}
},
"type": "object"
},
"V1Alpha1PatchEntry": {
"required": [
"target",
"operations"
],
"additionalProperties": false,
"properties": {
"operations": {
"description": "JSON Patch (RFC 6902) operations to apply. Used by the jsonpatch driver.",
"items": {
"$ref": "#/definitions/V1Alpha1PatchOperation"
},
"minItems": 1,
"type": [
"array",
"null"
]
},
"target": {
"description": "Target output file to patch",
"examples": [
"compose.yaml",
"signoz/deployment.yaml",
"values.yaml",
"telemetrystore/telemtrystore-clickhouse-0-*.yaml"
],
"minLength": 1,
"type": "string"
},
"type": {
"description": "Patch driver type. Defaults to jsonpatch.",
"default": "jsonpatch",
"examples": [
"jsonpatch"
],
"enum": [
"",
"jsonpatch"
],
"type": "string"
}
},
"type": "object"
},
"V1Alpha1PatchOperation": {
"required": [
"op",
"path"
],
"additionalProperties": false,
"properties": {
"from": {
"description": "Source JSON Pointer for move and copy operations",
"examples": [
"/services/clickhouse/old_field"
],
"pattern": "^/",
"type": "string"
},
"op": {
"description": "JSON Patch (RFC 6902) operation type",
"enum": [
"add",
"remove",
"replace",
"move",
"copy",
"test"
],
"type": "string"
},
"path": {
"description": "JSON Pointer (RFC 6901) to the target location",
"examples": [
"/services/clickhouse/mem_limit"
],
"pattern": "^/",
"type": "string"
},
"value": {
"description": "Value for add, replace, or test operations"
}
},
"type": "object"
},
"V1Alpha1Platform": {
"enum": [
"render",
"coolify",
"railway",
"ecs",
"aws",
"gcp",
"azure"
],
"type": "string"
},
"V1Alpha1Status": {
"additionalProperties": false,
"properties": {
"checksum": {
"description": "Checksum of the casting file",
"type": "string"
}
},
"type": "object"
},
"V1Alpha1TypeCluster": {
"additionalProperties": false,
"properties": {
"replicas": {
"description": "Number of replicas for the molding.",
"examples": [
1
],
"minimum": 0,
"type": [
"null",
"integer"
]
},
"shards": {
"description": "Number of shards for the molding",
"examples": [
1
],
"minimum": 1,
"type": [
"null",
"integer"
]
}
},
"type": "object"
},
"V1Alpha1TypeConfig": {
"additionalProperties": false,
"properties": {
"data": {
"description": "Configuration data as key-value pairs.",
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"type": "object"
},
"V1Alpha1TypeDeployment": {
"additionalProperties": false,
"properties": {
"flavor": {
"$ref": "#/definitions/V1Alpha1Flavor",
"description": "Flavor of mode for the deployment"
},
"mode": {
"$ref": "#/definitions/V1Alpha1Mode",
"description": "Type of installation method"
},
"platform": {
"$ref": "#/definitions/V1Alpha1Platform",
"description": "Provider where an installation runs on"
}
},
"type": "object"
},
"V1Alpha1TypeMetadata": {
"properties": {
"annotations": {
"description": "Unstructured key-value map for arbitrary metadata",
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"name": {
"description": "The name of this installation",
"examples": [
"o11y-dev"
],
"type": "string"
}
},
"type": "object"
}
},
"properties": {
"apiVersion": {
"description": "API Version of the configuration schema.",
"default": "v1alpha1",
"examples": [
"v1alpha1"
],
"enum": [
"v1alpha1"
],
"type": "string"
},
"kind": {
"$ref": "#/definitions/V1Alpha1Kind",
"description": "Kind of the casting resource."
},
"metadata": {
"$ref": "#/definitions/V1Alpha1TypeMetadata",
"description": "Metadata of the casting configuration"
},
"spec": {
"$ref": "#/definitions/CollectionagentSpec",
"description": "CollectionAgent specification"
},
"status": {
"$ref": "#/definitions/V1Alpha1Status",
"description": "Status of the casting"
}
},
"type": "object"
}
+40
View File
@@ -0,0 +1,40 @@
package collectionagent
import "github.com/hanzoai/o11y-foundry/api/v1alpha1"
type Collector struct {
// Kind of the collector to use.
Kind CollectorKind `json:"kind,omitzero" yaml:"kind,omitempty" description:"Kind of the collector to use" examples:"[\"agent\"]"`
// Specification for the collector.
Spec v1alpha1.MoldingSpec `json:"spec" yaml:"spec" description:"Specification for the collector"`
// Status of the collector.
Status CollectorStatus `json:"status" yaml:"status,omitempty" description:"Status of the collector"`
_ struct{} `additionalProperties:"false"`
}
type CollectorStatus struct {
v1alpha1.MoldingStatus `json:",inline" yaml:",inline"`
_ struct{} `additionalProperties:"false"`
}
func DefaultCollector() Collector {
return Collector{
Kind: CollectorKindAgent,
Spec: v1alpha1.MoldingSpec{
Enabled: v1alpha1.BoolPtr(true),
Cluster: v1alpha1.TypeCluster{
Replicas: v1alpha1.IntPtr(1),
},
Version: "v0.139.0",
Image: "otel/opentelemetry-collector-contrib:v0.139.0",
Env: map[string]string{},
Config: v1alpha1.TypeConfig{
Data: map[string]string{},
},
},
}
}
@@ -0,0 +1,81 @@
package collectionagent
import (
"encoding/json"
"errors"
"fmt"
"github.com/swaggest/jsonschema-go"
"go.yaml.in/yaml/v3"
)
var _ yaml.Marshaler = (*CollectorKind)(nil)
var _ yaml.Unmarshaler = (*CollectorKind)(nil)
var _ json.Marshaler = (*CollectorKind)(nil)
var _ json.Unmarshaler = (*CollectorKind)(nil)
var _ fmt.Stringer = (*CollectorKind)(nil)
var _ jsonschema.Enum = (*CollectorKind)(nil)
var (
CollectorKindAgent CollectorKind = CollectorKind{s: "agent"}
)
type CollectorKind struct {
s string
}
func (kind CollectorKind) String() string {
return kind.s
}
func CollectorKinds() []CollectorKind {
return []CollectorKind{CollectorKindAgent}
}
func (kind CollectorKind) MarshalJSON() ([]byte, error) {
return json.Marshal(kind.String())
}
func (kind *CollectorKind) UnmarshalJSON(text []byte) error {
var str string
if err := json.Unmarshal(text, &str); err != nil {
return err
}
return kind.UnmarshalText([]byte(str))
}
func (kind *CollectorKind) UnmarshalText(text []byte) error {
for _, availableKind := range CollectorKinds() {
if availableKind.String() == string(text) {
*kind = availableKind
return nil
}
}
if text == nil {
*kind = CollectorKind{s: ""}
return nil
}
return errors.New("invalid collector kind: " + string(text))
}
func (kind CollectorKind) MarshalText() ([]byte, error) {
return []byte(kind.String()), nil
}
func (kind *CollectorKind) UnmarshalYAML(node *yaml.Node) error {
return kind.UnmarshalText([]byte(node.Value))
}
func (kind CollectorKind) MarshalYAML() (any, error) {
return kind.String(), nil
}
func (kind CollectorKind) Enum() []any {
kinds := []any{}
for _, kind := range CollectorKinds() {
kinds = append(kinds, kind.String())
}
return kinds
}
+18
View File
@@ -0,0 +1,18 @@
package collectionagent
import (
_ "embed"
"github.com/google/jsonschema-go/jsonschema"
"github.com/hanzoai/o11y-foundry/api/v1alpha1"
)
//go:embed casting.schema.json
var schemaJSON []byte
var schema = v1alpha1.MustResolveSchema(schemaJSON)
// Schema returns the resolved JSON schema for a CollectionAgent casting.
func Schema() *jsonschema.Resolved {
return schema
}
@@ -0,0 +1,26 @@
package collectionagent
import (
"encoding/json"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestSchema(t *testing.T) {
t.Parallel()
assert.NotNil(t, Schema())
}
func TestSchemaValidatesDefault(t *testing.T) {
t.Parallel()
contents, err := json.Marshal(Default())
require.NoError(t, err)
var payload map[string]any
require.NoError(t, json.Unmarshal(contents, &payload))
assert.NoError(t, Schema().Validate(payload))
}
+101
View File
@@ -0,0 +1,101 @@
package v1alpha1
import (
"encoding/json"
"errors"
"fmt"
"github.com/swaggest/jsonschema-go"
"go.yaml.in/yaml/v3"
)
var _ yaml.Marshaler = (*Flavor)(nil)
var _ yaml.Unmarshaler = (*Flavor)(nil)
var _ json.Marshaler = (*Flavor)(nil)
var _ json.Unmarshaler = (*Flavor)(nil)
var _ fmt.Stringer = (*Flavor)(nil)
var _ jsonschema.Enum = (*Flavor)(nil)
var (
FlavorCompose Flavor = Flavor{s: "compose"}
FlavorSwarm Flavor = Flavor{s: "swarm"}
FlavorBinary Flavor = Flavor{s: "binary"}
FlavorKustomize Flavor = Flavor{s: "kustomize"}
FlavorHelm Flavor = Flavor{s: "helm"}
FlavorBlueprint Flavor = Flavor{s: "blueprint"}
FlavorStack Flavor = Flavor{s: "stack"}
FlavorTemplate Flavor = Flavor{s: "template"}
FlavorTerraform Flavor = Flavor{s: "terraform"}
)
type Flavor struct {
s string
}
func (flavor Flavor) String() string {
return flavor.s
}
func Flavors() []Flavor {
return []Flavor{
FlavorCompose,
FlavorSwarm,
FlavorBinary,
FlavorKustomize,
FlavorHelm,
FlavorBlueprint,
FlavorStack,
FlavorTemplate,
FlavorTerraform,
}
}
func (flavor Flavor) MarshalJSON() ([]byte, error) {
return json.Marshal(flavor.String())
}
func (flavor *Flavor) UnmarshalJSON(text []byte) error {
var str string
if err := json.Unmarshal(text, &str); err != nil {
return err
}
return flavor.UnmarshalText([]byte(str))
}
func (flavor *Flavor) UnmarshalText(text []byte) error {
for _, available := range Flavors() {
if available.String() == string(text) {
*flavor = available
return nil
}
}
if len(text) == 0 {
*flavor = Flavor{s: ""}
return nil
}
return errors.New("invalid deployment flavor: " + string(text))
}
func (flavor Flavor) MarshalText() ([]byte, error) {
return []byte(flavor.String()), nil
}
func (flavor *Flavor) UnmarshalYAML(node *yaml.Node) error {
return flavor.UnmarshalText([]byte(node.Value))
}
func (flavor Flavor) MarshalYAML() (any, error) {
return flavor.String(), nil
}
func (flavor Flavor) Enum() []any {
flavors := []any{}
for _, flavor := range Flavors() {
flavors = append(flavors, flavor.String())
}
return flavors
}
+86
View File
@@ -0,0 +1,86 @@
package v1alpha1
import (
"encoding/json"
"errors"
"fmt"
"github.com/swaggest/jsonschema-go"
"go.yaml.in/yaml/v3"
)
var _ yaml.Marshaler = (*Mode)(nil)
var _ yaml.Unmarshaler = (*Mode)(nil)
var _ json.Marshaler = (*Mode)(nil)
var _ json.Unmarshaler = (*Mode)(nil)
var _ fmt.Stringer = (*Mode)(nil)
var _ jsonschema.Enum = (*Mode)(nil)
var (
ModeDocker Mode = Mode{s: "docker"}
ModeSystemd Mode = Mode{s: "systemd"}
ModeKubernetes Mode = Mode{s: "kubernetes"}
ModeEC2 Mode = Mode{s: "ec2"}
)
type Mode struct {
s string
}
func (mode Mode) String() string {
return mode.s
}
func Modes() []Mode {
return []Mode{ModeDocker, ModeSystemd, ModeKubernetes, ModeEC2}
}
func (mode Mode) MarshalJSON() ([]byte, error) {
return json.Marshal(mode.String())
}
func (mode *Mode) UnmarshalJSON(text []byte) error {
var str string
if err := json.Unmarshal(text, &str); err != nil {
return err
}
return mode.UnmarshalText([]byte(str))
}
func (mode *Mode) UnmarshalText(text []byte) error {
for _, available := range Modes() {
if available.String() == string(text) {
*mode = available
return nil
}
}
if len(text) == 0 {
*mode = Mode{s: ""}
return nil
}
return errors.New("invalid deployment mode: " + string(text))
}
func (mode Mode) MarshalText() ([]byte, error) {
return []byte(mode.String()), nil
}
func (mode *Mode) UnmarshalYAML(node *yaml.Node) error {
return mode.UnmarshalText([]byte(node.Value))
}
func (mode Mode) MarshalYAML() (any, error) {
return mode.String(), nil
}
func (mode Mode) Enum() []any {
modes := []any{}
for _, mode := range Modes() {
modes = append(modes, mode.String())
}
return modes
}
+97
View File
@@ -0,0 +1,97 @@
package v1alpha1
import (
"encoding/json"
"errors"
"fmt"
"github.com/swaggest/jsonschema-go"
"go.yaml.in/yaml/v3"
)
var _ yaml.Marshaler = (*Platform)(nil)
var _ yaml.Unmarshaler = (*Platform)(nil)
var _ json.Marshaler = (*Platform)(nil)
var _ json.Unmarshaler = (*Platform)(nil)
var _ fmt.Stringer = (*Platform)(nil)
var _ jsonschema.Enum = (*Platform)(nil)
var (
PlatformRender Platform = Platform{s: "render"}
PlatformCoolify Platform = Platform{s: "coolify"}
PlatformRailway Platform = Platform{s: "railway"}
PlatformECS Platform = Platform{s: "ecs"}
PlatformAWS Platform = Platform{s: "aws"}
PlatformGCP Platform = Platform{s: "gcp"}
PlatformAzure Platform = Platform{s: "azure"}
)
type Platform struct {
s string
}
func (platform Platform) String() string {
return platform.s
}
func Platforms() []Platform {
return []Platform{
PlatformRender,
PlatformCoolify,
PlatformRailway,
PlatformECS,
PlatformAWS,
PlatformGCP,
PlatformAzure,
}
}
func (platform Platform) MarshalJSON() ([]byte, error) {
return json.Marshal(platform.String())
}
func (platform *Platform) UnmarshalJSON(text []byte) error {
var str string
if err := json.Unmarshal(text, &str); err != nil {
return err
}
return platform.UnmarshalText([]byte(str))
}
func (platform *Platform) UnmarshalText(text []byte) error {
for _, available := range Platforms() {
if available.String() == string(text) {
*platform = available
return nil
}
}
if len(text) == 0 {
*platform = Platform{s: ""}
return nil
}
return errors.New("invalid deployment platform: " + string(text))
}
func (platform Platform) MarshalText() ([]byte, error) {
return []byte(platform.String()), nil
}
func (platform *Platform) UnmarshalYAML(node *yaml.Node) error {
return platform.UnmarshalText([]byte(node.Value))
}
func (platform Platform) MarshalYAML() (any, error) {
return platform.String(), nil
}
func (platform Platform) Enum() []any {
platforms := []any{}
for _, platform := range Platforms() {
platforms = append(platforms, platform.String())
}
return platforms
}
+99
View File
@@ -0,0 +1,99 @@
package installation
import (
"github.com/hanzoai/o11y-foundry/api/v1alpha1"
"github.com/hanzoai/o11y-foundry/internal/domain"
)
// Casting is the Installation kind.
type Casting struct {
v1alpha1.CastingMeta `json:",inline" yaml:",inline"`
Spec Spec `json:"spec" yaml:"spec" required:"true" description:"Installation specification"`
_ struct{} `additionalProperties:"false"`
}
// Spec is the Installation-specific configuration.
type Spec struct {
Deployment v1alpha1.TypeDeployment `json:"deployment" yaml:"deployment" required:"true" description:"Deployment configuration for the platform"`
Patches []v1alpha1.PatchEntry `json:"patches,omitempty" yaml:"patches,omitempty" description:"Patch operations to apply to generated materials"`
Infrastructure Infrastructure `json:"infrastructure,omitzero" yaml:"infrastructure,omitzero" description:"Infrastructure configuration for generating infrastructure manifests (e.g., Terraform)."`
O11y v1alpha1.HanzoO11y `json:"o11y,omitzero" yaml:"o11y,omitempty" description:"The configuration for the HanzoO11y molding"`
TelemetryStore TelemetryStore `json:"telemetrystore,omitzero" yaml:"telemetrystore,omitempty" description:"The configuration for the telemetry store molding"`
TelemetryKeeper TelemetryKeeper `json:"telemetrykeeper,omitzero" yaml:"telemetrykeeper,omitempty" description:"The configuration for the telemetry keeper molding"`
MetaStore MetaStore `json:"metastore,omitzero" yaml:"metastore,omitempty" description:"The configuration for the meta store molding"`
Ingester Ingester `json:"ingester,omitzero" yaml:"ingester,omitempty" description:"The configuration for the ingester molding"`
_ struct{} `additionalProperties:"false"`
}
var _ v1alpha1.Machinery = (*Casting)(nil)
// Default returns an Installation with every molding initialised from its
// default.
func Default() *Casting {
return &Casting{
CastingMeta: v1alpha1.CastingMeta{
TypeVersion: v1alpha1.TypeVersion{APIVersion: "v1alpha1"},
Kind: v1alpha1.KindInstallation,
Metadata: v1alpha1.TypeMetadata{Name: "signoz"},
},
Spec: Spec{
Infrastructure: DefaultInfrastructure(),
O11y: v1alpha1.DefaultHanzoO11y(),
TelemetryStore: DefaultTelemetryStore(),
TelemetryKeeper: DefaultTelemetryKeeper(),
MetaStore: DefaultMetaStore(),
Ingester: DefaultIngester(),
},
}
}
// Example returns a minimal Installation; the forge pipeline fills in defaults.
func Example() *Casting {
return &Casting{
CastingMeta: v1alpha1.CastingMeta{
TypeVersion: v1alpha1.TypeVersion{APIVersion: "v1alpha1"},
Kind: v1alpha1.KindInstallation,
Metadata: v1alpha1.TypeMetadata{Name: "signoz"},
},
}
}
// Kind reports the casting kind. Shadows the embedded CastingMeta.Kind field;
// the field stays reachable as c.CastingMeta.Kind.
func (c *Casting) Kind() v1alpha1.Kind {
return v1alpha1.KindInstallation
}
// MergeStatusIntoSpec folds each molding's Status into its own Spec.
func (c *Casting) MergeStatusIntoSpec() error {
if err := c.Spec.O11y.Spec.MergeStatus(c.Spec.O11y.Status.MoldingStatus); err != nil {
return err
}
if err := c.Spec.TelemetryStore.Spec.MergeStatus(c.Spec.TelemetryStore.Status.MoldingStatus); err != nil {
return err
}
if err := c.Spec.TelemetryKeeper.Spec.MergeStatus(c.Spec.TelemetryKeeper.Status.MoldingStatus); err != nil {
return err
}
if err := c.Spec.MetaStore.Spec.MergeStatus(c.Spec.MetaStore.Status.MoldingStatus); err != nil {
return err
}
if err := c.Spec.Ingester.Spec.MergeStatus(c.Spec.Ingester.Status.MoldingStatus); err != nil {
return err
}
return nil
}
// TrackableProperties returns analytics tags for the casting.
func (c *Casting) TrackableProperties() domain.Properties {
return domain.NewProperties().
Set("kind", v1alpha1.KindInstallation.String()).
Set("platform", c.Spec.Deployment.Platform.String()).
Set("mode", c.Spec.Deployment.Mode.String()).
Set("flavor", c.Spec.Deployment.Flavor.String()).
Set("patches_count", len(c.Spec.Patches)).
Set("infrastructure_enabled", c.Spec.Infrastructure.Enabled).
Set("metastore_kind", c.Spec.MetaStore.Kind.String()).
Set("telemetrystore_kind", c.Spec.TelemetryStore.Kind.String()).
Set("telemetrykeeper_kind", c.Spec.TelemetryKeeper.Kind.String())
}
@@ -0,0 +1,697 @@
{
"required": [
"apiVersion",
"kind",
"metadata",
"spec"
],
"additionalProperties": false,
"definitions": {
"InstallationInfrastructure": {
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"status": {
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"type": "object"
},
"InstallationIngester": {
"additionalProperties": false,
"properties": {
"spec": {
"$ref": "#/definitions/V1Alpha1MoldingSpec"
},
"status": {
"$ref": "#/definitions/InstallationIngesterStatus"
}
},
"type": "object"
},
"InstallationIngesterStatus": {
"additionalProperties": false,
"properties": {
"addresses": {
"$ref": "#/definitions/InstallationIngesterStatusAddresses"
},
"config": {
"$ref": "#/definitions/V1Alpha1TypeConfig",
"description": "Configuration for the molding"
},
"env": {
"description": "Environment variables for the molding",
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"extras": {
"description": "Extra information about the molding",
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"type": "object"
},
"InstallationIngesterStatusAddresses": {
"additionalProperties": false,
"properties": {
"otlp": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
}
},
"type": "object"
},
"InstallationMetaStore": {
"additionalProperties": false,
"properties": {
"kind": {
"$ref": "#/definitions/InstallationMetaStoreKind",
"description": "Kind of the meta store to use",
"examples": [
"postgres",
"sqlite"
]
},
"spec": {
"$ref": "#/definitions/V1Alpha1MoldingSpec",
"description": "Specification for the meta store"
},
"status": {
"$ref": "#/definitions/InstallationMetaStoreStatus",
"description": "Status of the meta store"
}
},
"type": "object"
},
"InstallationMetaStoreKind": {
"enum": [
"postgres",
"sqlite"
],
"type": "string"
},
"InstallationMetaStoreStatus": {
"additionalProperties": false,
"properties": {
"addresses": {
"$ref": "#/definitions/InstallationMetaStoreStatusAddresses",
"description": "Addresses of the meta store"
},
"config": {
"$ref": "#/definitions/V1Alpha1TypeConfig",
"description": "Configuration for the molding"
},
"env": {
"description": "Environment variables for the molding",
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"extras": {
"description": "Extra information about the molding",
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"type": "object"
},
"InstallationMetaStoreStatusAddresses": {
"additionalProperties": false,
"properties": {
"dsn": {
"description": "DSN addresses",
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
}
},
"type": "object"
},
"InstallationSpec": {
"required": [
"deployment"
],
"additionalProperties": false,
"properties": {
"deployment": {
"$ref": "#/definitions/V1Alpha1TypeDeployment",
"description": "Deployment configuration for the platform"
},
"infrastructure": {
"$ref": "#/definitions/InstallationInfrastructure",
"description": "Infrastructure configuration for generating infrastructure manifests (e.g., Terraform)."
},
"ingester": {
"$ref": "#/definitions/InstallationIngester",
"description": "The configuration for the ingester molding"
},
"metastore": {
"$ref": "#/definitions/InstallationMetaStore",
"description": "The configuration for the meta store molding"
},
"o11y": {
"$ref": "#/definitions/V1Alpha1HanzoO11Y",
"description": "The configuration for the HanzoO11y molding"
},
"patches": {
"description": "Patch operations to apply to generated materials",
"items": {
"$ref": "#/definitions/V1Alpha1PatchEntry"
},
"type": "array"
},
"telemetrykeeper": {
"$ref": "#/definitions/InstallationTelemetryKeeper",
"description": "The configuration for the telemetry keeper molding"
},
"telemetrystore": {
"$ref": "#/definitions/InstallationTelemetryStore",
"description": "The configuration for the telemetry store molding"
}
},
"type": "object"
},
"InstallationTelemetryKeeper": {
"additionalProperties": false,
"properties": {
"kind": {
"$ref": "#/definitions/InstallationTelemetryKeeperKind",
"description": "Kind of the telemetry keeper to use",
"examples": [
"clickhousekeeper"
]
},
"spec": {
"$ref": "#/definitions/V1Alpha1MoldingSpec",
"description": "Specification for the telemetry keeper"
},
"status": {
"$ref": "#/definitions/InstallationTelemetryKeeperStatus",
"description": "Status of the telemetry keeper"
}
},
"type": "object"
},
"InstallationTelemetryKeeperKind": {
"enum": [
"clickhousekeeper"
],
"type": "string"
},
"InstallationTelemetryKeeperStatus": {
"additionalProperties": false,
"properties": {
"addresses": {
"$ref": "#/definitions/InstallationTelemetryKeeperStatusAddresses",
"description": "Addresses of the telemetry keeper"
},
"config": {
"$ref": "#/definitions/V1Alpha1TypeConfig",
"description": "Configuration for the molding"
},
"env": {
"description": "Environment variables for the molding",
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"extras": {
"description": "Extra information about the molding",
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"type": "object"
},
"InstallationTelemetryKeeperStatusAddresses": {
"additionalProperties": false,
"properties": {
"client": {
"description": "Client addresses",
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"raft": {
"description": "Raft addresses",
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
}
},
"type": "object"
},
"InstallationTelemetryStore": {
"additionalProperties": false,
"properties": {
"kind": {
"$ref": "#/definitions/InstallationTelemetryStoreKind",
"description": "Kind of the telemetry store to use",
"examples": [
"clickhouse"
]
},
"spec": {
"$ref": "#/definitions/V1Alpha1MoldingSpec",
"description": "Specification for the telemetry store"
},
"status": {
"$ref": "#/definitions/InstallationTelemetryStoreStatus",
"description": "Status of the telemetry store"
}
},
"type": "object"
},
"InstallationTelemetryStoreKind": {
"enum": [
"clickhouse"
],
"type": "string"
},
"InstallationTelemetryStoreStatus": {
"additionalProperties": false,
"properties": {
"addresses": {
"$ref": "#/definitions/InstallationTelemetryStoreStatusAddresses",
"description": "Addresses of the telemetry store"
},
"config": {
"$ref": "#/definitions/V1Alpha1TypeConfig",
"description": "Configuration for the molding"
},
"env": {
"description": "Environment variables for the molding",
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"extras": {
"description": "Extra information about the molding",
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"type": "object"
},
"InstallationTelemetryStoreStatusAddresses": {
"additionalProperties": false,
"properties": {
"tcp": {
"description": "TCP addresses",
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
}
},
"type": "object"
},
"V1Alpha1Flavor": {
"enum": [
"compose",
"swarm",
"binary",
"kustomize",
"helm",
"blueprint",
"stack",
"template",
"terraform"
],
"type": "string"
},
"V1Alpha1HanzoO11Y": {
"properties": {
"spec": {
"$ref": "#/definitions/V1Alpha1MoldingSpec"
},
"status": {
"$ref": "#/definitions/V1Alpha1HanzoO11YStatus"
}
},
"type": "object"
},
"V1Alpha1HanzoO11YStatus": {
"additionalProperties": false,
"properties": {
"addresses": {
"$ref": "#/definitions/V1Alpha1HanzoO11YStatusAddresses"
},
"config": {
"$ref": "#/definitions/V1Alpha1TypeConfig",
"description": "Configuration for the molding"
},
"env": {
"description": "Environment variables for the molding",
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"extras": {
"description": "Extra information about the molding",
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"type": "object"
},
"V1Alpha1HanzoO11YStatusAddresses": {
"properties": {
"apiserver": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"opamp": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
}
},
"type": "object"
},
"V1Alpha1Kind": {
"enum": [
"Installation"
],
"type": "string"
},
"V1Alpha1Mode": {
"enum": [
"docker",
"systemd",
"kubernetes",
"ec2"
],
"type": "string"
},
"V1Alpha1MoldingSpec": {
"additionalProperties": false,
"properties": {
"cluster": {
"$ref": "#/definitions/V1Alpha1TypeCluster",
"description": "Cluster configuration for the molding"
},
"config": {
"$ref": "#/definitions/V1Alpha1TypeConfig",
"description": "Configuration for the molding"
},
"enabled": {
"description": "Whether the molding is enabled",
"default": true,
"type": [
"null",
"boolean"
]
},
"env": {
"description": "Environment variables for the molding",
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"image": {
"description": "Container image of the molding",
"examples": [
"ghcr.io/hanzoai/o11y:latest"
],
"type": "string"
},
"version": {
"description": "The version of the molding to use",
"examples": [
"latest"
],
"type": "string"
}
},
"type": "object"
},
"V1Alpha1PatchEntry": {
"required": [
"target",
"operations"
],
"additionalProperties": false,
"properties": {
"operations": {
"description": "JSON Patch (RFC 6902) operations to apply. Used by the jsonpatch driver.",
"items": {
"$ref": "#/definitions/V1Alpha1PatchOperation"
},
"minItems": 1,
"type": [
"array",
"null"
]
},
"target": {
"description": "Target output file to patch",
"examples": [
"compose.yaml",
"signoz/deployment.yaml",
"values.yaml",
"telemetrystore/telemtrystore-clickhouse-0-*.yaml"
],
"minLength": 1,
"type": "string"
},
"type": {
"description": "Patch driver type. Defaults to jsonpatch.",
"default": "jsonpatch",
"examples": [
"jsonpatch"
],
"enum": [
"",
"jsonpatch"
],
"type": "string"
}
},
"type": "object"
},
"V1Alpha1PatchOperation": {
"required": [
"op",
"path"
],
"additionalProperties": false,
"properties": {
"from": {
"description": "Source JSON Pointer for move and copy operations",
"examples": [
"/services/clickhouse/old_field"
],
"pattern": "^/",
"type": "string"
},
"op": {
"description": "JSON Patch (RFC 6902) operation type",
"enum": [
"add",
"remove",
"replace",
"move",
"copy",
"test"
],
"type": "string"
},
"path": {
"description": "JSON Pointer (RFC 6901) to the target location",
"examples": [
"/services/clickhouse/mem_limit"
],
"pattern": "^/",
"type": "string"
},
"value": {
"description": "Value for add, replace, or test operations"
}
},
"type": "object"
},
"V1Alpha1Platform": {
"enum": [
"render",
"coolify",
"railway",
"ecs",
"aws",
"gcp",
"azure"
],
"type": "string"
},
"V1Alpha1Status": {
"additionalProperties": false,
"properties": {
"checksum": {
"description": "Checksum of the casting file",
"type": "string"
}
},
"type": "object"
},
"V1Alpha1TypeCluster": {
"additionalProperties": false,
"properties": {
"replicas": {
"description": "Number of replicas for the molding.",
"examples": [
1
],
"minimum": 0,
"type": [
"null",
"integer"
]
},
"shards": {
"description": "Number of shards for the molding",
"examples": [
1
],
"minimum": 1,
"type": [
"null",
"integer"
]
}
},
"type": "object"
},
"V1Alpha1TypeConfig": {
"additionalProperties": false,
"properties": {
"data": {
"description": "Configuration data as key-value pairs.",
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"type": "object"
},
"V1Alpha1TypeDeployment": {
"additionalProperties": false,
"properties": {
"flavor": {
"$ref": "#/definitions/V1Alpha1Flavor",
"description": "Flavor of mode for the deployment"
},
"mode": {
"$ref": "#/definitions/V1Alpha1Mode",
"description": "Type of installation method"
},
"platform": {
"$ref": "#/definitions/V1Alpha1Platform",
"description": "Provider where an installation runs on"
}
},
"type": "object"
},
"V1Alpha1TypeMetadata": {
"properties": {
"annotations": {
"description": "Unstructured key-value map for arbitrary metadata",
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"name": {
"description": "The name of this installation",
"examples": [
"o11y-dev"
],
"type": "string"
}
},
"type": "object"
}
},
"properties": {
"apiVersion": {
"description": "API Version of the configuration schema.",
"default": "v1alpha1",
"examples": [
"v1alpha1"
],
"enum": [
"v1alpha1"
],
"type": "string"
},
"kind": {
"$ref": "#/definitions/V1Alpha1Kind",
"description": "Kind of the casting resource."
},
"metadata": {
"$ref": "#/definitions/V1Alpha1TypeMetadata",
"description": "Metadata of the casting configuration"
},
"spec": {
"$ref": "#/definitions/InstallationSpec",
"description": "Installation specification"
},
"status": {
"$ref": "#/definitions/V1Alpha1Status",
"description": "Status of the casting"
}
},
"type": "object"
}
@@ -0,0 +1,36 @@
package installation
import "encoding/json"
// Infrastructure holds the configuration for infrastructure manifest generation (e.g., Terraform).
// The cloud provider is resolved automatically from spec.deployment.platform — no provider field
// is needed here.
type Infrastructure struct {
// Whether infrastructure manifest generation is enabled
Enabled bool `json:"enabled" yaml:"enabled"`
// Status holds the generated IaC file contents keyed by filename (e.g. "main.tf.json").
// This is populated by foundry after generation and written to the lock file.
Status map[string]string `json:"status,omitempty" yaml:"status,omitempty"`
_ struct{} `additionalProperties:"false"`
}
// MarshalJSON implements json.Marshaler. It manually omits Status when zero
// so that the strategic merge patch doesn't overwrite defaults with empty values.
func (i Infrastructure) MarshalJSON() ([]byte, error) {
m := map[string]any{
"enabled": i.Enabled,
}
if len(i.Status) > 0 {
m["status"] = i.Status
}
return json.Marshal(m)
}
// DefaultInfrastructure returns the default Infrastructure configuration.
func DefaultInfrastructure() Infrastructure {
return Infrastructure{
Enabled: false,
}
}
+44
View File
@@ -0,0 +1,44 @@
package installation
import "github.com/hanzoai/o11y-foundry/api/v1alpha1"
type Ingester struct {
// Specification for the ingester.
Spec v1alpha1.MoldingSpec `json:"spec" yaml:"spec" jsonschema:"description=Specification for the ingester"`
// Status of the ingester.
Status IngesterStatus `json:"status" yaml:"status,omitempty" jsonschema:"description=Status of the ingester"`
_ struct{} `additionalProperties:"false"`
}
type IngesterStatus struct {
v1alpha1.MoldingStatus `json:",inline" yaml:",inline"`
Addresses IngesterStatusAddresses `json:"addresses" yaml:"addresses,omitempty" jsonschema:"description=Addresses of the ingester"`
_ struct{} `additionalProperties:"false"`
}
type IngesterStatusAddresses struct {
OTLP []string `json:"otlp" yaml:"otlp" jsonschema:"description=OTLP addresses"`
_ struct{} `additionalProperties:"false"`
}
func DefaultIngester() Ingester {
return Ingester{
Spec: v1alpha1.MoldingSpec{
Enabled: v1alpha1.BoolPtr(true),
Cluster: v1alpha1.TypeCluster{
Replicas: v1alpha1.IntPtr(1),
},
Version: "latest",
Image: "ghcr.io/hanzoai/otel-collector:latest",
Env: map[string]string{},
Config: v1alpha1.TypeConfig{
Data: map[string]string{},
},
},
}
}
+46
View File
@@ -0,0 +1,46 @@
package installation
import (
"github.com/hanzoai/o11y-foundry/api/v1alpha1"
)
type MetaStore struct {
// Kind of the meta store to use.
Kind MetaStoreKind `json:"kind,omitzero" yaml:"kind,omitempty" description:"Kind of the meta store to use" examples:"[\"postgres\",\"sqlite\"]"`
// Specification for the meta store.
Spec v1alpha1.MoldingSpec `json:"spec" yaml:"spec" description:"Specification for the meta store"`
// Status of the meta store.
Status MetaStoreStatus `json:"status" yaml:"status,omitempty" description:"Status of the meta store"`
_ struct{} `additionalProperties:"false"`
}
type MetaStoreStatus struct {
v1alpha1.MoldingStatus `json:",inline" yaml:",inline"`
Addresses MetaStoreStatusAddresses `json:"addresses" yaml:"addresses,omitempty" description:"Addresses of the meta store"`
_ struct{} `additionalProperties:"false"`
}
type MetaStoreStatusAddresses struct {
// DSN addresses.
DSN []string `json:"dsn" yaml:"dsn" description:"DSN addresses"`
_ struct{} `additionalProperties:"false"`
}
func DefaultMetaStore() MetaStore {
return MetaStore{
Kind: MetaStoreKindPostgres,
Spec: v1alpha1.MoldingSpec{
Enabled: v1alpha1.BoolPtr(true),
Cluster: v1alpha1.TypeCluster{
Replicas: v1alpha1.IntPtr(1),
},
Version: "16",
Image: "postgres:16",
},
}
}
@@ -0,0 +1,82 @@
package installation
import (
"encoding/json"
"errors"
"fmt"
"github.com/swaggest/jsonschema-go"
"go.yaml.in/yaml/v3"
)
var _ yaml.Marshaler = (*MetaStoreKind)(nil)
var _ yaml.Unmarshaler = (*MetaStoreKind)(nil)
var _ json.Marshaler = (*MetaStoreKind)(nil)
var _ json.Unmarshaler = (*MetaStoreKind)(nil)
var _ fmt.Stringer = (*MetaStoreKind)(nil)
var _ jsonschema.Enum = (*MetaStoreKind)(nil)
var (
MetaStoreKindPostgres MetaStoreKind = MetaStoreKind{s: "postgres"}
MetaStoreKindSQLite MetaStoreKind = MetaStoreKind{s: "sqlite"}
)
type MetaStoreKind struct {
s string
}
func (kind MetaStoreKind) String() string {
return kind.s
}
func MetaStoreKinds() []MetaStoreKind {
return []MetaStoreKind{MetaStoreKindPostgres, MetaStoreKindSQLite}
}
func (kind MetaStoreKind) MarshalJSON() ([]byte, error) {
return json.Marshal(kind.String())
}
func (kind *MetaStoreKind) UnmarshalJSON(text []byte) error {
var str string
if err := json.Unmarshal(text, &str); err != nil {
return err
}
return kind.UnmarshalText([]byte(str))
}
func (kind *MetaStoreKind) UnmarshalText(text []byte) error {
for _, availableKind := range MetaStoreKinds() {
if availableKind.String() == string(text) {
*kind = availableKind
return nil
}
}
if text == nil {
*kind = MetaStoreKind{s: ""}
return nil
}
return errors.New("invalid meta store kind: " + string(text))
}
func (kind MetaStoreKind) MarshalText() ([]byte, error) {
return []byte(kind.String()), nil
}
func (kind *MetaStoreKind) UnmarshalYAML(node *yaml.Node) error {
return kind.UnmarshalText([]byte(node.Value))
}
func (kind MetaStoreKind) MarshalYAML() (any, error) {
return kind.String(), nil
}
func (kind MetaStoreKind) Enum() []any {
kinds := []any{}
for _, kind := range MetaStoreKinds() {
kinds = append(kinds, kind.String())
}
return kinds
}
+18
View File
@@ -0,0 +1,18 @@
package installation
import (
_ "embed"
"github.com/google/jsonschema-go/jsonschema"
"github.com/hanzoai/o11y-foundry/api/v1alpha1"
)
//go:embed casting.schema.json
var schemaJSON []byte
var schema = v1alpha1.MustResolveSchema(schemaJSON)
// Schema returns the resolved JSON schema for an Installation casting.
func Schema() *jsonschema.Resolved {
return schema
}
+26
View File
@@ -0,0 +1,26 @@
package installation
import (
"encoding/json"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestSchema(t *testing.T) {
t.Parallel()
assert.NotNil(t, Schema())
}
func TestSchemaValidatesDefault(t *testing.T) {
t.Parallel()
contents, err := json.Marshal(Default())
require.NoError(t, err)
var payload map[string]any
require.NoError(t, json.Unmarshal(contents, &payload))
assert.NoError(t, Schema().Validate(payload))
}
@@ -0,0 +1,51 @@
package installation
import (
"github.com/hanzoai/o11y-foundry/api/v1alpha1"
)
type TelemetryKeeper struct {
// Kind of the telemetry keeper to use.
Kind TelemetryKeeperKind `json:"kind,omitzero" yaml:"kind,omitempty" description:"Kind of the telemetry keeper to use" examples:"[\"clickhousekeeper\"]"`
// Specification for the telemetry keeper.
Spec v1alpha1.MoldingSpec `json:"spec" yaml:"spec" description:"Specification for the telemetry keeper"`
// Status of the telemetry keeper.
Status TelemetryKeeperStatus `json:"status" yaml:"status,omitempty" description:"Status of the telemetry keeper"`
_ struct{} `additionalProperties:"false"`
}
type TelemetryKeeperStatus struct {
v1alpha1.MoldingStatus `json:",inline" yaml:",inline"`
// Addresses of the telemetry keeper.
Addresses TelemetryKeeperStatusAddresses `json:"addresses" yaml:"addresses,omitempty" description:"Addresses of the telemetry keeper"`
_ struct{} `additionalProperties:"false"`
}
type TelemetryKeeperStatusAddresses struct {
// Raft addresses.
Raft []string `json:"raft" yaml:"raft,omitempty" description:"Raft addresses"`
// Client addresses.
Client []string `json:"client" yaml:"client,omitempty" description:"Client addresses"`
_ struct{} `additionalProperties:"false"`
}
func DefaultTelemetryKeeper() TelemetryKeeper {
return TelemetryKeeper{
Kind: TelemetryKeeperKindClickhouseKeeper,
Spec: v1alpha1.MoldingSpec{
Enabled: v1alpha1.BoolPtr(true),
Cluster: v1alpha1.TypeCluster{
Replicas: v1alpha1.IntPtr(1),
},
Version: "25.5.6",
Image: "clickhouse/clickhouse-keeper:25.5.6",
},
}
}
@@ -0,0 +1,81 @@
package installation
import (
"encoding/json"
"errors"
"fmt"
"github.com/swaggest/jsonschema-go"
"go.yaml.in/yaml/v3"
)
var _ yaml.Marshaler = (*TelemetryKeeperKind)(nil)
var _ yaml.Unmarshaler = (*TelemetryKeeperKind)(nil)
var _ json.Marshaler = (*TelemetryKeeperKind)(nil)
var _ json.Unmarshaler = (*TelemetryKeeperKind)(nil)
var _ fmt.Stringer = (*TelemetryKeeperKind)(nil)
var _ jsonschema.Enum = (*TelemetryKeeperKind)(nil)
var (
TelemetryKeeperKindClickhouseKeeper TelemetryKeeperKind = TelemetryKeeperKind{s: "clickhousekeeper"}
)
type TelemetryKeeperKind struct {
s string
}
func (kind TelemetryKeeperKind) String() string {
return kind.s
}
func TelemetryKeeperKinds() []TelemetryKeeperKind {
return []TelemetryKeeperKind{TelemetryKeeperKindClickhouseKeeper}
}
func (kind TelemetryKeeperKind) MarshalJSON() ([]byte, error) {
return json.Marshal(kind.String())
}
func (kind *TelemetryKeeperKind) UnmarshalJSON(text []byte) error {
var str string
if err := json.Unmarshal(text, &str); err != nil {
return err
}
return kind.UnmarshalText([]byte(str))
}
func (kind *TelemetryKeeperKind) UnmarshalText(text []byte) error {
for _, availableKind := range TelemetryKeeperKinds() {
if availableKind.String() == string(text) {
*kind = availableKind
return nil
}
}
if text == nil {
*kind = TelemetryKeeperKind{s: ""}
return nil
}
return errors.New("invalid telemetry keeper kind: " + string(text))
}
func (kind TelemetryKeeperKind) MarshalText() ([]byte, error) {
return []byte(kind.String()), nil
}
func (kind *TelemetryKeeperKind) UnmarshalYAML(node *yaml.Node) error {
return kind.UnmarshalText([]byte(node.Value))
}
func (kind TelemetryKeeperKind) MarshalYAML() (any, error) {
return kind.String(), nil
}
func (kind TelemetryKeeperKind) Enum() []any {
kinds := []any{}
for _, kind := range TelemetryKeeperKinds() {
kinds = append(kinds, kind.String())
}
return kinds
}
@@ -0,0 +1,48 @@
package installation
import (
"github.com/hanzoai/o11y-foundry/api/v1alpha1"
)
type TelemetryStore struct {
// Kind of the telemetry store to use.
Kind TelemetryStoreKind `json:"kind,omitzero" yaml:"kind,omitempty" description:"Kind of the telemetry store to use" examples:"[\"clickhouse\"]"`
// Specification for the telemetry store.
Spec v1alpha1.MoldingSpec `json:"spec" yaml:"spec" description:"Specification for the telemetry store"`
// Status of the telemetry store.
Status TelemetryStoreStatus `json:"status" yaml:"status,omitempty" description:"Status of the telemetry store"`
_ struct{} `additionalProperties:"false"`
}
type TelemetryStoreStatus struct {
v1alpha1.MoldingStatus `json:",inline" yaml:",inline"`
Addresses TelemetryStoreStatusAddresses `json:"addresses" yaml:"addresses,omitempty" description:"Addresses of the telemetry store"`
_ struct{} `additionalProperties:"false"`
}
type TelemetryStoreStatusAddresses struct {
// TCP addresses.
TCP []string `json:"tcp" yaml:"tcp" description:"TCP addresses"`
_ struct{} `additionalProperties:"false"`
}
func DefaultTelemetryStore() TelemetryStore {
return TelemetryStore{
Kind: TelemetryStoreKindClickhouse,
Spec: v1alpha1.MoldingSpec{
Enabled: v1alpha1.BoolPtr(true),
Cluster: v1alpha1.TypeCluster{
Replicas: v1alpha1.IntPtr(0),
Shards: v1alpha1.IntPtr(1),
},
Version: "25.5.6",
Image: "ghcr.io/hanzoai/datastore:25.5.6",
},
}
}
@@ -0,0 +1,83 @@
package installation
import (
"encoding/json"
"errors"
"fmt"
"github.com/swaggest/jsonschema-go"
"go.yaml.in/yaml/v3"
)
var _ yaml.Marshaler = (*TelemetryStoreKind)(nil)
var _ yaml.Unmarshaler = (*TelemetryStoreKind)(nil)
var _ json.Marshaler = (*TelemetryStoreKind)(nil)
var _ json.Unmarshaler = (*TelemetryStoreKind)(nil)
var _ fmt.Stringer = (*TelemetryStoreKind)(nil)
var _ jsonschema.Enum = (*TelemetryStoreKind)(nil)
var (
TelemetryStoreKindClickhouse TelemetryStoreKind = TelemetryStoreKind{s: "clickhouse"}
)
type TelemetryStoreKind struct {
s string
}
func TelemetryStoreKinds() []TelemetryStoreKind {
return []TelemetryStoreKind{TelemetryStoreKindClickhouse}
}
func (kind TelemetryStoreKind) String() string {
return kind.s
}
func (kind TelemetryStoreKind) MarshalJSON() ([]byte, error) {
return json.Marshal(kind.String())
}
func (kind *TelemetryStoreKind) UnmarshalJSON(text []byte) error {
var str string
if err := json.Unmarshal(text, &str); err != nil {
return err
}
return kind.UnmarshalText([]byte(str))
}
func (kind *TelemetryStoreKind) UnmarshalText(text []byte) error {
for _, availableKind := range TelemetryStoreKinds() {
if availableKind.String() == string(text) {
*kind = availableKind
return nil
}
}
if text == nil {
*kind = TelemetryStoreKind{s: ""}
return nil
}
return errors.New("invalid telemetry store kind: " + string(text))
}
func (kind TelemetryStoreKind) MarshalText() ([]byte, error) {
return []byte(kind.String()), nil
}
func (kind *TelemetryStoreKind) UnmarshalYAML(node *yaml.Node) error {
return kind.UnmarshalText([]byte(node.Value))
}
func (kind TelemetryStoreKind) MarshalYAML() (any, error) {
return kind.String(), nil
}
func (kind TelemetryStoreKind) Enum() []any {
kinds := []any{}
for _, kind := range TelemetryStoreKinds() {
kinds = append(kinds, kind.String())
}
return kinds
}
+9
View File
@@ -0,0 +1,9 @@
package v1alpha1
import "github.com/hanzoai/o11y-foundry/internal/domain"
// Machinery is the marker every per-Kind casting type satisfies.
type Machinery interface {
Kind() Kind
TrackableProperties() domain.Properties
}
+59
View File
@@ -0,0 +1,59 @@
package v1alpha1
import (
"encoding/json"
"reflect"
"github.com/hanzoai/o11y-foundry/internal/errors"
"k8s.io/apimachinery/pkg/util/strategicpatch"
)
// Merge applies an override onto a base via Kubernetes strategic merge patch
// and mutates base in place. Both arguments must be pointers to the same
// concrete struct type. Fields typed as any are replaced wholesale rather than
// recursively merged.
func Merge(base, overrides any) error {
if overrides == nil {
return nil
}
baseBytes, err := json.Marshal(base)
if err != nil {
return errors.Wrapf(err, errors.TypeInternal, "failed to convert current object to byte sequence")
}
overrideBytes, err := json.Marshal(overrides)
if err != nil {
return errors.Wrapf(err, errors.TypeInternal, "failed to convert current object to byte sequence")
}
patchMeta, err := strategicpatch.NewPatchMetaFromStruct(base)
if err != nil {
return errors.Wrapf(err, errors.TypeInternal, "failed to produce patch meta from struct")
}
patch, err := strategicpatch.CreateThreeWayMergePatch(overrideBytes, overrideBytes, baseBytes, patchMeta, true)
if err != nil {
return errors.Wrapf(err, errors.TypeInternal, "failed to create three way merge patch")
}
merged, err := strategicpatch.StrategicMergePatchUsingLookupPatchMeta(baseBytes, patch, patchMeta)
if err != nil {
return errors.Wrapf(err, errors.TypeInternal, "failed to apply patch")
}
valueOfBase := reflect.Indirect(reflect.ValueOf(base))
into := reflect.New(valueOfBase.Type())
if err := json.Unmarshal(merged, into.Interface()); err != nil {
return err
}
if !valueOfBase.CanSet() {
return errors.Newf(errors.TypeInternal, "unable to set unmarshalled value into base object")
}
valueOfBase.Set(reflect.Indirect(into))
return nil
}
+49
View File
@@ -0,0 +1,49 @@
package v1alpha1
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestMerge(t *testing.T) {
t.Parallel()
testCases := []struct {
name string
base TypeMetadata
override TypeMetadata
want TypeMetadata
}{
{
name: "override Name wins over base",
base: TypeMetadata{Name: "base"},
override: TypeMetadata{Name: "override"},
want: TypeMetadata{Name: "override"},
},
{
name: "override fills in unset base fields",
base: TypeMetadata{},
override: TypeMetadata{Name: "fresh"},
want: TypeMetadata{Name: "fresh"},
},
{
name: "override Annotations (map with omitempty) does not clobber base when unset",
base: TypeMetadata{Name: "base", Annotations: map[string]string{"a": "1"}},
override: TypeMetadata{Name: "base"},
want: TypeMetadata{Name: "base", Annotations: map[string]string{"a": "1"}},
},
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
base := tc.base
override := tc.override
require.NoError(t, Merge(&base, &override))
assert.Equal(t, tc.want, base)
})
}
}
+38
View File
@@ -0,0 +1,38 @@
package v1alpha1
type TypeVersion struct {
APIVersion string `json:"apiVersion" yaml:"apiVersion" required:"true" nullable:"false" enum:"v1alpha1" description:"API Version of the configuration schema." default:"v1alpha1" example:"v1alpha1"`
}
type TypeMetadata struct {
// The name of this installation. This name can be used to identify the installation.
Name string `json:"name,omitempty" yaml:"name,omitempty" description:"The name of this installation" example:"o11y-dev"`
// Annotations is an unstructured key-value map for arbitrary metadata.
// Can be used to specify deployment-specific settings.
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty" description:"Unstructured key-value map for arbitrary metadata"`
}
type TypeCluster struct {
Replicas *int `json:"replicas,omitempty" yaml:"replicas,omitempty" minimum:"0" description:"Number of replicas for the molding." example:"1"`
Shards *int `json:"shards,omitempty" yaml:"shards,omitempty" minimum:"1" description:"Number of shards for the molding" example:"1"`
_ struct{} `additionalProperties:"false"`
}
type TypeConfig struct {
Data map[string]string `json:"data,omitempty" yaml:"data,omitempty" description:"Configuration data as key-value pairs."`
_ struct{} `additionalProperties:"false"`
}
type TypeDeployment struct {
// Platform: cloud or hosting provider where an installation runs.
Platform Platform `json:"platform,omitzero" yaml:"platform,omitempty" description:"Provider where an installation runs on"`
// Mode: type of installation method (engine or technology behind the deployment).
Mode Mode `json:"mode,omitzero" yaml:"mode,omitempty" description:"Type of installation method"`
// Flavor: variant of the mode for the deployment.
Flavor Flavor `json:"flavor,omitzero" yaml:"flavor,omitempty" description:"Flavor of mode for the deployment"`
_ struct{} `additionalProperties:"false"`
}
+68
View File
@@ -0,0 +1,68 @@
package v1alpha1
import "maps"
type MoldingSpec struct {
// Whether the molding is enabled
Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty" description:"Whether the molding is enabled" default:"true"`
// Cluster configuration for the molding
Cluster TypeCluster `json:"cluster" yaml:"cluster,omitempty" description:"Cluster configuration for the molding"`
// The version of the molding to use
Version string `json:"version,omitempty" yaml:"version,omitempty" description:"The version of the molding to use" example:"latest"`
// Image of the molding
Image string `json:"image,omitempty" yaml:"image,omitempty" description:"Container image of the molding" example:"ghcr.io/hanzoai/o11y:latest"`
// Environment variables for the molding
Env map[string]string `json:"env,omitempty" yaml:"env,omitempty" description:"Environment variables for the molding"`
// Configuration for the molding
Config TypeConfig `json:"config" yaml:"config,omitempty" description:"Configuration for the molding"`
_ struct{} `additionalProperties:"false"`
}
type MoldingStatus struct {
// Extra information about the molding
Extras map[string]string `json:"extras,omitempty" yaml:"extras,omitempty" description:"Extra information about the molding"`
// Environment variables for the molding
Env map[string]string `json:"env,omitempty" yaml:"env,omitempty" description:"Environment variables for the molding"`
// Configuration for the molding
Config TypeConfig `json:"config" yaml:"config,omitempty" description:"Configuration for the molding"`
_ struct{} `additionalProperties:"false"`
}
// IsEnabled returns whether the molding is enabled.
// Returns false if the receiver or Enabled is nil.
func (spec *MoldingSpec) IsEnabled() bool {
if spec == nil || spec.Enabled == nil {
return false
}
return *spec.Enabled
}
func (spec *MoldingSpec) MergeStatus(status MoldingStatus) error {
if spec.Env == nil {
spec.Env = make(map[string]string)
}
if status.Env == nil {
status.Env = make(map[string]string)
}
maps.Copy(status.Env, spec.Env)
spec.Env = status.Env
if err := Merge(&status.Config, spec.Config); err != nil {
return err
}
spec.Config = status.Config
return nil
}
+55
View File
@@ -0,0 +1,55 @@
package v1alpha1
import (
"errors"
"fmt"
"go.yaml.in/yaml/v3"
)
var _ yaml.Marshaler = (*MoldingKind)(nil)
var _ yaml.Unmarshaler = (*MoldingKind)(nil)
var _ fmt.Stringer = (*MoldingKind)(nil)
var (
MoldingKindIngester MoldingKind = MoldingKind{s: "ingester"}
MoldingKindTelemetryStore MoldingKind = MoldingKind{s: "telemetrystore"}
MoldingKindTelemetryKeeper MoldingKind = MoldingKind{s: "telemetrykeeper"}
MoldingKindMetaStore MoldingKind = MoldingKind{s: "metastore"}
MoldingKindO11y MoldingKind = MoldingKind{s: "o11y"}
MoldingKindCollector MoldingKind = MoldingKind{s: "collector"}
)
type MoldingKind struct {
s string
}
func (kind MoldingKind) String() string {
return kind.s
}
func MoldingKinds() []MoldingKind {
return []MoldingKind{MoldingKindIngester, MoldingKindTelemetryStore, MoldingKindTelemetryKeeper, MoldingKindMetaStore, MoldingKindO11y, MoldingKindCollector}
}
func (kind *MoldingKind) UnmarshalText(text []byte) error {
for _, availableKind := range MoldingKinds() {
if availableKind.String() == string(text) {
*kind = availableKind
return nil
}
}
return errors.New("invalid molding kind: " + string(text))
}
func (kind MoldingKind) MarshalText() ([]byte, error) {
return []byte(kind.String()), nil
}
func (kind *MoldingKind) UnmarshalYAML(node *yaml.Node) error {
return kind.UnmarshalText([]byte(node.Value))
}
func (kind MoldingKind) MarshalYAML() (any, error) {
return kind.String(), nil
}
+36
View File
@@ -0,0 +1,36 @@
package v1alpha1
type HanzoO11y struct {
// Specification for o11y.
Spec MoldingSpec `json:"spec" yaml:"spec" jsonschema:"description=Specification for HanzoO11y"`
// Status of o11y.
Status HanzoO11yStatus `json:"status" yaml:"status,omitempty" jsonschema:"description=Status of HanzoO11y"`
}
type HanzoO11yStatus struct {
MoldingStatus `json:",inline" yaml:",inline"`
Addresses HanzoO11yStatusAddresses `json:"addresses" yaml:"addresses,omitempty" jsonschema:"description=Addresses of HanzoO11y"`
}
type HanzoO11yStatusAddresses struct {
// API server addresses.
APIServer []string `json:"apiserver" yaml:"apiserver" jsonschema:"description=API server addresses"`
// Opamp server addresses.
Opamp []string `json:"opamp" yaml:"opamp" jsonschema:"description=Opamp server addresses"`
}
func DefaultHanzoO11y() HanzoO11y {
return HanzoO11y{
Spec: MoldingSpec{
Enabled: BoolPtr(true),
Cluster: TypeCluster{
Replicas: IntPtr(1),
},
Version: "latest",
Image: "ghcr.io/hanzoai/o11y:latest",
},
}
}
+46
View File
@@ -0,0 +1,46 @@
package v1alpha1
const (
// PatchTypeJSONPatch is the default patch type using JSON Patch (RFC 6902).
PatchTypeJSONPatch = "jsonpatch"
)
// PatchEntry is a set of patch operations targeting a specific generated file.
type PatchEntry struct {
// Type selects the patch driver. Defaults to "jsonpatch" if empty.
Type string `json:"type,omitempty" yaml:"type,omitempty" enum:",jsonpatch" description:"Patch driver type. Defaults to jsonpatch." default:"jsonpatch" example:"jsonpatch"`
// Target is the output file to patch, relative to the pours directory.
Target string `json:"target" yaml:"target" required:"true" minLength:"1" description:"Target output file to patch" examples:"[\"compose.yaml\",\"signoz/deployment.yaml\",\"values.yaml\",\"telemetrystore/telemtrystore-clickhouse-0-*.yaml\"]"`
// Operations is a list of JSON Patch (RFC 6902) operations to apply. Used by the jsonpatch driver.
Operations []PatchOperation `json:"operations" yaml:"operations" required:"true" minItems:"1" description:"JSON Patch (RFC 6902) operations to apply. Used by the jsonpatch driver."`
_ struct{} `additionalProperties:"false"`
}
// PatchType returns the patch type, defaulting to PatchTypeJSONPatch if empty.
func (pe PatchEntry) PatchType() string {
if pe.Type == "" {
return PatchTypeJSONPatch
}
return pe.Type
}
// PatchOperation is a single JSON Patch (RFC 6902) operation. Used by the jsonpatch driver.
type PatchOperation struct {
// Op is the JSON Patch (RFC 6902) operation type: add, remove, replace, move, copy, test.
Op string `json:"op" yaml:"op" required:"true" enum:"add,remove,replace,move,copy,test" description:"JSON Patch (RFC 6902) operation type"`
// Path is a JSON Pointer (RFC 6902) to the target location.
Path string `json:"path" yaml:"path" required:"true" pattern:"^/" description:"JSON Pointer (RFC 6901) to the target location" example:"/services/clickhouse/mem_limit"`
// Value is the value for add, replace, or test operations.
Value any `json:"value,omitempty" yaml:"value,omitempty" description:"Value for add, replace, or test operations"`
// From is a JSON Pointer for the source location in move and copy operations.
From string `json:"from,omitempty" yaml:"from,omitempty" pattern:"^/" description:"Source JSON Pointer for move and copy operations" example:"/services/clickhouse/old_field"`
_ struct{} `additionalProperties:"false"`
}
+9
View File
@@ -0,0 +1,9 @@
package v1alpha1
func BoolPtr(v bool) *bool {
return &v
}
func IntPtr(v int) *int {
return &v
}
+20
View File
@@ -0,0 +1,20 @@
package v1alpha1
import (
"encoding/json"
"github.com/google/jsonschema-go/jsonschema"
)
// MustResolveSchema parses and resolves a JSON Schema, panicking on failure.
func MustResolveSchema(bytes []byte) *jsonschema.Resolved {
s := new(jsonschema.Schema)
if err := json.Unmarshal(bytes, s); err != nil {
panic(err)
}
resolved, err := s.Resolve(nil)
if err != nil {
panic(err)
}
return resolved
}
+23
View File
@@ -0,0 +1,23 @@
package v1alpha1
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestMustResolveSchema(t *testing.T) {
t.Parallel()
t.Run("valid schema", func(t *testing.T) {
t.Parallel()
assert.NotNil(t, MustResolveSchema([]byte(`{"type": "object"}`)))
})
t.Run("invalid json panics", func(t *testing.T) {
t.Parallel()
assert.Panics(t, func() {
MustResolveSchema([]byte(`not json`))
})
})
}
-8
View File
@@ -1,8 +0,0 @@
COMPOSE_PROJECT_NAME=signoz
### REQUIRED ENVS
CLICKHOUSE_HOST=clickhouse
CLICKHOUSE_PORT=9000
ZOOKEEPER_HOST=zookeeper-1
ZOOKEEPER_PORT=2181
SIGNOZ_HOST=signoz
-168
View File
@@ -1,168 +0,0 @@
version: "3"
x-common: &common
networks:
- signoz-net
restart: unless-stopped
logging:
options:
max-size: 50m
max-file: "3"
x-clickhouse-defaults: &clickhouse-defaults
!!merge <<: *common
image: clickhouse/clickhouse-server:25.5.6
tty: true
labels:
signoz.io/scrape: "true"
signoz.io/port: "9363"
signoz.io/path: "/metrics"
depends_on:
init-clickhouse:
condition: service_completed_successfully
zookeeper-1:
condition: service_healthy
healthcheck:
test:
- CMD
- wget
- --spider
- -q
- 0.0.0.0:8123/ping
interval: 30s
timeout: 5s
retries: 3
ulimits:
nproc: 65535
nofile:
soft: 262144
hard: 262144
env_file: ./pours/clickhouse/.env
x-zookeeper-defaults: &zookeeper-defaults
!!merge <<: *common
image: signoz/zookeeper:3.7.1
user: root
labels:
signoz.io/scrape: "true"
signoz.io/port: "9141"
signoz.io/path: "/metrics"
healthcheck:
test:
- CMD-SHELL
- curl -s -m 2 http://localhost:8080/commands/ruok | grep error | grep null
interval: 30s
timeout: 5s
retries: 3
x-db-depend: &db-depend
!!merge <<: *common
depends_on:
clickhouse:
condition: service_healthy
schema-migrator-sync:
condition: service_completed_successfully
services:
init-clickhouse:
!!merge <<: *common
image: clickhouse/clickhouse-server:25.5.6
container_name: signoz-init-clickhouse
command:
- bash
- -c
- |
version="v0.0.1"
node_os=$$(uname -s | tr '[:upper:]' '[:lower:]')
node_arch=$$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/)
echo "Fetching histogram-binary for $${node_os}/$${node_arch}"
cd /tmp
wget -O histogram-quantile.tar.gz "https://github.com/SigNoz/signoz/releases/download/histogram-quantile%2F$${version}/histogram-quantile_$${node_os}_$${node_arch}.tar.gz"
tar -xvzf histogram-quantile.tar.gz
mv histogram-quantile /var/lib/clickhouse/user_scripts/histogramQuantile
restart: on-failure
volumes:
- ./pours/clickhouse/user_scripts:/var/lib/clickhouse/user_scripts/
zookeeper-1:
!!merge <<: *zookeeper-defaults
container_name : signoz-zookeeper-1
volumes:
- zookeeper-1:/bitnami/zookeeper
env_file: ./pours/zookeeper/.env
clickhouse:
container_name: signoz-clickhouse
!!merge <<: *clickhouse-defaults'
volumes:
- ./pours/clickhouse/config.xml:/etc/clickhouse-server/config.xml
- ./pours/clickhouse/users.xml:/etc/clickhouse-server/users.xml
- ./pours/clickhouse/custom-function.xml:/etc/clickhouse-server/custom-function.xml
- ./pours/clickhouse/user_scripts:/var/lib/clickhouse/user_scripts/
- clickhouse:/var/lib/clickhouse/
signoz:
!!merge <<: *db-depend
image: signoz/signoz:${VERSION:-v0.101.0}
container_name: signoz
ports:
- "8080:8080"
volumes:
- sqlite:/var/lib/signoz/
env_file: ./pours/signoz/.env
healthcheck:
test:
- CMD
- wget
- --spider
- -q
- localhost:8080/api/v1/health
interval: 30s
timeout: 5s
retries: 3
otel-collector:
!!merge <<: *db-depend
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-v0.129.9}
container_name: signoz-otel-collector
command:
- --config=/etc/otel-collector-config.yaml
- --manager-config=/etc/manager-config.yaml
- --copy-path=/var/tmp/collector-config.yaml
- --feature-gates=-pkg.translator.prometheus.NormalizeName
volumes:
- ./pours/otel-collector/otel-collector-config.yaml:/etc/otel-collector-config.yaml
- ./pours/otel-collector/otel-collector-opamp-config.yaml:/etc/manager-config.yaml
env_file: ./pours/otel-collector/.env
ports:
- "4317:4317"
- "4318:4318"
depends_on:
clickhouse:
condition: service_healthy
schema-migrator-sync:
condition: service_completed_successfully
signoz:
condition: service_healthy
schema-migrator-sync:
!!merge <<: *common
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-v0.129.9}
container_name: schema-migrator-sync
command:
- sync
- --dsn=tcp://clickhouse:9000
- --up=
depends_on:
clickhouse:
condition: service_healthy
restart: on-failure
schema-migrator-async:
!!merge <<: *db-depend
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-v0.129.9}
container_name: schema-migrator-async
command:
- async
- --dsn=tcp://clickhouse:9000
- --up=
restart: on-failure
networks:
signoz-net:
name: signoz-net
volumes:
clickhouse:
name: signoz-clickhouse
sqlite:
name: signoz-sqlite
zookeeper-1:
name: signoz-zookeeper-1
-35
View File
@@ -1,35 +0,0 @@
# castings/linux/binary/standard/.env
# --- VERSIONS ---
# As per doc: zookeeper-3.8.5
ZOOKEEPER_VERSION=3.8.5
# As per doc: latest (but we pin for stability, update as needed)
SIGNOZ_VERSION=v0.46.0
OTEL_VERSION=0.102.7
MIGRATOR_VERSION=0.102.7
# --- INSTALLATION PATHS ---
ZK_INSTALL_DIR=/opt/zookeeper
ZK_DATA_DIR=/var/lib/zookeeper
ZK_LOG_DIR=/var/log/zookeeper
SIGNOZ_INSTALL_DIR=/opt/signoz
SIGNOZ_DATA_DIR=/var/lib/signoz
OTEL_INSTALL_DIR=/opt/signoz-otel-collector
OTEL_DATA_DIR=/var/lib/signoz-otel-collector
# --- NETWORK CONFIG ---
# Clickhouse is on localhost per docs
CLICKHOUSE_HOST=127.0.0.1
CLICKHOUSE_TCP_PORT=9000
CLICKHOUSE_PASSWORD=password
# Zookeeper is on localhost
ZK_HOST=127.0.0.1
ZK_CLIENT_PORT=2181
ZK_ADMIN_PORT=3181
# SigNoz
SIGNOZ_HOST=127.0.0.1
SIGNOZ_PORT=8080
@@ -1,16 +0,0 @@
[Unit]
Description=SigNoz OTel Collector
Documentation=https://signoz.io/docs
After=clickhouse-server.service
[Service]
User=signoz
Group=signoz
Type=simple
KillMode=mixed
Restart=on-failure
WorkingDirectory=${OTEL_INSTALL_DIR}
ExecStart=${OTEL_INSTALL_DIR}/bin/signoz-otel-collector --config=${OTEL_INSTALL_DIR}/conf/config.yaml --manager-config=${OTEL_INSTALL_DIR}/conf/opamp.yaml --copy-path=${OTEL_DATA_DIR}/config.yaml
[Install]
WantedBy=multi-user.target
@@ -1,17 +0,0 @@
[Unit]
Description=SigNoz
Documentation=https://signoz.io/docs
After=clickhouse-server.service
[Service]
User=signoz
Group=signoz
Type=simple
KillMode=mixed
Restart=on-failure
WorkingDirectory=${SIGNOZ_INSTALL_DIR}
EnvironmentFile=${SIGNOZ_INSTALL_DIR}/conf/systemd.env
ExecStart=${SIGNOZ_INSTALL_DIR}/bin/signoz server
[Install]
WantedBy=multi-user.target
@@ -1,18 +0,0 @@
[Unit]
Description=Zookeeper
Documentation=http://zookeeper.apache.org
[Service]
EnvironmentFile=${ZOOKEEPER_INSTALL_DIR}/conf/zoo.env
Type=forking
WorkingDirectory=${ZOOKEEPER_INSTALL_DIR}
User=zookeeper
Group=zookeeper
ExecStart=${ZOOKEEPER_INSTALL_DIR}/bin/zkServer.sh start ${ZOOKEEPER_INSTALL_DIR}/conf/zoo.cfg
ExecStop=${ZOOKEEPER_INSTALL_DIR}/bin/zkServer.sh stop ${ZOOKEEPER_INSTALL_DIR}/conf/zoo.cfg
ExecReload=${ZOOKEEPER_INSTALL_DIR}/bin/zkServer.sh restart ${ZOOKEEPER_INSTALL_DIR}/conf/zoo.cfg
TimeoutSec=30
Restart=on-failure
[Install]
WantedBy=multi-user.target
+46 -6
View File
@@ -1,9 +1,15 @@
// Package main provides the foundryctl CLI tool for managing deployments.
package main
import (
"context"
"log/slog"
"path/filepath"
"github.com/SigNoz/foundry/internal/instrumentation"
"github.com/hanzoai/o11y-foundry/internal/domain"
"github.com/hanzoai/o11y-foundry/internal/errors"
foundryerrors "github.com/hanzoai/o11y-foundry/internal/errors"
"github.com/hanzoai/o11y-foundry/internal/foundry"
"github.com/spf13/cobra"
)
@@ -11,14 +17,48 @@ func registerCastCmd(rootCmd *cobra.Command) {
castCmd := &cobra.Command{
Use: "cast",
Short: "Cast to the target environment.",
RunE: func(cmd *cobra.Command, args []string) error {
logger := instrumentation.NewLogger(cfg.Debug).With(slog.String("cmd.name", "cast"))
RunE: recoverRunE(domain.EventCast, func(cmd *cobra.Command, args []string) (domain.Properties, error) {
ctx := cmd.Context()
logger.DebugContext(ctx, "starting command", slog.String("cfg.file", cfg.File))
return nil
},
if !castCfg.NoGauge {
if props, err := runGauge(ctx, rootLogger, commonCfg.File); err != nil {
return props, err
}
}
if !castCfg.NoForge {
if props, err := runForge(ctx, rootLogger, commonCfg.File, poursCfg.Path); err != nil {
return props, err
}
}
return runCast(ctx, rootLogger, poursCfg.Path, commonCfg.File)
}),
}
rootCmd.AddCommand(castCmd)
castCfg.RegisterFlags(castCmd)
}
func runCast(ctx context.Context, logger *slog.Logger, poursPath string, configPath string) (domain.Properties, error) {
foundry, err := foundry.New(logger)
if err != nil {
logger.ErrorContext(ctx, "failed to create foundry, please report this issues to developers at https://github.com/hanzoai/o11y-foundry/issues", foundryerrors.LogAttr(err))
return domain.NewProperties(), err
}
poursPath, err = filepath.Abs(poursPath)
if err != nil {
return domain.NewProperties(), errors.Wrapf(err, errors.TypeInternal, "failed to resolve pours path")
}
machinery, err := foundry.Config.GetV1Alpha1Lock(ctx, configPath)
if err != nil {
return domain.NewProperties(), err
}
props := machinery.TrackableProperties()
err = foundry.Cast(ctx, machinery, poursPath)
return props, err
}
+106
View File
@@ -0,0 +1,106 @@
package main
import (
"encoding/json"
"log/slog"
"os"
"sort"
"github.com/hanzoai/o11y-foundry/api/v1alpha1"
installationcasting "github.com/hanzoai/o11y-foundry/internal/casting/installation"
"github.com/hanzoai/o11y-foundry/internal/domain"
"github.com/olekukonko/tablewriter"
"github.com/spf13/cobra"
)
func registerCatalogCmd(rootCmd *cobra.Command) {
catalogCmd := &cobra.Command{
Use: "catalog",
Short: "Show available castings",
RunE: recoverRunE(domain.EventCatalog, func(cmd *cobra.Command, args []string) (domain.Properties, error) {
return runCatalog(rootLogger)
}),
}
catalogCfg.RegisterFlags(catalogCmd)
rootCmd.AddCommand(catalogCmd)
}
type castingEntry struct {
Platform string `json:"platform"`
Mode string `json:"mode"`
Flavor string `json:"flavor"`
Example string `json:"example"`
}
func castingExample(d v1alpha1.TypeDeployment) string {
platform, mode, flavor := d.Platform.String(), d.Mode.String(), d.Flavor.String()
switch {
case platform != "" && mode != "":
return platform + "/" + mode + "/" + flavor
case platform != "":
return platform + "/" + flavor
default:
return mode + "/" + flavor
}
}
// catalogGroup returns a sort key that groups entries:
// 0 = mode + flavor (self-hosted: docker, systemd, kubernetes).
// 1 = mode + flavor + platform (cloud infra: ecs).
// 2 = platform + flavor (managed platforms: coolify, render, railway).
func catalogGroup(e castingEntry) int {
switch {
case e.Platform != "" && e.Mode != "":
return 1
case e.Platform != "":
return 2
default:
return 0
}
}
func runCatalog(logger *slog.Logger) (domain.Properties, error) {
registry := installationcasting.NewRegistry(logger)
var entries []castingEntry
for d := range registry.CastingItems() {
entries = append(entries, castingEntry{
Platform: d.Platform.String(),
Mode: d.Mode.String(),
Flavor: d.Flavor.String(),
Example: castingExample(d),
})
}
sort.Slice(entries, func(i, j int) bool {
gi, gj := catalogGroup(entries[i]), catalogGroup(entries[j])
if gi != gj {
return gi < gj
}
return entries[i].Example < entries[j].Example
})
props := domain.NewProperties()
if commonCfg.Format == "text" {
table := tablewriter.NewWriter(os.Stdout)
table.Header("Mode", "Flavor", "Platform", "Example")
for _, e := range entries {
_ = table.Append(e.Mode, e.Flavor, e.Platform, e.Example)
}
return props, table.Render()
}
data, err := json.MarshalIndent(map[string]any{"Castings": entries}, "", " ")
if err != nil {
return props, err
}
if catalogCfg.OutPath != "" {
err = os.WriteFile(catalogCfg.OutPath, data, 0644)
return props, err
}
_, err = os.Stdout.Write(data)
return props, err
}
+46 -7
View File
@@ -3,16 +3,55 @@ package main
import "github.com/spf13/cobra"
var (
// Stores input configuration.
cfg config
// Stores common configuration across all commands.
commonCfg commonConfig
// Stores pours configuration.
poursCfg poursConfig
// Stores cast configuration.
castCfg castConfig
// Stores catalog configuration.
catalogCfg catalogConfig
)
type config struct {
File string
Debug bool
type commonConfig struct {
File string
Debug bool
Format string
NoLedger bool
}
func (c *config) RegisterFlags(cmd *cobra.Command) {
cmd.PersistentFlags().StringVarP(&c.File, "file", "f", "casting.yaml", "Path to casting.yaml file.")
func (c *commonConfig) RegisterFlags(cmd *cobra.Command) {
cmd.PersistentFlags().StringVarP(&c.File, "file", "f", "casting.yaml", "Path to the casting configuration file.")
cmd.PersistentFlags().BoolVarP(&c.Debug, "debug", "d", false, "Enable debug mode.")
cmd.PersistentFlags().StringVar(&c.Format, "format", "json", "Output format for results and errors (json|text).")
cmd.PersistentFlags().BoolVar(&c.NoLedger, "no-ledger", false, "Disable anonymous usage ledger.")
}
type poursConfig struct {
Path string
}
func (c *poursConfig) RegisterFlags(cmd *cobra.Command) {
cmd.PersistentFlags().StringVarP(&c.Path, "pours", "p", "./pours", "Directory for pours containing the deployment and configuration files")
}
type castConfig struct {
NoGauge bool
NoForge bool
}
func (c *castConfig) RegisterFlags(cmd *cobra.Command) {
cmd.PersistentFlags().BoolVar(&c.NoGauge, "no-gauge", false, "Do not run gauge before forge and cast.")
cmd.PersistentFlags().BoolVar(&c.NoForge, "no-forge", false, "Do not run forge before cast.")
}
type catalogConfig struct {
OutPath string
}
func (c *catalogConfig) RegisterFlags(cmd *cobra.Command) {
cmd.Flags().StringVarP(&c.OutPath, "output", "o", "", "Path to write castings.json")
}
+35 -9
View File
@@ -1,24 +1,50 @@
package main
import (
"context"
"log/slog"
"os"
"path/filepath"
"github.com/SigNoz/foundry/internal/instrumentation"
"github.com/hanzoai/o11y-foundry/internal/domain"
foundryerrors "github.com/hanzoai/o11y-foundry/internal/errors"
"github.com/hanzoai/o11y-foundry/internal/foundry"
"github.com/hanzoai/o11y-foundry/internal/writer"
"github.com/spf13/cobra"
)
func registerForgeCmd(rootCmd *cobra.Command) {
forgeCmd := &cobra.Command{
Use: "forge",
Short: "Forge configuration files from moldings.",
RunE: func(cmd *cobra.Command, args []string) error {
logger := instrumentation.NewLogger(cfg.Debug).With(slog.String("cmd.name", "forge"))
ctx := cmd.Context()
logger.DebugContext(ctx, "starting command", slog.String("cfg.file", cfg.File))
return nil
},
Short: "Forge Configuration and Deployment Files",
Long: "Generate deployment configuration files from casting.yaml",
RunE: recoverRunE(domain.EventForge, func(cmd *cobra.Command, args []string) (domain.Properties, error) {
return runForge(cmd.Context(), rootLogger, commonCfg.File, poursCfg.Path)
}),
}
rootCmd.AddCommand(forgeCmd)
}
func runForge(ctx context.Context, logger *slog.Logger, path string, poursPath string) (domain.Properties, error) {
foundry, err := foundry.New(logger)
if err != nil {
logger.ErrorContext(ctx, "failed to create foundry, please report this issues to developers at https://github.com/hanzoai/o11y-foundry/issues", foundryerrors.LogAttr(err))
return domain.NewProperties(), err
}
machinery, err := foundry.Config.GetV1Alpha1(ctx, path)
if err != nil {
return domain.NewProperties(), err
}
props := machinery.TrackableProperties()
poursAbsPath, err := filepath.Abs(poursPath)
if err != nil {
return props, err
}
err = foundry.Forge(ctx, machinery, path, &writer.Options{Output: &os.File{}, TargetDirectory: poursAbsPath})
return props, err
}
+25 -8
View File
@@ -1,9 +1,12 @@
package main
import (
"context"
"log/slog"
"github.com/SigNoz/foundry/internal/instrumentation"
"github.com/hanzoai/o11y-foundry/internal/domain"
foundryerrors "github.com/hanzoai/o11y-foundry/internal/errors"
"github.com/hanzoai/o11y-foundry/internal/foundry"
"github.com/spf13/cobra"
)
@@ -11,14 +14,28 @@ func registerGaugeCmd(rootCmd *cobra.Command) {
gaugeCmd := &cobra.Command{
Use: "gauge",
Short: "Gauge whether required tools are available.",
RunE: func(cmd *cobra.Command, args []string) error {
logger := instrumentation.NewLogger(cfg.Debug).With(slog.String("cmd.name", "gauge"))
ctx := cmd.Context()
logger.DebugContext(ctx, "starting command", slog.String("cfg.file", cfg.File))
return nil
},
RunE: recoverRunE(domain.EventGauge, func(cmd *cobra.Command, args []string) (domain.Properties, error) {
return runGauge(cmd.Context(), rootLogger, commonCfg.File)
}),
}
rootCmd.AddCommand(gaugeCmd)
}
func runGauge(ctx context.Context, logger *slog.Logger, path string) (domain.Properties, error) {
foundry, err := foundry.New(logger)
if err != nil {
logger.ErrorContext(ctx, "failed to create foundry, please report this issues to developers at https://github.com/hanzoai/o11y-foundry/issues", foundryerrors.LogAttr(err))
return domain.NewProperties(), err
}
casting, err := foundry.Config.GetV1Alpha1(ctx, path)
if err != nil {
return domain.NewProperties(), err
}
props := casting.TrackableProperties()
err = foundry.Gauge(ctx, casting)
return props, err
}
+149
View File
@@ -0,0 +1,149 @@
package main
import (
"context"
"encoding/json"
"log/slog"
"os"
"path/filepath"
"reflect"
"strings"
"github.com/hanzoai/o11y-foundry/api/v1alpha1"
"github.com/hanzoai/o11y-foundry/api/v1alpha1/collectionagent"
"github.com/hanzoai/o11y-foundry/api/v1alpha1/installation"
installationcasting "github.com/hanzoai/o11y-foundry/internal/casting/installation"
"github.com/hanzoai/o11y-foundry/internal/domain"
foundryerrors "github.com/hanzoai/o11y-foundry/internal/errors"
"github.com/hanzoai/o11y-foundry/internal/instrumentation"
"github.com/spf13/cobra"
"github.com/swaggest/jsonschema-go"
)
const moduleAPIPrefix = "github.com/hanzoai/o11y-foundry/api/v1alpha1/"
type schemaTarget struct {
kind v1alpha1.Kind
val any
}
var schemaTargets = []schemaTarget{
{v1alpha1.KindInstallation, installation.Casting{}},
{v1alpha1.KindCollectionAgent, collectionagent.Casting{}},
}
func registerGenCmd(rootCmd *cobra.Command) {
genCmd := &cobra.Command{
Use: "gen",
Short: "Generate example files for all supported deployments.",
}
registerGenExamples(genCmd)
registerGenSchemas(genCmd)
rootCmd.AddCommand(genCmd)
}
func registerGenExamples(rootCmd *cobra.Command) {
genExamplesCmd := &cobra.Command{
Use: "examples",
Short: "Generate example files for all supported deployments.",
RunE: func(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()
logger := instrumentation.NewLogger(commonCfg.Debug)
return runGenExamples(ctx, logger)
},
}
rootCmd.AddCommand(genExamplesCmd)
}
func registerGenSchemas(rootCmd *cobra.Command) {
genSchemasCmd := &cobra.Command{
Use: "schemas",
Short: "Generate schema files.",
RunE: func(cmd *cobra.Command, args []string) error {
return runGenSchemas(cmd.Context())
},
}
rootCmd.AddCommand(genSchemasCmd)
}
func runGenExamples(ctx context.Context, logger *slog.Logger) error {
registry := installationcasting.NewRegistry(logger)
for deployment := range registry.CastingItems() {
logger.InfoContext(ctx, "generating example files for deployment", slog.Any("deployment", deployment))
config := installation.Example()
config.Spec.Deployment = deployment
rootPath := filepath.Join("docs", "examples/", deployment.Platform.String(), deployment.Mode.String(), deployment.Flavor.String())
if err := os.MkdirAll(rootPath, 0755); err != nil {
return err
}
if err := os.WriteFile(filepath.Join(rootPath, "casting.yaml"), domain.MustMarshalYAML(config), 0644); err != nil {
return err
}
if _, err := runForge(ctx, logger, filepath.Join(rootPath, "casting.yaml"), filepath.Join(rootPath, "pours")); err != nil {
logger.ErrorContext(ctx, "failed to forge casting", slog.Any("deployment", deployment), foundryerrors.LogAttr(err))
continue
}
}
return nil
}
func runGenSchemas(_ context.Context) error {
var oneOf []jsonschema.SchemaOrBool
kindType := reflect.TypeFor[v1alpha1.Kind]()
for _, t := range schemaTargets {
target := t
reflector := jsonschema.Reflector{}
// v1alpha1.Kind's Enum() returns all Kinds (the type permits any).
// For this per-Kind schema, the kind field is always this Casting's
// Kind, so we narrow the enum at reflection.
reflector.DefaultOptions = append(reflector.DefaultOptions,
jsonschema.InterceptSchema(func(params jsonschema.InterceptSchemaParams) (bool, error) {
if !params.Processed || params.Value.Type() != kindType {
return false, nil
}
params.Schema.Enum = []any{target.kind.String()}
return false, nil
}),
)
schema, err := reflector.Reflect(target.val)
if err != nil {
return foundryerrors.Wrapf(err, foundryerrors.TypeInternal, "reflect %T", target.val)
}
contents, err := json.MarshalIndent(schema, "", " ")
if err != nil {
return foundryerrors.Wrapf(err, foundryerrors.TypeInternal, "marshal %T", target.val)
}
kindDir := strings.TrimPrefix(reflect.TypeOf(target.val).PkgPath(), moduleAPIPrefix)
if err := os.WriteFile(filepath.Join("api", "v1alpha1", kindDir, "casting.schema.json"), contents, 0644); err != nil {
return err
}
ref := (&jsonschema.Schema{}).WithRef(filepath.Join(kindDir, "casting.schema.json"))
oneOf = append(oneOf, ref.ToSchemaOrBool())
}
root := (&jsonschema.Schema{}).
WithSchema("http://json-schema.org/draft-07/schema#").
WithTitle("Foundry Casting").
WithOneOf(oneOf...)
rootContents, err := json.MarshalIndent(root, "", " ")
if err != nil {
return err
}
return os.WriteFile(filepath.Join("api", "v1alpha1", "casting.schema.json"), rootContents, 0644)
}
+10 -9
View File
@@ -1,36 +1,37 @@
package main
import (
"log/slog"
"os"
"github.com/SigNoz/foundry/internal/instrumentation"
foundryerrors "github.com/hanzoai/o11y-foundry/internal/errors"
"github.com/spf13/cobra"
)
func main() {
rootCmd := &cobra.Command{
Use: "foundryctl",
SilenceUsage: true,
CompletionOptions: cobra.CompletionOptions{
DisableDefaultCmd: true,
},
PersistentPreRunE: newRoot,
}
// Register configuration.
cfg.RegisterFlags(rootCmd)
// Initialize instrumentation for the cmd/ package.
logger := instrumentation.NewLogger(false)
commonCfg.RegisterFlags(rootCmd)
poursCfg.RegisterFlags(rootCmd)
// Register commands.
registerGaugeCmd(rootCmd)
registerForgeCmd(rootCmd)
registerCastCmd(rootCmd)
registerGenCmd(rootCmd)
registerCatalogCmd(rootCmd)
registerVersionCmd(rootCmd)
defer closeRoot()
if err := rootCmd.Execute(); err != nil {
logger.ErrorContext(rootCmd.Context(), "failed to execute command", slog.Any("error", err))
os.Exit(1)
os.Exit(foundryerrors.ExitCode(err))
}
}
+82
View File
@@ -0,0 +1,82 @@
package main
import (
"log/slog"
"os"
"runtime"
"github.com/hanzoai/o11y-foundry/internal/domain"
foundryerrors "github.com/hanzoai/o11y-foundry/internal/errors"
"github.com/hanzoai/o11y-foundry/internal/instrumentation"
"github.com/hanzoai/o11y-foundry/internal/ledger"
"github.com/hanzoai/o11y-foundry/internal/ledger/noopledger"
"github.com/hanzoai/o11y-foundry/internal/ledger/segmentledger"
"github.com/hanzoai/o11y-foundry/internal/writer"
"github.com/spf13/cobra"
)
var (
rootLogger *slog.Logger
rootTracker ledger.Ledger
)
// newRoot is wired as rootCmd.PersistentPreRunE so it fires after persistent
// flags are parsed and before any command's RunE runs.
func newRoot(_ *cobra.Command, _ []string) error {
rootLogger = instrumentation.NewLogger(commonCfg.Debug)
config := ledger.NewConfig()
if commonCfg.NoLedger {
config.Enabled = false
}
switch config.Provider() {
case "segment":
rootTracker = segmentledger.New(config)
default:
rootTracker = noopledger.New()
}
return nil
}
func closeRoot() {
if rootTracker != nil {
_ = rootTracker.Close()
}
}
func recoverRunE(
event domain.Event,
runE func(cmd *cobra.Command, args []string) (domain.Properties, error),
) func(cmd *cobra.Command, args []string) error {
return func(cmd *cobra.Command, args []string) (err error) {
ctx := cmd.Context()
props := domain.NewProperties()
defer func() {
if r := recover(); r != nil {
buf := make([]byte, 4096)
n := runtime.Stack(buf, false)
errp := foundryerrors.Newf(foundryerrors.TypeFatal, "%v", r).WithStacktrace(string(buf[:n]))
err = errp
}
if err != nil {
rootLogger.ErrorContext(ctx, event.String()+" failed", foundryerrors.LogAttr(err))
rootTracker.Track(ctx, event.Failed(), props.WithError(err))
if commonCfg.Format == "json" {
_ = writer.WriteOutput(os.Stdout, foundryerrors.EnvelopeOf(err))
cmd.SilenceErrors = true
}
return
}
rootTracker.Track(ctx, event.Succeeded(), props.WithSuccess())
}()
props, err = runE(cmd, args)
return err
}
}
+36
View File
@@ -0,0 +1,36 @@
package main
import (
"fmt"
"os"
"github.com/hanzoai/o11y-foundry/internal/version"
"github.com/spf13/cobra"
)
var versionCfg versionConfig
type versionConfig struct {
Short bool
}
func (c *versionConfig) RegisterFlags(cmd *cobra.Command) {
cmd.Flags().BoolVar(&c.Short, "short", false, "Print version in a single line")
}
func registerVersionCmd(rootCmd *cobra.Command) {
versionCmd := &cobra.Command{
Use: "version",
Short: "Print the version information",
Run: func(cmd *cobra.Command, args []string) {
if versionCfg.Short {
_, _ = fmt.Fprintln(os.Stdout, version.Info.Short())
return
}
version.Info.PrettyPrint()
},
}
versionCfg.RegisterFlags(versionCmd)
rootCmd.AddCommand(versionCmd)
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 MiB

+58
View File
@@ -0,0 +1,58 @@
# Annotations
Annotations are key-value pairs in `metadata.annotations` that provide deployment-specific configuration to Foundry. They are inputs to the generation process - Foundry reads them during forge and uses them to populate templates and configure behavior.
## How annotations work
Annotations live in the casting file's metadata block:
```yaml
apiVersion: v1alpha1
metadata:
name: signoz
annotations:
foundry.signoz.io/some-key: some-value
spec:
deployment:
mode: systemd
flavor: binary
```
During forge, Foundry reads annotation values and injects them into the generated output. For example, systemd annotations set binary paths in the generated `.service` files. ECS annotations populate Terraform variables in the generated `terraform.tfvars.json`.
## Annotations vs patches
Annotations and patches serve different roles in the generation pipeline:
| | Annotations | Patches |
|---|---|---|
| **Where** | `metadata.annotations` | `spec.patches` |
| **When** | Before generation - Foundry reads them as input | After generation - Foundry applies them to output |
| **What** | Deployment-specific parameters (paths, IDs, ARNs) that Foundry needs to generate files correctly | Modifications to already-generated files (resource limits, storage classes, scheduling) |
| **Validated** | Yes - Foundry reads and uses them during template execution | No - Foundry passes them through as-is |
In short: annotations tell Foundry *how to generate*, patches tell Foundry *what to change after generating*.
### When to use which
Use **annotations** when Foundry needs the value during generation. These are typically infrastructure identifiers, file paths, or settings that determine the shape of the generated output. You cannot achieve the same result with patches because the value must exist before files are generated.
Use **patches** when you want to modify a generated file after the fact. These are typically platform-specific tuning (resource limits, scheduling, service types) that Foundry doesn't need to understand.
## Which castings use annotations
Not all deployment modes require annotations. Most modes (Docker Compose, Docker Swarm, Kubernetes Kustomize, Render, Coolify, Railway) work with just `metadata.name` and `spec.deployment`.
| Casting | Required | Annotations |
|---|---|---|
| [Systemd (binary)](../examples/systemd/binary/) | Yes | Binary paths for SigNoz, ingester, and PostgreSQL |
| [ECS EC2 (Terraform)](../examples/ecs/ec2/terraform/) | Yes | AWS region, cluster ID, subnets, security groups, IAM roles, S3 bucket |
| [Kubernetes (Helm)](../examples/kubernetes/helm/) | No | Optional chart repo and chart name overrides |
For the complete list of annotation keys and their descriptions, see [Casting File Reference](../reference/casting-file.md#annotations).
## Next steps
- [Patches](patches.md) - post-generation modifications
- [Casting](casting.md) - the full casting file structure
- [Casting file reference](../reference/casting-file.md#annotations) - complete annotation reference
+144
View File
@@ -0,0 +1,144 @@
# Casting
A casting is one YAML file that describes a complete SigNoz deployment. Foundry reads it, merges your overrides with built-in defaults, and generates everything needed to run the stack.
The casting file is the single source of truth for your deployment. You define what you want; Foundry handles the rest.
## Structure
A casting has five parts:
1. **Metadata** - name your deployment and set annotations
2. **Deployment target** - where it runs (Docker, Kubernetes, systemd, cloud platform)
3. **Moldings** - which components to include and how to configure them
4. **Annotations** - deployment-specific parameters Foundry reads during generation
5. **Patches** - platform-level overrides on the generated output
```yaml
apiVersion: v1alpha1
metadata:
name: <deployment-name>
spec:
deployment:
mode: <mode>
flavor: <flavor>
platform: <platform> # only for cloud platforms
signoz:
spec: { ... }
ingester:
spec: { ... }
telemetrystore:
spec: { ... }
telemetrykeeper:
spec: { ... }
metastore:
kind: postgres # or sqlite
spec: { ... }
patches: [ ... ]
```
Replace `<deployment-name>` with an identifier for this deployment (for example, `signoz-prod`). This name is used as a prefix in generated service names.
## Metadata
```yaml
apiVersion: v1alpha1
metadata:
name: signoz-prod
annotations: {} # optional; required for some deployment modes
```
`name` is required. Short, environment-specific names work best since they end up in generated service names.
`annotations` is optional for most deployment modes. Some modes (systemd, ECS, Helm) use annotations to pass deployment-specific parameters. See [Annotations](annotations.md) for when and how to use them.
## Deployment target
`spec.deployment` tells Foundry how you're deploying. It picks the right generator and produces the right artifacts.
```yaml
spec:
deployment:
mode: docker
flavor: compose
```
Each row below is a valid combination. Mixing values across rows is not supported.
| Target | `mode` | `flavor` | `platform` |
|---|---|---|---|
| Docker Compose | `docker` | `compose` | - |
| Docker Swarm | `docker` | `swarm` | - |
| Systemd (binary) | `systemd` | `binary` | - |
| Kubernetes (Kustomize) | `kubernetes` | `kustomize` | - |
| Kubernetes (Helm) | `kubernetes` | `helm` | - |
| Render | - | `blueprint` | `render` |
| Coolify | - | `stack` | `coolify` |
| Railway | - | `template` | `railway` |
| AWS ECS (EC2) | `ec2` | `terraform` | `ecs` |
> [!TIP]
> Run `foundryctl gen examples` to generate a working `casting.yaml` for every supported deployment mode.
## Moldings
Moldings are the individual components of a SigNoz deployment. Foundry has defaults for all of them. Add a block under `spec` only when you want to change something.
See [Moldings](moldings.md) for details on each component and how to configure them.
## Annotations
Annotations provide deployment-specific parameters that Foundry reads during generation. They are inputs to the pipeline, not modifications to the output.
Most deployment modes don't require annotations. Systemd and ECS do. Helm supports optional chart overrides.
See [Annotations](annotations.md) for the full guide, including how annotations differ from patches.
## Patches
Patches let you customize any generated output file without Foundry needing to model every platform-specific field. They use JSON Patch (RFC 6902) operations.
See [Patches](patches.md) for the full guide.
## Minimal example
Docker Compose with all defaults:
```yaml
apiVersion: v1alpha1
metadata:
name: signoz
spec:
deployment:
mode: docker
flavor: compose
```
With overrides for images and scaling:
```yaml
apiVersion: v1alpha1
metadata:
name: signoz
spec:
deployment:
mode: docker
flavor: compose
signoz:
spec:
image: signoz/signoz:v0.110.0
telemetrystore:
spec:
image: clickhouse/clickhouse-server:25.5.6
cluster:
replicas: 1
shards: 1
```
## Next steps
- [Moldings](moldings.md) - configure individual components
- [Annotations](annotations.md) - deployment-specific parameters
- [Patches](patches.md) - platform-level overrides
- [Casting file reference](../reference/casting-file.md) - complete field-by-field reference
- [Examples](../examples/) - working examples for every deployment mode
+107
View File
@@ -0,0 +1,107 @@
# Moldings
Moldings are the individual components that make up a SigNoz deployment. Each molding maps to a service (ClickHouse, PostgreSQL, OTel Collector, etc.) and generates the configuration and deployment files for that service.
Foundry ships with sensible defaults for every molding. Override only what you need by adding a block under `spec` in your casting.
## Components
| Key in `spec` | Component | Role |
|---|---|---|
| `telemetrykeeper` | ClickHouse Keeper | Cluster coordination for ClickHouse |
| `telemetrystore` | ClickHouse | Stores logs, traces, and metrics |
| `metastore` | PostgreSQL or SQLite | Stores metadata (dashboards, alerts, users) |
| `signoz` | SigNoz | UI and API server |
| `ingester` | SigNoz OTel Collector | Receives, processes, and writes telemetry data |
### Processing order
Foundry processes moldings in dependency order during forge:
```
TelemetryKeeper -> TelemetryStore -> MetaStore -> SigNoz -> Ingester
```
This ensures each component's configuration can reference its dependencies.
## Configuring a molding
Override a molding by giving it a `spec` block. Whatever you set gets merged with Foundry's defaults.
```yaml
spec:
telemetrystore:
spec:
image: clickhouse/clickhouse-server:25.5.6
cluster:
replicas: 1
shards: 1
```
### Spec fields
| Field | Description |
|---|---|
| `enabled` | Turn the component on or off (default: `true`) |
| `image` | Container image (Docker and Kubernetes modes) |
| `version` | Version label (systemd mode, tagging) |
| `cluster.replicas` | Number of replicas |
| `cluster.shards` | Number of shards (TelemetryStore only) |
| `env` | Environment variables as a key-value map |
| `config.data` | Config file overrides: filename to file contents |
### Disabling a molding
Set `enabled: false` to exclude a component from the deployment:
```yaml
spec:
telemetrykeeper:
spec:
enabled: false
```
### Custom config files
Use `config.data` to override the contents of a component's config files. The key is the filename; the value is the file contents.
```yaml
spec:
ingester:
spec:
config:
data:
ingester.yaml: |
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
```
> [!NOTE]
> `config.data` overrides application-level config files that Foundry understands and manages. For platform-level files (compose files, service units, Kubernetes manifests), use [patches](patches.md) instead.
### MetaStore kind
The metastore supports two backends. Set the `kind` field to choose:
```yaml
spec:
metastore:
kind: postgres # default
spec:
image: postgres:16
```
| Kind | Backend | Notes |
|---|---|---|
| `postgres` | PostgreSQL | Default. Recommended for production. |
| `sqlite` | SQLite | Embedded, no external dependency. Single-node only. |
## Next steps
- [Casting](casting.md) - the full casting file structure
- [Annotations](annotations.md) - deployment-specific parameters
- [Patches](patches.md) - platform-level overrides on generated files
- [Casting file reference](../reference/casting-file.md) - complete field reference
+120
View File
@@ -0,0 +1,120 @@
# Patches
Patches let you customize any generated output file using JSON Patch (RFC 6902) operations. They are applied during forge, after Foundry generates materials and before writing to `pours/`.
## Two-tier model
Foundry separates configuration into two layers:
- **`spec.<Molding>`** is the application domain. Foundry understands, validates, and enriches it.
- **`spec.patches`** is the platform domain. Foundry applies it as-is, no validation.
This gives you full coverage over the generated output without Foundry needing to model every platform-specific field. Use `spec.<Molding>` for component configuration (images, replicas, env, config files). Use `patches` for everything else (resource limits, storage classes, service types, scheduling constraints).
## Patch entry fields
| Field | Required | Description |
|---|---|---|
| `type` | No | Patch driver. Defaults to `jsonpatch`. |
| `target` | Yes | Output file to patch. Supports exact path, basename, or glob. |
| `operations` | Yes | List of JSON Patch (RFC 6902) operations. |
## JSON Patch operations
| Operation | Description | Required fields |
|---|---|---|
| `add` | Add a value at path. Append to array with `/-`. | `op`, `path`, `value` |
| `remove` | Remove the value at path. | `op`, `path` |
| `replace` | Replace the value at path. Path must exist. | `op`, `path`, `value` |
| `move` | Move a value from one path to another. | `op`, `from`, `path` |
| `copy` | Copy a value from one path to another. | `op`, `from`, `path` |
| `test` | Assert a value equals the given value. Fails if not. | `op`, `path`, `value` |
## Target matching
- **Exact path:** `target: "deployment/compose.yaml"`
- **Glob:** `target: "deployment/telemetrystore-*.yaml"` matches multiple files
> [!TIP]
> Run `foundryctl forge` first without patches to see the generated file names and structure, then write patches against them.
## Examples
### Docker Compose
Set a memory limit on ClickHouse and add a custom environment variable to SigNoz:
```yaml
spec:
patches:
- target: "compose.yaml"
operations:
- op: replace
path: /services/clickhouse/mem_limit
value: "4G"
- op: add
path: /services/signoz/environment/-
value: "CUSTOM_VAR=value"
```
### Systemd
Change the restart policy and add a memory limit on a service unit:
```yaml
spec:
patches:
- target: "signoz-ingester.service"
operations:
- op: replace
path: /Service/Restart
value: always
- op: add
path: /Service/MemoryMax
value: "4G"
```
### Kubernetes (Kustomize)
Set resource limits on ClickHouse:
```yaml
spec:
patches:
- target: "deployment/telemetrystore/clickhouse/clickhouseinstallation.yaml"
operations:
- op: replace
path: /spec/templates/podTemplates/0/spec/containers/0/resources
value:
requests:
cpu: "2"
memory: "4Gi"
limits:
cpu: "4"
memory: "8Gi"
```
For complete Kubernetes examples with storage classes, tolerations, nodeSelector, and LoadBalancer configuration, see:
- [Kustomize with patches](../examples/kubernetes/kustomize-patches/)
- [Helm with patches](../examples/kubernetes/helm-patches/)
## When to use patches vs config.data
| Use case | Use |
|---|---|
| Application config files (OTel Collector config, ClickHouse config) | `config.data` in the molding spec |
| Platform files (compose files, service units, Kubernetes manifests, Helm values) | `spec.patches` |
> [!NOTE]
> Config files like `otel-collector-config.yaml` or `clickhouse-config.yaml` don't need patches. Use `config.data` in the [molding spec](moldings.md#custom-config-files) instead.
## Patches vs annotations
Patches modify generated output *after* generation. [Annotations](annotations.md) provide parameters *before* generation. If Foundry needs a value to generate files correctly (binary paths, AWS resource IDs), use annotations. If you want to tweak something in the generated output (resource limits, service types), use patches.
## Next steps
- [Annotations](annotations.md) - deployment-specific parameters (pre-generation)
- [Casting](casting.md) - the full casting file structure
- [Moldings](moldings.md) - component configuration
- [Casting file reference](../reference/casting-file.md) - complete field reference
+13
View File
@@ -0,0 +1,13 @@
### Examples
| Platform | Mode | Flavor | Example |
| --- | --- | --- | --- |
| - | docker | compose | [docker/compose](docker/compose/) |
| - | docker | swarm | [docker/swarm](docker/swarm/) |
| - | kubernetes | helm | [kubernetes/helm](kubernetes/helm/) |
| - | kubernetes | kustomize | [kubernetes/kustomize](kubernetes/kustomize/) |
| - | systemd | binary | [systemd/binary](systemd/binary/) |
| ecs | ec2 | terraform | [ecs/ec2/terraform](ecs/ec2/terraform/) |
| coolify | - | stack | [coolify/stack](coolify/stack/) |
| railway | - | template | [railway/template](railway/template/) |
| render | - | blueprint | [render/blueprint](render/blueprint/) |
+7
View File
@@ -0,0 +1,7 @@
### Examples
| Platform | Mode | Flavor | Example |
| --- | --- | --- | --- |
{{- range .Castings }}
| {{ or .platform "-" }} | {{ or .mode "-" }} | {{ or .flavor "-" }} | [{{ .example }}]({{ .example }}/) |
{{- end }}
+58
View File
@@ -0,0 +1,58 @@
{
"Castings": [
{
"platform": "",
"mode": "docker",
"flavor": "compose",
"example": "docker/compose"
},
{
"platform": "",
"mode": "docker",
"flavor": "swarm",
"example": "docker/swarm"
},
{
"platform": "",
"mode": "kubernetes",
"flavor": "helm",
"example": "kubernetes/helm"
},
{
"platform": "",
"mode": "kubernetes",
"flavor": "kustomize",
"example": "kubernetes/kustomize"
},
{
"platform": "",
"mode": "systemd",
"flavor": "binary",
"example": "systemd/binary"
},
{
"platform": "ecs",
"mode": "ec2",
"flavor": "terraform",
"example": "ecs/ec2/terraform"
},
{
"platform": "coolify",
"mode": "",
"flavor": "stack",
"example": "coolify/stack"
},
{
"platform": "railway",
"mode": "",
"flavor": "template",
"example": "railway/template"
},
{
"platform": "render",
"mode": "",
"flavor": "blueprint",
"example": "render/blueprint"
}
]
}
+5
View File
@@ -0,0 +1,5 @@
# Coolify
| Flavor | Description |
| --- | --- |
| [stack](stack/) | Deploy SigNoz on Coolify as a stack |
+50
View File
@@ -0,0 +1,50 @@
# Coolify Stack
| Field | Value |
| --- | --- |
| **Mode** | `-` |
| **Flavor** | `stack` |
| **Platform** | `coolify` |
## Overview
Generates a `coolify.yaml` stack definition for deploying SigNoz on a Coolify-managed server. Deployment is manual via the Coolify dashboard.
> [!NOTE]
> `foundryctl cast` does not deploy to Coolify automatically. It generates the files and prints instructions for manual deployment.
## Prerequisites
- A [Coolify](https://coolify.io) instance (self-hosted or cloud)
## Configuration
```yaml
apiVersion: v1alpha1
metadata:
name: signoz
spec:
deployment:
flavor: stack
platform: coolify
```
## Deploy
```bash
# Generate the stack definition
foundryctl forge -f casting.yaml
```
After forging, deploy the generated `coolify.yaml` using the [Coolify stack feature](https://coolify.io/docs/knowledge-base/docker/compose).
## Generated output
```text
pours/deployment/
coolify.yaml
```
## Customization
For changes to the generated `coolify.yaml`, use [patches](../../../concepts/patches.md).
+8
View File
@@ -0,0 +1,8 @@
apiVersion: v1alpha1
kind: Installation
metadata:
name: signoz
spec:
deployment:
flavor: stack
platform: coolify
@@ -0,0 +1,648 @@
apiVersion: v1alpha1
kind: Installation
metadata:
name: signoz
spec:
deployment:
flavor: stack
platform: coolify
ingester:
spec:
cluster:
replicas: 1
config:
data:
ingester.yaml: |
connectors:
signozmeter:
metrics_flush_interval: 1h
dimensions:
- name: service.name
- name: deployment.environment
- name: host.name
receivers:
otlp:
protocols:
grpc:
endpoint: "0.0.0.0:4317"
http:
endpoint: "0.0.0.0:4318"
processors:
batch:
send_batch_size: 50000
send_batch_max_size: 55000
timeout: 5s
batch/meter:
send_batch_size: 20000
send_batch_max_size: 25000
timeout: 5s
signozspanmetrics/delta:
metrics_exporter: signozclickhousemetrics
metrics_flush_interval: 60s
latency_histogram_buckets:
- 100us
- 1ms
- 2ms
- 6ms
- 10ms
- 50ms
- 100ms
- 250ms
- 500ms
- 1000ms
- 1400ms
- 2000ms
- 5s
- 10s
- 20s
- 40s
- 60s
dimensions_cache_size: 100000
aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
enable_exp_histogram: true
dimensions:
- name: service.namespace
default: default
- name: deployment.environment
default: default
- name: signoz.collector.id
- name: service.version
exporters:
clickhousetraces:
datasource: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_traces
low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
use_new_schema: true
timeout: 45s
sending_queue:
enabled: false
signozclickhousemetrics:
dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metrics
timeout: 45s
sending_queue:
enabled: false
clickhouselogsexporter:
dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_logs
use_new_schema: true
timeout: 45s
sending_queue:
enabled: false
signozclickhousemeter:
dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_meter
timeout: 45s
sending_queue:
enabled: false
metadataexporter:
enabled: true
dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metadata
timeout: 45s
cache:
provider: in_memory
extensions:
signoz_health_check:
endpoint: "0.0.0.0:13133"
pprof:
endpoint: "0.0.0.0:1777"
service:
telemetry:
logs:
encoding: json
extensions:
- signoz_health_check
- pprof
pipelines:
traces:
receivers:
- otlp
processors:
- signozspanmetrics/delta
- batch
exporters:
- clickhousetraces
- signozmeter
- metadataexporter
metrics:
receivers:
- otlp
processors:
- batch
exporters:
- signozclickhousemetrics
- signozmeter
- metadataexporter
logs:
receivers:
- otlp
processors:
- batch
exporters:
- clickhouselogsexporter
- signozmeter
- metadataexporter
metrics/meter:
receivers:
- signozmeter
processors:
- batch/meter
exporters:
- signozclickhousemeter
opamp.yaml: |
server_endpoint: ws://signoz-signoz-0:4320/v1/opamp
enabled: true
env:
SIGNOZ_OTEL_COLLECTOR_TIMEOUT: 10m
image: signoz/signoz-otel-collector:latest
version: latest
status:
addresses:
otlp:
- tcp://signoz-ingester:4318
- tcp://signoz-ingester:4317
config:
data:
ingester.yaml: |
connectors:
signozmeter:
metrics_flush_interval: 1h
dimensions:
- name: service.name
- name: deployment.environment
- name: host.name
receivers:
otlp:
protocols:
grpc:
endpoint: "0.0.0.0:4317"
http:
endpoint: "0.0.0.0:4318"
processors:
batch:
send_batch_size: 50000
send_batch_max_size: 55000
timeout: 5s
batch/meter:
send_batch_size: 20000
send_batch_max_size: 25000
timeout: 5s
signozspanmetrics/delta:
metrics_exporter: signozclickhousemetrics
metrics_flush_interval: 60s
latency_histogram_buckets:
- 100us
- 1ms
- 2ms
- 6ms
- 10ms
- 50ms
- 100ms
- 250ms
- 500ms
- 1000ms
- 1400ms
- 2000ms
- 5s
- 10s
- 20s
- 40s
- 60s
dimensions_cache_size: 100000
aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
enable_exp_histogram: true
dimensions:
- name: service.namespace
default: default
- name: deployment.environment
default: default
- name: signoz.collector.id
- name: service.version
exporters:
clickhousetraces:
datasource: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_traces
low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
use_new_schema: true
timeout: 45s
sending_queue:
enabled: false
signozclickhousemetrics:
dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metrics
timeout: 45s
sending_queue:
enabled: false
clickhouselogsexporter:
dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_logs
use_new_schema: true
timeout: 45s
sending_queue:
enabled: false
signozclickhousemeter:
dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_meter
timeout: 45s
sending_queue:
enabled: false
metadataexporter:
enabled: true
dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metadata
timeout: 45s
cache:
provider: in_memory
extensions:
signoz_health_check:
endpoint: "0.0.0.0:13133"
pprof:
endpoint: "0.0.0.0:1777"
service:
telemetry:
logs:
encoding: json
extensions:
- signoz_health_check
- pprof
pipelines:
traces:
receivers:
- otlp
processors:
- signozspanmetrics/delta
- batch
exporters:
- clickhousetraces
- signozmeter
- metadataexporter
metrics:
receivers:
- otlp
processors:
- batch
exporters:
- signozclickhousemetrics
- signozmeter
- metadataexporter
logs:
receivers:
- otlp
processors:
- batch
exporters:
- clickhouselogsexporter
- signozmeter
- metadataexporter
metrics/meter:
receivers:
- signozmeter
processors:
- batch/meter
exporters:
- signozclickhousemeter
opamp.yaml: |
server_endpoint: ws://signoz-signoz-0:4320/v1/opamp
env:
SIGNOZ_OTEL_COLLECTOR_TIMEOUT: 10m
metastore:
kind: postgres
spec:
cluster:
replicas: 1
config: {}
enabled: true
env:
POSTGRES_DB: signoz
POSTGRES_PASSWORD: signoz
POSTGRES_USER: signoz
image: postgres:16
version: "16"
status:
addresses:
dsn:
- tcp://signoz-metastore-postgres-0:5432
config: {}
env:
POSTGRES_DB: signoz
POSTGRES_PASSWORD: signoz
POSTGRES_USER: signoz
signoz:
spec:
cluster:
replicas: 1
config: {}
enabled: true
env:
SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@signoz-metastore-postgres-0:5432/signoz?sslmode=disable
SIGNOZ_SQLSTORE_PROVIDER: postgres
SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-telemetrystore-clickhouse-0-0:9000
SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
image: signoz/signoz:latest
version: latest
status:
addresses:
apiserver:
- tcp://signoz-signoz-0:8080
opamp:
- ws://signoz-signoz-0:4320
config: {}
env:
SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@signoz-metastore-postgres-0:5432/signoz?sslmode=disable
SIGNOZ_SQLSTORE_PROVIDER: postgres
SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://signoz-telemetrystore-clickhouse-0-0:9000
SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
telemetrykeeper:
kind: clickhousekeeper
spec:
cluster:
replicas: 1
config:
data:
keeper-0.yaml: |
listen_host: 0.0.0.0
logger:
level: information
console: true
keeper_server:
four_letter_word_white_list: "*"
coordination_settings:
operation_timeout_ms: 10000
raft_logs_level: warning
session_timeout_ms: 30000
force_sync: false
snapshot_distance: 100000
snapshots_to_keep: 3
log_storage_path: /var/lib/clickhouse/coordination/log
raft_configuration:
server:
- hostname: signoz-telemetrykeeper-clickhousekeeper-0
port: 9234
id: 0
server_id: 0
snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
tcp_port: 9181
enabled: true
image: clickhouse/clickhouse-keeper:25.5.6
version: 25.5.6
status:
addresses:
client:
- tcp://signoz-telemetrykeeper-clickhousekeeper-0:9181
raft:
- tcp://signoz-telemetrykeeper-clickhousekeeper-0:9234
config:
data:
keeper-0.yaml: |
listen_host: 0.0.0.0
logger:
level: information
console: true
keeper_server:
four_letter_word_white_list: "*"
coordination_settings:
operation_timeout_ms: 10000
raft_logs_level: warning
session_timeout_ms: 30000
force_sync: false
snapshot_distance: 100000
snapshots_to_keep: 3
log_storage_path: /var/lib/clickhouse/coordination/log
raft_configuration:
server:
- hostname: signoz-telemetrykeeper-clickhousekeeper-0
port: 9234
id: 0
server_id: 0
snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
tcp_port: 9181
telemetrystore:
kind: clickhouse
spec:
cluster:
replicas: 0
shards: 1
config:
data:
config-0-0.yaml: |
path: /var/lib/clickhouse/
tmp_path: /var/lib/clickhouse/tmp/
user_files_path: /var/lib/clickhouse/user_files/
format_schema_path: /var/lib/clickhouse/format_schemas/
dictionaries_config: '*_dictionary.xml'
display_name: cluster
distributed_ddl:
path: /clickhouse/task_queue/ddl
http_port: 8123
interserver_http_port: 9009
listen_host: 0.0.0.0
logger:
console: 1
count: 10
formatting:
type: console
level: information
size: 1000M
macros:
replica: "00"
shard: "00"
profiles:
default:
allow_simdjson: 0
load_balancing: random
log_queries: 1
quotas:
default:
interval:
duration: 3600
errors: 0
execution_time: 0
queries: 0
read_rows: 0
result_rows: 0
user_directories:
users_xml:
path: users.xml
remote_servers:
cluster:
shard:
- replica:
- host: signoz-telemetrystore-clickhouse-0-0
port: 9000
zookeeper:
node:
- host: signoz-telemetrykeeper-clickhousekeeper-0
port: 9181
query_log:
flush_interval_milliseconds: 30000
partition_by: toYYYYMM(event_date)
ttl: "event_date + INTERVAL 1 DAY DELETE"
query_thread_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
query_metric_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
query_views_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
part_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
metric_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
asynchronous_metric_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
trace_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
error_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
latency_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
processors_profile_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
session_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
text_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
zookeeper_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
tcp_port: 9000
user_defined_executable_functions_config: '*function.yaml'
user_scripts_path: /var/lib/clickhouse/user_scripts/
users:
default:
access_management: 1
named_collection_control: 1
networks:
ip: ::/0
password: ""
profile: default
quota: default
show_named_collection: 1
show_named_collection_secrets: 1
functions.yaml: |
functions:
argument:
- name: buckets
type: Array(Float64)
- name: counts
type: Array(Float64)
- name: quantile
type: Array(Float64)
command: ./histogramQuantile
format: CSV
name: histogramQuantile
return_type: Float64
type: executable
enabled: true
image: clickhouse/clickhouse-server:25.5.6
version: 25.5.6
status:
addresses:
tcp:
- tcp://signoz-telemetrystore-clickhouse-0-0:9000
config:
data:
config-0-0.yaml: |
path: /var/lib/clickhouse/
tmp_path: /var/lib/clickhouse/tmp/
user_files_path: /var/lib/clickhouse/user_files/
format_schema_path: /var/lib/clickhouse/format_schemas/
dictionaries_config: '*_dictionary.xml'
display_name: cluster
distributed_ddl:
path: /clickhouse/task_queue/ddl
http_port: 8123
interserver_http_port: 9009
listen_host: 0.0.0.0
logger:
console: 1
count: 10
formatting:
type: console
level: information
size: 1000M
macros:
replica: "00"
shard: "00"
profiles:
default:
allow_simdjson: 0
load_balancing: random
log_queries: 1
quotas:
default:
interval:
duration: 3600
errors: 0
execution_time: 0
queries: 0
read_rows: 0
result_rows: 0
user_directories:
users_xml:
path: users.xml
remote_servers:
cluster:
shard:
- replica:
- host: signoz-telemetrystore-clickhouse-0-0
port: 9000
zookeeper:
node:
- host: signoz-telemetrykeeper-clickhousekeeper-0
port: 9181
query_log:
flush_interval_milliseconds: 30000
partition_by: toYYYYMM(event_date)
ttl: "event_date + INTERVAL 1 DAY DELETE"
query_thread_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
query_metric_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
query_views_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
part_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
metric_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
asynchronous_metric_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
trace_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
error_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
latency_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
processors_profile_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
session_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
text_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
zookeeper_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
tcp_port: 9000
user_defined_executable_functions_config: '*function.yaml'
user_scripts_path: /var/lib/clickhouse/user_scripts/
users:
default:
access_management: 1
named_collection_control: 1
networks:
ip: ::/0
password: ""
profile: default
quota: default
show_named_collection: 1
show_named_collection_secrets: 1
functions.yaml: |
functions:
argument:
- name: buckets
type: Array(Float64)
- name: counts
type: Array(Float64)
- name: quantile
type: Array(Float64)
command: ./histogramQuantile
format: CSV
name: histogramQuantile
return_type: Float64
type: executable
@@ -0,0 +1,484 @@
services:
ingester:
command:
- -c
- |
/signoz-otel-collector migrate sync check &&
/signoz-otel-collector --config=/etc/otel-collector-config.yaml --manager-config=/etc/opamp-config.yaml --copy-path=/var/tmp/collector-config.yaml
depends_on:
signoz-signoz-0:
condition: service_started
signoz-telemetrystore-clickhouse-0-0:
condition: service_healthy
signoz-telemetrystore-migrator:
condition: service_completed_successfully
deploy:
replicas: 1
entrypoint:
- /bin/sh
environment:
- OTEL_RESOURCE_ATTRIBUTES=host.name=signoz-host,os.type=linux
- LOW_CARDINAL_EXCEPTION_GROUPING=false
- SIGNOZ_OTEL_COLLECTOR_TIMEOUT=10m
image: signoz/signoz-otel-collector:latest
logging:
options:
max-file: "3"
max-size: 50m
networks:
default:
aliases:
- signoz-ingester
volumes:
- content: |
connectors:
signozmeter:
metrics_flush_interval: 1h
dimensions:
- name: service.name
- name: deployment.environment
- name: host.name
receivers:
otlp:
protocols:
grpc:
endpoint: "0.0.0.0:4317"
http:
endpoint: "0.0.0.0:4318"
processors:
batch:
send_batch_size: 50000
send_batch_max_size: 55000
timeout: 5s
batch/meter:
send_batch_size: 20000
send_batch_max_size: 25000
timeout: 5s
signozspanmetrics/delta:
metrics_exporter: signozclickhousemetrics
metrics_flush_interval: 60s
latency_histogram_buckets:
- 100us
- 1ms
- 2ms
- 6ms
- 10ms
- 50ms
- 100ms
- 250ms
- 500ms
- 1000ms
- 1400ms
- 2000ms
- 5s
- 10s
- 20s
- 40s
- 60s
dimensions_cache_size: 100000
aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
enable_exp_histogram: true
dimensions:
- name: service.namespace
default: default
- name: deployment.environment
default: default
- name: signoz.collector.id
- name: service.version
exporters:
clickhousetraces:
datasource: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_traces
low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
use_new_schema: true
timeout: 45s
sending_queue:
enabled: false
signozclickhousemetrics:
dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metrics
timeout: 45s
sending_queue:
enabled: false
clickhouselogsexporter:
dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_logs
use_new_schema: true
timeout: 45s
sending_queue:
enabled: false
signozclickhousemeter:
dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_meter
timeout: 45s
sending_queue:
enabled: false
metadataexporter:
enabled: true
dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metadata
timeout: 45s
cache:
provider: in_memory
extensions:
signoz_health_check:
endpoint: "0.0.0.0:13133"
pprof:
endpoint: "0.0.0.0:1777"
service:
telemetry:
logs:
encoding: json
extensions:
- signoz_health_check
- pprof
pipelines:
traces:
receivers:
- otlp
processors:
- signozspanmetrics/delta
- batch
exporters:
- clickhousetraces
- signozmeter
- metadataexporter
metrics:
receivers:
- otlp
processors:
- batch
exporters:
- signozclickhousemetrics
- signozmeter
- metadataexporter
logs:
receivers:
- otlp
processors:
- batch
exporters:
- clickhouselogsexporter
- signozmeter
- metadataexporter
metrics/meter:
receivers:
- signozmeter
processors:
- batch/meter
exporters:
- signozclickhousemeter
source: ./configs/ingester/ingester.yaml
target: /etc/otel-collector-config.yaml
type: bind
- content: |
server_endpoint: ws://signoz-signoz-0:4320/v1/opamp
source: ./configs/ingester/opamp.yaml
target: /etc/opamp-config.yaml
type: bind
signoz-metastore-postgres-0:
environment:
- POSTGRES_USER=signoz
- POSTGRES_PASSWORD=signoz
- POSTGRES_DB=signoz
healthcheck:
interval: 30s
retries: 3
test:
- CMD-SHELL
- pg_isready -U signoz -d signoz
timeout: 5s
image: postgres:16
logging:
options:
max-file: "3"
max-size: 50m
volumes:
- source: signoz-metastore-0-data
target: /var/lib/postgresql/data
type: volume
signoz-signoz-0:
container_name: signoz-signoz-0
depends_on:
signoz-metastore-postgres-0:
condition: service_healthy
signoz-telemetrystore-clickhouse-0-0:
condition: service_healthy
signoz-telemetrystore-migrator:
condition: service_completed_successfully
environment:
- SIGNOZ_SQLSTORE_POSTGRES_DSN=postgres://signoz:signoz@signoz-metastore-postgres-0:5432/signoz?sslmode=disable
- SIGNOZ_SQLSTORE_PROVIDER=postgres
- SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN=tcp://signoz-telemetrystore-clickhouse-0-0:9000
- SIGNOZ_TELEMETRYSTORE_PROVIDER=clickhouse
healthcheck:
interval: 30s
retries: 3
test:
- CMD
- wget
- --spider
- -q
- localhost:8080/api/v1/health
timeout: 5s
image: signoz/signoz:latest
logging:
options:
max-file: "3"
max-size: 50m
volumes:
- source: signoz-signoz-0-data
target: /var/lib/signoz/
type: volume
signoz-telemetrykeeper-clickhousekeeper-0:
entrypoint:
- /usr/bin/clickhouse-keeper
- --config-file=/etc/clickhouse-keeper/keeper.yaml
healthcheck:
interval: 30s
retries: 3
start_period: 40s
test:
- CMD
- clickhouse-keeper-client
- -h
- localhost
- -p
- "9181"
- -q
- ls
timeout: 10s
image: clickhouse/clickhouse-keeper:25.5.6
logging:
options:
max-file: "3"
max-size: 50m
volumes:
- source: signoz-telemetrykeeper-0-data
target: /var/lib/clickhouse-keeper
type: volume
- content: |
listen_host: 0.0.0.0
logger:
level: information
console: true
keeper_server:
four_letter_word_white_list: "*"
coordination_settings:
operation_timeout_ms: 10000
raft_logs_level: warning
session_timeout_ms: 30000
force_sync: false
snapshot_distance: 100000
snapshots_to_keep: 3
log_storage_path: /var/lib/clickhouse/coordination/log
raft_configuration:
server:
- hostname: signoz-telemetrykeeper-clickhousekeeper-0
port: 9234
id: 0
server_id: 0
snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
tcp_port: 9181
source: ./configs/telemetrykeeper/keeper-0.yaml
target: /etc/clickhouse-keeper/keeper.yaml
type: bind
signoz-telemetrystore-clickhouse-0-0:
depends_on:
signoz-telemetrykeeper-clickhousekeeper-0:
condition: service_healthy
signoz-telemetrystore-clickhouse-user-scripts:
condition: service_completed_successfully
environment:
- CLICKHOUSE_SKIP_USER_SETUP=1
- CLICKHOUSE_CONFIG=/etc/clickhouse-server/config.yaml
healthcheck:
interval: 30s
retries: 3
test:
- CMD
- wget
- --spider
- -q
- 0.0.0.0:8123/ping
timeout: 5s
image: clickhouse/clickhouse-server:25.5.6
logging:
options:
max-file: "3"
max-size: 50m
volumes:
- source: signoz-telemetrystore-0-0-data
target: /var/lib/clickhouse/
type: volume
- read_only: true
source: signoz-telemetrystore-user-scripts
target: /var/lib/clickhouse/user_scripts
type: volume
- content: |
path: /var/lib/clickhouse/
tmp_path: /var/lib/clickhouse/tmp/
user_files_path: /var/lib/clickhouse/user_files/
format_schema_path: /var/lib/clickhouse/format_schemas/
dictionaries_config: '*_dictionary.xml'
display_name: cluster
distributed_ddl:
path: /clickhouse/task_queue/ddl
http_port: 8123
interserver_http_port: 9009
listen_host: 0.0.0.0
logger:
console: 1
count: 10
formatting:
type: console
level: information
size: 1000M
macros:
replica: "00"
shard: "00"
profiles:
default:
allow_simdjson: 0
load_balancing: random
log_queries: 1
quotas:
default:
interval:
duration: 3600
errors: 0
execution_time: 0
queries: 0
read_rows: 0
result_rows: 0
user_directories:
users_xml:
path: users.xml
remote_servers:
cluster:
shard:
- replica:
- host: signoz-telemetrystore-clickhouse-0-0
port: 9000
zookeeper:
node:
- host: signoz-telemetrykeeper-clickhousekeeper-0
port: 9181
query_log:
flush_interval_milliseconds: 30000
partition_by: toYYYYMM(event_date)
ttl: "event_date + INTERVAL 1 DAY DELETE"
query_thread_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
query_metric_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
query_views_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
part_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
metric_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
asynchronous_metric_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
trace_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
error_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
latency_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
processors_profile_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
session_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
text_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
zookeeper_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
tcp_port: 9000
user_defined_executable_functions_config: '*function.yaml'
user_scripts_path: /var/lib/clickhouse/user_scripts/
users:
default:
access_management: 1
named_collection_control: 1
networks:
ip: ::/0
password: ""
profile: default
quota: default
show_named_collection: 1
show_named_collection_secrets: 1
source: ./configs/telemetrystore/config-0-0.yaml
target: /etc/clickhouse-server/config.yaml
type: bind
- content: |
functions:
argument:
- name: buckets
type: Array(Float64)
- name: counts
type: Array(Float64)
- name: quantile
type: Array(Float64)
command: ./histogramQuantile
format: CSV
name: histogramQuantile
return_type: Float64
type: executable
source: ./configs/telemetrystore/functions.yaml
target: /etc/clickhouse-server/functions.yaml
type: bind
signoz-telemetrystore-clickhouse-user-scripts:
command:
- bash
- -c
- |
version="v0.0.1"
node_os=$$(uname -s | tr '[:upper:]' '[:lower:]')
node_arch=$$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/)
echo "Fetching histogram-binary for $${node_os}/$${node_arch}"
cd /tmp
wget -O histogram-quantile.tar.gz "https://github.com/SigNoz/signoz/releases/download/histogram-quantile%2F$${version}/histogram-quantile_$${node_os}_$${node_arch}.tar.gz"
tar -xvzf histogram-quantile.tar.gz
mv histogram-quantile /var/lib/clickhouse/user_scripts/histogramQuantile
exclude_from_hc: true
image: clickhouse/clickhouse-server:25.5.6
logging:
options:
max-file: "3"
max-size: 50m
restart: "no"
volumes:
- source: signoz-telemetrystore-user-scripts
target: /var/lib/clickhouse/user_scripts
type: volume
signoz-telemetrystore-migrator:
command:
- /signoz-otel-collector migrate bootstrap --clickhouse-dsn tcp://signoz-telemetrystore-clickhouse-0-0:9000
- /signoz-otel-collector migrate sync up --clickhouse-dsn tcp://signoz-telemetrystore-clickhouse-0-0:9000
- /signoz-otel-collector migrate async up --clickhouse-dsn tcp://signoz-telemetrystore-clickhouse-0-0:9000
depends_on:
signoz-telemetrystore-clickhouse-0-0:
condition: service_healthy
entrypoint:
- /bin/sh
- -c
environment:
- SIGNOZ_OTEL_COLLECTOR_TIMEOUT=10m
exclude_from_hc: true
image: signoz/signoz-otel-collector:latest
logging:
options:
max-file: "3"
max-size: 50m
restart: on-failure
volumes:
signoz-metastore-0-data:
name: signoz-metastore-0-data
signoz-signoz-0-data:
name: signoz-signoz-0-data
signoz-telemetrykeeper-0-data:
name: signoz-telemetrykeeper-0-data
signoz-telemetrystore-0-0-data:
name: signoz-telemetrystore-0-0-data
signoz-telemetrystore-user-scripts:
name: signoz-telemetrystore-user-scripts
+6
View File
@@ -0,0 +1,6 @@
# Docker
| Flavor | Description |
| --- | --- |
| [compose](compose/) | Single-node Docker Compose deployment |
| [swarm](swarm/) | Multi-node Docker Swarm cluster |
+85
View File
@@ -0,0 +1,85 @@
# Docker Compose
| Field | Value |
| --- | --- |
| **Mode** | `docker` |
| **Flavor** | `compose` |
| **Platform** | `-` |
## Overview
Deploys SigNoz using Docker Compose with all Foundry defaults. This is the simplest way to run SigNoz locally or on a single node.
## Prerequisites
- Docker Engine 20.10+
- Docker Compose v2
## Configuration
```yaml
apiVersion: v1alpha1
metadata:
name: signoz
spec:
deployment:
flavor: compose
mode: docker
```
## Deploy
```bash
foundryctl cast -f casting.yaml
```
Or step by step:
```bash
# Validate prerequisites
foundryctl gauge -f casting.yaml
# Generate compose files
foundryctl forge -f casting.yaml
# Start the stack
cd pours/deployment && docker compose up -d
```
## Generated output
```text
pours/deployment/
compose.yaml
configs/
ingester/
ingester.yaml
opamp.yaml
telemetrykeeper/
clickhousekeeper/
keeper-0.yaml
telemetrystore/
clickhouse/
config.yaml
functions.yaml
```
## After deployment
```bash
# Check running containers
docker ps
# View logs for a specific service
docker compose -f pours/deployment/compose.yaml logs -f signoz
# Stop the stack
cd pours/deployment && docker compose down
```
> [!NOTE]
> - `foundryctl cast` detects whether `docker compose` (v2 plugin) or `docker-compose` (legacy standalone) is available and uses whichever it finds, preferring the v2 plugin.
## Customization
Override component images, replicas, or environment variables in the casting spec. For platform-level changes to the generated `compose.yaml` (memory limits, networks, volumes), use [patches](../../../concepts/patches.md).
@@ -0,0 +1,8 @@
apiVersion: v1alpha1
kind: Installation
metadata:
name: o11y
spec:
deployment:
flavor: compose
mode: docker
@@ -0,0 +1,637 @@
apiVersion: v1alpha1
kind: Installation
metadata:
name: o11y
spec:
deployment:
flavor: compose
mode: docker
ingester:
spec:
cluster:
replicas: 1
config:
data:
ingester.yaml: |
connectors:
o11ymeter:
metrics_flush_interval: 1h
dimensions:
- name: service.name
- name: deployment.environment
- name: host.name
receivers:
otlp:
protocols:
grpc:
endpoint: "0.0.0.0:4317"
http:
endpoint: "0.0.0.0:4318"
processors:
batch:
send_batch_size: 50000
send_batch_max_size: 55000
timeout: 5s
batch/meter:
send_batch_size: 20000
send_batch_max_size: 25000
timeout: 1s
o11yspanmetrics/delta:
metrics_exporter: o11yclickhousemetrics
metrics_flush_interval: 60s
latency_histogram_buckets:
- 100us
- 1ms
- 2ms
- 6ms
- 10ms
- 50ms
- 100ms
- 250ms
- 500ms
- 1000ms
- 1400ms
- 2000ms
- 5s
- 10s
- 20s
- 40s
- 60s
dimensions_cache_size: 100000
aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
enable_exp_histogram: true
dimensions:
- name: service.namespace
default: default
- name: deployment.environment
default: default
- name: o11y.collector.id
- name: service.version
exporters:
clickhousetraces:
datasource: tcp://o11y-telemetrystore-clickhouse-0-0:9000/o11y_traces
low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
use_new_schema: true
timeout: 45s
sending_queue:
enabled: false
o11yclickhousemetrics:
dsn: tcp://o11y-telemetrystore-clickhouse-0-0:9000/o11y_metrics
timeout: 45s
sending_queue:
enabled: false
clickhouselogsexporter:
dsn: tcp://o11y-telemetrystore-clickhouse-0-0:9000/o11y_logs
use_new_schema: true
timeout: 45s
sending_queue:
enabled: false
o11yclickhousemeter:
dsn: tcp://o11y-telemetrystore-clickhouse-0-0:9000/o11y_meter
timeout: 45s
sending_queue:
enabled: false
metadataexporter:
enabled: true
dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metadata
timeout: 45s
cache:
provider: in_memory
extensions:
o11y_health_check:
endpoint: "0.0.0.0:13133"
pprof:
endpoint: "0.0.0.0:1777"
service:
telemetry:
logs:
encoding: json
extensions:
- o11y_health_check
- pprof
pipelines:
traces:
receivers:
- otlp
processors:
- o11yspanmetrics/delta
- batch
exporters:
- clickhousetraces
- o11ymeter
metrics:
receivers:
- otlp
processors:
- batch
exporters:
- o11yclickhousemetrics
- o11ymeter
logs:
receivers:
- otlp
processors:
- batch
exporters:
- clickhouselogsexporter
- o11ymeter
metrics/meter:
receivers:
- o11ymeter
processors:
- batch/meter
exporters:
- o11yclickhousemeter
opamp.yaml: |
server_endpoint: ws://o11y-o11y:4320/v1/opamp
enabled: true
image: o11y/o11y-otel-collector:latest
version: latest
status:
addresses:
otlp:
- tcp://o11y-ingester:9000
config:
data:
ingester.yaml: |
connectors:
o11ymeter:
metrics_flush_interval: 1h
dimensions:
- name: service.name
- name: deployment.environment
- name: host.name
receivers:
otlp:
protocols:
grpc:
endpoint: "0.0.0.0:4317"
http:
endpoint: "0.0.0.0:4318"
processors:
batch:
send_batch_size: 50000
send_batch_max_size: 55000
timeout: 5s
batch/meter:
send_batch_size: 20000
send_batch_max_size: 25000
timeout: 1s
o11yspanmetrics/delta:
metrics_exporter: o11yclickhousemetrics
metrics_flush_interval: 60s
latency_histogram_buckets:
- 100us
- 1ms
- 2ms
- 6ms
- 10ms
- 50ms
- 100ms
- 250ms
- 500ms
- 1000ms
- 1400ms
- 2000ms
- 5s
- 10s
- 20s
- 40s
- 60s
dimensions_cache_size: 100000
aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
enable_exp_histogram: true
dimensions:
- name: service.namespace
default: default
- name: deployment.environment
default: default
- name: o11y.collector.id
- name: service.version
exporters:
clickhousetraces:
datasource: tcp://o11y-telemetrystore-clickhouse-0-0:9000/o11y_traces
low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
use_new_schema: true
timeout: 45s
sending_queue:
enabled: false
o11yclickhousemetrics:
dsn: tcp://o11y-telemetrystore-clickhouse-0-0:9000/o11y_metrics
timeout: 45s
sending_queue:
enabled: false
clickhouselogsexporter:
dsn: tcp://o11y-telemetrystore-clickhouse-0-0:9000/o11y_logs
use_new_schema: true
timeout: 45s
sending_queue:
enabled: false
o11yclickhousemeter:
dsn: tcp://o11y-telemetrystore-clickhouse-0-0:9000/o11y_meter
timeout: 45s
sending_queue:
enabled: false
metadataexporter:
enabled: true
dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metadata
timeout: 45s
cache:
provider: in_memory
extensions:
o11y_health_check:
endpoint: "0.0.0.0:13133"
pprof:
endpoint: "0.0.0.0:1777"
service:
telemetry:
logs:
encoding: json
extensions:
- o11y_health_check
- pprof
pipelines:
traces:
receivers:
- otlp
processors:
- o11yspanmetrics/delta
- batch
exporters:
- clickhousetraces
- o11ymeter
metrics:
receivers:
- otlp
processors:
- batch
exporters:
- o11yclickhousemetrics
- o11ymeter
logs:
receivers:
- otlp
processors:
- batch
exporters:
- clickhouselogsexporter
- o11ymeter
metrics/meter:
receivers:
- o11ymeter
processors:
- batch/meter
exporters:
- o11yclickhousemeter
opamp.yaml: |
server_endpoint: ws://o11y-o11y:4320/v1/opamp
metastore:
kind: postgres
spec:
cluster:
replicas: 1
config: {}
enabled: true
env:
POSTGRES_DB: o11y
POSTGRES_PASSWORD: o11y
POSTGRES_USER: o11y
image: postgres:16
version: "16"
status:
addresses:
dsn:
- tcp://o11y-metastore-postgres-0:9000
config: {}
env:
POSTGRES_DB: o11y
POSTGRES_PASSWORD: o11y
POSTGRES_USER: o11y
o11y:
spec:
cluster:
replicas: 1
config: {}
enabled: true
env:
HANZO_SQLSTORE_POSTGRES_DSN: postgres://o11y:o11y@o11y-metastore-postgres-0:9000/o11y?sslmode=disable
HANZO_SQLSTORE_PROVIDER: postgres
HANZO_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://o11y-telemetrystore-clickhouse-0-0:9000
HANZO_TELEMETRYSTORE_PROVIDER: clickhouse
image: o11y/o11y:latest
version: latest
status:
addresses:
apiserver:
- tcp://o11y-o11y:8080
opamp:
- ws://o11y-o11y:4320
config: {}
env:
HANZO_SQLSTORE_POSTGRES_DSN: postgres://o11y:o11y@o11y-metastore-postgres-0:9000/o11y?sslmode=disable
HANZO_SQLSTORE_PROVIDER: postgres
HANZO_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://o11y-telemetrystore-clickhouse-0-0:9000
HANZO_TELEMETRYSTORE_PROVIDER: clickhouse
telemetrykeeper:
kind: clickhousekeeper
spec:
cluster:
replicas: 1
config:
data:
keeper-0.yaml: |
listen_host: 0.0.0.0
logger:
level: information
console: true
keeper_server:
four_letter_word_white_list: "*"
coordination_settings:
operation_timeout_ms: 10000
raft_logs_level: warning
session_timeout_ms: 30000
force_sync: false
snapshot_distance: 100000
snapshots_to_keep: 3
log_storage_path: /var/lib/clickhouse/coordination/log
raft_configuration:
server:
- hostname: o11y-telemetrykeeper-clickhousekeeper-0
port: 9234
id: 0
server_id: 0
snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
tcp_port: 9181
enabled: true
image: clickhouse/clickhouse-keeper:25.5.6
version: 25.5.6
status:
addresses:
client:
- tcp://o11y-telemetrykeeper-clickhousekeeper-0:9181
raft:
- tcp://o11y-telemetrykeeper-clickhousekeeper-0:9234
config:
data:
keeper-0.yaml: |
listen_host: 0.0.0.0
logger:
level: information
console: true
keeper_server:
four_letter_word_white_list: "*"
coordination_settings:
operation_timeout_ms: 10000
raft_logs_level: warning
session_timeout_ms: 30000
force_sync: false
snapshot_distance: 100000
snapshots_to_keep: 3
log_storage_path: /var/lib/clickhouse/coordination/log
raft_configuration:
server:
- hostname: o11y-telemetrykeeper-clickhousekeeper-0
port: 9234
id: 0
server_id: 0
snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
tcp_port: 9181
telemetrystore:
kind: clickhouse
spec:
cluster:
replicas: 0
shards: 1
config:
data:
config-0-0.yaml: |
path: /var/lib/clickhouse/
tmp_path: /var/lib/clickhouse/tmp/
user_files_path: /var/lib/clickhouse/user_files/
format_schema_path: /var/lib/clickhouse/format_schemas/
dictionaries_config: '*_dictionary.xml'
display_name: cluster
distributed_ddl:
path: /clickhouse/task_queue/ddl
http_port: 8123
interserver_http_port: 9009
listen_host: 0.0.0.0
logger:
console: 1
count: 10
formatting:
type: console
level: information
size: 1000M
macros:
replica: "00"
shard: "00"
profiles:
default:
allow_simdjson: 0
load_balancing: random
log_queries: 1
quotas:
default:
interval:
duration: 3600
errors: 0
execution_time: 0
queries: 0
read_rows: 0
result_rows: 0
user_directories:
users_xml:
path: users.xml
remote_servers:
cluster:
shard:
- replica:
host: o11y-telemetrystore-clickhouse-0-0
port: 9000
zookeeper:
node:
- host: o11y-telemetrykeeper-clickhousekeeper-0
port: 9181
query_log:
flush_interval_milliseconds: 30000
partition_by: toYYYYMM(event_date)
ttl: "event_date + INTERVAL 1 DAY DELETE"
query_thread_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
query_metric_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
query_views_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
part_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
metric_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
asynchronous_metric_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
trace_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
error_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
latency_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
processors_profile_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
session_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
text_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
zookeeper_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
tcp_port: 9000
user_defined_executable_functions_config: '*function.yaml'
user_scripts_path: /var/lib/clickhouse/user_scripts/
users:
default:
access_management: 1
named_collection_control: 1
networks:
ip: ::/0
password: ""
profile: default
quota: default
show_named_collection: 1
show_named_collection_secrets: 1
functions.yaml: |
functions:
argument:
- name: buckets
type: Array(Float64)
- name: counts
type: Array(Float64)
- name: quantile
type: Array(Float64)
command: ./histogramQuantile
format: CSV
name: histogramQuantile
return_type: Float64
type: executable
enabled: true
image: clickhouse/clickhouse-server:25.5.6
version: 25.5.6
status:
addresses:
tcp:
- tcp://o11y-telemetrystore-clickhouse-0-0:9000
config:
data:
config-0-0.yaml: |
path: /var/lib/clickhouse/
tmp_path: /var/lib/clickhouse/tmp/
user_files_path: /var/lib/clickhouse/user_files/
format_schema_path: /var/lib/clickhouse/format_schemas/
dictionaries_config: '*_dictionary.xml'
display_name: cluster
distributed_ddl:
path: /clickhouse/task_queue/ddl
http_port: 8123
interserver_http_port: 9009
listen_host: 0.0.0.0
logger:
console: 1
count: 10
formatting:
type: console
level: information
size: 1000M
macros:
replica: "00"
shard: "00"
profiles:
default:
allow_simdjson: 0
load_balancing: random
log_queries: 1
quotas:
default:
interval:
duration: 3600
errors: 0
execution_time: 0
queries: 0
read_rows: 0
result_rows: 0
user_directories:
users_xml:
path: users.xml
remote_servers:
cluster:
shard:
- replica:
host: o11y-telemetrystore-clickhouse-0-0
port: 9000
zookeeper:
node:
- host: o11y-telemetrykeeper-clickhousekeeper-0
port: 9181
query_log:
flush_interval_milliseconds: 30000
partition_by: toYYYYMM(event_date)
ttl: "event_date + INTERVAL 1 DAY DELETE"
query_thread_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
query_metric_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
query_views_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
part_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
metric_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
asynchronous_metric_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
trace_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
error_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
latency_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
processors_profile_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
session_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
text_log:
flush_interval_milliseconds: 30000
ttl: "event_date + INTERVAL 1 DAY DELETE"
zookeeper_log:
ttl: "event_date + INTERVAL 1 DAY DELETE"
tcp_port: 9000
user_defined_executable_functions_config: '*function.yaml'
user_scripts_path: /var/lib/clickhouse/user_scripts/
users:
default:
access_management: 1
named_collection_control: 1
networks:
ip: ::/0
password: ""
profile: default
quota: default
show_named_collection: 1
show_named_collection_secrets: 1
functions.yaml: |
functions:
argument:
- name: buckets
type: Array(Float64)
- name: counts
type: Array(Float64)
- name: quantile
type: Array(Float64)
command: ./histogramQuantile
format: CSV
name: histogramQuantile
return_type: Float64
type: executable
@@ -0,0 +1,183 @@
name: signoz
networks:
o11y-network:
name: o11y-network
services:
o11y-ingester:
command:
- --config=/etc/otel-collector-config.yaml
depends_on:
o11y-telemetrystore-clickhouse-0-0:
condition: service_healthy
o11y-telemetrystore-migrator:
condition: service_completed_successfully
deploy:
replicas: 1
healthcheck:
interval: 30s
retries: 3
start_period: 30s
test:
- CMD
- wget
- --spider
- -q
- http://localhost:13133/health
timeout: 10s
image: ghcr.io/hanzoai/otel-collector:latest
networks:
- o11y-network
ports:
- 4317:4317
- 4318:4318
volumes:
- ./configs/ingester/ingester.yaml:/etc/otel-collector-config.yaml:ro
o11y-metastore-postgres-0:
container_name: o11y-metastore-postgres-0
environment:
- POSTGRES_USER=o11y
- POSTGRES_PASSWORD=o11y
- POSTGRES_DB=o11y
healthcheck:
interval: 30s
retries: 3
start_period: 30s
test:
- CMD-SHELL
- pg_isready -U o11y -d o11y
timeout: 10s
image: postgres:16
networks:
- o11y-network
volumes:
- o11y-metastore-0-data:/var/lib/postgresql/data
o11y-o11y:
depends_on:
o11y-metastore-postgres-0:
condition: service_healthy
o11y-telemetrystore-clickhouse-0-0:
condition: service_healthy
deploy:
restart_policy:
condition: on-failure
environment:
- HANZO_ALERTMANAGER_PROVIDER=o11y
- HANZO_TELEMETRYSTORE_CLICKHOUSE_DSN=tcp://o11y-telemetrystore-clickhouse-0-0:9000
- HANZO_SQLSTORE_SQLITE_PATH=/var/lib/ghcr.io/hanzoai/o11y.db
- DASHBOARDS_PATH=/root/config/dashboards
- STORAGE=clickhouse
- GODEBUG=netdns=go
- TELEMETRY_ENABLED=true
- DEPLOYMENT_TYPE=docker-standalone-amd
- DOT_METRICS_ENABLED=true
healthcheck:
interval: 30s
retries: 3
start_period: 60s
test:
- CMD
- wget
- --spider
- -q
- http://localhost:8080/api/v1/health
timeout: 10s
image: ghcr.io/hanzoai/o11y:latest
networks:
- o11y-network
ports:
- 8080:8080
volumes:
- o11y-o11y-0-data:/var/lib/o11y
o11y-telemetrykeeper-clickhousekeeper-0:
container_name: o11y-telemetrykeeper-clickhousekeeper-0
entrypoint:
- /usr/bin/clickhouse-keeper
- --config-file=/etc/clickhouse-keeper/keeper.yaml
healthcheck:
interval: 30s
retries: 3
start_period: 40s
test:
- CMD
- clickhouse-keeper-client
- -h
- localhost
- -p
- "9181"
- -q
- ls
timeout: 10s
image: clickhouse/clickhouse-keeper:25.5.6
networks:
- o11y-network
volumes:
- o11y-telemetrykeeper-0-data:/var/lib/clickhouse-keeper
- ./configs/telemetrykeeper/keeper-0.yaml:/etc/clickhouse-keeper/keeper.yaml:ro
o11y-telemetrystore-clickhouse-0-0:
container_name: o11y-telemetrystore-clickhouse-0-0
depends_on:
o11y-telemetrykeeper-clickhousekeeper-0:
condition: service_healthy
o11y-telemetrystore-clickhouse-user-scripts:
condition: service_completed_successfully
environment:
- CLICKHOUSE_SKIP_USER_SETUP=1
- CLICKHOUSE_CONFIG=/etc/clickhouse-server/config.yaml
healthcheck:
interval: 30s
retries: 3
start_period: 40s
test:
- CMD
- wget
- --spider
- -q
- http://localhost:8123/ping
timeout: 10s
image: ghcr.io/hanzoai/datastore:25.5.6
networks:
- o11y-network
volumes:
- o11y-telemetrystore-0-0-data:/var/lib/clickhouse
- o11y-telemetrystore-user-scripts:/var/lib/clickhouse/user_scripts:ro
- ./configs/telemetrystore/config.yaml:/etc/clickhouse-server/config.yaml:ro
o11y-telemetrystore-clickhouse-user-scripts:
command:
- bash
- -c
- |-
version="v0.0.1"
node_os=$$(uname -s | tr '[:upper:]' '[:lower:]')
node_arch=$$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/)
echo "Fetching histogram-binary for $${node_os}/$${node_arch}"
cd /tmp
wget -O histogram-quantile.tar.gz "https://github.com/Hanzo O11y/o11y/releases/download/histogram-quantile%2F$${version}/histogram-quantile_$${node_os}_$${node_arch}.tar.gz"
tar -xvzf histogram-quantile.tar.gz
mv histogram-quantile /var/lib/clickhouse/user_scripts/histogramQuantile
container_name: o11y-telemetrystore-clickhouse-user-scripts
image: ghcr.io/hanzoai/datastore:25.5.6
networks:
- o11y-network
volumes:
- o11y-telemetrystore-user-scripts:/var/lib/clickhouse/user_scripts
o11y-telemetrystore-migrator:
command:
- /o11y-otel-collector migrate bootstrap --clickhouse-dsn tcp://o11y-telemetrystore-clickhouse-0-0:9000
- /o11y-otel-collector migrate sync up --clickhouse-dsn tcp://o11y-telemetrystore-clickhouse-0-0:9000
- /o11y-otel-collector migrate async up --clickhouse-dsn tcp://o11y-telemetrystore-clickhouse-0-0:9000
container_name: o11y-telemetrystore-migrator
depends_on:
o11y-telemetrystore-clickhouse-0-0:
condition: service_healthy
entrypoint:
- /bin/sh
- -c
image: ghcr.io/hanzoai/otel-collector:latest
networks:
- o11y-network
volumes:
o11y-metastore-0-data: null
o11y-o11y-0-data: null
o11y-telemetrykeeper-0-data: null
o11y-telemetrystore-0-0-data: null
o11y-telemetrystore-user-scripts: null
@@ -0,0 +1,123 @@
connectors:
o11ymeter:
dimensions:
- name: service.name
- name: deployment.environment
- name: host.name
metrics_flush_interval: 1h
exporters:
clickhouselogsexporter:
dsn: tcp://o11y-telemetrystore-clickhouse-0-0:9000/o11y_logs
sending_queue:
enabled: false
timeout: 45s
use_new_schema: true
clickhousetraces:
datasource: tcp://o11y-telemetrystore-clickhouse-0-0:9000/o11y_traces
low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
sending_queue:
enabled: false
timeout: 45s
use_new_schema: true
o11yclickhousemeter:
dsn: tcp://o11y-telemetrystore-clickhouse-0-0:9000/o11y_meter
sending_queue:
enabled: false
timeout: 45s
o11yclickhousemetrics:
dsn: tcp://o11y-telemetrystore-clickhouse-0-0:9000/o11y_metrics
sending_queue:
enabled: false
timeout: 45s
extensions:
pprof:
endpoint: 0.0.0.0:1777
o11y_health_check:
endpoint: 0.0.0.0:13133
processors:
batch:
send_batch_max_size: 55000
send_batch_size: 50000
timeout: 5s
batch/meter:
send_batch_max_size: 25000
send_batch_size: 20000
timeout: 1s
o11yspanmetrics/delta:
aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
dimensions:
- default: default
name: service.namespace
- default: default
name: deployment.environment
- name: o11y.collector.id
- name: service.version
dimensions_cache_size: 100000
enable_exp_histogram: true
latency_histogram_buckets:
- 100us
- 1ms
- 2ms
- 6ms
- 10ms
- 50ms
- 100ms
- 250ms
- 500ms
- 1000ms
- 1400ms
- 2000ms
- 5s
- 10s
- 20s
- 40s
- 60s
metrics_exporter: o11yclickhousemetrics
metrics_flush_interval: 60s
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
service:
extensions:
- o11y_health_check
- pprof
pipelines:
logs:
exporters:
- clickhouselogsexporter
- o11ymeter
processors:
- batch
receivers:
- otlp
metrics:
exporters:
- o11yclickhousemetrics
- o11ymeter
processors:
- batch
receivers:
- otlp
metrics/meter:
exporters:
- o11yclickhousemeter
processors:
- batch/meter
receivers:
- o11ymeter
traces:
exporters:
- clickhousetraces
- o11ymeter
processors:
- o11yspanmetrics/delta
- batch
receivers:
- otlp
telemetry:
logs:
encoding: json
@@ -0,0 +1 @@
server_endpoint: ws://signoz-signoz-0:4320/v1/opamp
@@ -0,0 +1,22 @@
keeper_server:
coordination_settings:
force_sync: false
operation_timeout_ms: 10000
raft_logs_level: warning
session_timeout_ms: 30000
snapshot_distance: 100000
snapshots_to_keep: 3
four_letter_word_white_list: '*'
log_storage_path: /var/lib/clickhouse/coordination/log
raft_configuration:
server:
- hostname: signoz-telemetrykeeper-clickhousekeeper-0
id: 0
port: 9234
server_id: 0
snapshot_storage_path: /var/lib/clickhouse/coordination/snapshots
tcp_port: 9181
listen_host: 0.0.0.0
logger:
console: true
level: information
@@ -0,0 +1,96 @@
asynchronous_metric_log:
ttl: event_date + INTERVAL 1 DAY DELETE
dictionaries_config: '*_dictionary.xml'
display_name: cluster
distributed_ddl:
path: /clickhouse/task_queue/ddl
error_log:
ttl: event_date + INTERVAL 1 DAY DELETE
format_schema_path: /var/lib/clickhouse/format_schemas/
http_port: 8123
interserver_http_port: 9009
latency_log:
ttl: event_date + INTERVAL 1 DAY DELETE
listen_host: 0.0.0.0
logger:
console: 1
count: 10
formatting:
type: console
level: information
size: 1000M
macros:
replica: "00"
shard: "00"
metric_log:
flush_interval_milliseconds: 30000
ttl: event_date + INTERVAL 1 DAY DELETE
part_log:
ttl: event_date + INTERVAL 1 DAY DELETE
path: /var/lib/clickhouse/
processors_profile_log:
flush_interval_milliseconds: 30000
ttl: event_date + INTERVAL 1 DAY DELETE
profiles:
default:
allow_simdjson: 0
load_balancing: random
log_queries: 1
query_log:
flush_interval_milliseconds: 30000
partition_by: toYYYYMM(event_date)
ttl: event_date + INTERVAL 1 DAY DELETE
query_metric_log:
ttl: event_date + INTERVAL 1 DAY DELETE
query_thread_log:
ttl: event_date + INTERVAL 1 DAY DELETE
query_views_log:
ttl: event_date + INTERVAL 1 DAY DELETE
quotas:
default:
interval:
duration: 3600
errors: 0
execution_time: 0
queries: 0
read_rows: 0
result_rows: 0
remote_servers:
cluster:
shard:
- replica:
host: o11y-telemetrystore-clickhouse-0-0
port: 9000
session_log:
ttl: event_date + INTERVAL 1 DAY DELETE
tcp_port: 9000
text_log:
flush_interval_milliseconds: 30000
ttl: event_date + INTERVAL 1 DAY DELETE
tmp_path: /var/lib/clickhouse/tmp/
trace_log:
flush_interval_milliseconds: 30000
ttl: event_date + INTERVAL 1 DAY DELETE
user_defined_executable_functions_config: '*function.yaml'
user_directories:
users_xml:
path: users.xml
user_files_path: /var/lib/clickhouse/user_files/
user_scripts_path: /var/lib/clickhouse/user_scripts/
users:
default:
access_management: 1
named_collection_control: 1
networks:
ip: ::/0
password: ""
profile: default
quota: default
show_named_collection: 1
show_named_collection_secrets: 1
zookeeper:
node:
- host: o11y-telemetrykeeper-clickhousekeeper-0
port: 9181
zookeeper_log:
ttl: event_date + INTERVAL 1 DAY DELETE
@@ -0,0 +1,13 @@
functions:
argument:
- name: buckets
type: Array(Float64)
- name: counts
type: Array(Float64)
- name: quantile
type: Array(Float64)
command: ./histogramQuantile
format: CSV
name: histogramQuantile
return_type: Float64
type: executable
+79
View File
@@ -0,0 +1,79 @@
# Docker Swarm
| Field | Value |
| --- | --- |
| **Mode** | `docker` |
| **Flavor** | `swarm` |
| **Platform** | `-` |
## Overview
Deploys SigNoz on a Docker Swarm cluster. Foundry generates a Compose file and deploys it as a stack using `docker stack deploy`.
## Prerequisites
- Docker Engine 20.10+ with Swarm mode initialized (`docker swarm init`)
- At least one manager node
## Configuration
```yaml
apiVersion: v1alpha1
metadata:
name: signoz
spec:
deployment:
flavor: swarm
mode: docker
```
## Deploy
```bash
foundryctl cast -f casting.yaml
```
Or step by step:
```bash
# Generate the compose file
foundryctl forge -f casting.yaml
# Deploy manually
docker stack deploy -c pours/deployment/compose.yaml signoz
```
## Generated output
```text
pours/deployment/
compose.yaml
configs/
ingester/
ingester.yaml
opamp.yaml
telemetrykeeper/
clickhousekeeper/
keeper-0.yaml
telemetrystore/
clickhouse/
config.yaml
functions.yaml
```
## After deployment
```bash
# List services in the stack
docker stack services signoz
# View logs for a service
docker service logs signoz_signoz -f
# Remove the stack
docker stack rm signoz
```
## Customization
For platform-level changes to the generated `compose.yaml`, use [patches](../../../concepts/patches.md).
+8
View File
@@ -0,0 +1,8 @@
apiVersion: v1alpha1
kind: Installation
metadata:
name: signoz
spec:
deployment:
flavor: swarm
mode: docker

Some files were not shown because too many files have changed in this diff Show More