Skip to content

Commit

Permalink
update shell to sh
Browse files Browse the repository at this point in the history
  • Loading branch information
vordimous committed Sep 25, 2024
1 parent 605fa2c commit 5c8944d
Show file tree
Hide file tree
Showing 99 changed files with 244 additions and 262 deletions.
4 changes: 2 additions & 2 deletions amqp.reflect/setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -ex
#!/bin/sh
set -e

# Install Zilla to the Kubernetes cluster with helm and wait for the pod to start up
ZILLA_CHART="${ZILLA_CHART:-oci://ghcr.io/aklivity/charts/zilla}"
Expand Down
4 changes: 2 additions & 2 deletions amqp.reflect/teardown.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -x
#!/bin/sh
set -e

# Stop port forwarding
pgrep kubectl && killall kubectl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ services:
zilla:
image: ghcr.io/aklivity/zilla:${ZILLA_VERSION}
container_name: zilla
pull_policy: always
pull_policy: ${ZILLA_PULL_POLICY:-always}
restart: unless-stopped
ports:
- 7114:7114
Expand Down
6 changes: 3 additions & 3 deletions asyncapi.http.kafka.proxy/docker/compose/setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
set -e

NAMESPACE="${NAMESPACE:-zilla-http-kafka-asyncapi-proxy}"
Expand All @@ -9,12 +9,12 @@ export KAFKA_PORT="${KAFKA_PORT:-9092}"
INIT_KAFKA="${INIT_KAFKA:-true}"

# Start or restart Zilla
if [[ -z $(docker compose -p $NAMESPACE ps -q zilla) ]]; then
if [ -z $(docker compose -p $NAMESPACE ps -q zilla) ]; then
echo "==== Running the $NAMESPACE example with $KAFKA_BROKER($KAFKA_BOOTSTRAP_SERVER) ===="
docker compose -p $NAMESPACE up -d

# Create topics in Kafka
if [[ $INIT_KAFKA == true ]]; then
if [ $INIT_KAFKA = true ]; then
docker run --rm bitnami/kafka:3.2 bash -c "
echo 'Creating topics for $KAFKA_BOOTSTRAP_SERVER'
/opt/bitnami/kafka/bin/kafka-topics.sh --bootstrap-server $KAFKA_BOOTSTRAP_SERVER --create --if-not-exists --topic petstore-pets --config cleanup.policy=compact
Expand Down
2 changes: 1 addition & 1 deletion asyncapi.http.kafka.proxy/docker/compose/teardown.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
set -e

NAMESPACE="${NAMESPACE:-zilla-asyncapi-http-kafka-proxy}"
Expand Down
6 changes: 3 additions & 3 deletions asyncapi.http.kafka.proxy/k8s/helm/setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
set -e

ZILLA_VERSION="${ZILLA_VERSION:-^0.9.0}"
Expand All @@ -19,7 +19,7 @@ helm upgrade --install zilla $ZILLA_CHART --version $ZILLA_VERSION --namespace $
--set-file configMaps.specs.data.kafka-asyncapi\\.yaml=../../specs/kafka-asyncapi.yaml

# Create topics in Kafka
if [[ $INIT_KAFKA == true ]]; then
if [ $INIT_KAFKA = true ]; then
kubectl run kafka-init-pod --image=bitnami/kafka:3.2 --namespace $NAMESPACE --rm --restart=Never -i -t -- /bin/sh -c "
echo 'Creating topics for $KAFKA_BOOTSTRAP_SERVER'
/opt/bitnami/kafka/bin/kafka-topics.sh --bootstrap-server $KAFKA_BOOTSTRAP_SERVER --create --if-not-exists --topic petstore-pets --config cleanup.policy=compact
Expand All @@ -33,6 +33,6 @@ fi
SERVICE_PORTS=$(kubectl get svc --namespace $NAMESPACE zilla --template "{{ range .spec.ports }}{{.port}} {{ end }}")
eval "kubectl port-forward --namespace $NAMESPACE service/zilla $SERVICE_PORTS" > /tmp/kubectl-zilla.log 2>&1 &

if [[ -x "$(command -v nc)" ]]; then
if [ -x "$(command -v nc)" ]; then
until nc -z localhost 7114; do sleep 1; done
fi
4 changes: 2 additions & 2 deletions asyncapi.http.kafka.proxy/k8s/helm/teardown.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -x
#!/bin/sh
set -e

