Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: docker/swarm deployment restructuring and improvements #6904

Merged
merged 42 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
3fe7b62
ci: remove frontend-ee build, remove all frontend push
prashant-shahi Jan 20, 2025
ae38c9f
ci(test): query-service-ee, rename workflow to CI
prashant-shahi Jan 20, 2025
9483c44
chore(frontend): remove frontend nginx and docker files
prashant-shahi Jan 20, 2025
2ac6daf
chore(frontend): move frontend .dockerignore to root
prashant-shahi Jan 20, 2025
dc8ed55
chore(frontend): remove kubernetes HOTRod files
prashant-shahi Jan 20, 2025
5306981
Merge branch 'main' into chore/oss-issues
prashant-shahi Jan 20, 2025
3abaa12
feat: deploy directory restructuring and improvements
prashant-shahi Jan 22, 2025
ac557ae
Merge branch 'main' into chore/oss-issues
prashant-shahi Jan 22, 2025
8da569a
chore: remove upstream clickhouse config
prashant-shahi Jan 22, 2025
c703e25
ci: rename jobs back to build for now
prashant-shahi Jan 22, 2025
38ee0d7
chore: add back histogramQuantile to previous path temporarily
prashant-shahi Jan 23, 2025
62b4aeb
fix: root user for agent/logspout for docker.sock permissions
prashant-shahi Jan 24, 2025
275a814
Merge branch 'main' into chore/oss-issues
prashant-shahi Jan 24, 2025
5eda481
chore(swarm): otel-metrics and update permissions
prashant-shahi Jan 24, 2025
7915380
chore: update metrics scraper prom scrape_configs
prashant-shahi Jan 24, 2025
7f9aaeb
chore(install-script): update install.sh, based on the compose changes
prashant-shahi Jan 24, 2025
588065e
chore: docker network to ease scraping metrics
prashant-shahi Jan 24, 2025
829e819
chore: docker network to ease scraping metrics
prashant-shahi Jan 24, 2025
167c797
chore: docker network to ease scraping metrics
prashant-shahi Jan 24, 2025
29e5912
chore(docker-swarm): wrap up with metrics scraping using labels in Swarm
prashant-shahi Jan 25, 2025
d9949a0
Merge branch 'main' into chore/oss-issues
prashant-shahi Jan 25, 2025
8896442
chore: remove redundant hostname declartion
prashant-shahi Jan 25, 2025
12bb82b
chore: use histogram assets from release, use SIGNOZ_SQLSTORE_SQLITE_…
prashant-shahi Jan 26, 2025
7eac0a9
chore: update signozoio error wrapping
prashant-shahi Jan 26, 2025
9af2623
chore: update histogram check path
prashant-shahi Jan 26, 2025
f3bf2f5
chore(compose): escape $ for proper interpolation
prashant-shahi Jan 26, 2025
fc703a3
ci(releaser): skip for histogram-quantile release
prashant-shahi Jan 26, 2025
9219691
chore: ignore .local files
prashant-shahi Jan 26, 2025
cfc2979
Merge branch 'main' into chore/oss-issues
prashant-shahi Jan 27, 2025
a34f0ac
chore: use variable for histogram-quantile version
prashant-shahi Jan 27, 2025
ce3ad37
chore: update init-clickhouse
prashant-shahi Jan 27, 2025
1ebf247
chore(docker-swarm): single container for both sync/async migration
prashant-shahi Jan 27, 2025
7127575
Merge branch 'main' into chore/oss-issues
prashant-shahi Jan 27, 2025
b113170
chore(docker-swarm): use 3 replicas for otel-collector
prashant-shahi Jan 27, 2025
35c7489
chore(frontend): revert frontend deprecation, will create another PR
prashant-shahi Jan 27, 2025
4c8e219
chore: remove container name from swarm compose
prashant-shahi Jan 27, 2025
e893ff9
chore: update develop references and compose path
prashant-shahi Jan 27, 2025
428d8a6
ci: revert push workflow, rename ci back to build
prashant-shahi Jan 27, 2025
342d888
Merge branch 'main' into chore/oss-issues
prashant-shahi Jan 27, 2025
08c7712
chore: revert test-ee related changes
prashant-shahi Jan 27, 2025
ad57e43
chore: revert frontend docker/nginx files
prashant-shahi Jan 27, 2025
a1ae332
Merge branch 'main' into chore/oss-issues
prashant-shahi Jan 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
.vscode
README.md
deploy
sample-apps

