diff --git a/opsroot.json b/opsroot.json
index 75449381..6220ec7f 100644
--- a/opsroot.json
+++ b/opsroot.json
@@ -23,7 +23,8 @@
"pgvector": "docker.io/pgvector/pgvector:pg16",
"kubegres": "docker.io/reactivetechio/kubegres:1.18",
"ferretdb": "ghcr.io/nuvolaris/ferretdb:1.6.0",
- "rbacproxy": "registry.k8s.io/kubebuilder/kube-rbac-proxy:v0.14.1"
+ "rbacproxy": "registry.k8s.io/kubebuilder/kube-rbac-proxy:v0.14.1",
+ "tika": "docker.io/apache/tika:3.2.3.0-full"
}
}
}
diff --git a/setup/nuvolaris/opsfile.yml b/setup/nuvolaris/opsfile.yml
index de44edb2..f18a0b91 100644
--- a/setup/nuvolaris/opsfile.yml
+++ b/setup/nuvolaris/opsfile.yml
@@ -263,11 +263,6 @@ tasks:
delete:
desc: no-op delete command
- streamer:
- desc: manage the streamer deployment
-
- system-api:
- desc: manage the system api deployment
add-user:
silent: true
@@ -305,3 +300,13 @@ tasks:
- echo "Login with:" ops ide login {{.USR}} "$APIHOST"
- echo "Password is saved in:" ~/.ops/{{.USR}}.password
- echo "Web URL is:" "$HOST"
+
+
+ streamer:
+ desc: manage the streamer deployment
+
+ system-api:
+ desc: manage the system api deployment
+
+ tika:
+ desc: manage the tika api deployment
diff --git a/setup/nuvolaris/streamer/opsfile.yml b/setup/nuvolaris/streamer/opsfile.yml
index 9a0b6661..fa7429df 100644
--- a/setup/nuvolaris/streamer/opsfile.yml
+++ b/setup/nuvolaris/streamer/opsfile.yml
@@ -72,6 +72,7 @@ tasks:
- "{{.DRY}} kubectl -n nuvolaris apply -f _streamer.yaml"
#- cat _ingress.yaml
- "{{.DRY}} kubectl -n nuvolaris apply -f _ingress.yaml"
+ - ops util wait po/nuvolaris-streamer-api-0
- |
echo "Streamer API deployed with HOSTNAME: stream.${STREAMER_API_HOSTNAME} and OW_APIHOST: ${OW_APIHOST}"
@@ -81,6 +82,7 @@ tasks:
ignore_error: true
cmds:
- kubectl -n nuvolaris delete sts/nuvolaris-streamer-api ing/nuvolaris-streamer-api-ingress
+ - ops util wait po/nuvolaris-streamer-api-0 delete
- |
echo "Streamer API undeployed"
diff --git a/setup/nuvolaris/system-api/opsfile.yml b/setup/nuvolaris/system-api/opsfile.yml
index f5e1767b..8dff09bb 100644
--- a/setup/nuvolaris/system-api/opsfile.yml
+++ b/setup/nuvolaris/system-api/opsfile.yml
@@ -104,6 +104,7 @@ tasks:
- kubectl -n nuvolaris apply -f "$OPS_ROOT/setup/nuvolaris/system-api/_ingress.yaml"
- task: install-toml
- task: install-secret
+ - ops util wait po/nuvolaris-system-api-0
- |
echo "Admin API deployed with HOSTNAME: ${SYS_API_HOSTNAME}/system"
@@ -115,6 +116,7 @@ tasks:
- task: remove-secret
- task: remove-toml
- kubectl -n nuvolaris delete sts/nuvolaris-system-api ing/nuvolaris-system-api-ingress svc/nuvolaris-system-api
+ - ops util wait po/nuvolaris-system-api-0 delete
- |
echo "System Admin API undeployed"
diff --git a/setup/nuvolaris/tika/opsfile.yml b/setup/nuvolaris/tika/opsfile.yml
new file mode 100644
index 00000000..af97d06d
--- /dev/null
+++ b/setup/nuvolaris/tika/opsfile.yml
@@ -0,0 +1,59 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+version: '3'
+
+vars:
+ VAR: ""
+ MSG: ""
+ VAL: ""
+ RETRY: 100
+ TIMEOUT: 15s
+ CONTEXT: ""
+ DRY: ""
+
+env:
+ KUBECONFIG:
+ sh: |-
+ if test -e "$OPS_TMP/kubeconfig"
+ then echo "$OPS_TMP/kubeconfig"
+ else echo ~/.kube/config
+ fi
+
+tasks:
+
+ deploy:
+ silent: true
+ desc: deploy tika
+ cmds:
+ - envsubst -i tika.yaml -o _tika.yaml
+ - kubectl -n nuvolaris apply -f _tika.yaml
+ - ops util wait po/tika-0
+ - |
+ echo "Tika deployed"
+
+ undeploy:
+ silent: true
+ desc: undeploy tika
+ ignore_error: true
+ cmds:
+ - kubectl -n nuvolaris delete sts/tika svc/tika cm/tika-config
+ - ops util wait po/tika-0 delete
+ - |
+ echo "Tika undeployed"
+
+
+
diff --git a/setup/nuvolaris/tika/tika.yaml b/setup/nuvolaris/tika/tika.yaml
new file mode 100644
index 00000000..48c2cd64
--- /dev/null
+++ b/setup/nuvolaris/tika/tika.yaml
@@ -0,0 +1,112 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: tika-config
+ namespace: nuvolaris
+data:
+ JAVA_OPTS: "-Xms256m -Xmx1g -Djava.awt.headless=true"
+ tika-config.xml: |
+
+
+ /usr/bin/tesseract
+ true
+ ocr_only
+
+
+
+
+---
+# StatefulSet
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: tika
+ namespace: nuvolaris
+ labels:
+ app: tika
+spec:
+ serviceName: tika
+ replicas: 1
+ selector:
+ matchLabels:
+ app: tika
+ updateStrategy:
+ type: RollingUpdate
+ template:
+ metadata:
+ labels:
+ app: tika
+ spec:
+ containers:
+ - name: tika
+ image: ${IMAGES_TIKA}
+ imagePullPolicy: IfNotPresent
+ #args:
+ # - "-config"
+ #s - "/tika-config/tika-config.xml"
+ ports:
+ - containerPort: 9998
+ name: http
+ env:
+ - name: JAVA_OPTS
+ valueFrom:
+ configMapKeyRef:
+ name: tika-config
+ key: JAVA_OPTS
+ readinessProbe:
+ tcpSocket:
+ port: 9998
+ initialDelaySeconds: 10
+ periodSeconds: 5
+ failureThreshold: 6
+ livenessProbe:
+ tcpSocket:
+ port: 9998
+ initialDelaySeconds: 30
+ periodSeconds: 20
+ failureThreshold: 3
+ resources:
+ requests:
+ cpu: "250m"
+ memory: "512Mi"
+ limits:
+ cpu: "1000m"
+ memory: "2Gi"
+ volumeMounts:
+ - name: tika-config
+ mountPath: /tika-config
+ - name: tika-data
+ mountPath: /data
+ volumes:
+ - name: tika-config
+ configMap:
+ name: tika-config
+ volumeClaimTemplates:
+ - metadata:
+ name: tika-data
+ labels:
+ app: tika
+ spec:
+ accessModes: ["ReadWriteOnce"]
+ resources:
+ requests:
+ storage: 10Gi
+
+---
+# Service
+apiVersion: v1
+kind: Service
+metadata:
+ name: tika
+ namespace: nuvolaris
+ labels:
+ app: tika
+spec:
+ type: ClusterIP
+ selector:
+ app: tika
+ ports:
+ - port: 9998
+ targetPort: 9998
+ protocol: TCP
+ name: http
diff --git a/util/docopts.md b/util/docopts.md
index 1a928307..652ba34f 100644
--- a/util/docopts.md
+++ b/util/docopts.md
@@ -46,6 +46,8 @@ Usage:
util edit []
util link-plugin
util stdtext
+ util wait