Skip to content

Commit b5e58dc

Browse files
Fix endpoint provisioners integration in this repo (#48)
Signed-off-by: Mathieu Benoit <mathieu-benoit@hotmail.fr>
1 parent fba8562 commit b5e58dc

File tree

4 files changed

+30
-31
lines changed

4 files changed

+30
-31
lines changed

.scripts/test-provisioners.sh

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,22 @@ do
99
implementations=$(ls -d */)
1010
for implementation in $implementations;
1111
do
12-
if [[ "$implementation" = "score-compose"
13-
|| "$implementation" = "score-k8s" ]]; then
14-
echo "#### For ${implementation%?}:"
15-
provisioners=$(ls $implementation*.provisioners.yaml)
16-
for provisioner in $provisioners;
17-
do
18-
echo "###### With ${provisioner}:"
19-
if [[ "$provisioner" = "score-compose/10-dns-in-codespace.provisioners.yaml"
20-
|| "$provisioner" = "score-k8s/10-dns-in-codespace.provisioners.yaml"
21-
|| "$provisioner" = "score-compose/10-dmr-llm-model-via-curl-cmd.provisioners.yaml"
22-
|| "$provisioner" = "score-k8s/10-endpoint-with-microcks-cli.provisioners.yaml" ]]; then
23-
echo "Skipped."
24-
else
25-
${implementation%?} init --no-sample --provisioners $provisioner
26-
${implementation%?} generate $(ls score*.yaml)
27-
rm -r .${implementation%?}
28-
fi
29-
done
30-
fi
12+
echo "#### For ${implementation%?}:"
13+
provisioners=$(ls $implementation*.provisioners.yaml)
14+
for provisioner in $provisioners;
15+
do
16+
echo "###### With ${provisioner}:"
17+
if [[ "$provisioner" = "score-compose/10-dns-in-codespace.provisioners.yaml"
18+
|| "$provisioner" = "score-k8s/10-dns-in-codespace.provisioners.yaml"
19+
|| "$provisioner" = "score-compose/10-dmr-llm-model-via-curl-cmd.provisioners.yaml"
20+
|| "$provisioner" = "score-k8s/10-endpoint-with-microcks-cli.provisioners.yaml" ]]; then
21+
echo "Skipped."
22+
else
23+
${implementation%?} init --no-sample --provisioners $provisioner
24+
${implementation%?} generate $(ls score*.yaml)
25+
rm -r .${implementation%?}
26+
fi
27+
done
3128
done
3229
cd ..
3330
done

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@ score-compose init --provisioners https://raw.githubusercontent.com/score-spec/c
1111

1212
| File | Type | Class | Params | Outputs | Description
1313
| ---- | ---- | ----- | ------ | ------- | -----------
14-
| 10-redis-dapr-pubsub.provisioners.yaml | `dapr-pubsub` | (any) | (none) | `name` | Generates a Dapr PubSub `Component` pointing to a Redis `Service`.
15-
| 10-redis-dapr-state-store.provisioners.yaml | `dapr-state-store` | (any) | (none) | `name` | Generates a Dapr StateStore `Component` pointing to a Redis `Service`.
16-
| 10-dapr-subscription.provisioners.yaml | `dapr-subscription` | (any) | `pubsub`, `topic` | `name`, `topic` | Generates a Dapr `Subscription` on a given Topic and `PubSub`.
17-
| 10-dns-in-codespace.provisioners.yaml | `dns` | (any) | (none) | `host`, `url` | Gets the forwarded port URL in current GitHub Codespace on port `8080`.
18-
| 10-dns-with-url.provisioners.yaml | `dns` | (any) | (none) | `host`, `url` | Outputs a `*.localhost` domain as the hostname and associated URL in http on port `8080`.
19-
| 10-env.provisioners.yaml | `environment` | (any) | (none) | (none) | Loads environment variables from a local `.env` file.
20-
| 10-hpa.provisioners.yaml | `horizontal-pod-autoscaler` | (any) | (none) | (none) | Generates an empty object because HPA is not supported in Docker Compose.
21-
| 10-dmr-llm-model-via-curl-cmd.provisioners.yaml | `llm-model` | (any) | `model` | `model`, `url`, `api-key` | Runs `curl` to download the model with the Docker Model Runner (DMR).
22-
| 10-dmr-llm-model-via-curl-service.provisioners.yaml | `llm-model` | (any) | `model` | `model`, `url`, `api-key` | Generates a `curl` service downloading the model with the Docker Model Runner (DMR).
23-
| 10-dmr-llm-model-via-service-provider.provisioners.yaml | `llm-model` | (any) | `model` | `model`, `url`, `api-key` | Generates the LLM model service via the Docker Model Runner (DMR) provider.
24-
| 10-service.provisioners.yaml | `service` | (any) | (none) | `name` | Outputs the name of the Workload dependency if it exists in the list of Workloads.
14+
| 10-redis-dapr-pubsub.provisioners.yaml | `dapr-pubsub` | (any) | (none) | `name` | Generates a Dapr PubSub `Component` pointing to a Redis `Service`.
15+
| 10-redis-dapr-state-store.provisioners.yaml | `dapr-state-store` | (any) | (none) | `name` | Generates a Dapr StateStore `Component` pointing to a Redis `Service`.
16+
| 10-dapr-subscription.provisioners.yaml | `dapr-subscription` | (any) | `pubsub`, `topic` | `name`, `topic` | Generates a Dapr `Subscription` on a given Topic and `PubSub`.
17+
| 10-dns-in-codespace.provisioners.yaml | `dns` | (any) | (none) | `host`, `url` | Gets the forwarded port URL in current GitHub Codespace on port `8080`.
18+
| 10-dns-with-url.provisioners.yaml | `dns` | (any) | (none) | `host`, `url` | Outputs a `*.localhost` domain as the hostname and associated URL in http on port `8080`.
19+
| 10-endpoint-with-microcks.provisioners.yaml | `endpoint` | (any) | `port`, `openapi_file`, `openapi_title` | `url` | Outputs an endpoint URL for connecting to an other workload (a Microcks mock is generated if not found).
20+
| 10-env.provisioners.yaml | `environment` | (any) | (none) | (none) | Loads environment variables from a local `.env` file.
21+
| 10-hpa.provisioners.yaml | `horizontal-pod-autoscaler` | (any) | (none) | (none) | Generates an empty object because HPA is not supported in Docker Compose.
22+
| 10-dmr-llm-model-via-curl-cmd.provisioners.yaml | `llm-model` | (any) | `model` | `model`, `url`, `api-key` | Runs `curl` to download the model with the Docker Model Runner (DMR).
23+
| 10-dmr-llm-model-via-curl-service.provisioners.yaml | `llm-model` | (any) | `model` | `model`, `url`, `api-key` | Generates a `curl` service downloading the model with the Docker Model Runner (DMR).
24+
| 10-dmr-llm-model-via-service-provider.provisioners.yaml | `llm-model` | (any) | `model` | `model`, `url`, `api-key` | Generates the LLM model service via the Docker Model Runner (DMR) provider.
25+
| 10-service.provisioners.yaml | `service` | (any) | (none) | `name` | Outputs the name of the Workload dependency if it exists in the list of Workloads.
2526

2627
## For `score-k8s`
2728

@@ -38,6 +39,7 @@ score-k8s init --provisioners https://raw.githubusercontent.com/score-spec/commu
3839
| 10-dapr-subscription.provisioners.yaml | `dapr-subscription` | (any) | `pubsub`, `topic` | `name`, `topic` | Generates a Dapr `Subscription` on a given Topic and `PubSub`.
3940
| 10-dns-in-codespace.provisioners.yaml | `dns` | (any) | (none) | `host`, `url` | Get the forwarded port URL in current GitHub Codespace on port `80`.
4041
| 10-dns-with-url.provisioners.yaml | `dns` | (any) | (none) | `host`, `url` | Outputs a `*.localhost` domain as the hostname and associated URL in http on port `80`.
42+
| 10-endpoint-with-microcks-cli.provisioners.yaml | `endpoint` | (any) | `port`, `openapi_file` | `url` | Outputs an endpoint URL for connecting to an other workload (a Microcks mock is generated if not found).
4143
| 10-env.provisioners.yaml | `environment` | (any) | (none) | (none) | Loads environment variables from a local `.env` file.
4244
| 10-hpa.provisioners.yaml | `horizontal-pod-autoscaler` | (any) | `maxReplicas`, `minReplicas`, `defaultTargetCPUUtilizationPercentage` | (none) | Generates an `HorizontalPodAutoscaler` manifest.
4345
| 10-redis-helm-template.provisioners.yaml | `redis` | (any) | (none) | `host`, `password`, `port`, `username` | Generates the manifests of the `bitnami/redis` Helm chart.

endpoint/score.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ resources:
1818
type: endpoint
1919
params:
2020
port: 8181
21-
openapi_file: ./resources/backend-openapi.yaml
21+
openapi_file: ./backend-openapi.yaml
2222
openapi_title: Order Service API

0 commit comments

Comments
 (0)