# Stop port forwarding
pgrep kubectl && killall kubectl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ services:
zilla:
image: ghcr.io/aklivity/zilla:${ZILLA_VERSION}
container_name: zilla
pull_policy: always
pull_policy: ${ZILLA_PULL_POLICY:-always}
restart: unless-stopped
ports:
- 7183:7183
Expand Down
6 changes: 3 additions & 3 deletions asyncapi.mqtt.kafka.proxy/docker/compose/setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
set -e

NAMESPACE="${NAMESPACE:-zilla-asyncapi-mqtt-kafka-proxy}"
Expand All @@ -8,12 +8,12 @@ export KAFKA_BOOTSTRAP_SERVER="${KAFKA_BOOTSTRAP_SERVER:-host.docker.internal:90
INIT_KAFKA="${INIT_KAFKA:-true}"

# Start or restart Zilla
if [[ -z $(docker compose -p $NAMESPACE ps -q zilla) ]]; then
if [ -z $(docker compose -p $NAMESPACE ps -q zilla) ]; then
echo "==== Running the $NAMESPACE example with $KAFKA_BROKER($KAFKA_BOOTSTRAP_SERVER) ===="
docker compose -p $NAMESPACE up -d

# Create the mqtt topics in Kafka
if [[ $INIT_KAFKA == true ]]; then
if [ $INIT_KAFKA = true ]; then
docker run --rm bitnami/kafka:3.2 bash -c "
echo 'Creating topics for $KAFKA_BOOTSTRAP_SERVER'
/opt/bitnami/kafka/bin/kafka-topics.sh --bootstrap-server $KAFKA_BOOTSTRAP_SERVER --create --if-not-exists --topic mqtt-messages
Expand Down
2 changes: 1 addition & 1 deletion asyncapi.mqtt.kafka.proxy/docker/compose/teardown.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
set -e

NAMESPACE="${NAMESPACE:-zilla-asyncapi-mqtt-kafka-proxy}"
Expand Down
6 changes: 3 additions & 3 deletions asyncapi.mqtt.kafka.proxy/k8s/helm/setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
set -e

ZILLA_VERSION="${ZILLA_VERSION:-^0.9.0}"
Expand All @@ -18,7 +18,7 @@ helm upgrade --install zilla $ZILLA_CHART --version $ZILLA_VERSION --namespace $
--set-file configMaps.specs.data.kafka-asyncapi\\.yaml=../../specs/kafka-asyncapi.yaml

# Create the mqtt topics in Kafka
if [[ $INIT_KAFKA == true ]]; then
if [ $INIT_KAFKA = true ]; then
kubectl run kafka-init-pod --image=bitnami/kafka:3.5 --namespace $NAMESPACE --rm --restart=Never -i -t -- /bin/sh -c "
echo 'Creating topics for $KAFKA_BOOTSTRAP_SERVER'
/opt/bitnami/kafka/bin/kafka-topics.sh --bootstrap-server $KAFKA_BOOTSTRAP_SERVER --create --if-not-exists --topic mqtt-messages
Expand All @@ -33,6 +33,6 @@ fi
SERVICE_PORTS=$(kubectl get svc --namespace $NAMESPACE zilla --template "{{ range .spec.ports }}{{.port}} {{ end }}")
eval "kubectl port-forward --namespace $NAMESPACE service/zilla $SERVICE_PORTS" > /tmp/kubectl-zilla.log 2>&1 &

if [[ -x "$(command -v nc)" ]]; then
if [ -x "$(command -v nc)" ]; then
until nc -z localhost 7183; do sleep 1; done
fi
4 changes: 2 additions & 2 deletions asyncapi.mqtt.kafka.proxy/k8s/helm/teardown.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -x
#!/bin/sh
set -e

# Stop port forwarding
pgrep kubectl && killall kubectl
Expand Down
4 changes: 2 additions & 2 deletions asyncapi.mqtt.proxy/setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -ex
#!/bin/sh
set -e

# Install Zilla to the Kubernetes cluster with helm and wait for the pod to start up
ZILLA_CHART="${ZILLA_CHART:-oci://ghcr.io/aklivity/charts/zilla}"
Expand Down
4 changes: 2 additions & 2 deletions asyncapi.mqtt.proxy/teardown.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -x
#!/bin/sh
set -e

# Stop port forwarding
pgrep kubectl && killall kubectl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ services:
zilla:
image: ghcr.io/aklivity/zilla:${ZILLA_VERSION}
container_name: zilla
pull_policy: always
pull_policy: ${ZILLA_PULL_POLICY:-always}
restart: unless-stopped
ports:
- 7114:7114
Expand Down
6 changes: 3 additions & 3 deletions asyncapi.sse.kafka.proxy/docker/compose/setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
set -e

