Skip to content

Commit

Permalink
Merge branch 'master' into always-use-dbname
Browse files Browse the repository at this point in the history
Signed-off-by: Lorenzo Mangani <[email protected]>
  • Loading branch information
lmangani authored Nov 11, 2023
2 parents bbe9514 + d1a459a commit 76bc981
Show file tree
Hide file tree
Showing 29 changed files with 6,370 additions and 2,185 deletions.
99 changes: 70 additions & 29 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ jobs:
build:
name: 'Build & Publish'
runs-on: ubuntu-latest

steps:
- uses: 'actions/checkout@v3'
- uses: actions/checkout@v4.1.1
with:
ref: ${{ github.ref }}
- name: Update Package to Release version
Expand All @@ -29,9 +28,9 @@ jobs:
shell: bash
run: |
if [ "$SECRET" == "" ]; then
echo ::set-output name=secretspresent::false
echo "secretspresent=false" >> $GITHUB_OUTPUT
else
echo ::set-output name=secretspresent::true
echo "secretspresent=true" >> $GITHUB_OUTPUT
fi
env:
SECRET: ${{ secrets.NPM_TOKEN }}
Expand All @@ -41,43 +40,51 @@ jobs:
node-version: 18
- name: Publish to NPM
if: ${{ steps.checksecrets.outputs.secretspresent }}
continue-on-error: true
run: |
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
npm install
npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}


node:
name: 'Build & Publish Node'
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/[email protected]
with:
ref: ${{ github.ref }}
- name: Check Docker secret presence
id: checkdocker
shell: bash
run: |
if [ "$SECRET" == "" ]; then
echo ::set-output name=secretspresent::false
echo "secretspresent=false" >> $GITHUB_OUTPUT
else
echo ::set-output name=secretspresent::true
echo "secretspresent=true" >> $GITHUB_OUTPUT
fi
env:
SECRET: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker QEMU
if: ${{ steps.checkdocker.outputs.secretspresent }}
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3.0.0
with:
platforms: amd64, arm64
- name: Set up Docker Buildx
if: ${{ steps.checkdocker.outputs.secretspresent }}
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3.0.0

