From 7308d9f115a9e431d89eedcf3a906729102095d9 Mon Sep 17 00:00:00 2001 From: Pandey Date: Thu, 22 Jan 2026 02:07:01 +0530 Subject: [PATCH] chore: remove redundant files and add settings.json (#33) #### Chores - remove castings/ from the root package - add go formatting instructions to settings.json --- .gitignore | 3 + .vscode/settings.json | 6 + castings/docker/compose/.env | 8 - castings/docker/compose/docker-compose.yaml | 168 ------------------ castings/linux/binary/.env | 35 ---- .../systemd/signoz-otel-collector.service | 16 -- castings/linux/binary/systemd/signoz.service | 17 -- .../linux/binary/systemd/zookeeper.service | 18 -- 8 files changed, 9 insertions(+), 262 deletions(-) create mode 100644 .vscode/settings.json delete mode 100644 castings/docker/compose/.env delete mode 100644 castings/docker/compose/docker-compose.yaml delete mode 100644 castings/linux/binary/.env delete mode 100644 castings/linux/binary/systemd/signoz-otel-collector.service delete mode 100644 castings/linux/binary/systemd/signoz.service delete mode 100644 castings/linux/binary/systemd/zookeeper.service diff --git a/.gitignore b/.gitignore index a17f559..90e2149 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,6 @@ tmp/ ### Foundry ### pours/ + +### VSCode ### +!.vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..4100c67 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "[go]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "golang.go" + } +} diff --git a/castings/docker/compose/.env b/castings/docker/compose/.env deleted file mode 100644 index 78717d1..0000000 --- a/castings/docker/compose/.env +++ /dev/null @@ -1,8 +0,0 @@ -COMPOSE_PROJECT_NAME=signoz - -### REQUIRED ENVS -CLICKHOUSE_HOST=clickhouse -CLICKHOUSE_PORT=9000 -ZOOKEEPER_HOST=zookeeper-1 -ZOOKEEPER_PORT=2181 -SIGNOZ_HOST=signoz \ No newline at end of file diff --git a/castings/docker/compose/docker-compose.yaml b/castings/docker/compose/docker-compose.yaml deleted file mode 100644 index 0d22ec9..0000000 --- a/castings/docker/compose/docker-compose.yaml +++ /dev/null @@ -1,168 +0,0 @@ -version: "3" -x-common: &common - networks: - - signoz-net - restart: unless-stopped - logging: - options: - max-size: 50m - max-file: "3" -x-clickhouse-defaults: &clickhouse-defaults - !!merge <<: *common - image: clickhouse/clickhouse-server:25.5.6 - tty: true - labels: - signoz.io/scrape: "true" - signoz.io/port: "9363" - signoz.io/path: "/metrics" - depends_on: - init-clickhouse: - condition: service_completed_successfully - zookeeper-1: - condition: service_healthy - healthcheck: - test: - - CMD - - wget - - --spider - - -q - - 0.0.0.0:8123/ping - interval: 30s - timeout: 5s - retries: 3 - ulimits: - nproc: 65535 - nofile: - soft: 262144 - hard: 262144 - env_file: ./pours/clickhouse/.env -x-zookeeper-defaults: &zookeeper-defaults - !!merge <<: *common - image: signoz/zookeeper:3.7.1 - user: root - labels: - signoz.io/scrape: "true" - signoz.io/port: "9141" - signoz.io/path: "/metrics" - healthcheck: - test: - - CMD-SHELL - - curl -s -m 2 http://localhost:8080/commands/ruok | grep error | grep null - interval: 30s - timeout: 5s - retries: 3 -x-db-depend: &db-depend - !!merge <<: *common - depends_on: - clickhouse: - condition: service_healthy - schema-migrator-sync: - condition: service_completed_successfully -services: - init-clickhouse: - !!merge <<: *common - image: clickhouse/clickhouse-server:25.5.6 - container_name: signoz-init-clickhouse - command: - - bash - - -c - - | - version="v0.0.1" - node_os=$$(uname -s | tr '[:upper:]' '[:lower:]') - node_arch=$$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) - echo "Fetching histogram-binary for $${node_os}/$${node_arch}" - cd /tmp - wget -O histogram-quantile.tar.gz "https://github.com/SigNoz/signoz/releases/download/histogram-quantile%2F$${version}/histogram-quantile_$${node_os}_$${node_arch}.tar.gz" - tar -xvzf histogram-quantile.tar.gz - mv histogram-quantile /var/lib/clickhouse/user_scripts/histogramQuantile - restart: on-failure - volumes: - - ./pours/clickhouse/user_scripts:/var/lib/clickhouse/user_scripts/ - zookeeper-1: - !!merge <<: *zookeeper-defaults - container_name : signoz-zookeeper-1 - volumes: - - zookeeper-1:/bitnami/zookeeper - env_file: ./pours/zookeeper/.env - clickhouse: - container_name: signoz-clickhouse - !!merge <<: *clickhouse-defaults' - volumes: - - ./pours/clickhouse/config.xml:/etc/clickhouse-server/config.xml - - ./pours/clickhouse/users.xml:/etc/clickhouse-server/users.xml - - ./pours/clickhouse/custom-function.xml:/etc/clickhouse-server/custom-function.xml - - ./pours/clickhouse/user_scripts:/var/lib/clickhouse/user_scripts/ - - clickhouse:/var/lib/clickhouse/ - signoz: - !!merge <<: *db-depend - image: signoz/signoz:${VERSION:-v0.101.0} - container_name: signoz - ports: - - "8080:8080" - volumes: - - sqlite:/var/lib/signoz/ - env_file: ./pours/signoz/.env - healthcheck: - test: - - CMD - - wget - - --spider - - -q - - localhost:8080/api/v1/health - interval: 30s - timeout: 5s - retries: 3 - otel-collector: - !!merge <<: *db-depend - image: signoz/signoz-otel-collector:${OTELCOL_TAG:-v0.129.9} - container_name: signoz-otel-collector - command: - - --config=/etc/otel-collector-config.yaml - - --manager-config=/etc/manager-config.yaml - - --copy-path=/var/tmp/collector-config.yaml - - --feature-gates=-pkg.translator.prometheus.NormalizeName - volumes: - - ./pours/otel-collector/otel-collector-config.yaml:/etc/otel-collector-config.yaml - - ./pours/otel-collector/otel-collector-opamp-config.yaml:/etc/manager-config.yaml - env_file: ./pours/otel-collector/.env - ports: - - "4317:4317" - - "4318:4318" - depends_on: - clickhouse: - condition: service_healthy - schema-migrator-sync: - condition: service_completed_successfully - signoz: - condition: service_healthy - schema-migrator-sync: - !!merge <<: *common - image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-v0.129.9} - container_name: schema-migrator-sync - command: - - sync - - --dsn=tcp://clickhouse:9000 - - --up= - depends_on: - clickhouse: - condition: service_healthy - restart: on-failure - schema-migrator-async: - !!merge <<: *db-depend - image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-v0.129.9} - container_name: schema-migrator-async - command: - - async - - --dsn=tcp://clickhouse:9000 - - --up= - restart: on-failure -networks: - signoz-net: - name: signoz-net -volumes: - clickhouse: - name: signoz-clickhouse - sqlite: - name: signoz-sqlite - zookeeper-1: - name: signoz-zookeeper-1 \ No newline at end of file diff --git a/castings/linux/binary/.env b/castings/linux/binary/.env deleted file mode 100644 index 2a40440..0000000 --- a/castings/linux/binary/.env +++ /dev/null @@ -1,35 +0,0 @@ -# castings/linux/binary/standard/.env - -# --- VERSIONS --- -# As per doc: zookeeper-3.8.5 -ZOOKEEPER_VERSION=3.8.5 -# As per doc: latest (but we pin for stability, update as needed) -SIGNOZ_VERSION=v0.46.0 -OTEL_VERSION=0.102.7 -MIGRATOR_VERSION=0.102.7 - -# --- INSTALLATION PATHS --- -ZK_INSTALL_DIR=/opt/zookeeper -ZK_DATA_DIR=/var/lib/zookeeper -ZK_LOG_DIR=/var/log/zookeeper - -SIGNOZ_INSTALL_DIR=/opt/signoz -SIGNOZ_DATA_DIR=/var/lib/signoz - -OTEL_INSTALL_DIR=/opt/signoz-otel-collector -OTEL_DATA_DIR=/var/lib/signoz-otel-collector - -# --- NETWORK CONFIG --- -# Clickhouse is on localhost per docs -CLICKHOUSE_HOST=127.0.0.1 -CLICKHOUSE_TCP_PORT=9000 -CLICKHOUSE_PASSWORD=password - -# Zookeeper is on localhost -ZK_HOST=127.0.0.1 -ZK_CLIENT_PORT=2181 -ZK_ADMIN_PORT=3181 - -# SigNoz -SIGNOZ_HOST=127.0.0.1 -SIGNOZ_PORT=8080 \ No newline at end of file diff --git a/castings/linux/binary/systemd/signoz-otel-collector.service b/castings/linux/binary/systemd/signoz-otel-collector.service deleted file mode 100644 index 47eeab6..0000000 --- a/castings/linux/binary/systemd/signoz-otel-collector.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=SigNoz OTel Collector -Documentation=https://signoz.io/docs -After=clickhouse-server.service - -[Service] -User=signoz -Group=signoz -Type=simple -KillMode=mixed -Restart=on-failure -WorkingDirectory=${OTEL_INSTALL_DIR} -ExecStart=${OTEL_INSTALL_DIR}/bin/signoz-otel-collector --config=${OTEL_INSTALL_DIR}/conf/config.yaml --manager-config=${OTEL_INSTALL_DIR}/conf/opamp.yaml --copy-path=${OTEL_DATA_DIR}/config.yaml - -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/castings/linux/binary/systemd/signoz.service b/castings/linux/binary/systemd/signoz.service deleted file mode 100644 index c20aea5..0000000 --- a/castings/linux/binary/systemd/signoz.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=SigNoz -Documentation=https://signoz.io/docs -After=clickhouse-server.service - -[Service] -User=signoz -Group=signoz -Type=simple -KillMode=mixed -Restart=on-failure -WorkingDirectory=${SIGNOZ_INSTALL_DIR} -EnvironmentFile=${SIGNOZ_INSTALL_DIR}/conf/systemd.env -ExecStart=${SIGNOZ_INSTALL_DIR}/bin/signoz server - -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/castings/linux/binary/systemd/zookeeper.service b/castings/linux/binary/systemd/zookeeper.service deleted file mode 100644 index 2fbf0fc..0000000 --- a/castings/linux/binary/systemd/zookeeper.service +++ /dev/null @@ -1,18 +0,0 @@ -[Unit] -Description=Zookeeper -Documentation=http://zookeeper.apache.org - -[Service] -EnvironmentFile=${ZOOKEEPER_INSTALL_DIR}/conf/zoo.env -Type=forking -WorkingDirectory=${ZOOKEEPER_INSTALL_DIR} -User=zookeeper -Group=zookeeper -ExecStart=${ZOOKEEPER_INSTALL_DIR}/bin/zkServer.sh start ${ZOOKEEPER_INSTALL_DIR}/conf/zoo.cfg -ExecStop=${ZOOKEEPER_INSTALL_DIR}/bin/zkServer.sh stop ${ZOOKEEPER_INSTALL_DIR}/conf/zoo.cfg -ExecReload=${ZOOKEEPER_INSTALL_DIR}/bin/zkServer.sh restart ${ZOOKEEPER_INSTALL_DIR}/conf/zoo.cfg -TimeoutSec=30 -Restart=on-failure - -[Install] -WantedBy=multi-user.target \ No newline at end of file