NAMESPACE="${NAMESPACE:-zilla-sse-kafka-asyncapi-proxy}"
Expand All @@ -9,12 +9,12 @@ export KAFKA_PORT="${KAFKA_PORT:-9092}"
INIT_KAFKA="${INIT_KAFKA:-true}"

# Start or restart Zilla
if [[ -z $(docker compose -p $NAMESPACE ps -q zilla) ]]; then
if [ -z $(docker compose -p $NAMESPACE ps -q zilla) ]; then
echo "==== Running the $NAMESPACE example with $KAFKA_BROKER($KAFKA_BOOTSTRAP_SERVER) ===="
docker compose -p $NAMESPACE up -d

# Create topics in Kafka
if [[ $INIT_KAFKA == true ]]; then
if [ $INIT_KAFKA = true ]; then
docker run --rm bitnami/kafka:3.2 bash -c "
echo 'Creating topics for $KAFKA_BOOTSTRAP_SERVER'
/opt/bitnami/kafka/bin/kafka-topics.sh --bootstrap-server $KAFKA_BOOTSTRAP_SERVER --create --if-not-exists --topic events --config cleanup.policy=compact
Expand Down
2 changes: 1 addition & 1 deletion asyncapi.sse.kafka.proxy/docker/compose/teardown.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
set -e

NAMESPACE="${NAMESPACE:-zilla-asyncapi-sse-kafka-proxy}"
Expand Down
6 changes: 3 additions & 3 deletions asyncapi.sse.kafka.proxy/k8s/helm/setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
set -e

ZILLA_VERSION="${ZILLA_VERSION:-^0.9.0}"
Expand All @@ -18,7 +18,7 @@ helm upgrade --install zilla $ZILLA_CHART --version $ZILLA_VERSION --namespace $
--set-file configMaps.specs.data.kafka-asyncapi\\.yaml=../../specs/kafka-asyncapi.yaml

# Create topics in Kafka
if [[ $INIT_KAFKA == true ]]; then
if [ $INIT_KAFKA = true ]; then
kubectl run kafka-init-pod --image=bitnami/kafka:3.2 --namespace $NAMESPACE --rm --restart=Never -i -t -- /bin/sh -c "
echo 'Creating topics for $KAFKA_BOOTSTRAP_SERVER'
/opt/bitnami/kafka/bin/kafka-topics.sh --bootstrap-server $KAFKA_BOOTSTRAP_SERVER --create --if-not-exists --topic events --config cleanup.policy=compact
Expand All @@ -30,6 +30,6 @@ fi
SERVICE_PORTS=$(kubectl get svc --namespace $NAMESPACE zilla --template "{{ range .spec.ports }}{{.port}} {{ end }}")
eval "kubectl port-forward --namespace $NAMESPACE service/zilla $SERVICE_PORTS" > /tmp/kubectl-zilla.log 2>&1 &

if [[ -x "$(command -v nc)" ]]; then
if [ -x "$(command -v nc)" ]; then
until nc -z localhost 7114; do sleep 1; done
fi
4 changes: 2 additions & 2 deletions asyncapi.sse.kafka.proxy/k8s/helm/teardown.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -x
#!/bin/sh
set -e

# Stop port forwarding
pgrep kubectl && killall kubectl
Expand Down
4 changes: 2 additions & 2 deletions asyncapi.sse.proxy/setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -ex
#!/bin/sh
set -e

# Install Zilla to the Kubernetes cluster with helm and wait for the pod to start up
ZILLA_CHART="${ZILLA_CHART:-oci://ghcr.io/aklivity/charts/zilla}"
Expand Down
4 changes: 2 additions & 2 deletions asyncapi.sse.proxy/teardown.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -x
#!/bin/sh
set -e

# Stop port forwarding
pgrep kubectl && killall kubectl
Expand Down
4 changes: 2 additions & 2 deletions grpc.echo/setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -ex
#!/bin/sh
set -e

# Install Zilla to the Kubernetes cluster with helm and wait for the pod to start up
ZILLA_CHART="${ZILLA_CHART:-oci://ghcr.io/aklivity/charts/zilla}"
Expand Down
4 changes: 2 additions & 2 deletions grpc.echo/teardown.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -x
#!/bin/sh
set -e