- name: Login to DockerHub
if: ${{ steps.checkdocker.outputs.secretspresent }}
uses: docker/login-action@v2.0.0
uses: docker/login-action@v3.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push to Docker Hub
if: ${{ steps.checkdocker.outputs.secretspresent }}
uses: docker/build-push-action@v3.0.0
uses: docker/build-push-action@v5.0.0
with:
platforms: linux/amd64, linux/arm64
push: true
Expand All @@ -86,7 +93,55 @@ jobs:
qxip/qryn:${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
qxip/cloki:latest
qxip/cloki:${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
- name: Log in to the GHCR registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push to GHCR
uses: docker/[email protected]
with:
platforms: linux/amd64, linux/arm64
file: ./Dockerfile
push: true
tags: |
ghcr.io/metrico/qryn:latest
ghcr.io/metrico/qryn:${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
bun:
name: 'Build & Publish Bun'
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/[email protected]
with:
ref: ${{ github.ref }}
- name: Check Docker secret presence
id: checkdocker
shell: bash
run: |
if [ "$SECRET" == "" ]; then
echo "secretspresent=false" >> $GITHUB_OUTPUT
else
echo "secretspresent=true" >> $GITHUB_OUTPUT
fi
env:
SECRET: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker QEMU
if: ${{ steps.checkdocker.outputs.secretspresent }}
uses: docker/[email protected]
with:
platforms: amd64, arm64
- name: Set up Docker Buildx
if: ${{ steps.checkdocker.outputs.secretspresent }}
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
if: ${{ steps.checkdocker.outputs.secretspresent }}
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push to Docker Hub (bun)
if: ${{ steps.checkdocker.outputs.secretspresent }}
uses: docker/[email protected]
Expand All @@ -97,28 +152,14 @@ jobs:
tags: |
qxip/qryn:bun
qxip/qryn:${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}-bun
qxip/cloki:bun
qxip/cloki:${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}-bun
- name: Log in to the GHCR registry
uses: docker/login-action@v2.0.0
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push to GHCR
uses: docker/[email protected]
with:
platforms: linux/amd64, linux/arm64
file: ./Dockerfile
push: true
tags: |
ghcr.io/metrico/qryn:latest
ghcr.io/metrico/qryn:${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
- name: Build and push to GHCR (bun)
uses: docker/build-push-action@v3.0.0
uses: docker/build-push-action@v5.0.0
with:
platforms: linux/amd64, linux/arm64
file: ./Dockerfile_bun
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/manual_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: 'Manual Bun CI+CD'

on:
workflow_dispatch:
inputs:
TAG_NAME:
description: 'Release Version Tag (0.0.0)'
required: true

jobs:
bun:
name: 'Build & Publish Bun'
runs-on: ubuntu-latest
steps:
- uses: 'actions/[email protected]'
with:
ref: ${{ github.ref }}
- name: Check Docker secret presence
id: checkdocker
shell: bash
run: |
if [ "$SECRET" == "" ]; then
echo "secretspresent=false" >> $GITHUB_OUTPUT
else
echo "secretspresent=true" >> $GITHUB_OUTPUT
fi
env:
SECRET: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker QEMU
if: ${{ steps.checkdocker.outputs.secretspresent }}
uses: docker/[email protected]
with:
platforms: amd64, arm64
- name: Set up Docker Buildx
if: ${{ steps.checkdocker.outputs.secretspresent }}
uses: docker/[email protected]
- name: Login to DockerHub
if: ${{ steps.checkdocker.outputs.secretspresent }}
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push to Docker Hub (bun)
if: ${{ steps.checkdocker.outputs.secretspresent }}
uses: docker/[email protected]
with:
platforms: linux/amd64, linux/arm64
file: ./Dockerfile_bun
push: true
tags: |
qxip/qryn:bun
- name: Log in to the GHCR registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push to GHCR (bun)
uses: docker/[email protected]
with:
platforms: linux/amd64, linux/arm64
file: ./Dockerfile_bun
push: true
tags: |
ghcr.io/metrico/qryn:bun
27 changes: 19 additions & 8 deletions .github/workflows/node-clickhouse.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,43 @@ on:
- '**.md'
- '**.yml'
- '**.yaml'
workflow_dispatch:
inputs:
clickhouse_tag:
description: 'Tag for ClickHouse (23.8-alpine)'
required: false

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18, 16.x, 20]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

services:
clickhouse:
image: "clickhouse/clickhouse-server:${{ github.event.inputs.clickhouse_tag || '23.8-alpine' }}"
ports:
- 8123:8123
- 9000:9000
steps:
- run: docker run --name clickhouse -p 9000:9000 -p 8123:8123 -d clickhouse/clickhouse-server:23.8-alpine
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run postinstall
- run: git submodule init
- run: git submodule update
- name: Workflow Telemetry
uses: runforesight/[email protected]
- env:
CLICKHOUSE_DB: loki
CLICKHOUSE_TSDB: loki
CLICKHOUSE_DB: qryn
CLICKHOUSE_TSDB: qryn
INTEGRATION_E2E: 1
CLOKI_EXT_URL: 127.0.0.1:3100
QRYN_LOGIN: a
QRYN_PASSWORD: b
run: node qryn.mjs >/dev/stdout & npm run test --forceExit
8 changes: 2 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Qryn
FROM node:16-slim

# BUILD FORCE
ENV BUILD 703030
ENV PORT 3100
# qryn
FROM node:20-slim

COPY . /app
WORKDIR /app
Expand Down
8 changes: 2 additions & 6 deletions Dockerfile_bun
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# qryn bun builder
FROM oven/bun:alpine

# BUILD FORCE
ENV BUILD 20231027
ENV PORT 3100
FROM oven/bun:latest

COPY . /app
WORKDIR /app
Expand All @@ -12,4 +8,4 @@ RUN bun install

# Expose Ports
EXPOSE 3100
CMD [ "bun", "qryn.mjs" ]
CMD [ "bun", "--bun", "qryn.mjs" ]
37 changes: 24 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,39 @@

<br>

### :eye: View Explorer
## Features

💡 _**qryn** independently implements popular observability standards, protocols and query languages_

<br>

### :eye: Built-In Explorer

**qryn** ships with **view** - our zero dependency, lightweight data explorer for **Logs, Metrics** and **Traces**

<a href="https://qryn.dev" target="_blank">
<img src="https://user-images.githubusercontent.com/1423657/200136242-f4133229-ee7c-45e0-8228-8734cf56140a.gif" width=700 class=border />
</a>

## Features

💡 _**qryn** independently implements popular observability standards, protocols and query languages_

<br>

## ➡️ Ingest
### 📚 OpenTelemetry
**qryn** is officially integrated with [opentelemetry](https://github.com/metrico/otel-collector) supports _any log, trace or metric format_<br>
Ingested data can be queried using any of the avialable qryn APIs _(LogQL, PromQL, TraceQL)_

**qryn** is officially integrated with [opentelemetry](https://github.com/metrico/otel-collector) supports _any log, trace or metric format_
> 💡 _No modifications required to your opentelemetry instrumentation!_
Ingested data can be queried using any of the avialable qryn APIs _(LogQL, PromQL, TraceQL)_
### 📚 Native
**qryn** supports [native ingestion](https://qryn.metrico.in/#/support) for Loki, Prometheus, Tempo/Zipkin and other protocols_<br>
With qryn users can _push data using any combination of supported protocols_

> 💡 _No opentelemetry or any other middlewayre/proxy required!_
<br>

## ⬅️ Query

### 📚 Loki + LogQL

> Any Loki compatible client or application can be used with qryn out of the box
Expand All @@ -71,8 +82,8 @@ The Grafana Loki datasource can be used to natively browse and query _logs_ and
<img src="https://user-images.githubusercontent.com/1423657/196654073-b84a218c-6a70-49bb-a477-e8be5714e0ba.gif" width=700 class=border />
</a>

:tada: _No plugins needed_ <br>
:eye: _No Grafana? No problem! Use View_
> :tada: _No plugins needed_ <br>
> :eye: _No Grafana? No problem! Use View_

<br>
Expand All @@ -89,8 +100,8 @@ The Grafana Prometheus datasource can be used to natively to query _metrics_ and
<img src="https://user-images.githubusercontent.com/1423657/196654084-1f1d8a62-3fd2-4420-a2fa-57ac2872938c.gif" width=700 class=border />
</a>

:tada: _No plugins needed_ <br>
:eye: _No Grafana? No problem! Use View_
> :tada: _No plugins needed_ <br>
> :eye: _No Grafana? No problem! Use View_


Expand All @@ -108,8 +119,8 @@ The Tempo datasource can be used to natively query _traces_ including _**TraceQL
<img src="https://user-images.githubusercontent.com/1423657/196654097-8a235253-bf5d-4937-9e78-fddf12819d44.gif" width=700 class=border />
</a>

:tada: _No plugins needed_ <br>
:eye: _No Grafana? No problem! Use View_
> :tada: _No plugins needed_ <br>
> :eye: _No Grafana? No problem! Use View_

<br>
Expand Down
Loading

0 comments on commit 76bc981

Please sign in to comment.