# frontend
.env
node_modules
39 changes: 8 additions & 31 deletions .github/workflows/build.yaml → .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build-pipeline
name: ci

on:
pull_request:
Expand All @@ -14,7 +14,7 @@ jobs:
- name: Run check
run: make check-no-ee-references

build-frontend:
test-frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -28,35 +28,8 @@ jobs:
- name: TSC
run: yarn tsc
working-directory: ./frontend
- name: Build frontend docker image
shell: bash
run: |
make build-frontend-amd64

build-frontend-ee:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create .env file
run: |
echo 'INTERCOM_APP_ID="${{ secrets.INTERCOM_APP_ID }}"' > frontend/.env
echo 'SEGMENT_ID="${{ secrets.SEGMENT_ID }}"' >> frontend/.env
- name: Install dependencies
run: cd frontend && yarn install
- name: Run ESLint
run: cd frontend && npm run lint
- name: Run Jest
run: cd frontend && npm run jest
- name: TSC
run: yarn tsc
working-directory: ./frontend
- name: Build frontend docker image
shell: bash
run: |
make build-frontend-amd64

build-query-service:
test-query-service:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -74,7 +47,7 @@ jobs:
run: |
make build-query-service-amd64

build-ee-query-service:
test-ee-query-service:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -83,6 +56,10 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Run tests
shell: bash
run: |
make test-ee
- name: Build EE query-service image
shell: bash
run: |
Expand Down
99 changes: 0 additions & 99 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,102 +106,3 @@ jobs:
sudo apt-get install -y gcc-aarch64-linux-gnu musl-tools
- name: Build and push docker image
prashant-shahi marked this conversation as resolved.
Show resolved Hide resolved
run: make build-push-ee-query-service

image-build-and-push-frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
working-directory: frontend
run: yarn install
- name: Run Prettier
working-directory: frontend
run: npm run prettify
continue-on-error: true
- name: Run ESLint
working-directory: frontend
run: npm run lint
continue-on-error: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: benjlevesque/[email protected]
id: short-sha
- name: Get branch name
id: branch-name
uses: tj-actions/[email protected]
- name: Set docker tag environment
run: |
if [ '${{ steps.branch-name.outputs.is_tag }}' == 'true' ]; then
tag="${{ steps.branch-name.outputs.tag }}"
tag="${tag:1}"
echo "DOCKER_TAG=$tag" >> $GITHUB_ENV
elif [ '${{ steps.branch-name.outputs.current_branch }}' == 'main' ]; then
echo "DOCKER_TAG=latest" >> $GITHUB_ENV
else
echo "DOCKER_TAG=${{ steps.branch-name.outputs.current_branch }}" >> $GITHUB_ENV
fi
- name: Build and push docker image
run: make build-push-frontend