# Stop port forwarding
pgrep kubectl && killall kubectl
Expand Down
4 changes: 2 additions & 2 deletions grpc.kafka.echo/setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -ex
#!/bin/sh
set -e

# Install Zilla to the Kubernetes cluster with helm and wait for the pod to start up
ZILLA_CHART="${ZILLA_CHART:-oci://ghcr.io/aklivity/charts/zilla}"
Expand Down
4 changes: 2 additions & 2 deletions grpc.kafka.echo/teardown.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -x
#!/bin/sh
set -e

# Stop port forwarding
pgrep kubectl && killall kubectl
Expand Down
4 changes: 2 additions & 2 deletions grpc.kafka.fanout/setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -ex
#!/bin/sh
set -e
# Install Zilla to the Kubernetes cluster with helm and wait for the pod to start up
ZILLA_CHART="${ZILLA_CHART:-oci://ghcr.io/aklivity/charts/zilla}"
ZILLA_VERSION="${ZILLA_VERSION:-^0.9.0}"
Expand Down
4 changes: 2 additions & 2 deletions grpc.kafka.fanout/teardown.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -x
#!/bin/sh
set -e

# Stop port forwarding
pgrep kubectl && killall kubectl
Expand Down
4 changes: 2 additions & 2 deletions grpc.kafka.proxy/setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -ex
#!/bin/sh
set -e
# Install Zilla to the Kubernetes cluster with helm and wait for the pod to start up
ZILLA_CHART="${ZILLA_CHART:-oci://ghcr.io/aklivity/charts/zilla}"
ZILLA_VERSION="${ZILLA_VERSION:-^0.9.0}"
Expand Down
4 changes: 2 additions & 2 deletions grpc.kafka.proxy/teardown.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -x
#!/bin/sh
set -e

# Stop port forwarding
pgrep kubectl && killall kubectl
Expand Down
4 changes: 2 additions & 2 deletions grpc.proxy/setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -ex
#!/bin/sh
set -e

# Install Zilla to the Kubernetes cluster with helm and wait for the pod to start up
ZILLA_CHART="${ZILLA_CHART:-oci://ghcr.io/aklivity/charts/zilla}"
Expand Down
4 changes: 2 additions & 2 deletions grpc.proxy/teardown.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -x
#!/bin/sh
set -e

# Stop port forwarding
pgrep kubectl && killall kubectl
Expand Down
4 changes: 2 additions & 2 deletions http.echo.jwt/setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -ex
#!/bin/sh
set -e

# Install Zilla to the Kubernetes cluster with helm and wait for the pod to start up
ZILLA_CHART="${ZILLA_CHART:-oci://ghcr.io/aklivity/charts/zilla}"
Expand Down
4 changes: 2 additions & 2 deletions http.echo.jwt/teardown.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -x
#!/bin/sh
set -e

# Stop port forwarding
pgrep kubectl && killall kubectl
Expand Down
4 changes: 2 additions & 2 deletions http.echo/setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -ex
#!/bin/sh
set -e

# Install Zilla to the Kubernetes cluster with helm and wait for the pod to start up
ZILLA_CHART="${ZILLA_CHART:-oci://ghcr.io/aklivity/charts/zilla}"
Expand Down
4 changes: 2 additions & 2 deletions http.echo/teardown.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -x
#!/bin/sh
set -e

# Stop port forwarding
pgrep kubectl && killall kubectl
Expand Down
4 changes: 2 additions & 2 deletions http.filesystem.config.server/setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -ex
#!/bin/sh
set -e

# Install Zilla (config) to the Kubernetes cluster with helm and wait for the pod to start up
ZILLA_CHART="${ZILLA_CHART:-oci://ghcr.io/aklivity/charts/zilla}"
Expand Down
4 changes: 2 additions & 2 deletions http.filesystem.config.server/teardown.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -x
#!/bin/sh
set -e

# Stop port forwarding
pgrep kubectl && killall kubectl
Expand Down
4 changes: 2 additions & 2 deletions http.filesystem/setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -ex
#!/bin/sh
set -e

# Install Zilla to the Kubernetes cluster with helm and wait for the pod to start up
ZILLA_CHART="${ZILLA_CHART:-oci://ghcr.io/aklivity/charts/zilla}"
Expand Down
4 changes: 2 additions & 2 deletions http.filesystem/teardown.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -x
#!/bin/sh
set -e

# Stop port forwarding
pgrep kubectl && killall kubectl
Expand Down
Loading

0 comments on commit 5c8944d

Please sign in to comment.