Skip to content
Draft
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
94 changes: 90 additions & 4 deletions deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,111 @@
defaults:
global:
resources:
requests:
cpu: 400m
memory: 512Mi
probes:
liveness:
httpGet:
path: /q/health/live
port: 8080
initialDelaySeconds: 0 # Default value
periodSeconds: 10 # Default value
timeoutSeconds: 1 # Default value
successThreshold: 1 # Default value
failureThreshold: 3 # Default value
readiness:
httpGet:
path: /q/health/ready
port: 8080
initialDelaySeconds: 0 # Default value
periodSeconds: 10 # Default value
timeoutSeconds: 1 # Default value
successThreshold: 1 # Default value
failureThreshold: 3 # Default value
startup:
httpGet:
path: /q/health/startup
port: 8080
initialDelaySeconds: 0 # Default value
periodSeconds: 10 # Default value
timeoutSeconds: 1 # Default value
successThreshold: 1 # Default value
failureThreshold: 3
delivery:
replicas: 3

ingestion:
rest-ingestion:
ingress:
enabled: true
ingressClassName: "nginx"
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: "500m"
hosts:
- host: ingestion.127.0.0.1.nip.io
- host: host.docker.internal
- host: ingestion.20.126.186.199.nip.io
delivery:
blueprint-web:
ingress:
enabled: true
ingressClassName: "nginx"
hosts:
- host: puresight.127.0.0.1.nip.io
- host: puresight.20.126.186.199.nip.io
paths:
- servicePort: 80
tls:
- hosts:
- puresight.20.126.186.199.nip.io
secretName: blueprint-web.crt
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-cert-cluster-issuer"
blueprint-search:
ingress:
enabled: true
ingressClassName: "nginx"
hosts:
- host: puresight.127.0.0.1.nip.io
- host: puresight.20.126.186.199.nip.io
paths:
- path: /search
tls:
- hosts:
- puresight.20.126.186.199.nip.io
secretName: blueprint-search.crt
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-cert-cluster-issuer"
probes:
liveness: {}
components:
opensearch:
sidecar: true
probes:
readiness:
httpGet:
path: /
port: 9200
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
liveness:
httpGet:
path: /
port: 9200
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 5
failureThreshold: 3
startup:
httpGet:
path: /
port: 9200
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3

22 changes: 22 additions & 0 deletions scripts/price/publish-price-k8s.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
STREAMX_TOKEN=$(kubectl get secrets sx-sec-auth-jwt-websight -o jsonpath -o jsonpath="{.data.jwt}" | base64 --decode)

INGESTION_URL="http://ingestion.20.126.186.199.nip.io"
PRODUCT_ID=${1:-B071FMSYNH}
PRICE=${2:-2559}

curl -o - -X POST "${INGESTION_URL}/ingestion/v1/channels/data/messages" \
-H "Authorization: Bearer ${STREAMX_TOKEN}" \
-H 'Content-Type: application/json' \
-d '{
"key" : "price:'${PRODUCT_ID}'",
"action" : "publish",
"eventTime" : null,
"properties" : { },
"payload" : {
"dev.streamx.blueprints.data.Data" : {
"content": {
"bytes": "{ \"price\": { \"value\": \"'${PRICE}'\" } }"
}
}
}
}'
38 changes: 38 additions & 0 deletions scripts/reviews/publish-k8s.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
TOKEN=$(kubectl get secrets sx-sec-auth-jwt-websight -o jsonpath -o jsonpath="{.data.jwt}" | base64 --decode)

INGESTION_URL="http://ingestion.20.126.186.199.nip.io"
PRODUCT_ID=${1:-B071FMSYNH}

curl -o - -X POST "${INGESTION_URL}/ingestion/v1/channels/data/messages" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}" \
-d '{
"key" : "review:'${PRODUCT_ID}':1",
"action" : "publish",
"eventTime" : null,
"properties" : { },
"payload" : {
"dev.streamx.blueprints.data.Data" : {
"content": {
"bytes": "{\"title\": \"A Dreamy Slumber\",\"content\": \"This bed has been a game-changer for my sleep quality. The comfort level is unmatched, and it feels like I am sleeping on a cloud. I wake up refreshed and ready to tackle the day. Worth every penny!\",\"stars\": 5,\"author\": \"Sarah Johnson\",\"date\": \"July 15, 2023\"}"
}
}
}
}'

curl -o - -X POST "${INGESTION_URL}/ingestion/v1/channels/data/messages" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${TOKEN}" \
-d '{
"key" : "review:'${PRODUCT_ID}':2",
"action" : "publish",
"eventTime" : null,
"properties" : { },
"payload" : {
"dev.streamx.blueprints.data.Data" : {
"content": {
"bytes": "{\"title\": \"Cozy and Supportive\",\"content\": \"The bed provides a cozy nest-like feeling, and the support is excellent for my back. While it is a bit pricier than I would like, the comfort it offers makes it a solid investment for a good night'\''s sleep.\",\"stars\": 4,\"author\": \"Michael Thompson\",\"date\": \"August 3, 2023\"}"
}
}
}
}'
2 changes: 1 addition & 1 deletion scripts/run-pim-k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ docker rm streamx-demo-sandbox-pim
docker run --name streamx-demo-sandbox-pim \
--add-host=host.docker.internal:host-gateway \
-p 9000:8080 \
-e STREAMX_URL=http://host.docker.internal \
-e STREAMX_URL=http://ingestion.20.126.186.199.nip.io \
-e STREAMX_TOKEN="$STREAMX_TOKEN" \
-e QUARKUS_HTTP_AUTH_FORM_TIMEOUT=PT1M \
${IMAGE}
2 changes: 1 addition & 1 deletion scripts/run-websight-k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ docker run --name streamx-demo-sandbox-websight-cms \
-p 5009:5009 \
-e JAVA_DEBUG_PORT=5009 \
-e STREAMX_PUBLICATION_ENABLE=true \
-e PURESIGHT_STREAMX_REST_INGESTION_HOST=http://host.docker.internal \
-e PURESIGHT_STREAMX_REST_INGESTION_HOST=http://ingestion.20.126.186.199.nip.io \
-e PURESIGHT_STREAMX_REST_INGESTION_AUTH_TOKEN="$STREAMX_TOKEN" \
${IMAGE}