fix: update Contributing and Makefile for dev-setup (#599)

This commit is contained in:
Kartik Verma 2022-01-25 16:31:19 +05:30 committed by GitHub
parent 40f9a4a5aa
commit 9c07ac376d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 7 deletions

1
.gitignore vendored
View File

@ -42,3 +42,4 @@ frontend/cypress.env.json
frontend/*.env
pkg/query-service/signoz.db
/deploy/docker/clickhouse-setup/data/

View File

@ -44,13 +44,13 @@ Need to update [https://github.com/SigNoz/signoz/tree/main/pkg/query-service](ht
### To run ClickHouse setup (recommended for local development)
- `git clone https://github.com/SigNoz/signoz.git && cd signoz/deploy`
- comment out frontend service section at `docker/clickhouse-setup/docker-compose.yaml#L38`
- comment out query-service section at `docker/clickhouse-setup/docker-compose.yaml#L22`
- git clone https://github.com/SigNoz/signoz.git
- run `sudo make dev-setup` to configure local setup to run query-service
- comment out frontend service section at `deploy/docker/clickhouse-setup/docker-compose.yaml#L38`
- comment out query-service section at `deploy/docker/clickhouse-setup/docker-compose.yaml#L22`
- Install signoz locally without the frontend and query-service
- If you are using x86_64 processors (All Intel/AMD processors) run `sudo docker-compose --env-file ./docker/clickhouse-setup/env/x86_64.env -f docker/clickhouse-setup/docker-compose.yaml up -d`
- If you are on arm64 processors (Apple M1 Macbooks) run `sudo docker-compose --env-file ./docker/clickhouse-setup/env/arm64.env -f docker/clickhouse-setup/docker-compose.yaml up -d`
- `STORAGE=clickhouse ClickHouseUrl=tcp://localhost:9001 go run main.go`
- If you are using x86_64 processors (All Intel/AMD processors) run `sudo make run-x86`
- If you are on arm64 processors (Apple M1 Macbooks) run `sudo make run-arm`
**_Query Service should now be available at `http://localhost:8080`_**

View File

@ -81,3 +81,17 @@ build-push-flattener:
@echo "------------------"
@cd $(FLATTENER_DIRECTORY) && \
docker buildx build --file Dockerfile --progress plane --no-cache --push --platform linux/arm64,linux/amd64 --tag $(REPONAME)/$(FLATTERNER_DOCKER_IMAGE):$(DOCKER_TAG) .
dev-setup:
mkdir -p /var/lib/signoz
sqlite3 /var/lib/signoz/signoz.db "VACUUM";
mkdir -p pkg/query-service/config/dashboards
@echo "------------------"
@echo "--> Local Setup completed"
@echo "------------------"
run-x86:
@sudo docker-compose --env-file ./deploy/docker/clickhouse-setup/env/x86_64.env -f ./deploy/docker/clickhouse-setup/docker-compose.yaml up -d
run-arm:
@sudo docker-compose --env-file ./deploy/docker/clickhouse-setup/env/arm64.env -f ./deploy/docker/clickhouse-setup/docker-compose.yaml up -d

View File

@ -11,7 +11,7 @@ require (
github.com/aws/aws-sdk-go v1.27.0 // indirect
github.com/containerd/containerd v1.4.12 // indirect
github.com/dhui/dktest v0.3.4 // indirect
github.com/docker/docker v20.10.12+incompatible
github.com/docker/docker v20.10.12+incompatible // indirect
github.com/frankban/quicktest v1.13.0 // indirect
github.com/go-kit/log v0.1.0
github.com/golang-migrate/migrate/v4 v4.14.1