Skip to content

Commit

Permalink
chore: merging main to develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitnayan committed Feb 9, 2022
2 parents acbe7f9 + 07183d5 commit c5ee8cd
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 4 deletions.
36 changes: 36 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file)
# and commit this file to your remote git repository to share the goodness with others.


tasks:
- name: Run Script to Comment ut required lines
init: |
cd ./.scripts
sh commentLinesForSetup.sh
- name: Run Docker Images
init: |
cd ./deploy
sudo docker-compose --env-file ./docker/clickhouse-setup/env/x86_64.env -f docker/clickhouse-setup/docker-compose.yaml up -d
# command:

- name: Run Frontend
init: |
cd ./frontend
yarn install
command:
yarn dev

ports:
- port: 3000
onOpen: open-browser
- port: 8080
onOpen: ignore
- port: 9000
onOpen: ignore
- port: 8123
onOpen: ignore
- port: 8089
onOpen: ignore
- port: 9093
onOpen: ignore
7 changes: 7 additions & 0 deletions .scripts/commentLinesForSetup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

# It Comments out the Line Query-Service & Frontend Section of deploy/docker/clickhouse-setup/docker-compose.yaml
# Update the Line Numbers when deploy/docker/clickhouse-setup/docker-compose.yaml chnages.
# Docs Ref.: https://github.com/SigNoz/signoz/blob/main/CONTRIBUTING.md#contribute-to-frontend-with-docker-installation-of-signoz

sed -i 38,70's/.*/# &/' .././deploy/docker/clickhouse-setup/docker-compose.yaml
20 changes: 17 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Need to update [https://github.com/SigNoz/signoz/tree/main/frontend](https://git
### Contribute to Frontend with Docker installation of SigNoz

- `git clone https://github.com/SigNoz/signoz.git && cd signoz`
- comment out frontend service section at `deploy/docker/clickhouse-setup/docker-compose.yaml#L38`
- comment out frontend service section at `deploy/docker/clickhouse-setup/docker-compose.yaml#L59`
- run `cd deploy` to move to deploy directory
- Install signoz locally without the frontend
- If you are using x86_64 processors (All Intel/AMD processors) run `sudo docker-compose -f docker/clickhouse-setup/docker-compose.yaml up -d`
Expand All @@ -27,6 +27,8 @@ Need to update [https://github.com/SigNoz/signoz/tree/main/frontend](https://git
- `yarn install`
- `yarn dev`

> Notes for Maintainers/Contributors who will change Line Numbers of Frontend & Query-Section. Please Update Line Numbers in `./scripts/commentLinesForSetup.sh`
### Contribute to Frontend without installing SigNoz backend

If you don't want to install SigNoz backend just for doing frontend development, we can provide you with test environments which you can use as the backend. Please ping us in #contributing channel in our [slack community](https://signoz.io/slack) and we will DM you with `<test environment URL>`
Expand All @@ -46,16 +48,27 @@ Need to update [https://github.com/SigNoz/signoz/tree/main/pkg/query-service](ht

- 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`
- comment out frontend service section at `docker/clickhouse-setup/docker-compose.yaml#L59`
- comment out query-service section at `docker/clickhouse-setup/docker-compose.yaml#L38`
- Install signoz locally without the frontend and query-service
- 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`

> Notes for Maintainers/Contributors who will change Line Numbers of Frontend & Query-Section. Please Update Line Numbers in `./scripts/commentLinesForSetup.sh`
**_Query Service should now be available at `http://localhost:8080`_**

> If you want to see how, frontend plays with query service, you can run frontend also in you local env with the baseURL changed to `http://localhost:8080` in file `src/constants/env.ts` as the query-service is now running at port `8080`
---
Instead of configuring a local setup, you can also use [Gitpod](https://www.gitpod.io/), a VSCode-based Web IDE.

Click the button below. A workspace with all required environments will be created.

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/SigNoz/signoz)

> To use it on your forked repo, edit the 'Open in Gitpod' button url to `https://gitpod.io/#https://github.com/<your-github-username>/signoz`
# Contribute to SigNoz Helm Chart

Need to update [https://github.com/SigNoz/charts](https://github.com/SigNoz/charts).
Expand Down Expand Up @@ -90,6 +103,7 @@ kubectl -n sample-application run strzal --image=djbingham/curl \
--restart='OnFailure' -i --tty --rm --command -- curl \
http://locust-master:8089/stop
```
---

## General Instructions

Expand Down
3 changes: 3 additions & 0 deletions deploy/docker/clickhouse-setup/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ services:
- '--config.file=/prometheus/alertmanager.yml'
- '--storage.path=/data'

# Notes for Maintainers/Contributors who will change Line Numbers of Frontend & Query-Section. Please Update Line Numbers in `./scripts/commentLinesForSetup.sh` & `./CONTRIBUTING.md`


query-service:
image: signoz/query-service:0.5.4
container_name: query-service
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/constants/env.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const ENVIRONMENT = {
baseURL: process?.env?.FRONTEND_API_ENDPOINT || '',
baseURL: process?.env?.FRONTEND_API_ENDPOINT || process.env.GITPOD_WORKSPACE_URL.replace('://','://8080-') ||'http://localhost:8080'|| '',
};
1 change: 1 addition & 0 deletions frontend/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const config = {
publicPath: '/',
watch: true,
},
allowedHosts: 'all',
},
target: 'web',
output: {
Expand Down

0 comments on commit c5ee8cd

Please sign in to comment.