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
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
@@ -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.
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -8,7 +8,37 @@ permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
|
||||
env:
|
||||
MAKE: make --no-print-directory --makefile=.primus/src/make/main.mk
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
runs-on: ubuntu-latest
|
||||
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
|
||||
@@ -16,7 +46,11 @@ jobs:
|
||||
PRIMUS_REF: main
|
||||
GO_BUILD_CONTEXT: ./cmd/foundryctl
|
||||
GO_VERSION: 1.25
|
||||
GO_BUILD_FLAGS: ""
|
||||
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
|
||||
|
||||
@@ -18,6 +18,14 @@ jobs:
|
||||
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')) ||
|
||||
@@ -27,6 +35,14 @@ jobs:
|
||||
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')) ||
|
||||
@@ -60,8 +76,8 @@ jobs:
|
||||
go-version: "1.25"
|
||||
- name: gen-examples
|
||||
run: |
|
||||
go run cmd/foundryctl/*.go gen examples
|
||||
git diff --compact-summary --exit-code || (echo; echo "Unexpected difference in docs/examples/ directory. Run go run cmd/foundryctl/*.go gen locally and commit."; exit 1)
|
||||
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')) ||
|
||||
@@ -76,5 +92,21 @@ jobs:
|
||||
go-version: "1.25"
|
||||
- name: gen-schemas
|
||||
run: |
|
||||
go run cmd/foundryctl/*.go gen schemas
|
||||
git diff --compact-summary --exit-code || (echo; echo "Unexpected difference in docs/schemas/ directory. Run go run cmd/foundryctl/*.go gen locally and commit."; exit 1)
|
||||
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: ubuntu-latest
|
||||
steps:
|
||||
- name: self-checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: go-install
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25"
|
||||
- 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)
|
||||
|
||||
@@ -63,3 +63,6 @@ pours/
|
||||
|
||||
### VSCode ###
|
||||
!.vscode/settings.json
|
||||
|
||||
### Claude ###
|
||||
CLAUDE.local.md
|
||||
|
||||
@@ -24,3 +24,14 @@ linters:
|
||||
- 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
|
||||
|
||||
@@ -24,6 +24,11 @@ builds:
|
||||
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
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -1,21 +1,659 @@
|
||||
MIT License
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (c) 2026 Hanzo O11y Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
Preamble
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
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/>.
|
||||
|
||||
@@ -1,20 +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 -p dev down --remove-orphans --volumes
|
||||
cd pours/deployment && docker compose down --remove-orphans --volumes
|
||||
cd ../..
|
||||
rm -rf ./pours
|
||||
|
||||
gauge:
|
||||
go run ./cmd/foundryctl gauge --debug -f ./tmp/casting.yaml
|
||||
$(FOUNDRYCTL) gauge --debug $(NO_LEDGER) -f ./tmp/casting.yaml
|
||||
|
||||
forge:
|
||||
go run ./cmd/foundryctl forge --debug -f ./tmp/casting.yaml
|
||||
$(FOUNDRYCTL) forge --debug $(NO_LEDGER) -f ./tmp/casting.yaml
|
||||
|
||||
cast:
|
||||
go run ./cmd/foundryctl cast --debug -f ./tmp/casting.yaml
|
||||
$(FOUNDRYCTL) cast --debug $(NO_LEDGER) -f ./tmp/casting.yaml
|
||||
|
||||
test:
|
||||
make forge
|
||||
make docker
|
||||
|
||||
gen:
|
||||
go run ./cmd/foundryctl/*.go gen
|
||||
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
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
<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
|
||||
</h1>
|
||||
</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">
|
||||
@@ -49,7 +50,7 @@ curl -L "https://github.com/Hanzo O11y/foundry/releases/latest/download/foundry_
|
||||
tar -xzf foundry.tar.gz
|
||||
```
|
||||
|
||||
**macOS:**
|
||||
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
|
||||
@@ -89,7 +90,6 @@ spec:
|
||||
```bash
|
||||
foundryctl cast -f casting.yaml
|
||||
```
|
||||
## The Foundry Model
|
||||
|
||||
Foundry uses a metalworking metaphor: you define a **Casting**, which contains **Moldings** (components), and Foundry **forges** them into **Pours** (generated files).
|
||||
|
||||
@@ -140,49 +140,85 @@ A Casting is a complete Hanzo O11y deployment definition: one YAML file that Fou
|
||||
**Pours** are the generated deployment and configuration files. When you run `forge`, Foundry creates the `pours/` directory containing everything needed to run Hanzo O11y.
|
||||
|
||||
```
|
||||
pours/
|
||||
└── deployment/
|
||||
├── compose.yaml
|
||||
└── configs/
|
||||
├── ingester/
|
||||
│ ├── ingester.yaml
|
||||
│ └── opamp.yaml
|
||||
├── telemetrykeeper/
|
||||
│ └── keeper-0.yaml
|
||||
└── telemetrystore/
|
||||
├── config.yaml
|
||||
└── functions.yaml
|
||||
+-------------------------------------------------------------+
|
||||
| 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
|
||||
|
||||
```
|
||||
Usage:
|
||||
foundryctl [command]
|
||||
foundryctl [command]
|
||||
|
||||
Available Commands:
|
||||
gauge Gauge whether required tools are available
|
||||
forge Forge configuration and deployment files
|
||||
cast Cast to the target environment
|
||||
gen Generate example files for all supported deployments
|
||||
help Help about any 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 mode
|
||||
-f, --file string Path to the Casting configuration file (default "casting.yaml")
|
||||
-p, --pours string Directory for Pours (default "./pours")
|
||||
-h, --help Help for foundryctl
|
||||
-d, --debug Enable debug logging
|
||||
-f, --file string Casting file path (default "casting.yaml")
|
||||
-p, --pours string Output directory (default "./pours")
|
||||
```
|
||||
|
||||
### gauge
|
||||
|
||||
Validates that all required tools are installed for your deployment mode:
|
||||
|
||||
```bash
|
||||
# Validate tools
|
||||
foundryctl gauge -f casting.yaml
|
||||
```
|
||||
|
||||
### forge
|
||||
# Generate files only
|
||||
foundryctl forge -f casting.yaml
|
||||
|
||||
Generates deployment and configuration files based on your Casting:
|
||||
|
||||
@@ -197,21 +233,12 @@ Deploys Hanzo O11y to your target environment. Runs `gauge` and `forge` automati
|
||||
```bash
|
||||
foundryctl cast -f casting.yaml
|
||||
|
||||
# Skip gauge check
|
||||
foundryctl cast --no-gauge
|
||||
|
||||
# Skip forge (use existing Pours)
|
||||
foundryctl cast --no-forge
|
||||
```
|
||||
|
||||
### gen
|
||||
|
||||
Generates example Casting configurations for all supported deployment modes:
|
||||
|
||||
```bash
|
||||
# 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
|
||||
|
||||
@@ -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**
|
||||
@@ -1,92 +0,0 @@
|
||||
package v1alpha1
|
||||
|
||||
type Casting struct {
|
||||
TypeVersion `json:",inline" yaml:",inline"`
|
||||
|
||||
// Metadata of the casting configuration.
|
||||
Metadata TypeMetadata `json:"metadata" yaml:"metadata" description:"Metadata of the casting configuration"`
|
||||
|
||||
// Specification for the casting.
|
||||
Spec CastingSpec `json:"spec" yaml:"spec" description:"Specification for the casting"`
|
||||
|
||||
// Status of the casting.
|
||||
Status CastingStatus `json:"status,omitzero" yaml:"status,omitempty" description:"Status of the casting"`
|
||||
}
|
||||
|
||||
type CastingSpec struct {
|
||||
// Mode platform in which the platform will run.
|
||||
Deployment TypeDeployment `json:"deployment" yaml:"deployment" description:"Deployment configuration for the platform"`
|
||||
|
||||
// The configuration for the o11y molding.
|
||||
O11y HanzoO11y `json:"o11y,omitzero" yaml:"o11y,omitempty" description:"The configuration for the HanzoO11y molding"`
|
||||
|
||||
// The configuration for the telemetry store molding.
|
||||
TelemetryStore TelemetryStore `json:"telemetrystore,omitzero" yaml:"telemetrystore,omitempty" description:"The configuration for the telemetry store molding"`
|
||||
|
||||
// The configuration for the telemetry keeper molding.
|
||||
TelemetryKeeper TelemetryKeeper `json:"telemetrykeeper,omitzero" yaml:"telemetrykeeper,omitempty" description:"The configuration for the telemetry keeper molding"`
|
||||
|
||||
// The configuration for the meta store molding.
|
||||
MetaStore MetaStore `json:"metastore,omitzero" yaml:"metastore,omitempty" description:"The configuration for the meta store molding"`
|
||||
|
||||
// The configuration for the ingester molding.
|
||||
Ingester Ingester `json:"ingester,omitzero" yaml:"ingester,omitempty" description:"The configuration for the ingester molding"`
|
||||
}
|
||||
|
||||
type CastingStatus struct {
|
||||
// Checksum of the casting file.
|
||||
Checksum string `json:"checksum" yaml:"checksum" description:"Checksum of the casting file"`
|
||||
}
|
||||
|
||||
func MergeCastingSpecAndStatus(base *Casting) error {
|
||||
if err := base.Spec.O11y.Spec.MergeStatus(base.Spec.O11y.Status.MoldingStatus); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := base.Spec.TelemetryStore.Spec.MergeStatus(base.Spec.TelemetryStore.Status.MoldingStatus); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := base.Spec.TelemetryKeeper.Spec.MergeStatus(base.Spec.TelemetryKeeper.Status.MoldingStatus); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := base.Spec.MetaStore.Spec.MergeStatus(base.Spec.MetaStore.Status.MoldingStatus); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := base.Spec.Ingester.Spec.MergeStatus(base.Spec.Ingester.Status.MoldingStatus); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func DefaultCasting() Casting {
|
||||
return Casting{
|
||||
TypeVersion: TypeVersion{
|
||||
APIVersion: "v1alpha1",
|
||||
},
|
||||
Metadata: TypeMetadata{
|
||||
Name: "o11y",
|
||||
},
|
||||
Spec: CastingSpec{
|
||||
O11y: DefaultHanzoO11y(),
|
||||
TelemetryStore: DefaultTelemetryStore(),
|
||||
TelemetryKeeper: DefaultTelemetryKeeper(),
|
||||
MetaStore: DefaultMetaStore(),
|
||||
Ingester: DefaultIngester(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func ExampleCasting() Casting {
|
||||
return Casting{
|
||||
TypeVersion: TypeVersion{
|
||||
APIVersion: "v1alpha1",
|
||||
},
|
||||
Metadata: TypeMetadata{
|
||||
Name: "o11y",
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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"`
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package collectionagent
|
||||
|
||||
import (
|
||||
"github.com/signoz/foundry/api/v1alpha1"
|
||||
"github.com/signoz/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,384 @@
|
||||
{
|
||||
"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": [
|
||||
"signoz/signoz:latest"
|
||||
],
|
||||
"pattern": "^[a-z0-9]+([._-][a-z0-9]+)*(/[a-z0-9]+([._-][a-z0-9]+)*)*(:[a-zA-Z0-9._-]+)?(@sha256:[a-f0-9]{64})?$",
|
||||
"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": {
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"annotations": {
|
||||
"description": "Annotations is an unstructured key-value map for arbitrary metadata. Can be used to specify deployment-specific settings.",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of this installation. This name is used to identify the installation.",
|
||||
"default": "signoz",
|
||||
"examples": [
|
||||
"signoz"
|
||||
],
|
||||
"maxLength": 63,
|
||||
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
|
||||
"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"
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package collectionagent
|
||||
|
||||
import "github.com/signoz/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
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package collectionagent
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
|
||||
"github.com/google/jsonschema-go/jsonschema"
|
||||
"github.com/signoz/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))
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package installation
|
||||
|
||||
import (
|
||||
"github.com/signoz/foundry/api/v1alpha1"
|
||||
"github.com/signoz/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)."`
|
||||
Signoz SigNoz `json:"signoz,omitzero" yaml:"signoz,omitempty" description:"The configuration for the SigNoz 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(),
|
||||
Signoz: DefaultSigNoz(),
|
||||
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.Signoz.Spec.MergeStatus(c.Spec.Signoz.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,710 @@
|
||||
{
|
||||
"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"
|
||||
},
|
||||
"InstallationSigNoz": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"spec": {
|
||||
"$ref": "#/definitions/V1Alpha1MoldingSpec"
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/definitions/InstallationSigNozStatus"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"InstallationSigNozStatus": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"addresses": {
|
||||
"$ref": "#/definitions/InstallationSigNozStatusAddresses"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"InstallationSigNozStatusAddresses": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"apiserver": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"opamp": {
|
||||
"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"
|
||||
},
|
||||
"patches": {
|
||||
"description": "Patch operations to apply to generated materials",
|
||||
"items": {
|
||||
"$ref": "#/definitions/V1Alpha1PatchEntry"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"signoz": {
|
||||
"$ref": "#/definitions/InstallationSigNoz",
|
||||
"description": "The configuration for the SigNoz molding"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"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": [
|
||||
"signoz/signoz:latest"
|
||||
],
|
||||
"pattern": "^[a-z0-9]+([._-][a-z0-9]+)*(/[a-z0-9]+([._-][a-z0-9]+)*)*(:[a-zA-Z0-9._-]+)?(@sha256:[a-f0-9]{64})?$",
|
||||
"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": {
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"annotations": {
|
||||
"description": "Annotations is an unstructured key-value map for arbitrary metadata. Can be used to specify deployment-specific settings.",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of this installation. This name is used to identify the installation.",
|
||||
"default": "signoz",
|
||||
"examples": [
|
||||
"signoz"
|
||||
],
|
||||
"maxLength": 63,
|
||||
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
|
||||
"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,
|
||||
}
|
||||
}
|
||||
@@ -1,36 +1,42 @@
|
||||
package v1alpha1
|
||||
package installation
|
||||
|
||||
import "github.com/hanzoai/o11y-foundry/internal/types"
|
||||
|
||||
type Ingester struct {
|
||||
// Specification for the ingester.
|
||||
Spec MoldingSpec `json:"spec" yaml:"spec" jsonschema:"description=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 {
|
||||
MoldingStatus `json:",inline" yaml:",inline"`
|
||||
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: MoldingSpec{
|
||||
Enabled: true,
|
||||
Cluster: TypeCluster{
|
||||
Replicas: types.NewIntPtr(1),
|
||||
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: TypeConfig{
|
||||
Config: v1alpha1.TypeConfig{
|
||||
Data: map[string]string{},
|
||||
},
|
||||
},
|
||||
@@ -1,4 +1,4 @@
|
||||
package v1alpha1
|
||||
package installation
|
||||
|
||||
import (
|
||||
"github.com/hanzoai/o11y-foundry/internal/types"
|
||||
@@ -9,30 +9,35 @@ type MetaStore struct {
|
||||
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 MoldingSpec `json:"spec" yaml:"spec" description:"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 {
|
||||
MoldingStatus `json:",inline" yaml:",inline"`
|
||||
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: MoldingSpec{
|
||||
Enabled: true,
|
||||
Cluster: TypeCluster{
|
||||
Replicas: types.NewIntPtr(1),
|
||||
Spec: v1alpha1.MoldingSpec{
|
||||
Enabled: v1alpha1.BoolPtr(true),
|
||||
Cluster: v1alpha1.TypeCluster{
|
||||
Replicas: v1alpha1.IntPtr(1),
|
||||
},
|
||||
Version: "16",
|
||||
Image: "postgres:16",
|
||||
@@ -1,10 +1,11 @@
|
||||
package v1alpha1
|
||||
package installation
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/swaggest/jsonschema-go"
|
||||
"go.yaml.in/yaml/v3"
|
||||
)
|
||||
|
||||
@@ -13,6 +14,7 @@ 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"}
|
||||
@@ -69,3 +71,12 @@ func (kind *MetaStoreKind) UnmarshalYAML(node *yaml.Node) error {
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package installation
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
|
||||
"github.com/google/jsonschema-go/jsonschema"
|
||||
"github.com/signoz/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
|
||||
}
|
||||
@@ -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,44 @@
|
||||
package installation
|
||||
|
||||
import "github.com/signoz/foundry/api/v1alpha1"
|
||||
|
||||
type SigNoz struct {
|
||||
// Specification for signoz.
|
||||
Spec v1alpha1.MoldingSpec `json:"spec" yaml:"spec" jsonschema:"description=Specification for SigNoz"`
|
||||
|
||||
// Status of signoz.
|
||||
Status SigNozStatus `json:"status" yaml:"status,omitempty" jsonschema:"description=Status of SigNoz"`
|
||||
|
||||
_ struct{} `additionalProperties:"false"`
|
||||
}
|
||||
|
||||
type SigNozStatus struct {
|
||||
v1alpha1.MoldingStatus `json:",inline" yaml:",inline"`
|
||||
|
||||
Addresses SigNozStatusAddresses `json:"addresses" yaml:"addresses,omitempty" jsonschema:"description=Addresses of SigNoz"`
|
||||
|
||||
_ struct{} `additionalProperties:"false"`
|
||||
}
|
||||
|
||||
type SigNozStatusAddresses 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"`
|
||||
|
||||
_ struct{} `additionalProperties:"false"`
|
||||
}
|
||||
|
||||
func DefaultSigNoz() SigNoz {
|
||||
return SigNoz{
|
||||
Spec: v1alpha1.MoldingSpec{
|
||||
Enabled: v1alpha1.BoolPtr(true),
|
||||
Cluster: v1alpha1.TypeCluster{
|
||||
Replicas: v1alpha1.IntPtr(1),
|
||||
},
|
||||
Version: "latest",
|
||||
Image: "signoz/signoz:latest",
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package v1alpha1
|
||||
package installation
|
||||
|
||||
import (
|
||||
"github.com/hanzoai/o11y-foundry/internal/types"
|
||||
@@ -9,17 +9,21 @@ type TelemetryKeeper struct {
|
||||
Kind TelemetryKeeperKind `json:"kind,omitzero" yaml:"kind,omitempty" description:"Kind of the telemetry keeper to use" examples:"[\"clickhousekeeper\"]"`
|
||||
|
||||
// Specification for the telemetry keeper.
|
||||
Spec MoldingSpec `json:"spec" yaml:"spec" description:"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 {
|
||||
MoldingStatus `json:",inline" yaml:",inline"`
|
||||
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 {
|
||||
@@ -28,15 +32,17 @@ type TelemetryKeeperStatusAddresses struct {
|
||||
|
||||
// Client addresses.
|
||||
Client []string `json:"client" yaml:"client,omitempty" description:"Client addresses"`
|
||||
|
||||
_ struct{} `additionalProperties:"false"`
|
||||
}
|
||||
|
||||
func DefaultTelemetryKeeper() TelemetryKeeper {
|
||||
return TelemetryKeeper{
|
||||
Kind: TelemetryKeeperKindClickhouseKeeper,
|
||||
Spec: MoldingSpec{
|
||||
Enabled: true,
|
||||
Cluster: TypeCluster{
|
||||
Replicas: types.NewIntPtr(1),
|
||||
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",
|
||||
+12
-1
@@ -1,10 +1,11 @@
|
||||
package v1alpha1
|
||||
package installation
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/swaggest/jsonschema-go"
|
||||
"go.yaml.in/yaml/v3"
|
||||
)
|
||||
|
||||
@@ -13,6 +14,7 @@ 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"}
|
||||
@@ -68,3 +70,12 @@ func (kind *TelemetryKeeperKind) UnmarshalYAML(node *yaml.Node) error {
|
||||
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
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package v1alpha1
|
||||
package installation
|
||||
|
||||
import (
|
||||
"github.com/hanzoai/o11y-foundry/internal/types"
|
||||
@@ -9,31 +9,37 @@ type TelemetryStore struct {
|
||||
Kind TelemetryStoreKind `json:"kind,omitzero" yaml:"kind,omitempty" description:"Kind of the telemetry store to use" examples:"[\"clickhouse\"]"`
|
||||
|
||||
// Specification for the telemetry store.
|
||||
Spec MoldingSpec `json:"spec" yaml:"spec" description:"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 {
|
||||
MoldingStatus `json:",inline" yaml:",inline"`
|
||||
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: MoldingSpec{
|
||||
Enabled: true,
|
||||
Cluster: TypeCluster{
|
||||
Replicas: types.NewIntPtr(0),
|
||||
Shards: types.NewIntPtr(1),
|
||||
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",
|
||||
+14
-1
@@ -1,10 +1,11 @@
|
||||
package v1alpha1
|
||||
package installation
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/swaggest/jsonschema-go"
|
||||
"go.yaml.in/yaml/v3"
|
||||
)
|
||||
|
||||
@@ -13,6 +14,7 @@ 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"}
|
||||
@@ -50,10 +52,12 @@ func (kind *TelemetryStoreKind) UnmarshalText(text []byte) error {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
if text == nil {
|
||||
*kind = TelemetryStoreKind{s: ""}
|
||||
return nil
|
||||
}
|
||||
|
||||
return errors.New("invalid telemetry store kind: " + string(text))
|
||||
}
|
||||
|
||||
@@ -68,3 +72,12 @@ func (kind *TelemetryStoreKind) UnmarshalYAML(node *yaml.Node) error {
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package v1alpha1
|
||||
|
||||
import "github.com/signoz/foundry/internal/domain"
|
||||
|
||||
// Machinery is the marker every per-Kind casting type satisfies.
|
||||
type Machinery interface {
|
||||
Kind() Kind
|
||||
TrackableProperties() domain.Properties
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"reflect"
|
||||
|
||||
"github.com/signoz/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
|
||||
}
|
||||
@@ -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)
|
||||
})
|
||||
}
|
||||
}
|
||||
+13
-69
@@ -1,16 +1,7 @@
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/strategicpatch"
|
||||
)
|
||||
|
||||
type TypeVersion struct {
|
||||
// API Version of the casting configuration schema.
|
||||
APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty" description:"API Version of the casting configuration schema" example:"v1alpha1"`
|
||||
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 {
|
||||
@@ -23,72 +14,25 @@ type TypeMetadata struct {
|
||||
}
|
||||
|
||||
type TypeCluster struct {
|
||||
// Number of replicas for the component
|
||||
Replicas *int `json:"replicas,omitempty" yaml:"replicas,omitempty" description:"Number of replicas for the component" example:"1"`
|
||||
|
||||
// Number of shards for the component
|
||||
Shards *int `json:"shards,omitempty" yaml:"shards,omitempty" description:"Number of shards for the component" example:"1"`
|
||||
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 contains the configuration data.
|
||||
Data map[string]string `json:"data,omitempty" yaml:"data,omitempty" description:"Configuration data as key-value pairs"`
|
||||
Data map[string]string `json:"data,omitempty" yaml:"data,omitempty" description:"Configuration data as key-value pairs."`
|
||||
_ struct{} `additionalProperties:"false"`
|
||||
}
|
||||
|
||||
type TypeDeployment struct {
|
||||
// Platform: Provider where an installation runs on using various cloud vendors
|
||||
// Example values: aws|gcp|azure|digitalocean|railway
|
||||
Platform string `json:"platform,omitempty" yaml:"platform,omitempty" description:"Provider where an installation runs on" examples:"[\"aws\",\"gcp\",\"azure\",\"digitalocean\",\"railway\",\"docker\",\"linux\"]"`
|
||||
// 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 that we support, currently identifies the engine or technology behind a deployment
|
||||
Mode string `json:"mode,omitempty" yaml:"mode,omitempty" description:"Type of installation method" examples:"[\"binary\",\"docker\",\"kubernetes\",\"helm\",\"nomad\",\"windows\",\"systemctl\"]"`
|
||||
// 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: Defines the flavor of mode for the deployment, allows the user the pattern to deploy on
|
||||
Flavor string `json:"flavor,omitempty" yaml:"flavor,omitempty" description:"Flavor of mode for the deployment" examples:"[\"compose\",\"swarm\",\"helmfile\",\"helm\",\"kustomize\",\"binary\",\"rpm\",\"deb\",\"chocolatey\"]"`
|
||||
}
|
||||
// Flavor: variant of the mode for the deployment.
|
||||
Flavor Flavor `json:"flavor,omitzero" yaml:"flavor,omitempty" description:"Flavor of mode for the deployment"`
|
||||
|
||||
func Merge(base, overrides any) error {
|
||||
if overrides == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
baseBytes, err := json.Marshal(base)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to convert current object to byte sequence: %w", err)
|
||||
}
|
||||
|
||||
overrideBytes, err := json.Marshal(overrides)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to convert current object to byte sequence: %w", err)
|
||||
}
|
||||
|
||||
patchMeta, err := strategicpatch.NewPatchMetaFromStruct(base)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to produce patch meta from struct: %w", err)
|
||||
}
|
||||
|
||||
patch, err := strategicpatch.CreateThreeWayMergePatch(overrideBytes, overrideBytes, baseBytes, patchMeta, true)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create three way merge patch: %w", err)
|
||||
}
|
||||
|
||||
merged, err := strategicpatch.StrategicMergePatchUsingLookupPatchMeta(baseBytes, patch, patchMeta)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to apply patch: %w", err)
|
||||
}
|
||||
|
||||
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 fmt.Errorf("unable to set unmarshalled value into base object")
|
||||
}
|
||||
|
||||
valueOfBase.Set(reflect.Indirect(into))
|
||||
|
||||
return nil
|
||||
_ struct{} `additionalProperties:"false"`
|
||||
}
|
||||
|
||||
+19
-3
@@ -4,7 +4,7 @@ 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"`
|
||||
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"`
|
||||
@@ -20,6 +20,8 @@ type MoldingSpec struct {
|
||||
|
||||
// Configuration for the molding
|
||||
Config TypeConfig `json:"config" yaml:"config,omitempty" description:"Configuration for the molding"`
|
||||
|
||||
_ struct{} `additionalProperties:"false"`
|
||||
}
|
||||
|
||||
type MoldingStatus struct {
|
||||
@@ -31,6 +33,17 @@ type MoldingStatus struct {
|
||||
|
||||
// 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 {
|
||||
@@ -42,11 +55,14 @@ func (spec *MoldingSpec) MergeStatus(status MoldingStatus) error {
|
||||
status.Env = make(map[string]string)
|
||||
}
|
||||
|
||||
maps.Copy(spec.Env, status.Env)
|
||||
maps.Copy(status.Env, spec.Env)
|
||||
spec.Env = status.Env
|
||||
|
||||
if err := Merge(&spec.Config, status.Config); err != nil {
|
||||
if err := Merge(&status.Config, spec.Config); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
spec.Config = status.Config
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package v1alpha1
|
||||
|
||||
func BoolPtr(v bool) *bool {
|
||||
return &v
|
||||
}
|
||||
|
||||
func IntPtr(v int) *int {
|
||||
return &v
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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`))
|
||||
})
|
||||
})
|
||||
}
|
||||
+15
-18
@@ -3,7 +3,6 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"path/filepath"
|
||||
|
||||
@@ -17,50 +16,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 {
|
||||
RunE: recoverRunE(domain.EventCast, func(cmd *cobra.Command, args []string) (domain.Properties, error) {
|
||||
ctx := cmd.Context()
|
||||
logger := instrumentation.NewLogger(commonCfg.Debug)
|
||||
|
||||
if !castCfg.NoGauge {
|
||||
err := runGauge(ctx, logger, commonCfg.File)
|
||||
if err != nil {
|
||||
return err
|
||||
if props, err := runGauge(ctx, rootLogger, commonCfg.File); err != nil {
|
||||
return props, err
|
||||
}
|
||||
}
|
||||
|
||||
if !castCfg.NoForge {
|
||||
err := runForge(ctx, logger, commonCfg.File, poursCfg.Path)
|
||||
if err != nil {
|
||||
return err
|
||||
if props, err := runForge(ctx, rootLogger, commonCfg.File, poursCfg.Path); err != nil {
|
||||
return props, err
|
||||
}
|
||||
}
|
||||
|
||||
return runCast(ctx, logger, poursCfg.Path, commonCfg.File)
|
||||
},
|
||||
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) error {
|
||||
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 err
|
||||
}
|
||||
|
||||
// Get absolute pours path
|
||||
poursPath, err = filepath.Abs(poursPath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to resolve pours path: %w", err)
|
||||
return domain.NewProperties(), errors.Wrapf(err, errors.TypeInternal, "failed to resolve pours path")
|
||||
}
|
||||
|
||||
lock, err := foundry.Config.GetV1Alpha1Lock(ctx, configPath)
|
||||
machinery, err := foundry.Config.GetV1Alpha1Lock(ctx, configPath)
|
||||
if err != nil {
|
||||
logger.ErrorContext(ctx, "failed to load generated casting.yaml.lock", foundryerrors.LogAttr(err))
|
||||
return err
|
||||
return domain.NewProperties(), err
|
||||
}
|
||||
|
||||
return foundry.Cast(ctx, lock, poursPath)
|
||||
props := machinery.TrackableProperties()
|
||||
|
||||
err = foundry.Cast(ctx, machinery, poursPath)
|
||||
return props, err
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"log/slog"
|
||||
"os"
|
||||
"sort"
|
||||
|
||||
"github.com/olekukonko/tablewriter"
|
||||
"github.com/signoz/foundry/api/v1alpha1"
|
||||
installationcasting "github.com/signoz/foundry/internal/casting/installation"
|
||||
"github.com/signoz/foundry/internal/domain"
|
||||
"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
|
||||
}
|
||||
@@ -7,21 +7,27 @@ var (
|
||||
commonCfg commonConfig
|
||||
|
||||
// Stores pours configuration.
|
||||
|
||||
poursCfg poursConfig
|
||||
|
||||
// Stores cast configuration.
|
||||
castCfg castConfig
|
||||
|
||||
// Stores catalog configuration.
|
||||
catalogCfg catalogConfig
|
||||
)
|
||||
|
||||
type commonConfig struct {
|
||||
File string
|
||||
Debug bool
|
||||
File string
|
||||
Debug bool
|
||||
Format string
|
||||
NoLedger bool
|
||||
}
|
||||
|
||||
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 {
|
||||
@@ -41,3 +47,11 @@ 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")
|
||||
}
|
||||
|
||||
+11
-16
@@ -18,38 +18,33 @@ func registerForgeCmd(rootCmd *cobra.Command) {
|
||||
Use: "forge",
|
||||
Short: "Forge Configuration and Deployment Files",
|
||||
Long: "Generate deployment configuration files from casting.yaml",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
ctx := cmd.Context()
|
||||
logger := instrumentation.NewLogger(commonCfg.Debug)
|
||||
|
||||
return runForge(ctx, logger, commonCfg.File, poursCfg.Path)
|
||||
},
|
||||
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) error {
|
||||
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 err
|
||||
}
|
||||
|
||||
config, err := foundry.Config.GetV1Alpha1(ctx, path)
|
||||
machinery, err := foundry.Config.GetV1Alpha1(ctx, path)
|
||||
if err != nil {
|
||||
return err
|
||||
return domain.NewProperties(), err
|
||||
}
|
||||
|
||||
props := machinery.TrackableProperties()
|
||||
|
||||
poursAbsPath, err := filepath.Abs(poursPath)
|
||||
if err != nil {
|
||||
return err
|
||||
return props, err
|
||||
}
|
||||
|
||||
err = foundry.Forge(ctx, config, path, &writer.Options{Output: &os.File{}, TargetDirectory: poursAbsPath})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
err = foundry.Forge(ctx, machinery, path, &writer.Options{Output: &os.File{}, TargetDirectory: poursAbsPath})
|
||||
return props, err
|
||||
}
|
||||
|
||||
+8
-15
@@ -14,18 +14,15 @@ 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 {
|
||||
ctx := cmd.Context()
|
||||
logger := instrumentation.NewLogger(commonCfg.Debug)
|
||||
|
||||
return runGauge(ctx, logger, commonCfg.File)
|
||||
},
|
||||
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) error {
|
||||
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))
|
||||
@@ -34,15 +31,11 @@ func runGauge(ctx context.Context, logger *slog.Logger, path string) error {
|
||||
|
||||
casting, err := foundry.Config.GetV1Alpha1(ctx, path)
|
||||
if err != nil {
|
||||
logger.ErrorContext(ctx, err.Error())
|
||||
return err
|
||||
return domain.NewProperties(), err
|
||||
}
|
||||
|
||||
props := casting.TrackableProperties()
|
||||
|
||||
err = foundry.Gauge(ctx, casting)
|
||||
if err != nil {
|
||||
logger.ErrorContext(ctx, err.Error())
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return props, err
|
||||
}
|
||||
|
||||
+64
-22
@@ -2,10 +2,12 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
"encoding/json"
|
||||
"log/slog"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/hanzoai/o11y-foundry/api/v1alpha1"
|
||||
foundryerrors "github.com/hanzoai/o11y-foundry/internal/errors"
|
||||
@@ -16,6 +18,18 @@ import (
|
||||
"github.com/swaggest/jsonschema-go"
|
||||
)
|
||||
|
||||
const moduleAPIPrefix = "github.com/signoz/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",
|
||||
@@ -48,10 +62,7 @@ func registerGenSchemas(rootCmd *cobra.Command) {
|
||||
Use: "schemas",
|
||||
Short: "Generate schema files.",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
ctx := cmd.Context()
|
||||
logger := instrumentation.NewLogger(commonCfg.Debug)
|
||||
|
||||
return runGenSchemas(ctx, logger)
|
||||
return runGenSchemas(cmd.Context())
|
||||
},
|
||||
}
|
||||
|
||||
@@ -65,25 +76,22 @@ func runGenExamples(ctx context.Context, logger *slog.Logger) error {
|
||||
return err
|
||||
}
|
||||
|
||||
for deployment := range foundry.Registry.CastingItems() {
|
||||
for deployment := range registry.CastingItems() {
|
||||
logger.InfoContext(ctx, "generating example files for deployment", slog.Any("deployment", deployment))
|
||||
|
||||
config := v1alpha1.ExampleCasting()
|
||||
config := installation.Example()
|
||||
config.Spec.Deployment = deployment
|
||||
|
||||
rootPath := filepath.Join("docs", "examples/", deployment.Platform, deployment.Mode, deployment.Flavor)
|
||||
err = os.MkdirAll(rootPath, 0755)
|
||||
if err != nil {
|
||||
rootPath := filepath.Join("docs", "examples/", deployment.Platform.String(), deployment.Mode.String(), deployment.Flavor.String())
|
||||
if err := os.MkdirAll(rootPath, 0755); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = os.WriteFile(filepath.Join(rootPath, "casting.yaml"), types.MustMarshalYAML(config), 0644)
|
||||
if err != nil {
|
||||
if err := os.WriteFile(filepath.Join(rootPath, "casting.yaml"), domain.MustMarshalYAML(config), 0644); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = runForge(ctx, logger, filepath.Join(rootPath, "casting.yaml"), filepath.Join(rootPath, "pours"))
|
||||
if err != nil {
|
||||
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
|
||||
}
|
||||
@@ -92,18 +100,52 @@ func runGenExamples(ctx context.Context, logger *slog.Logger) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func runGenSchemas(context.Context, *slog.Logger) error {
|
||||
reflector := jsonschema.Reflector{}
|
||||
func runGenSchemas(_ context.Context) error {
|
||||
var oneOf []jsonschema.SchemaOrBool
|
||||
kindType := reflect.TypeFor[v1alpha1.Kind]()
|
||||
|
||||
schema, err := reflector.Reflect(v1alpha1.Casting{})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
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())
|
||||
}
|
||||
|
||||
err = os.WriteFile(filepath.Join("docs", "schemas", "v1alpha1.yaml"), types.MustMarshalYAML(schema), 0644)
|
||||
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 nil
|
||||
return os.WriteFile(filepath.Join("api", "v1alpha1", "casting.schema.json"), rootContents, 0644)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
|
||||
foundryerrors "github.com/hanzoai/o11y-foundry/internal/errors"
|
||||
@@ -11,12 +10,12 @@ import (
|
||||
|
||||
func main() {
|
||||
rootCmd := &cobra.Command{
|
||||
Use: "foundryctl",
|
||||
SilenceUsage: true,
|
||||
SilenceErrors: true,
|
||||
Use: "foundryctl",
|
||||
SilenceUsage: true,
|
||||
CompletionOptions: cobra.CompletionOptions{
|
||||
DisableDefaultCmd: true,
|
||||
},
|
||||
PersistentPreRunE: newRoot,
|
||||
}
|
||||
|
||||
// Register configuration.
|
||||
@@ -28,11 +27,12 @@ func main() {
|
||||
registerForgeCmd(rootCmd)
|
||||
registerCastCmd(rootCmd)
|
||||
registerGenCmd(rootCmd)
|
||||
registerCatalogCmd(rootCmd)
|
||||
registerVersionCmd(rootCmd)
|
||||
|
||||
logger := instrumentation.NewLogger(false)
|
||||
defer closeRoot()
|
||||
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
logger.ErrorContext(context.Background(), "failed to run foundryctl", foundryerrors.LogAttr(err))
|
||||
os.Exit(1)
|
||||
os.Exit(foundryerrors.ExitCode(err))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log/slog"
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
"github.com/signoz/foundry/internal/domain"
|
||||
foundryerrors "github.com/signoz/foundry/internal/errors"
|
||||
"github.com/signoz/foundry/internal/instrumentation"
|
||||
"github.com/signoz/foundry/internal/ledger"
|
||||
"github.com/signoz/foundry/internal/ledger/noopledger"
|
||||
"github.com/signoz/foundry/internal/ledger/segmentledger"
|
||||
"github.com/signoz/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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/signoz/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)
|
||||
}
|
||||
-173
@@ -1,173 +0,0 @@
|
||||
## Casting
|
||||
|
||||
A _casting_ is one YAML file that describes a full Hanzo O11y deployment. Foundry fills in defaults; you override what you need.
|
||||
|
||||
### How to write `casting.yaml`
|
||||
|
||||
You’ll build the file in this order:
|
||||
|
||||
1. **Name your deployment**: `apiVersion` and `metadata` (name, optional annotations).
|
||||
2. **Where it runs**: Deployment target: Docker, systemd, or Render.
|
||||
3. **What runs**: Moldings (Hanzo O11y, ingester, ClickHouse, metastore). Add blocks when you want to change defaults.
|
||||
4. **How it's configured**: Per-molding `spec`: images, env, scaling, config files.
|
||||
5. **Run it**: Point Foundry at the file and generate artifacts.
|
||||
|
||||
|
||||
#### 1. Name your deployment
|
||||
|
||||
Top of the file: `apiVersion` and `metadata`.
|
||||
|
||||
```yaml
|
||||
apiVersion: v1alpha1
|
||||
metadata:
|
||||
name: o11y-prod # deployment ID: used as prefix for service names
|
||||
annotations: {} # optional; required for systemd (step 2)
|
||||
```
|
||||
|
||||
`name` is required: use something that identifies this deployment (`o11y-prod`, `o11y-dev`, whatever). `annotations` is optional unless you're on systemd/binary; then you'll put binary paths there (see step 2).
|
||||
|
||||
> [!TIP]
|
||||
> Short, environment-specific names work best; they end up in generated service names.
|
||||
|
||||
#### 2. Where it runs (deployment target)
|
||||
|
||||
`spec.deployment` tells Foundry how you're deploying: Docker Compose, systemd, or Render. It uses this to pick the right mold and spit out the right artifacts.
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
deployment:
|
||||
mode: docker # or systemd
|
||||
flavor: compose # or binary | blueprint
|
||||
platform: # optional; "render" for Render
|
||||
```
|
||||
|
||||
Pick one row:
|
||||
|
||||
| Where you're deploying | `mode` | `flavor` | `platform` |
|
||||
| ---------------------- | ---------- | ----------- | --------- |
|
||||
| **Docker Compose** | `docker` | `compose` | (none) |
|
||||
| **Linux (systemd)** | `systemd` | `binary` | (none) |
|
||||
| **[Render](https://render.com)** | (none) | `blueprint` | `render` |
|
||||
|
||||
> [!NOTE]
|
||||
> systemd (`mode` + `flavor: binary`):** Foundry needs the paths to your binaries. Put them in `metadata.annotations`:
|
||||
>
|
||||
> | Annotation | What it's for |
|
||||
> | ---------- | ------------- |
|
||||
> | `foundry.o11y.hanzo.ai/o11y-binary-path` | Hanzo O11y binary (for example, `/opt/o11y/bin/o11y`) |
|
||||
> | `foundry.o11y.hanzo.ai/ingester-binary-path` | OTel Collector / ingester (for example, `/opt/ingester/bin/o11y-otel-collector`) |
|
||||
> | `foundry.o11y.hanzo.ai/metastore-postgres-binary-path` | PostgreSQL binary when using Postgres metastore (for example, `/usr/bin/postgres`) |
|
||||
>
|
||||
> Example:
|
||||
>
|
||||
> ```yaml
|
||||
> metadata:
|
||||
> name: o11y
|
||||
> annotations:
|
||||
> foundry.o11y.hanzo.ai/o11y-binary-path: /opt/o11y/bin/o11y
|
||||
> foundry.o11y.hanzo.ai/ingester-binary-path: /opt/ingester/bin/o11y-otel-collector
|
||||
> foundry.o11y.hanzo.ai/metastore-postgres-binary-path: /usr/bin/postgres
|
||||
> ```
|
||||
|
||||
#### 3. What runs (moldings)
|
||||
|
||||
_Moldings_ are the pieces (Hanzo O11y, ingester, ClickHouse, etc.). Foundry has defaults for all of them; add a block under `spec` when you want to change one.
|
||||
|
||||
| Molding key in `spec` | Component |
|
||||
| --------------------- | --------- |
|
||||
| `o11y` | Hanzo O11y |
|
||||
| `ingester` | OTel Collector (ingestion & processing) |
|
||||
| `telemetrystore` | ClickHouse (logs, traces, metrics) |
|
||||
| `telemetrykeeper` | ClickHouse Keeper (coordination) |
|
||||
| `metastore` | Metadata store (PostgreSQL or SQLite) |
|
||||
|
||||
Angle brackets are placeholders: swap `<deployment-name>` for your ID, and pick valid `mode` / `flavor` / `platform` from the table above.
|
||||
|
||||
```yaml
|
||||
apiVersion: v1alpha1
|
||||
metadata:
|
||||
name: <deployment-name>
|
||||
annotations: {} # optional; required for systemd with binary paths
|
||||
spec:
|
||||
deployment:
|
||||
mode: <docker|systemd>
|
||||
flavor: <compose|binary|blueprint>
|
||||
platform: <render> # optional
|
||||
# Override only what you need:
|
||||
o11y:
|
||||
spec: { ... }
|
||||
ingester:
|
||||
spec: { ... }
|
||||
telemetrystore:
|
||||
spec: { ... }
|
||||
telemetrykeeper:
|
||||
spec: { ... }
|
||||
metastore:
|
||||
kind: postgres # or sqlite
|
||||
spec: { ... }
|
||||
```
|
||||
|
||||
#### 4. How it’s configured (molding spec)
|
||||
|
||||
Override a molding by giving it a `spec` block. Whatever you set gets merged with Foundry's defaults.
|
||||
|
||||
**Fields you'll see:**
|
||||
|
||||
| Field | Meaning |
|
||||
| ------------------- | ------- |
|
||||
| `enabled` | Turn the component on/off (default: `true`) |
|
||||
| `image` | Container image (Docker mode) |
|
||||
| `version` | Version label (for example, for systemd or tagging) |
|
||||
| `cluster.replicas` | Number of replicas |
|
||||
| `cluster.shards` | Shards (TelemetryStore only) |
|
||||
| `env` | Environment variables (key/value map) |
|
||||
| `config.data` | Config files: **filename → file contents** |
|
||||
|
||||
#### 5. Run it
|
||||
|
||||
When the file's done:
|
||||
|
||||
1. Run:
|
||||
|
||||
```shell
|
||||
foundry cast -f casting.yaml
|
||||
```
|
||||
|
||||
2. Foundry merges your overrides with defaults and writes out the artifacts (Compose files, systemd units, or Render blueprint, depending on what you picked).
|
||||
|
||||
That's it. The casting file is the source of truth; Foundry does the rest.
|
||||
|
||||
## Examples
|
||||
|
||||
**Minimal: Docker Compose, all defaults:**
|
||||
|
||||
```yaml
|
||||
apiVersion: v1alpha1
|
||||
metadata:
|
||||
name: o11y
|
||||
spec:
|
||||
deployment:
|
||||
mode: docker
|
||||
flavor: compose
|
||||
```
|
||||
|
||||
**Same, with a few overrides (images, scaling, env):**
|
||||
|
||||
```yaml
|
||||
apiVersion: v1alpha1
|
||||
metadata:
|
||||
name: o11y
|
||||
spec:
|
||||
deployment:
|
||||
mode: docker
|
||||
flavor: compose
|
||||
o11y:
|
||||
spec:
|
||||
image: ghcr.io/hanzoai/o11y:v0.110.0
|
||||
telemetrystore:
|
||||
spec:
|
||||
image: ghcr.io/hanzoai/datastore:25.5.6
|
||||
cluster:
|
||||
replicas: 1
|
||||
shards: 1
|
||||
```
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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/) |
|
||||
@@ -0,0 +1,7 @@
|
||||
### Examples
|
||||
|
||||
| Platform | Mode | Flavor | Example |
|
||||
| --- | --- | --- | --- |
|
||||
{{- range .Castings }}
|
||||
| {{ or .platform "-" }} | {{ or .mode "-" }} | {{ or .flavor "-" }} | [{{ .example }}]({{ .example }}/) |
|
||||
{{- end }}
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
# Coolify
|
||||
|
||||
| Flavor | Description |
|
||||
| --- | --- |
|
||||
| [stack](stack/) | Deploy SigNoz on Coolify as a stack |
|
||||
@@ -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).
|
||||
@@ -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
|
||||
@@ -0,0 +1,6 @@
|
||||
# Docker
|
||||
|
||||
| Flavor | Description |
|
||||
| --- | --- |
|
||||
| [compose](compose/) | Single-node Docker Compose deployment |
|
||||
| [swarm](swarm/) | Multi-node Docker Swarm cluster |
|
||||
@@ -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).
|
||||
@@ -1,4 +1,5 @@
|
||||
apiVersion: v1alpha1
|
||||
kind: Installation
|
||||
metadata:
|
||||
name: o11y
|
||||
spec:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
apiVersion: v1alpha1
|
||||
kind: Installation
|
||||
metadata:
|
||||
name: o11y
|
||||
spec:
|
||||
@@ -28,9 +29,9 @@ spec:
|
||||
endpoint: "0.0.0.0:4318"
|
||||
processors:
|
||||
batch:
|
||||
send_batch_size: 20000
|
||||
send_batch_max_size: 25000
|
||||
timeout: 1s
|
||||
send_batch_size: 50000
|
||||
send_batch_max_size: 55000
|
||||
timeout: 5s
|
||||
batch/meter:
|
||||
send_batch_size: 20000
|
||||
send_batch_max_size: 25000
|
||||
@@ -90,6 +91,12 @@ spec:
|
||||
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"
|
||||
@@ -163,9 +170,9 @@ spec:
|
||||
endpoint: "0.0.0.0:4318"
|
||||
processors:
|
||||
batch:
|
||||
send_batch_size: 20000
|
||||
send_batch_max_size: 25000
|
||||
timeout: 1s
|
||||
send_batch_size: 50000
|
||||
send_batch_max_size: 55000
|
||||
timeout: 5s
|
||||
batch/meter:
|
||||
send_batch_size: 20000
|
||||
send_batch_max_size: 25000
|
||||
@@ -225,6 +232,12 @@ spec:
|
||||
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"
|
||||
@@ -337,6 +350,9 @@ spec:
|
||||
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:
|
||||
@@ -368,6 +384,9 @@ spec:
|
||||
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:
|
||||
@@ -385,7 +404,7 @@ spec:
|
||||
shards: 1
|
||||
config:
|
||||
data:
|
||||
config.yaml: |
|
||||
config-0-0.yaml: |
|
||||
path: /var/lib/clickhouse/
|
||||
tmp_path: /var/lib/clickhouse/tmp/
|
||||
user_files_path: /var/lib/clickhouse/user_files/
|
||||
@@ -405,13 +424,13 @@ spec:
|
||||
level: information
|
||||
size: 1000M
|
||||
macros:
|
||||
replica: "01"
|
||||
shard: "01"
|
||||
replica: "00"
|
||||
shard: "00"
|
||||
profiles:
|
||||
default:
|
||||
allow_simdjson: 0
|
||||
load_balancing: random
|
||||
log_queries: 1
|
||||
max_memory_usage: 10000000000
|
||||
quotas:
|
||||
default:
|
||||
interval:
|
||||
@@ -434,6 +453,40 @@ spec:
|
||||
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/
|
||||
@@ -471,7 +524,7 @@ spec:
|
||||
- tcp://o11y-telemetrystore-clickhouse-0-0:9000
|
||||
config:
|
||||
data:
|
||||
config.yaml: |
|
||||
config-0-0.yaml: |
|
||||
path: /var/lib/clickhouse/
|
||||
tmp_path: /var/lib/clickhouse/tmp/
|
||||
user_files_path: /var/lib/clickhouse/user_files/
|
||||
@@ -491,13 +544,13 @@ spec:
|
||||
level: information
|
||||
size: 1000M
|
||||
macros:
|
||||
replica: "01"
|
||||
shard: "01"
|
||||
replica: "00"
|
||||
shard: "00"
|
||||
profiles:
|
||||
default:
|
||||
allow_simdjson: 0
|
||||
load_balancing: random
|
||||
log_queries: 1
|
||||
max_memory_usage: 10000000000
|
||||
quotas:
|
||||
default:
|
||||
interval:
|
||||
@@ -520,6 +573,40 @@ spec:
|
||||
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/
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
name: signoz
|
||||
networks:
|
||||
o11y-network:
|
||||
name: o11y-network
|
||||
@@ -45,7 +46,7 @@ services:
|
||||
- CMD-SHELL
|
||||
- pg_isready -U o11y -d o11y
|
||||
timeout: 10s
|
||||
image: docker.io/postgres:16
|
||||
image: postgres:16
|
||||
networks:
|
||||
- o11y-network
|
||||
volumes:
|
||||
@@ -57,7 +58,8 @@ services:
|
||||
o11y-telemetrystore-clickhouse-0-0:
|
||||
condition: service_healthy
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
environment:
|
||||
- HANZO_ALERTMANAGER_PROVIDER=o11y
|
||||
- HANZO_TELEMETRYSTORE_CLICKHOUSE_DSN=tcp://o11y-telemetrystore-clickhouse-0-0:9000
|
||||
@@ -77,7 +79,7 @@ services:
|
||||
- wget
|
||||
- --spider
|
||||
- -q
|
||||
- http://localhost:3301/api/v1/health
|
||||
- http://localhost:8080/api/v1/health
|
||||
timeout: 10s
|
||||
image: ghcr.io/hanzoai/o11y:latest
|
||||
networks:
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
server_endpoint: ws://o11y-o11y:4320/v1/opamp
|
||||
+3
-3
@@ -36,9 +36,9 @@ extensions:
|
||||
endpoint: 0.0.0.0:13133
|
||||
processors:
|
||||
batch:
|
||||
send_batch_max_size: 25000
|
||||
send_batch_size: 20000
|
||||
timeout: 1s
|
||||
send_batch_max_size: 55000
|
||||
send_batch_size: 50000
|
||||
timeout: 5s
|
||||
batch/meter:
|
||||
send_batch_max_size: 25000
|
||||
send_batch_size: 20000
|
||||
@@ -0,0 +1 @@
|
||||
server_endpoint: ws://signoz-signoz-0:4320/v1/opamp
|
||||
+22
@@ -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
|
||||
+37
-3
@@ -1,10 +1,16 @@
|
||||
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
|
||||
@@ -14,14 +20,32 @@ logger:
|
||||
level: information
|
||||
size: 1000M
|
||||
macros:
|
||||
replica: "01"
|
||||
shard: "01"
|
||||
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
|
||||
max_memory_usage: 10000000000
|
||||
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:
|
||||
@@ -37,8 +61,16 @@ remote_servers:
|
||||
- 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:
|
||||
@@ -60,3 +92,5 @@ zookeeper:
|
||||
node:
|
||||
- host: o11y-telemetrykeeper-clickhousekeeper-0
|
||||
port: 9181
|
||||
zookeeper_log:
|
||||
ttl: event_date + INTERVAL 1 DAY DELETE
|
||||
@@ -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).
|
||||
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1alpha1
|
||||
kind: Installation
|
||||
metadata:
|
||||
name: signoz
|
||||
spec:
|
||||
deployment:
|
||||
flavor: swarm
|
||||
mode: docker
|
||||
@@ -0,0 +1,648 @@
|
||||
apiVersion: v1alpha1
|
||||
kind: Installation
|
||||
metadata:
|
||||
name: signoz
|
||||
spec:
|
||||
deployment:
|
||||
flavor: swarm
|
||||
mode: docker
|
||||
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,197 @@
|
||||
configs:
|
||||
ingester-config:
|
||||
file: ingester/ingester.yaml
|
||||
manager-config:
|
||||
file: ingester/opamp.yaml
|
||||
telemetrykeeper-0:
|
||||
file: telemetrykeeper/clickhousekeeper/keeper-0.yaml
|
||||
telemetrystore-config-0-0:
|
||||
file: telemetrystore/clickhouse/config-0-0.yaml
|
||||
telemetrystore-functions:
|
||||
file: telemetrystore/clickhouse/functions.yaml
|
||||
networks:
|
||||
signoz-network:
|
||||
attachable: true
|
||||
driver: overlay
|
||||
name: signoz-network
|
||||
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
|
||||
configs:
|
||||
- source: ingester-config
|
||||
target: /etc/otel-collector-config.yaml
|
||||
- source: manager-config
|
||||
target: /etc/opamp-config.yaml
|
||||
deploy:
|
||||
replicas: 1
|
||||
entrypoint:
|
||||
- /bin/sh
|
||||
environment:
|
||||
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://signoz-telemetrystore-clickhouse-0-0:9000
|
||||
- SIGNOZ_OTEL_COLLECTOR_TIMEOUT=10m
|
||||
image: signoz/signoz-otel-collector:latest
|
||||
networks:
|
||||
signoz-network:
|
||||
aliases:
|
||||
- signoz-ingester
|
||||
ports:
|
||||
- 4317:4317
|
||||
- 4318:4318
|
||||
signoz-metastore-postgres-0:
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
environment:
|
||||
- POSTGRES_DB=signoz
|
||||
- POSTGRES_PASSWORD=signoz
|
||||
- POSTGRES_USER=signoz
|
||||
healthcheck:
|
||||
interval: 30s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
test:
|
||||
- CMD-SHELL
|
||||
- pg_isready -U signoz -d signoz
|
||||
timeout: 10s
|
||||
image: postgres:16
|
||||
networks:
|
||||
- signoz-network
|
||||
volumes:
|
||||
- signoz-metastore-postgres-0-data:/var/lib/postgresql/data
|
||||
signoz-signoz-0:
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
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
|
||||
start_period: 60s
|
||||
test:
|
||||
- CMD
|
||||
- wget
|
||||
- --spider
|
||||
- -q
|
||||
- http://localhost:8080/api/v1/health
|
||||
timeout: 10s
|
||||
image: signoz/signoz:latest
|
||||
networks:
|
||||
- signoz-network
|
||||
ports:
|
||||
- 8080:8080
|
||||
signoz-telemetrykeeper-clickhousekeeper-0:
|
||||
configs:
|
||||
- source: telemetrykeeper-0
|
||||
target: /etc/clickhouse-keeper/keeper.yaml
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
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:
|
||||
- signoz-network
|
||||
volumes:
|
||||
- signoz-telemetrykeeper-0-data:/var/lib/clickhouse-keeper
|
||||
signoz-telemetrystore-clickhouse-0-0:
|
||||
configs:
|
||||
- source: telemetrystore-config-0-0
|
||||
target: /etc/clickhouse-server/config.yaml
|
||||
- source: telemetrystore-functions
|
||||
target: /etc/clickhouse-server/functions.yaml
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
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
|
||||
hostname: signoz-telemetrystore-clickhouse-0-0
|
||||
image: clickhouse/clickhouse-server:25.5.6
|
||||
networks:
|
||||
- signoz-network
|
||||
volumes:
|
||||
- signoz-telemetrystore-0-0-data:/var/lib/clickhouse
|
||||
- signoz-telemetrystore-user-scripts:/var/lib/clickhouse/user_scripts:ro
|
||||
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
|
||||
deploy:
|
||||
mode: global
|
||||
restart_policy:
|
||||
condition: none
|
||||
image: clickhouse/clickhouse-server:25.5.6
|
||||
networks:
|
||||
- signoz-network
|
||||
volumes:
|
||||
- signoz-telemetrystore-user-scripts:/var/lib/clickhouse/user_scripts
|
||||
signoz-telemetrystore-migrator:
|
||||
command:
|
||||
- -c
|
||||
- |
|
||||
/signoz-otel-collector migrate ready &&
|
||||
/signoz-otel-collector migrate bootstrap &&
|
||||
/signoz-otel-collector migrate sync up &&
|
||||
/signoz-otel-collector migrate async up
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
max_attempts: 3
|
||||
entrypoint:
|
||||
- /bin/sh
|
||||
environment:
|
||||
- SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN=tcp://signoz-telemetrystore-clickhouse-0-0:9000
|
||||
- SIGNOZ_OTEL_COLLECTOR_TIMEOUT=10m
|
||||
image: signoz/signoz-otel-collector:latest
|
||||
networks:
|
||||
- signoz-network
|
||||
version: "3"
|
||||
volumes:
|
||||
signoz-metastore-postgres-0-data: null
|
||||
signoz-telemetrykeeper-0-data: null
|
||||
signoz-telemetrystore-0-0-data: null
|
||||
signoz-telemetrystore-user-scripts: null
|
||||
@@ -0,0 +1,132 @@
|
||||
connectors:
|
||||
signozmeter:
|
||||
dimensions:
|
||||
- name: service.name
|
||||
- name: deployment.environment
|
||||
- name: host.name
|
||||
metrics_flush_interval: 1h
|
||||
exporters:
|
||||
clickhouselogsexporter:
|
||||
dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_logs
|
||||
sending_queue:
|
||||
enabled: false
|
||||
timeout: 45s
|
||||
use_new_schema: true
|
||||
clickhousetraces:
|
||||
datasource: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_traces
|
||||
low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
|
||||
sending_queue:
|
||||
enabled: false
|
||||
timeout: 45s
|
||||
use_new_schema: true
|
||||
metadataexporter:
|
||||
cache:
|
||||
provider: in_memory
|
||||
dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metadata
|
||||
enabled: true
|
||||
timeout: 45s
|
||||
signozclickhousemeter:
|
||||
dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_meter
|
||||
sending_queue:
|
||||
enabled: false
|
||||
timeout: 45s
|
||||
signozclickhousemetrics:
|
||||
dsn: tcp://signoz-telemetrystore-clickhouse-0-0:9000/signoz_metrics
|
||||
sending_queue:
|
||||
enabled: false
|
||||
timeout: 45s
|
||||
extensions:
|
||||
pprof:
|
||||
endpoint: 0.0.0.0:1777
|
||||
signoz_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: 5s
|
||||
signozspanmetrics/delta:
|
||||
aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
|
||||
dimensions:
|
||||
- default: default
|
||||
name: service.namespace
|
||||
- default: default
|
||||
name: deployment.environment
|
||||
- name: signoz.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: signozclickhousemetrics
|
||||
metrics_flush_interval: 60s
|
||||
receivers:
|
||||
otlp:
|
||||
protocols:
|
||||
grpc:
|
||||
endpoint: 0.0.0.0:4317
|
||||
http:
|
||||
endpoint: 0.0.0.0:4318
|
||||
service:
|
||||
extensions:
|
||||
- signoz_health_check
|
||||
- pprof
|
||||
pipelines:
|
||||
logs:
|
||||
exporters:
|
||||
- clickhouselogsexporter
|
||||
- signozmeter
|
||||
- metadataexporter
|
||||
processors:
|
||||
- batch
|
||||
receivers:
|
||||
- otlp
|
||||
metrics:
|
||||
exporters:
|
||||
- signozclickhousemetrics
|
||||
- signozmeter
|
||||
- metadataexporter
|
||||
processors:
|
||||
- batch
|
||||
receivers:
|
||||
- otlp
|
||||
metrics/meter:
|
||||
exporters:
|
||||
- signozclickhousemeter
|
||||
processors:
|
||||
- batch/meter
|
||||
receivers:
|
||||
- signozmeter
|
||||
traces:
|
||||
exporters:
|
||||
- clickhousetraces
|
||||
- signozmeter
|
||||
- metadataexporter
|
||||
processors:
|
||||
- signozspanmetrics/delta
|
||||
- batch
|
||||
receivers:
|
||||
- otlp
|
||||
telemetry:
|
||||
logs:
|
||||
encoding: json
|
||||
@@ -0,0 +1 @@
|
||||
server_endpoint: ws://signoz-signoz-0:4320/v1/opamp
|
||||
+3
@@ -1,8 +1,11 @@
|
||||
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:
|
||||
@@ -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: signoz-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: signoz-telemetrykeeper-clickhousekeeper-0
|
||||
port: 9181
|
||||
zookeeper_log:
|
||||
ttl: event_date + INTERVAL 1 DAY DELETE
|
||||
@@ -0,0 +1,5 @@
|
||||
# AWS ECS
|
||||
|
||||
| Mode | Flavor | Description |
|
||||
| --- | --- | --- |
|
||||
| [ec2/terraform](ec2/terraform/) | `terraform` | ECS on EC2 with Terraform-managed infrastructure |
|
||||
@@ -0,0 +1,266 @@
|
||||
# ECS EC2 with Terraform
|
||||
|
||||
| Field | Value |
|
||||
| --- | --- |
|
||||
| **Mode** | `ec2` |
|
||||
| **Flavor** | `terraform` |
|
||||
| **Platform** | `ecs` |
|
||||
|
||||
## Overview
|
||||
|
||||
Deploys SigNoz on AWS ECS (EC2 launch type) using Terraform. Each component runs as a separate ECS service with AWS Cloud Map for service discovery.
|
||||
|
||||
Components:
|
||||
- ClickHouse Keeper (telemetry keeper)
|
||||
- ClickHouse (telemetry store)
|
||||
- PostgreSQL (metadata store)
|
||||
- SigNoz (UI + API server on port 8080)
|
||||
- OTel Collector (ingester)
|
||||
- Schema migrator (Fargate one-shot task)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- An existing ECS cluster with an EC2 capacity provider
|
||||
- A VPC with private subnets
|
||||
- An S3 bucket for storing component configs
|
||||
- IAM roles for ECS task and task execution
|
||||
- [Terraform](https://developer.hashicorp.com/terraform/install) >= 1.0
|
||||
|
||||
## Configuration
|
||||
|
||||
```yaml
|
||||
apiVersion: v1alpha1
|
||||
metadata:
|
||||
name: signoz
|
||||
annotations:
|
||||
foundry.signoz.io/ecs/region: us-east-1
|
||||
foundry.signoz.io/ecs/cluster-id: arn:aws:ecs:us-east-1:123456789012:cluster/my-cluster
|
||||
foundry.signoz.io/ecs/subnet-ids: subnet-abc123,subnet-def456
|
||||
foundry.signoz.io/ecs/security-group-ids: sg-abc123
|
||||
foundry.signoz.io/ecs/vpc-id: vpc-abc123
|
||||
foundry.signoz.io/ecs/config-bucket: my-signoz-configs
|
||||
foundry.signoz.io/ecs/task-role-arn: arn:aws:iam::123456789012:role/ecs-task-role
|
||||
foundry.signoz.io/ecs/task-execution-role-arn: arn:aws:iam::123456789012:role/ecs-execution-role
|
||||
foundry.signoz.io/ecs/capacity-provider: my-capacity-provider
|
||||
spec:
|
||||
deployment:
|
||||
platform: ecs
|
||||
mode: ec2
|
||||
flavor: terraform
|
||||
```
|
||||
|
||||
## Deploy
|
||||
|
||||
Run the full pipeline (generate Terraform files and apply):
|
||||
|
||||
```bash
|
||||
foundryctl cast -f casting.yaml
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> `foundryctl cast` runs `terraform init` followed by `terraform apply -auto-approve`. If you prefer to review the plan before applying, use the step-by-step approach below.
|
||||
|
||||
Step-by-step alternative:
|
||||
|
||||
```bash
|
||||
# 1. Generate Terraform files
|
||||
foundryctl forge -f casting.yaml
|
||||
|
||||
# 2. Initialize and apply Terraform
|
||||
cd pours/deployment
|
||||
terraform init
|
||||
terraform apply
|
||||
```
|
||||
|
||||
## Generated output
|
||||
|
||||
```text
|
||||
pours/deployment/
|
||||
main.tf.json
|
||||
variables.tf.json
|
||||
terraform.tfvars.json
|
||||
module/
|
||||
main.tf.json
|
||||
variables.tf.json
|
||||
outputs.tf.json
|
||||
telemetrykeeper.tf.json
|
||||
telemetrystore.tf.json
|
||||
telemetrystore_migrator.tf.json
|
||||
metastore.tf.json
|
||||
signoz.tf.json
|
||||
ingester.tf.json
|
||||
telemetrykeeper/
|
||||
clickhousekeeper/
|
||||
keeper-0.yaml
|
||||
telemetrystore/
|
||||
clickhouse/
|
||||
config.yaml
|
||||
functions.yaml
|
||||
ingester/
|
||||
ingester.yaml
|
||||
opamp.yaml
|
||||
```
|
||||
|
||||
## After deployment
|
||||
|
||||
Verify the ECS services are running:
|
||||
|
||||
```bash
|
||||
aws ecs list-services --cluster my-cluster --region us-east-1
|
||||
aws ecs describe-services \
|
||||
--cluster my-cluster \
|
||||
--services signoz-signoz signoz-ingester signoz-telemetrystore-clickhouse \
|
||||
--region us-east-1
|
||||
```
|
||||
|
||||
Check that Cloud Map service discovery is healthy:
|
||||
|
||||
```bash
|
||||
aws servicediscovery list-services --region us-east-1
|
||||
```
|
||||
|
||||
Access the SigNoz UI by setting up an ALB pointing to the SigNoz service on port 8080.
|
||||
|
||||
## Customization
|
||||
|
||||
The module ships with sensible defaults for CPU and memory. To override them, use `spec.patches` on the generated module files:
|
||||
|
||||
```yaml
|
||||
apiVersion: v1alpha1
|
||||
metadata:
|
||||
name: signoz
|
||||
annotations:
|
||||
# ... (same annotations as above)
|
||||
spec:
|
||||
deployment:
|
||||
platform: ecs
|
||||
mode: ec2
|
||||
flavor: terraform
|
||||
patches:
|
||||
- target: "deployment/module/signoz.tf.json"
|
||||
type: jsonpatch
|
||||
operations:
|
||||
- op: replace
|
||||
path: /locals/containers/0/cpu
|
||||
value: 1024
|
||||
- op: replace
|
||||
path: /locals/containers/0/memory
|
||||
value: 1024
|
||||
- op: replace
|
||||
path: /locals/containers/0/memoryReservation
|
||||
value: 1024
|
||||
- target: "deployment/module/telemetrystore.tf.json"
|
||||
type: jsonpatch
|
||||
operations:
|
||||
- op: replace
|
||||
path: /locals/containers/2/cpu
|
||||
value: 2048
|
||||
- op: replace
|
||||
path: /locals/containers/2/memory
|
||||
value: 4096
|
||||
- op: replace
|
||||
path: /locals/containers/2/memoryReservation
|
||||
value: 4096
|
||||
```
|
||||
|
||||
Run `foundryctl forge` to see the generated files and identify the JSON paths you want to patch.
|
||||
|
||||
## Annotations
|
||||
|
||||
Annotations populate `terraform.tfvars.json` so Foundry can generate a ready-to-apply Terraform configuration.
|
||||
|
||||
| Annotation | Maps to tfvar | Description |
|
||||
| --- | --- | --- |
|
||||
| `foundry.signoz.io/ecs/region` | `region` | AWS region |
|
||||
| `foundry.signoz.io/ecs/cluster-id` | `ecs_cluster_id` | ECS cluster ARN or ID |
|
||||
| `foundry.signoz.io/ecs/subnet-ids` | `subnet_ids` | Comma-separated subnet IDs |
|
||||
| `foundry.signoz.io/ecs/security-group-ids` | `security_group_ids` | Comma-separated security group IDs |
|
||||
| `foundry.signoz.io/ecs/vpc-id` | `vpc_id` | VPC ID for Cloud Map namespace |
|
||||
| `foundry.signoz.io/ecs/config-bucket` | `config_bucket` | S3 bucket for component configs |
|
||||
| `foundry.signoz.io/ecs/task-role-arn` | `task_role_arn` | IAM role ARN for ECS tasks |
|
||||
| `foundry.signoz.io/ecs/task-execution-role-arn` | `task_execution_role_arn` | IAM role ARN for task execution |
|
||||
| `foundry.signoz.io/ecs/capacity-provider` | `capacity_provider` | ECS capacity provider name |
|
||||
|
||||
## Platform details
|
||||
|
||||
### Providers
|
||||
|
||||
| Provider | Version | Purpose |
|
||||
| --- | --- | --- |
|
||||
| `hashicorp/aws` | `>= 5.0` | ECS, Cloud Map, S3 |
|
||||
|
||||
### Resources
|
||||
|
||||
The module creates the following AWS resources:
|
||||
|
||||
| Resource | Count | Description |
|
||||
| --- | --- | --- |
|
||||
| `aws_service_discovery_private_dns_namespace` | 1 | Cloud Map namespace (`{name}.local`) |
|
||||
| `aws_ecs_task_definition` | 6 | One per component (including migrator) |
|
||||
| `aws_ecs_service` | 5 | One per long-running component |
|
||||
| `aws_service_discovery_service` | 5 | One per long-running component |
|
||||
| `aws_s3_object` | N | Config files for ClickHouse, Keeper, and Ingester |
|
||||
| `aws_ecs_task_execution` (data) | 1 | Runs the migrator as a Fargate task |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| `region` | `string` | AWS region |
|
||||
| `ecs_cluster_id` | `string` | ID of the existing ECS cluster |
|
||||
| `subnet_ids` | `list(string)` | Subnet IDs for ECS service networking (awsvpc) |
|
||||
| `security_group_ids` | `list(string)` | Security group IDs for ECS service networking |
|
||||
| `vpc_id` | `string` | VPC ID for the Cloud Map private DNS namespace |
|
||||
| `config_bucket` | `string` | S3 bucket for storing component config files |
|
||||
| `task_role_arn` | `string` | IAM role ARN for ECS tasks |
|
||||
| `task_execution_role_arn` | `string` | IAM role ARN for ECS task execution (pull images, write logs) |
|
||||
| `capacity_provider` | `string` | Name of the ECS capacity provider |
|
||||
|
||||
### Outputs
|
||||
|
||||
| Output | Description |
|
||||
| --- | --- |
|
||||
| `namespace_id` | Cloud Map private DNS namespace ID |
|
||||
| `namespace_name` | Cloud Map private DNS namespace name |
|
||||
| `signoz_service_arn` | SigNoz ECS service ARN (target for ALB on port 8080) |
|
||||
| `signoz_service_name` | SigNoz ECS service name |
|
||||
| `ingester_service_arn` | Ingester ECS service ARN (target for NLB on port 4317/4318) |
|
||||
| `ingester_service_name` | Ingester ECS service name |
|
||||
| `telemetrystore_service_name` | ClickHouse ECS service name |
|
||||
| `telemetrykeeper_service_name` | ClickHouse Keeper ECS service name |
|
||||
| `metastore_service_name` | PostgreSQL ECS service name |
|
||||
|
||||
### Service discovery
|
||||
|
||||
Components communicate via Cloud Map DNS within the `{name}.local` namespace:
|
||||
|
||||
| Component | DNS name | Port |
|
||||
| --- | --- | --- |
|
||||
| ClickHouse Keeper | `telemetrykeeper-clickhousekeeper.{name}.local` | 9181 (client), 9234 (raft) |
|
||||
| ClickHouse | `telemetrystore-clickhouse.{name}.local` | 9000 (native), 8123 (HTTP) |
|
||||
| PostgreSQL | `metastore-postgresql.{name}.local` | 5432 |
|
||||
| SigNoz | `signoz.{name}.local` | 8080 (API), 4320 (OpAMP) |
|
||||
| Ingester | `ingester.{name}.local` | 4317 (gRPC), 4318 (HTTP) |
|
||||
|
||||
### IAM requirements
|
||||
|
||||
The **task execution role** (`task_execution_role_arn`) needs:
|
||||
- `ecr:GetAuthorizationToken`, `ecr:BatchGetImage`, `ecr:GetDownloadUrlForLayer` (pull images)
|
||||
- `logs:CreateLogStream`, `logs:PutLogEvents` (CloudWatch logs)
|
||||
|
||||
The **task role** (`task_role_arn`) needs:
|
||||
- `s3:GetObject` on the config bucket (config-fetcher sidecar reads configs from S3)
|
||||
|
||||
### Security groups
|
||||
|
||||
ECS services use `awsvpc` networking. Security groups must allow:
|
||||
|
||||
| From | To | Port | Purpose |
|
||||
| --- | --- | --- | --- |
|
||||
| Ingester | ClickHouse | 9000 | Telemetry writes |
|
||||
| SigNoz | ClickHouse | 9000 | Query reads |
|
||||
| SigNoz | PostgreSQL | 5432 | Metadata |
|
||||
| SigNoz | Ingester | 4320 | OpAMP management |
|
||||
| ClickHouse | ClickHouse Keeper | 9181 | Coordination |
|
||||
| External | SigNoz | 8080 | UI/API access (via ALB) |
|
||||
| External | Ingester | 4317, 4318 | Telemetry ingestion (via NLB) |
|
||||
@@ -0,0 +1,9 @@
|
||||
apiVersion: v1alpha1
|
||||
kind: Installation
|
||||
metadata:
|
||||
name: signoz
|
||||
spec:
|
||||
deployment:
|
||||
flavor: terraform
|
||||
mode: ec2
|
||||
platform: ecs
|
||||
@@ -0,0 +1,647 @@
|
||||
apiVersion: v1alpha1
|
||||
kind: Installation
|
||||
metadata:
|
||||
name: signoz
|
||||
spec:
|
||||
deployment:
|
||||
flavor: terraform
|
||||
mode: ec2
|
||||
platform: ecs
|
||||
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://telemetrystore-clickhouse.signoz.local: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://telemetrystore-clickhouse.signoz.local:9000/signoz_metrics
|
||||
timeout: 45s
|
||||
sending_queue:
|
||||
enabled: false
|
||||
clickhouselogsexporter:
|
||||
dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_logs
|
||||
use_new_schema: true
|
||||
timeout: 45s
|
||||
sending_queue:
|
||||
enabled: false
|
||||
signozclickhousemeter:
|
||||
dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_meter
|
||||
timeout: 45s
|
||||
sending_queue:
|
||||
enabled: false
|
||||
metadataexporter:
|
||||
enabled: true
|
||||
dsn: tcp://telemetrystore-clickhouse.signoz.local: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.local:4320/v1/opamp
|
||||
enabled: true
|
||||
env:
|
||||
SIGNOZ_OTEL_COLLECTOR_TIMEOUT: 10m
|
||||
image: signoz/signoz-otel-collector:latest
|
||||
version: latest
|
||||
status:
|
||||
addresses:
|
||||
otlp: null
|
||||
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://telemetrystore-clickhouse.signoz.local: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://telemetrystore-clickhouse.signoz.local:9000/signoz_metrics
|
||||
timeout: 45s
|
||||
sending_queue:
|
||||
enabled: false
|
||||
clickhouselogsexporter:
|
||||
dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_logs
|
||||
use_new_schema: true
|
||||
timeout: 45s
|
||||
sending_queue:
|
||||
enabled: false
|
||||
signozclickhousemeter:
|
||||
dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_meter
|
||||
timeout: 45s
|
||||
sending_queue:
|
||||
enabled: false
|
||||
metadataexporter:
|
||||
enabled: true
|
||||
dsn: tcp://telemetrystore-clickhouse.signoz.local: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.local: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://metastore-postgres.signoz.local: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@metastore-postgres.signoz.local:5432/signoz?sslmode=disable
|
||||
SIGNOZ_SQLSTORE_PROVIDER: postgres
|
||||
SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://telemetrystore-clickhouse.signoz.local:9000
|
||||
SIGNOZ_TELEMETRYSTORE_PROVIDER: clickhouse
|
||||
image: signoz/signoz:latest
|
||||
version: latest
|
||||
status:
|
||||
addresses:
|
||||
apiserver:
|
||||
- tcp://signoz.signoz.local:8080
|
||||
opamp:
|
||||
- ws://signoz.signoz.local:4320
|
||||
config: {}
|
||||
env:
|
||||
SIGNOZ_SQLSTORE_POSTGRES_DSN: postgres://signoz:signoz@metastore-postgres.signoz.local:5432/signoz?sslmode=disable
|
||||
SIGNOZ_SQLSTORE_PROVIDER: postgres
|
||||
SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN: tcp://telemetrystore-clickhouse.signoz.local: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: telemetrykeeper-clickhousekeeper.signoz.local
|
||||
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://telemetrykeeper-clickhousekeeper.signoz.local:9181
|
||||
raft:
|
||||
- tcp://telemetrykeeper-clickhousekeeper.signoz.local: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: telemetrykeeper-clickhousekeeper.signoz.local
|
||||
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: telemetrystore-clickhouse.signoz.local
|
||||
port: 9000
|
||||
zookeeper:
|
||||
node:
|
||||
- host: telemetrykeeper-clickhousekeeper.signoz.local
|
||||
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://telemetrystore-clickhouse.signoz.local: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: telemetrystore-clickhouse.signoz.local
|
||||
port: 9000
|
||||
zookeeper:
|
||||
node:
|
||||
- host: telemetrykeeper-clickhousekeeper.signoz.local
|
||||
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,30 @@
|
||||
{
|
||||
"terraform": {
|
||||
"required_version": ">= 1.0",
|
||||
"required_providers": {
|
||||
"aws": {
|
||||
"source": "hashicorp/aws",
|
||||
"version": ">= 5.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"provider": {
|
||||
"aws": {
|
||||
"region": "${var.region}"
|
||||
}
|
||||
},
|
||||
"module": {
|
||||
"signoz": {
|
||||
"source": "./module",
|
||||
"region": "${var.region}",
|
||||
"ecs_cluster_id": "${var.ecs_cluster_id}",
|
||||
"subnet_ids": "${var.subnet_ids}",
|
||||
"security_group_ids": "${var.security_group_ids}",
|
||||
"vpc_id": "${var.vpc_id}",
|
||||
"config_bucket": "${var.config_bucket}",
|
||||
"task_role_arn": "${var.task_role_arn}",
|
||||
"task_execution_role_arn": "${var.task_execution_role_arn}",
|
||||
"capacity_provider": "${var.capacity_provider}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
{
|
||||
"locals": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "config-fetcher",
|
||||
"image": "amazon/aws-cli:2.27.32",
|
||||
"essential": false,
|
||||
"entryPoint": ["/bin/sh", "-c"],
|
||||
"command": ["aws s3 cp s3://${var.config_bucket}/signoz/ingester/ /configs/ingester/ --recursive"],
|
||||
"mountPoints": [
|
||||
{
|
||||
"sourceVolume": "ingester-config",
|
||||
"containerPath": "/configs/ingester"
|
||||
}
|
||||
],
|
||||
"cpu": 10,
|
||||
"memory": 102,
|
||||
"memoryReservation": 102
|
||||
},
|
||||
{
|
||||
"name": "ingester",
|
||||
"image": "signoz/signoz-otel-collector:latest",
|
||||
"essential": true,
|
||||
"entryPoint": ["/bin/sh", "-c"],
|
||||
"command": ["/signoz-otel-collector migrate sync check && /signoz-otel-collector --config=/conf/ingester.yaml --manager-config=/conf/opamp.yaml --copy-path=/var/tmp/collector-config.yaml"],
|
||||
"environment": [{"name":"SIGNOZ_OTEL_COLLECTOR_CLICKHOUSE_DSN","value":"tcp://telemetrystore-clickhouse.signoz.local:9000"},{"name":"SIGNOZ_OTEL_COLLECTOR_TIMEOUT","value":"10m"}],
|
||||
"portMappings": [
|
||||
{"name": "grpc", "containerPort": 4317, "protocol": "tcp", "appProtocol": "grpc"},
|
||||
{"name": "http", "containerPort": 4318, "protocol": "tcp", "appProtocol": "http"}
|
||||
],
|
||||
"mountPoints": [
|
||||
{
|
||||
"sourceVolume": "ingester-config",
|
||||
"containerPath": "/conf"
|
||||
}
|
||||
],
|
||||
"dependsOn": [
|
||||
{"containerName": "config-fetcher", "condition": "SUCCESS"}
|
||||
],
|
||||
"cpu": 512,
|
||||
"memory": 512,
|
||||
"memoryReservation": 512,
|
||||
"healthCheck": {
|
||||
"command": ["CMD-SHELL", "wget --spider -q localhost:13133 || exit 1"],
|
||||
"interval": 30,
|
||||
"timeout": 5,
|
||||
"retries": 3,
|
||||
"startPeriod": 30
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"resource": {
|
||||
"aws_s3_object": {
|
||||
"ingester_configs": {
|
||||
"for_each": "${fileset(\"${path.module}/ingester\", \"*.yaml\")}",
|
||||
"bucket": "${var.config_bucket}",
|
||||
"key": "signoz/ingester/${each.value}",
|
||||
"source": "${path.module}/ingester/${each.value}",
|
||||
"etag": "${filemd5(\"${path.module}/ingester/${each.value}\")}"
|
||||
}
|
||||
},
|
||||
"aws_ecs_task_definition": {
|
||||
"ingester": {
|
||||
"family": "signoz-ingester",
|
||||
"network_mode": "awsvpc",
|
||||
"requires_compatibilities": ["EC2"],
|
||||
"task_role_arn": "${var.task_role_arn}",
|
||||
"execution_role_arn": "${var.task_execution_role_arn}",
|
||||
"container_definitions": "${jsonencode(local.containers)}",
|
||||
"volume": [
|
||||
{
|
||||
"name": "ingester-config",
|
||||
"docker_volume_configuration": {
|
||||
"scope": "task",
|
||||
"driver": "local"
|
||||
}
|
||||
}
|
||||
],
|
||||
"depends_on": ["aws_s3_object.ingester_configs"]
|
||||
}
|
||||
},
|
||||
"aws_service_discovery_service": {
|
||||
"ingester": {
|
||||
"name": "ingester",
|
||||
"dns_config": {
|
||||
"namespace_id": "${aws_service_discovery_private_dns_namespace.main.id}",
|
||||
"dns_records": [
|
||||
{
|
||||
"ttl": 10,
|
||||
"type": "A"
|
||||
}
|
||||
],
|
||||
"routing_policy": "MULTIVALUE"
|
||||
}
|
||||
}
|
||||
},
|
||||
"aws_ecs_service": {
|
||||
"ingester": {
|
||||
"name": "signoz-ingester",
|
||||
"cluster": "${var.ecs_cluster_id}",
|
||||
"task_definition": "${aws_ecs_task_definition.ingester.arn}",
|
||||
"desired_count": 1,
|
||||
"capacity_provider_strategy": [
|
||||
{
|
||||
"capacity_provider": "${var.capacity_provider}",
|
||||
"weight": 1,
|
||||
"base": 0
|
||||
}
|
||||
],
|
||||
"network_configuration": {
|
||||
"subnets": "${var.subnet_ids}",
|
||||
"security_groups": "${var.security_group_ids}"
|
||||
},
|
||||
"service_registries": {
|
||||
"registry_arn": "${aws_service_discovery_service.ingester.arn}"
|
||||
},
|
||||
"depends_on": [
|
||||
"aws_ecs_service.signoz",
|
||||
"aws_ecs_service.telemetrystore"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
connectors:
|
||||
signozmeter:
|
||||
dimensions:
|
||||
- name: service.name
|
||||
- name: deployment.environment
|
||||
- name: host.name
|
||||
metrics_flush_interval: 1h
|
||||
exporters:
|
||||
clickhouselogsexporter:
|
||||
dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_logs
|
||||
sending_queue:
|
||||
enabled: false
|
||||
timeout: 45s
|
||||
use_new_schema: true
|
||||
clickhousetraces:
|
||||
datasource: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_traces
|
||||
low_cardinal_exception_grouping: ${env:LOW_CARDINAL_EXCEPTION_GROUPING}
|
||||
sending_queue:
|
||||
enabled: false
|
||||
timeout: 45s
|
||||
use_new_schema: true
|
||||
metadataexporter:
|
||||
cache:
|
||||
provider: in_memory
|
||||
dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_metadata
|
||||
enabled: true
|
||||
timeout: 45s
|
||||
signozclickhousemeter:
|
||||
dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_meter
|
||||
sending_queue:
|
||||
enabled: false
|
||||
timeout: 45s
|
||||
signozclickhousemetrics:
|
||||
dsn: tcp://telemetrystore-clickhouse.signoz.local:9000/signoz_metrics
|
||||
sending_queue:
|
||||
enabled: false
|
||||
timeout: 45s
|
||||
extensions:
|
||||
pprof:
|
||||
endpoint: 0.0.0.0:1777
|
||||
signoz_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: 5s
|
||||
signozspanmetrics/delta:
|
||||
aggregation_temporality: AGGREGATION_TEMPORALITY_DELTA
|
||||
dimensions:
|
||||
- default: default
|
||||
name: service.namespace
|
||||
- default: default
|
||||
name: deployment.environment
|
||||
- name: signoz.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: signozclickhousemetrics
|
||||
metrics_flush_interval: 60s
|
||||
receivers:
|
||||
otlp:
|
||||
protocols:
|
||||
grpc:
|
||||
endpoint: 0.0.0.0:4317
|
||||
http:
|
||||
endpoint: 0.0.0.0:4318
|
||||
service:
|
||||
extensions:
|
||||
- signoz_health_check
|
||||
- pprof
|
||||
pipelines:
|
||||
logs:
|
||||
exporters:
|
||||
- clickhouselogsexporter
|
||||
- signozmeter
|
||||
- metadataexporter
|
||||
processors:
|
||||
- batch
|
||||
receivers:
|
||||
- otlp
|
||||
metrics:
|
||||
exporters:
|
||||
- signozclickhousemetrics
|
||||
- signozmeter
|
||||
- metadataexporter
|
||||
processors:
|
||||
- batch
|
||||
receivers:
|
||||
- otlp
|
||||
metrics/meter:
|
||||
exporters:
|
||||
- signozclickhousemeter
|
||||
processors:
|
||||
- batch/meter
|
||||
receivers:
|
||||
- signozmeter
|
||||
traces:
|
||||
exporters:
|
||||
- clickhousetraces
|
||||
- signozmeter
|
||||
- metadataexporter
|
||||
processors:
|
||||
- signozspanmetrics/delta
|
||||
- batch
|
||||
receivers:
|
||||
- otlp
|
||||
telemetry:
|
||||
logs:
|
||||
encoding: json
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user