image-build-and-push-frontend-ee:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create .env file
run: |
echo 'INTERCOM_APP_ID="${{ secrets.INTERCOM_APP_ID }}"' > frontend/.env
echo 'SEGMENT_ID="${{ secrets.SEGMENT_ID }}"' >> frontend/.env
echo 'SENTRY_AUTH_TOKEN="${{ secrets.SENTRY_AUTH_TOKEN }}"' >> frontend/.env
echo 'SENTRY_ORG="${{ secrets.SENTRY_ORG }}"' >> frontend/.env
echo 'SENTRY_PROJECT_ID="${{ secrets.SENTRY_PROJECT_ID }}"' >> frontend/.env
echo 'SENTRY_DSN="${{ secrets.SENTRY_DSN }}"' >> frontend/.env
echo 'TUNNEL_URL="${{ secrets.TUNNEL_URL }}"' >> frontend/.env
echo 'TUNNEL_DOMAIN="${{ secrets.TUNNEL_DOMAIN }}"' >> frontend/.env
echo 'POSTHOG_KEY="${{ secrets.POSTHOG_KEY }}"' >> frontend/.env
- name: Install dependencies
working-directory: frontend
run: yarn install
- name: Run Prettier
working-directory: frontend
run: npm run prettify
continue-on-error: true
- name: Run ESLint
working-directory: frontend
run: npm run lint
continue-on-error: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: benjlevesque/[email protected]
id: short-sha
- name: Get branch name
id: branch-name
uses: tj-actions/[email protected]
- name: Set docker tag environment
run: |
if [ '${{ steps.branch-name.outputs.is_tag }}' == 'true' ]; then
tag="${{ steps.branch-name.outputs.tag }}"
tag="${tag:1}"
echo "DOCKER_TAG=${tag}-ee" >> $GITHUB_ENV
elif [ '${{ steps.branch-name.outputs.current_branch }}' == 'main' ]; then
echo "DOCKER_TAG=latest-ee" >> $GITHUB_ENV
else
echo "DOCKER_TAG=${{ steps.branch-name.outputs.current_branch }}-ee" >> $GITHUB_ENV
fi
- name: Build and push docker image
run: make build-push-frontend
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,6 @@ check-no-ee-references:

test:
go test ./pkg/...

test-ee:
go test ./ee/...
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
<host>zookeeper-1</host>
<port>2181</port>
</node>
<!-- <node index="2">
<node index="2">
grandwizard28 marked this conversation as resolved.
Show resolved Hide resolved
<host>zookeeper-2</host>
<port>2181</port>
</node>
<node index="3">
<host>zookeeper-3</host>
<port>2181</port>
</node> -->
</node>
</zookeeper>

<!-- Configuration of clusters that could be used in Distributed tables.
Expand Down Expand Up @@ -58,7 +58,7 @@
<!-- <priority>1</priority> -->
</replica>
</shard>
<!-- <shard>
<shard>
grandwizard28 marked this conversation as resolved.
Show resolved Hide resolved
<replica>
<host>clickhouse-2</host>
<port>9000</port>
Expand All @@ -69,7 +69,7 @@
<host>clickhouse-3</host>
<port>9000</port>
</replica>
</shard> -->
</shard>
</cluster>
</remote_servers>
</clickhouse>
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@
asynchronous_metrics - send data from table system.asynchronous_metrics
status_info - send data from different component from CH, ex: Dictionaries status
-->
<!--

<prometheus>
<endpoint>/metrics</endpoint>
<port>9363</port>
Expand All @@ -726,7 +726,6 @@
<asynchronous_metrics>true</asynchronous_metrics>
<status_info>true</status_info>
</prometheus>
-->

<!-- Query log. Used only for queries with setting log_queries = 1. -->
<query_log>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ alerting:
- alertmanager:9093

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
rule_files: []
# - "first_rules.yml"
# - "second_rules.yml"
- 'alerts.yml'
# - 'alerts.yml'

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
Expand Down
1 change: 1 addition & 0 deletions deploy/docker-swarm/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
COMPOSE_PROJECT_NAME=clickhouse-setup
Empty file.
35 changes: 0 additions & 35 deletions deploy/docker-swarm/clickhouse-setup/alertmanager.yml

This file was deleted.

11 changes: 0 additions & 11 deletions deploy/docker-swarm/clickhouse-setup/alerts.yml

This file was deleted.

Loading
Loading