Skip to content

Commit

Permalink
A little more port switching to help with host ports
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Dec 7, 2024
1 parent efbdbbc commit 4a1d071
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 18 deletions.
4 changes: 2 additions & 2 deletions ci/k8s/coverpage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
app: islandora-coverpage
ports:
- protocol: TCP
port: 8888
port: 8082
targetPort: 8080
---
apiVersion: apps/v1
Expand Down Expand Up @@ -37,7 +37,7 @@ spec:
memory: "1Gi"
ports:
- containerPort: 8080
hostPort: 8888
hostPort: 8082
readinessProbe:
httpGet:
path: /healthcheck
Expand Down
5 changes: 3 additions & 2 deletions ci/k8s/crayfits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ spec:
app: islandora-crayfits
ports:
- protocol: TCP
port: 8080
port: 8083
targetPort: 8080
---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -36,7 +37,7 @@ spec:
memory: "128Mi"
ports:
- containerPort: 8080
hostPort: 8080
hostPort: 8083
readinessProbe:
httpGet:
path: /healthcheck
Expand Down
4 changes: 3 additions & 1 deletion ci/k8s/fits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ spec:
app: fits
ports:
- protocol: TCP
port: 8080
port: 8084
targetPort: 8080
---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -41,6 +42,7 @@ spec:
memory: "2Gi"
ports:
- containerPort: 8080
hostPort: 8084
readinessProbe:
httpGet:
path: /fits/version
Expand Down
6 changes: 4 additions & 2 deletions ci/k8s/homarus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ spec:
app: islandora-ffmpeg
ports:
- protocol: TCP
port: 8080
port: 8086
targetPort: 8080
---
apiVersion: apps/v1
kind: Deployment
Expand All @@ -35,7 +36,8 @@ spec:
limits:
memory: "4Gi"
ports:
- containerPort: 8080
- hostPort: 8086
containerPort: 8080
readinessProbe:
httpGet:
path: /healthcheck
Expand Down
4 changes: 2 additions & 2 deletions ci/k8s/htr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
app: islandora-openai-htr
ports:
- protocol: TCP
port: 8001
port: 8087
targetPort: 8080
---
apiVersion: apps/v1
Expand Down Expand Up @@ -42,7 +42,7 @@ spec:
limits:
memory: "1Gi"
ports:
- hostPort: 8001
- hostPort: 8087
containerPort: 8080
readinessProbe:
httpGet:
Expand Down
4 changes: 2 additions & 2 deletions ci/k8s/mergepdf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
app: islandora-mergepdf
ports:
- protocol: TCP
port: 8887
port: 8088
targetPort: 8080
---
apiVersion: apps/v1
Expand Down Expand Up @@ -40,7 +40,7 @@ spec:
memory: "4Gi"
ports:
- containerPort: 8080
hostPort: 8887
hostPort: 8088
readinessProbe:
httpGet:
path: /healthcheck
Expand Down
4 changes: 2 additions & 2 deletions ci/k8s/ocrpdf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
app: islandora-ocrpdf
ports:
- protocol: TCP
port: 8886
port: 8089
targetPort: 8080
---
apiVersion: apps/v1
Expand Down Expand Up @@ -37,7 +37,7 @@ spec:
memory: "2Gi"
ports:
- containerPort: 8080
hostPort: 8886
hostPort: 8089
readinessProbe:
httpGet:
path: /healthcheck
Expand Down
1 change: 1 addition & 0 deletions examples/hls/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ RUN apk update && \
jq==1.7.1-r0

COPY scyllaridae.yml /app/scyllaridae.yml
COPY cmd.sh /app/cmd.sh
12 changes: 7 additions & 5 deletions examples/hls/cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,24 @@ ffmpeg \
-b:v 800k \
-maxrate 800k \
-bufsize 1200k \
-b:a 96k "$TMP_DIR/$NID.m3u8"
-b:a 96k "$TMP_DIR/$NID.m3u8" > /dev/null 2>&1

if [ ! -f "$TMP_DIR/$NID.m3u8" ]; then
exit 1
fi

tar -czf "$TMP_DIR/hls.tar.gz" -C "$TMP_DIR" "$NID.m3u8" ./*.ts
# shellcheck disable=SC2046
tar -czf "$TMP_DIR/hls.tar.gz" -C "$TMP_DIR" "./$NID.m3u8" $(cd "$TMP_DIR" ; echo ./*.ts)

BASE_URL=$(dirname "$NODE_URL" | xargs dirname)
TID=$(curl "$BASE_URL/term_from_term_name?vocab=islandora_media_use&name=Service+File&_format=json" | jq '.[0].tid[0].value')
TID=$(curl -s "$BASE_URL/term_from_term_name?vocab=islandora_media_use&name=Service+File&_format=json" | jq '.[0].tid[0].value')

curl \
curl -s \
-X PUT \
-H "Authorization: $SCYLLARIDAE_AUTH" \
-H "Content-Type: application/gzip" \
-H "Content-Location: private://derivatives/hls/$NID/hls.tar.gz" \
-T "$TMP_DIR/hls.tar.gz" \
--data-binary "@$TMP_DIR/hls.tar.gz" \
"$NODE_URL/media/file/$TID"

rm -rf "$TMP_DIR"
1 change: 1 addition & 0 deletions examples/hls/scyllaridae.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
forwardAuth: true
allowedMimeTypes:
- "audio/*"
- "video/*"
Expand Down

0 comments on commit 4a1d071

Please sign in to comment.