Skip to content

Commit fd8d09e

Browse files
authored
Merge pull request #808 from 06kellyjac/license_inventory_kickoff
feat(experimental): kick off inventory project
2 parents eccb4dc + 6ad27bd commit fd8d09e

37 files changed

+12434
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI - experimental - inventory
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- experimental/license-inventory/**
8+
pull_request:
9+
branches: [main]
10+
paths:
11+
- experimental/license-inventory/**
12+
13+
permissions:
14+
pull-requests: write
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
20+
strategy:
21+
matrix:
22+
node-version: [18.x]
23+
mongodb-version: [4.4]
24+
25+
steps:
26+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Use Node.js ${{ matrix.node-version }}
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: ${{ matrix.node-version }}
34+
35+
- name: Start MongoDB
36+
uses: supercharge/[email protected]
37+
with:
38+
mongodb-version: ${{ matrix.mongodb-version }}
39+
40+
- name: Install dependencies
41+
working-directory: ./experimental/license-inventory
42+
run: npm ci
43+
44+
- name: Test
45+
working-directory: ./experimental/license-inventory
46+
run: |
47+
MONGO_URI="mongodb://localhost:27017/inventory" npm run test
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: experimental-inventory - Publish to NPM
2+
on:
3+
push:
4+
tags:
5+
- 'license-inventory-*'
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
11+
12+
# Setup .npmrc file to publish to npm
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: '18.x'
16+
registry-url: 'https://registry.npmjs.org'
17+
18+
- run: npm ci
19+
working-directory: ./experimental/license-inventory
20+
21+
- run: npm run build
22+
working-directory: ./experimental/license-inventory
23+
24+
- run: npm publish --access=public
25+
working-directory: ./experimental/license-inventory
26+
env:
27+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<br />
2+
<div align="center">
3+
<a href="https://github.com/finos/git-proxy">
4+
<img src="../../docs/img/logo.png" alt="Logo" height="95">
5+
</a>
6+
7+
<br />
8+
<strong>git-proxy: license-inventory</strong>
9+
<br />
10+
11+
<p align="center">
12+
<strong>experimental</strong> project to provide license data and attach said license data to projects for fueling policy evaluation.
13+
<br />
14+
</p>
15+
16+
<br />
17+
18+
[![FINOS - Incubating](https://cdn.jsdelivr.net/gh/finos/contrib-toolbox@master/images/badge-incubating.svg)](https://community.finos.org/docs/governance/Software-Projects/stages/incubating)
19+
[![NPM](https://img.shields.io/npm/v/@finos/git-proxy-license-inventory?colorA=00C586&colorB=000000)](https://www.npmjs.com/package/@finos/git-proxy-license-inventory)
20+
[![Build](https://img.shields.io/github/actions/workflow/status/finos/git-proxy/experimental-inventory-ci.yml?branch=main&label=CI&logo=github&colorA=00C586&colorB=000000)](https://github.com/finos/git-proxy/actions/workflows/experimental-inventory-ci.yml)
21+
[![git-proxy](https://api.securityscorecards.dev/projects/github.com/finos/git-proxy/badge)](https://api.securityscorecards.dev/projects/github.com/finos/git-proxy)
22+
<br />
23+
[![License](https://img.shields.io/github/license/finos/git-proxy?colorA=00C586&colorB=000000)](https://github.com/finos/git-proxy/blob/main/LICENSE)
24+
[![Slack](https://img.shields.io/badge/_-Chat_on_Slack-000000.svg?logo=slack&colorA=00C586)](https://app.slack.com/client/T01E7QRQH97/C06LXNW0W76)
25+
26+
</div>
27+
<br />
28+
29+
This is an **experimental** project to provide license data and attach said license data to projects for fueling policy evaluation.
30+
31+
Please consider all REST API paths, inputs, and outputs in flux during `v0`. Additionally do not rely import paths to be stable.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
apiVersion: 1
2+
3+
datasources:
4+
- name: Loki
5+
type: loki
6+
uid: loki
7+
access: proxy
8+
url: http://loki:3100
9+
basicAuth: false
10+
version: 1
11+
editable: false
12+
isDefault: true
13+
14+
- name: Prometheus
15+
type: prometheus
16+
uid: prometheus
17+
access: proxy
18+
orgId: 1
19+
url: http://prometheus:9090
20+
basicAuth: false
21+
isDefault: false
22+
version: 1
23+
editable: false
24+
jsonData:
25+
httpMethod: GET
26+
27+
- name: Tempo
28+
type: tempo
29+
uid: tempo
30+
access: proxy
31+
orgId: 1
32+
url: http://tempo:3200
33+
basicAuth: false
34+
isDefault: false
35+
version: 1
36+
editable: false
37+
jsonData:
38+
tracesToLogsV2:
39+
datasourceUid: loki
40+
filterByTraceID: true
41+
filterBySpanID: true
42+
tracesToMetrics:
43+
datasourceUid: prometheus
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
auth_enabled: false
2+
3+
server:
4+
http_listen_port: 3100
5+
grpc_listen_port: 9096
6+
7+
common:
8+
instance_addr: 127.0.0.1
9+
path_prefix: /tmp/loki
10+
storage:
11+
filesystem:
12+
chunks_directory: /tmp/loki/chunks
13+
rules_directory: /tmp/loki/rules
14+
replication_factor: 1
15+
ring:
16+
kvstore:
17+
store: inmemory
18+
19+
frontend:
20+
max_outstanding_per_tenant: 2048
21+
22+
pattern_ingester:
23+
enabled: true
24+
25+
limits_config:
26+
max_global_streams_per_user: 0
27+
ingestion_rate_mb: 50000
28+
ingestion_burst_size_mb: 50000
29+
volume_enabled: true
30+
31+
query_range:
32+
results_cache:
33+
cache:
34+
embedded_cache:
35+
enabled: true
36+
max_size_mb: 100
37+
38+
schema_config:
39+
configs:
40+
- from: 2020-10-24
41+
store: tsdb
42+
object_store: filesystem
43+
schema: v13
44+
index:
45+
prefix: index_
46+
period: 24h
47+
48+
analytics:
49+
reporting_enabled: false
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
extensions:
2+
health_check:
3+
pprof:
4+
endpoint: 127.0.0.1:1777
5+
zpages:
6+
endpoint: 127.0.0.1:55679
7+
8+
receivers:
9+
otlp:
10+
protocols:
11+
http:
12+
endpoint: 0.0.0.0:4318
13+
14+
# collect own metrics
15+
prometheus:
16+
config:
17+
scrape_configs:
18+
- job_name: otel-collector
19+
scrape_interval: 10s
20+
static_configs:
21+
- targets:
22+
- 127.0.0.1:8888
23+
24+
exporters:
25+
loki:
26+
endpoint: http://loki:3100/loki/api/v1/push
27+
prometheus:
28+
endpoint: 127.0.0.1:8889
29+
namespace: otel-collector
30+
send_timestamps: true
31+
metric_expiration: 180m
32+
enable_open_metrics: true
33+
add_metric_suffixes: false
34+
resource_to_telemetry_conversion:
35+
enabled: true
36+
otlphttp:
37+
endpoint: http://tempo:4318
38+
39+
processors:
40+
batch:
41+
42+
service:
43+
pipelines:
44+
traces:
45+
receivers: [otlp]
46+
exporters: [otlphttp]
47+
metrics:
48+
receivers: [otlp]
49+
exporters: [prometheus]
50+
logs:
51+
receivers: [otlp]
52+
exporters: [loki]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
global:
2+
scrape_interval: 15s
3+
evaluation_interval: 15s
4+
5+
scrape_configs:
6+
- job_name: prometheus
7+
static_configs:
8+
- targets: [ 'localhost:9090' ]
9+
- job_name: tempo
10+
static_configs:
11+
- targets: [ 'tempo:3200' ]
12+
- job_name: promtail
13+
static_configs:
14+
- targets: [ 'promtail:9080' ]
15+
- job_name: otel-collector
16+
static_configs:
17+
- targets: [ 'otel-collector:8889' ]
18+
- job_name: otel-collector-meta
19+
static_configs:
20+
- targets: [ 'otel-collector:8888' ]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
positions:
2+
filename: /tmp/positions.yaml
3+
4+
clients:
5+
- url: http://loki:3100/loki/api/v1/push
6+
7+
scrape_configs:
8+
- job_name: system
9+
static_configs:
10+
- targets:
11+
- localhost
12+
labels:
13+
job: mongo
14+
__path__: /var/log-mongo/mongo.log*
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
stream_over_http_enabled: true
2+
server:
3+
http_listen_port: 3200
4+
5+
distributor:
6+
receivers:
7+
otlp:
8+
protocols:
9+
http:
10+
11+
compactor:
12+
compaction:
13+
block_retention: 1h
14+
15+
metrics_generator:
16+
registry:
17+
external_labels:
18+
source: tempo
19+
cluster: docker-compose
20+
storage:
21+
path: /var/tempo/generator/wal
22+
remote_write:
23+
- url: http://prometheus:9090/api/v1/write
24+
send_exemplars: true
25+
traces_storage:
26+
path: /var/tempo/generator/traces
27+
28+
storage:
29+
trace:
30+
backend: local
31+
wal:
32+
path: /var/tempo/wal
33+
local:
34+
path: /var/tempo/blocks
35+
36+
overrides:
37+
defaults:
38+
metrics_generator:
39+
processors: [service-graphs, span-metrics, local-blocks]
40+
generate_native_histograms: both

0 commit comments

Comments
 (0)