Skip to content
Draft
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
44 changes: 44 additions & 0 deletions deployment/docker/compose-cluster.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
version: '3.8'

services:
seq-db-proxy:
image: ghcr.io/ozontech/seq-db:latest
ports:
- "9002:9002" # Default HTTP port
- "9004:9004" # Default gRPC port
- "9200:9200" # Default debug port
command:
--mode=proxy
--config=/configs/config.yaml
depends_on:
- seq-db-store
volumes:
- ./config-cluster.yaml:/configs/config.yaml
- ./mappings.yaml:/configs/mappings.yaml
seq-db-store:
image: ghcr.io/ozontech/seq-db:latest
command:
--mode=store
--config=/configs/config.yaml
volumes:
- ./config-cluster.yaml:/configs/config.yaml
- ./mappings.yaml:/configs/mappings.yaml
- seqdbdata:/data
stdin_open: true
tty: true
restart: unless-stopped
seq-ui:
image: ghcr.io/ozontech/seq-ui:latest
volumes:
- ./config.seq-ui.yaml:/seq-ui/config.yaml
ports:
- "5555:5555" # Default HTTP port
- "5556:5556" # Default gRPC port
- "5557:5557" # Default debug port
command: --config config.yaml
seq-ui-fe:
image: ghcr.io/ozontech/seq-ui-fe:latest
ports:
- "5173:80"
volumes:
seqdbdata: {}
20 changes: 20 additions & 0 deletions deployment/docker/compose-single.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3.8'

services:
seq-db:
image: ghcr.io/ozontech/seq-db:latest
ports:
- "9002:9002" # Default HTTP port
- "9004:9004" # Default gRPC port
- "9200:9200" # Default debug port
command:
--config=/configs/config.yaml
--mode=single
volumes:
- ./config-single.yaml:/configs/config.yaml:ro
- seqdbdata:/data
stdin_open: true
tty: true
restart: unless-stopped
volumes:
seqdbdata: {}
28 changes: 28 additions & 0 deletions deployment/docker/config-cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
storage:
data_dir: /data
frac_size: 256MiB
total_size: 100GiB

cluster:
hot_replicas: 1
# shuffle_replicas: true
hot_stores:
- seq-db-store:9004
# colds
# read_stores:
# - seq-db-store:9004
# write_stores:
# - seq-db-store:9004




mapping:
enable_updates: true
path: /configs/mappings.yaml
update_period: 5s

slow_logs:
bulk_threshold: 100ms
search_threshold: 20ms
fetch_threshold: 20ms
5 changes: 5 additions & 0 deletions deployment/docker/config-single.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
storage:
data_dir: /data

mapping:
path: auto
37 changes: 37 additions & 0 deletions deployment/docker/config.seq-ui.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
server:
http_addr: "0.0.0.0:5555"
grpc_addr: "0.0.0.0:5556"
debug_addr: "0.0.0.0:5557"
cors:
allowed_headers:
- Content-Type
- Authorization
allowed_methods:
- HEAD
- GET
- POST
- PATCH
- DELETE
allowed_origins:
- '*'
max_age: 300
clients:
seq_db_addrs:
- "seq-db-proxy:9004"
seq_db_timeout: 15s
seq_db_avg_doc_size: 100
request_retries: 3
proxy_client_mode: "grpc"
grpc_keepalive_params:
time: 10s
timeout: 10s
permit_without_stream: true
handlers:
seq_api:
seq_cli_max_search_limit: 10000
max_search_limit: 1000
max_search_total_limit: 100000
max_search_offset_limit: 100000
max_export_limit: 10000
max_parallel_export_requests: 1
max_aggregations_per_request: 3
17 changes: 17 additions & 0 deletions deployment/docker/mappings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
mapping-list:
- type: "keyword"
name: "k8s_pod"
- type: "keyword"
name: "k8s_namespace"
- type: "keyword"
name: "k8s_container"
- type: "text"
name: "request"
- type: "path"
name: "request_uri"
- name: "message"
types:
- type: "text"
- title: "keyword"
type: "keyword"
size: 18
23 changes: 23 additions & 0 deletions deployment/k8s/helm-chart/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
24 changes: 24 additions & 0 deletions deployment/k8s/helm-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: seq-db
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "latest"
13 changes: 13 additions & 0 deletions deployment/k8s/helm-chart/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Helm Chart

Install [Helm](https://helm.sh/docs/intro/install/)

## Examples for Minikube Minikube

Install [Minikube](https://minikube.sigs.k8s.io/docs/start/)

### Install

```shell
helm upgrade --install seq-db . -f values.minikube.yaml
```
Empty file.
62 changes: 62 additions & 0 deletions deployment/k8s/helm-chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "seq-db.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "seq-db.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "seq-db.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "seq-db.labels" -}}
helm.sh/chart: {{ include "seq-db.chart" . }}
{{ include "seq-db.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "seq-db.selectorLabels" -}}
app.kubernetes.io/name: {{ include "seq-db.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "seq-db.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "seq-db.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
13 changes: 13 additions & 0 deletions deployment/k8s/helm-chart/templates/configmap-mappings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "seq-db.fullname" . }}-mappings
labels:
app: "{{ template "seq-db.fullname" . }}"
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
data:
mappings.yaml: |
mapping-list:
{{ .Values.mapping.mapping_list | toYaml | indent 4 }}
31 changes: 31 additions & 0 deletions deployment/k8s/helm-chart/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "seq-db.fullname" . }}-config
labels:
app: "{{ template "seq-db.fullname" . }}"
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
data:
config.yaml: |
storage:
data_dir: /data
{{- if .Values.storage.frac_size }}
frac_size: {{ .Values.storage.frac_size }}
{{- end }}
{{- if .Values.storage.total_size }}
total_size: {{ .Values.storage.total_size }}
{{- end }}
mapping:
enable_updates: {{ .Values.mapping.enable_updates }}
{{- if .Values.mapping.auto }}
path: auto
{{- else }}
path: /mappings/mappings.yaml
{{- end }}
update_period: {{ .Values.mapping.update_period }}
slow_logs:
bulk_threshold: 0ms
fetch_threshold: 3s
search_threshold: 3s
62 changes: 62 additions & 0 deletions deployment/k8s/helm-chart/templates/seq-proxy/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "seq-proxy.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}-proxy
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "seq-proxy.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}-proxy
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}-proxy
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}-proxy
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "seq-proxy.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "seq-proxy.labels" -}}
helm.sh/chart: {{ include "seq-proxy.chart" . }}
{{ include "seq-proxy.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "seq-proxy.selectorLabels" -}}
app.kubernetes.io/name: {{ include "seq-proxy.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "seq-proxy.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "seq-proxy.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
Loading
Loading