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

Adding support for CollectionsQuery #37

Merged
merged 15 commits into from
Jan 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
# Mac Shit
.DS_Store


# open telemetry demo
deployment/opentelemetry-demo
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ GoLang-based implementation of [DIF's DWN Specification](https://identity.founda

## Progress

### For initial v0.1.0 release (2022 Q4)
### For initial v0.1.0 release (2023 Q1)

- [x] [Initial API layer](https://github.com/openreserveio/dwn/pull/4)
- [x] [Initial message processing, collections write/read](https://github.com/openreserveio/dwn/pull/9)
Expand All @@ -20,8 +20,9 @@ GoLang-based implementation of [DIF's DWN Specification](https://identity.founda
- [ ] [Hooks](https://github.com/openreserveio/dwn/issues/28) and [Webhooks](https://github.com/openreserveio/dwn/issues/29), [Events](https://github.com/openreserveio/dwn/issues/12)
- [ ] [Permissions](https://github.com/openreserveio/dwn/issues/30)
- [x] Docker-based deployment focus
- [ ] [Opinionated Client Library](https://github.com/openreserveio/dwn/issues/39)

### For v0.2.0 release (2023 Q1)
### For v0.2.0 release (2023 Q2)

- [ ] Protocols support
- [ ] Sync
Expand All @@ -32,6 +33,7 @@ GoLang-based implementation of [DIF's DWN Specification](https://identity.founda
### To be scheduled:

- [ ] Support [DID Registration](https://identity.foundation/did-registration/)
- [ ] Automated release to alpha.openreserve.io open testing channel


# Documentation
Expand Down
119 changes: 107 additions & 12 deletions deployment/localdev/compose/full-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
version: "3.9"

x-default-logging: &logging
driver: "json-file"
options:
max-size: "5m"
max-file: "2"


volumes:
mysql_data:
driver: local
Expand All @@ -9,6 +16,86 @@ volumes:
driver: local

services:

# ********************
# Telemetry Components
# ********************
# Jaeger
jaeger:
image: jaegertracing/all-in-one:latest
container_name: jaeger
command:
- "--memory.max-traces"
- "10000"
- "--query.base-path"
- "/jaeger/ui"
- "--prometheus.server-url"
- "http://prometheus:9090"
deploy:
resources:
limits:
memory: 275M
restart: always
ports:
- "8005:16686" # Jaeger UI
- "4317" # OTLP gRPC default port
environment:
- COLLECTOR_OTLP_ENABLED=true
- METRICS_STORAGE_TYPE=prometheus
logging: *logging

# Grafana
grafana:
image: grafana/grafana:9.1.0
container_name: grafana
volumes:
- ./grafana.ini:/etc/grafana/grafana.ini
- ./grafana/provisioning/:/etc/grafana/provisioning/
ports:
- "3000:3000"
logging: *logging

# OpenTelemetry Collector
otelcol:
image: otel/opentelemetry-collector-contrib:0.61.0
container_name: otelcol
deploy:
resources:
limits:
memory: 100M
restart: always
command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-config-extras.yml" ]
volumes:
- ./otelcol-config.yml:/etc/otelcol-config.yml
- ./otelcol-config-extras.yml:/etc/otelcol-config-extras.yml
ports:
- "4317:4317" # OTLP over gRPC receiver
- "4318:4318" # OTLP over HTTP receiver
- "9464" # Prometheus exporter
- "8888" # metrics endpoint
depends_on:
- jaeger
logging: *logging

# Prometheus
prometheus:
image: quay.io/prometheus/prometheus:v2.34.0
container_name: prometheus
command:
- --web.console.templates=/etc/prometheus/consoles
- --web.console.libraries=/etc/prometheus/console_libraries
- --storage.tsdb.retention.time=1h
- --config.file=/etc/prometheus/prometheus-config.yaml
- --storage.tsdb.path=/prometheus
- --web.enable-lifecycle
- --web.route-prefix=/
volumes:
- ./prometheus-config.yaml:/etc/prometheus/prometheus-config.yaml
ports:
- "9090:9090"
logging: *logging

# Common Infrastructure Components
eventsqueue:
image: "nats"
ports:
Expand All @@ -23,6 +110,20 @@ services:
- "MONGO_INITDB_ROOT_PASSWORD=openreservepass"
volumes:
- "documentdb_data:/data/db"
localstack:
image: "localstack/localstack"
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
environment:
- DEBUG=1
- PERSISTENCE=0
- DOCKER_HOST=unix:///var/run/docker.sock
volumes:
- "localstack_data:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"

# DWN Components
collsvc:
image: "openreserveio/collsvc:latest"
build:
Expand All @@ -35,6 +136,8 @@ services:
environment:
- "DWN_COLLSVC.DOCDBCONNECTIONURI=mongodb://openreserveuser:openreservepass@docdb:27017"
- "DWN_COLLSVC.LISTENPORT=9001"
- "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://otelcol:4318/v1/traces"
- "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://otelcol:4318/v1/metrics"
api:
image: "openreserveio/api:latest"
build:
Expand All @@ -48,15 +151,7 @@ services:
- "DWN_API.LISTENPORT=8080"
- "DWN_COLLSVC.EXTERNALADDRESS=collsvc"
- "DWN_COLLSVC.EXTERNALPORT=9001"
localstack:
image: "localstack/localstack"
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
environment:
- DEBUG=1
- PERSISTENCE=0
- DOCKER_HOST=unix:///var/run/docker.sock
volumes:
- "localstack_data:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
# - "OPEN_TELEMETRY_COLLECTOR_URL=http://otelcol:4318/v1/traces"
- "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://otelcol:4318/v1/traces"
# - "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://otelcol:4317"

Loading