install archivebox
This commit is contained in:
parent
6eadc6da84
commit
d8295b5e33
55
apps/zurrli/archivebox/configmap.yaml
Normal file
55
apps/zurrli/archivebox/configmap.yaml
Normal file
|
@ -0,0 +1,55 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: sonic-config
|
||||
data:
|
||||
sonic.cfg: |
|
||||
# Sonic
|
||||
# Fast, lightweight and schema-less search backend
|
||||
# Configuration file
|
||||
# Example: https://github.com/valeriansaliou/sonic/blob/master/config.cfg
|
||||
|
||||
[server]
|
||||
log_level = "warn"
|
||||
|
||||
[channel]
|
||||
inet = "0.0.0.0:1491"
|
||||
tcp_timeout = 300
|
||||
auth_password = "${env.SEARCH_BACKEND_PASSWORD}"
|
||||
|
||||
[channel.search]
|
||||
query_limit_default = 65535
|
||||
query_limit_maximum = 65535
|
||||
query_alternates_try = 10
|
||||
suggest_limit_default = 5
|
||||
suggest_limit_maximum = 20
|
||||
|
||||
[store]
|
||||
|
||||
[store.kv]
|
||||
path = "/var/lib/sonic/store/kv/"
|
||||
retain_word_objects = 100000
|
||||
|
||||
[store.kv.pool]
|
||||
inactive_after = 1800
|
||||
|
||||
[store.kv.database]
|
||||
flush_after = 900
|
||||
compress = true
|
||||
parallelism = 2
|
||||
max_files = 100
|
||||
max_compactions = 1
|
||||
max_flushes = 1
|
||||
write_buffer = 16384
|
||||
write_ahead_log = true
|
||||
|
||||
[store.fst]
|
||||
path = "/var/lib/sonic/store/fst/"
|
||||
|
||||
[store.fst.pool]
|
||||
inactive_after = 300
|
||||
|
||||
[store.fst.graph]
|
||||
consolidate_after = 180
|
||||
max_size = 2048
|
||||
max_words = 250000
|
95
apps/zurrli/archivebox/deployment.yaml
Normal file
95
apps/zurrli/archivebox/deployment.yaml
Normal file
|
@ -0,0 +1,95 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: archivebox
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: archivebox
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: archivebox
|
||||
spec:
|
||||
containers:
|
||||
- name: archivebox
|
||||
args:
|
||||
- server
|
||||
- --quick-init
|
||||
- "0.0.0.0:8000"
|
||||
image: docker.io/archivebox/archivebox:0.7.2
|
||||
env:
|
||||
- name: PUBLIC_INDEX
|
||||
value: "True"
|
||||
- name: SAVE_ARCHIVE_DOT_ORG
|
||||
value: "False"
|
||||
- name: SEARCH_BACKEND_ENGINE
|
||||
value: sonic
|
||||
- name: SEARCH_BACKEND_HOST_NAME
|
||||
value: localhost
|
||||
- name: SEARCH_BACKEND_PASSWORD
|
||||
value: ItDoesNtM4tt3rrITsLOCAL
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
protocol: TCP
|
||||
name: http
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: archivebox
|
||||
- name: scheduler
|
||||
args:
|
||||
- schedule
|
||||
- --foreground
|
||||
- --update
|
||||
- --every=day
|
||||
image: docker.io/archivebox/archivebox:0.7.2
|
||||
env:
|
||||
- name: TIMEOUT
|
||||
value: "120"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: archivebox
|
||||
- name: search
|
||||
image: docker.io/valeriansaliou/sonic:v1.4.8
|
||||
env:
|
||||
- name: SEARCH_BACKEND_PASSWORD
|
||||
value: ItDoesNtM4tt3rrITsLOCAL
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/sonic/store
|
||||
subPath: sonic
|
||||
name: archivebox
|
||||
- mountPath: /etc/sonic.cfg
|
||||
subPath: sonic.cfg
|
||||
name: sonic-config
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: archivebox
|
||||
persistentVolumeClaim:
|
||||
claimName: archivebox
|
||||
- name: sonic-config
|
||||
configMap:
|
||||
name: sonic-config
|
24
apps/zurrli/archivebox/ingress.yaml
Normal file
24
apps/zurrli/archivebox/ingress.yaml
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod-desec
|
||||
traefik.ingress.kubernetes.io/router.middlewares: kube-system-redirect-https@kubernetescrd
|
||||
name: archivebox
|
||||
spec:
|
||||
rules:
|
||||
- host: archivebox.tobru.ch
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: archivebox
|
||||
port:
|
||||
number: 8000
|
||||
tls:
|
||||
- hosts:
|
||||
- archivebox.tobru.ch
|
||||
secretName: ingress-cert
|
11
apps/zurrli/archivebox/kustomization.yaml
Normal file
11
apps/zurrli/archivebox/kustomization.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: archivebox
|
||||
resources:
|
||||
- pvc.yaml
|
||||
- configmap.yaml
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
||||
#generators:
|
||||
# - secret-generator.yaml
|
14
apps/zurrli/archivebox/pvc.yaml
Normal file
14
apps/zurrli/archivebox/pvc.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
labels:
|
||||
app: archivebox
|
||||
name: archivebox
|
||||
spec:
|
||||
storageClassName: local-path
|
||||
volumeMode: Filesystem
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
6
apps/zurrli/archivebox/secret-generator.yaml
Normal file
6
apps/zurrli/archivebox/secret-generator.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
apiVersion: viaduct.ai/v1
|
||||
kind: ksops
|
||||
metadata:
|
||||
name: secret-generator
|
||||
files:
|
||||
- secret.sops.yaml
|
11
apps/zurrli/archivebox/service.yaml
Normal file
11
apps/zurrli/archivebox/service.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: archivebox
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 8000
|
||||
selector:
|
||||
app: archivebox
|
||||
type: ClusterIP
|
19
argoapps/zurrli/archivebox.yaml
Normal file
19
argoapps/zurrli/archivebox.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: archivebox
|
||||
namespace: argocd
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
spec:
|
||||
project: apps
|
||||
source:
|
||||
path: apps/zurrli/archivebox
|
||||
repoURL: https://git.tbrnt.ch/tobru/gitops-zurrli.git
|
||||
targetRevision: HEAD
|
||||
destination:
|
||||
namespace: archivebox
|
||||
server: https://kubernetes.default.svc
|
||||
syncPolicy:
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
Loading…
Reference in a new issue