### Create .env file for Environment Provisioner Source: https://context7.com/score-spec/community-provisioners/llms.txt Example of creating a `.env` file with environment variables that will be loaded by the environment provisioner. ```bash # Create .env file cat > .env << 'EOF' DATABASE_URL=postgres://user:pass@localhost/db API_KEY=secret123 DEBUG=true EOF ``` -------------------------------- ### Initialize, Generate, and Run GCP Pub/Sub Emulator Source: https://context7.com/score-spec/community-provisioners/llms.txt Commands to import the GCP Pub/Sub emulator provisioner, generate the SCORE manifest, and start the emulator using Docker Compose. Outputs include 'host', 'port', 'project_id', and 'emulator_host'. ```bash # Import GCP Pub/Sub emulator provisioner score-compose init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/gcp-pubsub-emulator/score-compose/10-gcp-pubsub-emulator.provisioners.yaml score-compose generate score.yaml docker compose up -d # Outputs: host, port, project_id, emulator_host ``` -------------------------------- ### Define Backend Workload Source: https://context7.com/score-spec/community-provisioners/llms.txt Example score-backend.yaml configuration for a simple backend service. ```yaml # score-backend.yaml apiVersion: score.dev/v1b1 metadata: name: backend containers: my-container: image: busybox command: ["/bin/sh"] args: ["-c", "while true; do echo Hello Backend; sleep 5; done"] ``` -------------------------------- ### Get resource outputs in score-compose Source: https://context7.com/score-spec/community-provisioners/llms.txt Retrieves outputs such as connection strings and names for provisioned resources in score-compose. ```bash score-compose resources get-outputs ``` -------------------------------- ### Define Redis Workload Source: https://context7.com/score-spec/community-provisioners/llms.txt Example score.yaml configuration for a workload requiring a Redis cache resource. ```yaml # score.yaml - Workload using Redis apiVersion: score.dev/v1b1 metadata: name: my-workload containers: my-container: image: my-app:latest variables: REDIS_HOST: "${resources.cache.host}" REDIS_PORT: "${resources.cache.port}" REDIS_PASSWORD: "${resources.cache.password}" resources: cache: type: redis ``` -------------------------------- ### Define LLM Model Workload Source: https://context7.com/score-spec/community-provisioners/llms.txt Example score.yaml configuration for a workload consuming an LLM model resource. ```yaml # score.yaml - Workload using LLM Model apiVersion: score.dev/v1b1 metadata: name: my-workload containers: my-container: image: busybox command: ["/bin/sh"] args: ["-c", "while true; do echo $LLM_BASE_URL; sleep 5; done"] variables: LLM_MODEL_NAME: "${resources.model.model}" LLM_BASE_URL: "${resources.model.url}" resources: model: type: llm-model params: model: ai/smollm2:135M-Q4_0 ``` -------------------------------- ### Define Route Workload Source: https://context7.com/score-spec/community-provisioners/llms.txt Example score.yaml configuration for a workload exposing a service via a route resource. ```yaml # score.yaml - Workload with route apiVersion: score.dev/v1b1 metadata: name: my-workload containers: my-container: image: ghcr.io/stefanprodan/podinfo:latest resources: dns: type: dns route: type: route params: host: ${resources.dns.host} path: / port: 8080 service: ports: tcp: port: 8080 targetPort: 9898 ``` -------------------------------- ### Initialize local workspace with a provisioner Source: https://github.com/score-spec/community-provisioners/blob/main/score-compose.md Imports a community provisioner file into the local workspace. Replace the URL placeholder with the actual provisioner file path. ```bash score-compose init --provisioners REPLACE-ME-WITH-ACTUAL-PROVISIONER-FILE-URL.yaml ``` -------------------------------- ### Initialize DNS Provisioner for Localhost and Codespaces Source: https://context7.com/score-spec/community-provisioners/llms.txt Commands to initialize the DNS provisioner for standard localhost environments and for GitHub Codespaces. Outputs include 'host' and 'url'. ```bash # Standard localhost DNS score-compose init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/dns/score-compose/10-dns-with-url.provisioners.yaml # GitHub Codespaces DNS score-compose init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/dns/score-compose/10-dns-in-codespace.provisioners.yaml # Outputs: host (e.g., "dnsabc123.localhost"), url (e.g., "http://dnsabc123.localhost:8080") ``` -------------------------------- ### Initialize local workspace with a community provisioner Source: https://github.com/score-spec/community-provisioners/blob/main/score-k8s.md Imports a specific provisioner file into the local workspace. Replace the URL placeholder with the actual provisioner file location. ```bash score-k8s init --provisioners REPLACE-ME-WITH-ACTUAL-PROVISIONER-FILE-URL.yaml ``` -------------------------------- ### List provisioner definitions Source: https://github.com/score-spec/community-provisioners/blob/main/score-compose.md Displays the currently configured provisioner definitions. ```bash score-compose provisioners list ``` -------------------------------- ### Initialize Redis Provisioners Source: https://context7.com/score-spec/community-provisioners/llms.txt Commands to initialize Helm-based Redis provisioners for Kubernetes. ```bash # Using Helm template (generates manifests) score-k8s init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/redis/score-k8s/10-redis-helm-template.provisioners.yaml score-k8s generate score.yaml kubectl apply -f manifests.yaml # Using Helm upgrade (deploys directly) score-k8s init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/redis/score-k8s/10-redis-helm-upgrade.provisioners.yaml # Outputs: host, port, username, password ``` -------------------------------- ### Initialize Route Provisioners Source: https://context7.com/score-spec/community-provisioners/llms.txt Commands to initialize Ingress and Gateway API route provisioners for Kubernetes. ```bash # Nginx Ingress route score-k8s init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/route/score-k8s/10-ingress-route.provisioners.yaml # Nginx Ingress route with NetworkPolicy score-k8s init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/route/score-k8s/10-ingress-with-netpol-route.provisioners.yaml # Gateway API HTTPRoute score-k8s init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/route/score-k8s/10-shared-gateway-httproute.provisioners.yaml # Gateway API HTTPRoute with NetworkPolicy score-k8s init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/route/score-k8s/10-shared-gateway-httproute-with-netpol.provisioners.yaml ``` -------------------------------- ### List available provisioners Source: https://github.com/score-spec/community-provisioners/blob/main/score-k8s.md Displays the definitions of currently configured provisioners. ```bash score-k8s provisioners list ``` -------------------------------- ### CLI Initialization Source: https://github.com/score-spec/community-provisioners/blob/main/README.md How to initialize score-k8s with a specific community provisioner file. ```APIDOC ## CLI Usage ### Description Initialize score-k8s using a remote provisioner YAML file. ### Command `score-k8s init --provisioners [URL]` ### Example ```bash score-k8s init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/dapr-state-store/score-k8s/10-redis-dapr-state-store.provisioners.yaml ``` ``` -------------------------------- ### Deploy and monitor containers Source: https://github.com/score-spec/community-provisioners/blob/main/score-compose.md Commands for deploying generated manifests and inspecting container status. ```bash docker compose up -d ``` ```bash docker ps ``` -------------------------------- ### Initialize and Generate Environment Provisioner Source: https://context7.com/score-spec/community-provisioners/llms.txt Commands to import the environment provisioner and generate the SCORE manifest. This makes variables defined in the `.env` file accessible to the workload. ```bash # Import environment provisioner score-compose init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/environment/score-compose/10-env.provisioners.yaml score-compose generate score.yaml ``` -------------------------------- ### Initialize LLM Model Provisioners Source: https://context7.com/score-spec/community-provisioners/llms.txt Commands to initialize various Docker Model Runner and Ollama provisioners for score-compose. ```bash # Docker Model Runner via curl command score-compose init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/llm-model/score-compose/10-dmr-llm-model-via-curl-cmd.provisioners.yaml # Docker Model Runner via curl service score-compose init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/llm-model/score-compose/10-dmr-llm-model-via-curl-service.provisioners.yaml # Docker Model Runner via service provider score-compose init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/llm-model/score-compose/10-dmr-llm-model-via-service-provider.provisioners.yaml # Ollama-based LLM model service score-compose init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/llm-model/score-compose/10-ollama-llm-model-service.provisioners.yaml # Outputs: model, url, api-key ``` -------------------------------- ### List provisioned resources in score-compose Source: https://context7.com/score-spec/community-provisioners/llms.txt Lists all resources that have been provisioned using score-compose. ```bash score-compose resources list ``` -------------------------------- ### Initialize and Generate Kubernetes Manifests Source: https://context7.com/score-spec/community-provisioners/llms.txt Initializes SCORE with service provisioners for Kubernetes, including NetworkPolicy support. This command prepares for generating Kubernetes manifests. ```bash # For Kubernetes with NetworkPolicy score-k8s init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/service/score-k8s/10-service-with-netpol.provisioners.yaml # Output: name (service name of the dependency) ``` -------------------------------- ### Inspect running containers Source: https://github.com/score-spec/community-provisioners/blob/main/score-k8s.md Lists all Kubernetes objects to verify the deployment status. ```bash kubectl get all ``` -------------------------------- ### Initialize score-k8s with RabbitMQ-backed Dapr PubSub provisioner Source: https://context7.com/score-spec/community-provisioners/llms.txt Initializes score-k8s and imports a provisioner for a RabbitMQ-backed Dapr PubSub component. This is for score-k8s only. ```bash # For RabbitMQ-backed PubSub (score-k8s only) score-k8s init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/dapr-pubsub/score-k8s/10-rabbitmq-dapr-pubsub.provisioners.yaml ``` -------------------------------- ### Initialize score-k8s with Redis-backed Dapr PubSub provisioner Source: https://context7.com/score-spec/community-provisioners/llms.txt Initializes score-k8s and imports a provisioner for a Redis-backed Dapr PubSub component. ```bash # For Redis-backed PubSub (score-k8s) score-k8s init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/dapr-pubsub/score-k8s/10-redis-dapr-pubsub.provisioners.yaml ``` -------------------------------- ### Initialize score-compose with a Provisioner Source: https://github.com/score-spec/community-provisioners/blob/main/README.md Use this command to initialize score-compose with a specific provisioner from a remote URL. Ensure the URL points to a valid provisioner YAML file. ```bash score-compose init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/dapr-state-store/score-compose/10-redis-dapr-state-store.provisioners.yaml ``` -------------------------------- ### Initialize score-compose with Redis-backed Dapr PubSub provisioner Source: https://context7.com/score-spec/community-provisioners/llms.txt Initializes score-compose and imports a provisioner for a Redis-backed Dapr PubSub component. ```bash # For Redis-backed PubSub (score-compose) score-compose init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/dapr-pubsub/score-compose/10-redis-dapr-pubsub.provisioners.yaml ``` -------------------------------- ### Initialize and Generate HPA Provisioner Source: https://context7.com/score-spec/community-provisioners/llms.txt Commands to initialize the Horizontal Pod Autoscaler provisioner and generate Kubernetes manifests. ```bash score-k8s init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/horizontal-pod-autoscaler/score-k8s/10-hpa.provisioners.yaml score-k8s generate score.yaml kubectl apply -f manifests.yaml # Verify HPA kubectl get hpa ``` -------------------------------- ### Initialize score-k8s with Redis Dapr State Store Provisioner Source: https://github.com/score-spec/community-provisioners/blob/main/README.md Use this command to initialize score-k8s with a specific provisioner. Ensure the provisioner URL is correct. ```bash score-k8s init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/dapr-state-store/score-k8s/10-redis-dapr-state-store.provisioners.yaml ``` -------------------------------- ### Retrieve resource outputs Source: https://github.com/score-spec/community-provisioners/blob/main/score-k8s.md Fetches the output values for resources managed by the provisioner. ```bash score-k8s resources get-outputs ``` -------------------------------- ### Initialize Endpoint Provisioner for Kubernetes CLI Source: https://context7.com/score-spec/community-provisioners/llms.txt Initializes SCORE with the endpoint provisioner for Kubernetes CLI, configuring it to use Microcks for mocking API endpoints in a Kubernetes environment. ```bash # Import endpoint provisioner for score-k8s score-k8s init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/endpoint/score-k8s/10-endpoint-with-microcks-cli.provisioners.yaml # Output: url (either real service URL or Microcks mock URL) ``` -------------------------------- ### List provisioned resources Source: https://github.com/score-spec/community-provisioners/blob/main/score-k8s.md Shows the status and list of resources managed by Score. ```bash score-k8s resources list ``` -------------------------------- ### Initialize and Generate Dapr Subscription Source: https://context7.com/score-spec/community-provisioners/llms.txt Command to import the Dapr subscription provisioner and generate the SCORE manifest. Outputs include 'name' and 'topic'. ```bash # Import subscription provisioner score-compose init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/dapr-subscription/score-compose/10-dapr-subscription.provisioners.yaml score-compose generate score.yaml # Outputs: name, topic ``` -------------------------------- ### Deploy with Docker Compose Source: https://context7.com/score-spec/community-provisioners/llms.txt Deploys the application using Docker Compose after manifests have been generated. ```bash docker compose up -d ``` -------------------------------- ### Initialize Endpoint Provisioner for Docker Compose Source: https://context7.com/score-spec/community-provisioners/llms.txt Initializes SCORE with the endpoint provisioner for Docker Compose, enabling the use of Microcks for mocking API endpoints during local development. ```bash # Import endpoint provisioner for score-compose score-compose init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/endpoint/score-compose/10-endpoint-with-microcks.provisioners.yaml ``` -------------------------------- ### Initialize and Generate Docker Compose Source: https://context7.com/score-spec/community-provisioners/llms.txt Initializes SCORE with service provisioners for Docker Compose and generates the docker-compose.yaml file. Use this for local development with Dapr sidecars. ```bash # Import service provisioner score-compose init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/service/score-compose/10-service.provisioners.yaml # Generate for both workloads score-compose generate score-backend.yaml score-frontend.yaml docker compose up -d ``` -------------------------------- ### Manage resource operations Source: https://github.com/score-spec/community-provisioners/blob/main/score-compose.md Commands for listing resources and retrieving their specific outputs. ```bash score-compose resources list ``` ```bash score-compose resources get-outputs ``` -------------------------------- ### Deploy generated manifests Source: https://github.com/score-spec/community-provisioners/blob/main/score-k8s.md Applies the generated Kubernetes manifests to the cluster. ```bash kubectl apply -f manifests.yaml ``` -------------------------------- ### Provisioner Definitions Source: https://github.com/score-spec/community-provisioners/blob/main/README.md Summary of available community provisioners and their parameters. ```APIDOC ## Provisioner Reference ### Dapr PubSub - **10-rabbitmq-dapr-pubsub.provisioners.yaml**: Generates Dapr PubSub Component for RabbitMQ. - **10-redis-dapr-pubsub.provisioners.yaml**: Generates Dapr PubSub Component for Redis. ### Dapr State Store - **10-redis-dapr-state-store.provisioners.yaml**: Generates Dapr StateStore Component for Redis. ### Dapr Subscription - **10-dapr-subscription.provisioners.yaml**: Generates Dapr Subscription. Parameters: `pubsub`, `topic`. ### DNS - **10-dns-in-codespace.provisioners.yaml**: Get forwarded port URL in GitHub Codespace. - **10-dns-with-url.provisioners.yaml**: Outputs *.localhost domain. ### Endpoint - **10-endpoint-with-microcks-cli.provisioners.yaml**: Outputs endpoint URL. Parameters: `port`, `openapi_file`. ### Environment - **10-env.provisioners.yaml**: Loads environment variables from .env file. ### HPA - **10-hpa.provisioners.yaml**: Generates HorizontalPodAutoscaler. Parameters: `maxReplicas`, `minReplicas`, `defaultTargetCPUUtilizationPercentage`. ### Redis - **10-redis-helm-template.provisioners.yaml**: Generates bitnami/redis Helm chart manifests. - **10-redis-helm-upgrade.provisioners.yaml**: Deploys bitnami/redis Helm chart. ### Route - **10-ingress-route.provisioners.yaml**: Provisions Ingress route. Parameters: `host`, `path`, `port`. - **10-ingress-with-netpol-route.provisioners.yaml**: Provisions Ingress route + NetworkPolicy. Parameters: `host`, `path`, `port`. - **10-shared-gateway-httproute.provisioners.yaml**: Generates HTTPRoute. Parameters: `host`, `path`, `port`. - **10-shared-gateway-httproute-with-netpol.provisioners.yaml**: Generates HTTPRoute + NetworkPolicy. Parameters: `host`, `path`, `port`. ``` -------------------------------- ### Generate platform-specific manifests Source: https://github.com/score-spec/community-provisioners/blob/main/score-k8s.md Converts a Score file into Kubernetes-compatible manifests. ```bash score-k8s generate score.yaml ``` -------------------------------- ### Import, generate, and deploy Dapr State Store with score-compose Source: https://context7.com/score-spec/community-provisioners/llms.txt A sequence of commands to import the Dapr state store provisioner, generate Docker Compose manifests, and deploy the application. ```bash # Import and generate score-compose init --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/dapr-state-store/score-compose/10-redis-dapr-state-store.provisioners.yaml score-compose generate score.yaml docker compose up -d # Output: name (e.g., "redis-abc123") ``` -------------------------------- ### Dapr PubSub provisioner output Source: https://context7.com/score-spec/community-provisioners/llms.txt Indicates the expected output after successfully importing and configuring a Dapr PubSub provisioner. ```bash # Output: name ``` -------------------------------- ### Generate platform-specific manifests Source: https://github.com/score-spec/community-provisioners/blob/main/score-compose.md Processes the score.yaml file to generate manifests for the target platform. ```bash score-compose generate score.yaml ``` -------------------------------- ### Generate DNS and Route Manifest Source: https://context7.com/score-spec/community-provisioners/llms.txt This provisioner generates a localhost domain hostname and associated URL. For score-compose, URLs are generated on port 8080; for score-k8s, on port 80. It also supports GitHub Codespaces with forwarded port URLs. ```yaml # score.yaml - Workload with DNS and Route apiVersion: score.dev/v1b1 metadata: name: my-workload containers: my-container: image: ghcr.io/stefanprodan/podinfo:latest variables: PODINFO_UI_MESSAGE: "Hello, ${resources.dns.url}!" resources: dns: type: dns route: type: route params: host: ${resources.dns.host} path: "/" port: 8080 service: ports: tcp: port: 8080 targetPort: 9898 ``` -------------------------------- ### Generate Dapr Subscription Manifest Source: https://context7.com/score-spec/community-provisioners/llms.txt Use this provisioner to create a Dapr Subscription manifest. It requires 'topic' and 'pubsub' parameters to connect a workload to a specific topic on a PubSub component. ```yaml # score.yaml - Workload with Dapr Subscription apiVersion: score.dev/v1b1 metadata: name: my-workload annotations: dapr.io/enabled: "true" dapr.io/app-id: "my-workload" dapr.io/app-port: "3000" containers: my-container: image: busybox command: ["/bin/sh"] args: ["-c", "while true; do echo $TOPIC_NAME; echo '\n'; sleep 5; done"] variables: TOPIC_NAME: "${resources.subscription.topic}" service: ports: tcp: port: 3000 targetPort: 3000 resources: subscription: type: dapr-subscription params: topic: "notifications" pubsub: "pubsub" ``` -------------------------------- ### Verify running containers Source: https://context7.com/score-spec/community-provisioners/llms.txt Checks the status of running containers managed by Docker Compose. ```bash docker ps ``` -------------------------------- ### Define Workload Using Endpoint with Mock Fallback Source: https://context7.com/score-spec/community-provisioners/llms.txt Defines a workload that depends on an API endpoint. If the API is not available, it automatically generates a Microcks mock based on the provided OpenAPI specification. ```yaml # score.yaml - Workload using endpoint with mock fallback apiVersion: score.dev/v1b1 metadata: name: my-workload containers: my-container: image: my-app:latest variables: BACKEND_URL: "${resources.api.url}" resources: api: type: endpoint params: port: 8080 openapi_file: ./backend-openapi.yaml openapi_title: "Backend API" ``` -------------------------------- ### Define Frontend Service Dependency Source: https://context7.com/score-spec/community-provisioners/llms.txt Defines a frontend container that depends on a backend service. The BACKEND_SVC environment variable is set to the name of the backend resource. ```yaml apiVersion: score.dev/v1b1 metadata: name: frontend containers: my-container: image: busybox command: ["/bin/sh"] args: ["-c", "while true; do echo $BACKEND_SVC; sleep 5; done"] variables: BACKEND_SVC: http://${resources.backend.name} resources: backend: type: service ``` -------------------------------- ### SCORE Manifest for Environment Variables Source: https://context7.com/score-spec/community-provisioners/llms.txt SCORE manifest that utilizes the environment provisioner to load variables from a `.env` file. Variables like `DATABASE_URL` and `API_KEY` are made available to the workload containers. ```yaml # score.yaml - Workload using environment variables apiVersion: score.dev/v1b1 metadata: name: my-workload containers: my-container: image: my-app:latest variables: DB_URL: "${resources.env.DATABASE_URL}" SECRET: "${resources.env.API_KEY}" resources: env: type: environment ``` -------------------------------- ### SCORE Manifest for GCP Pub/Sub Emulator Source: https://context7.com/score-spec/community-provisioners/llms.txt SCORE manifest configuring the GCP Pub/Sub Emulator provisioner. It sets environment variables for the emulator host, port, and project ID, making them available to the workload. ```yaml # score.yaml - Workload using GCP Pub/Sub Emulator apiVersion: score.dev/v1b1 metadata: name: my-workload containers: my-container: image: busybox command: ["/bin/sh"] args: ["-c", "while true; do echo $PUBSUB_EMULATOR_HOST; sleep 5; done"] variables: PUBSUB_HOST: "${resources.pubsub.host}" PUBSUB_PORT: "${resources.pubsub.port}" PUBSUB_PROJECT_ID: "${resources.pubsub.project_id}" PUBSUB_EMULATOR_HOST: "${resources.pubsub.emulator_host}" resources: pubsub: type: gcp-pubsub-emulator params: project_id: my-test-project ``` -------------------------------- ### Score.yaml for Dapr PubSub Source: https://context7.com/score-spec/community-provisioners/llms.txt Defines a Score workload that utilizes a Dapr pub/sub component. ```yaml # score.yaml - Workload using Dapr PubSub apiVersion: score.dev/v1b1 metadata: name: publisher annotations: dapr.io/enabled: "true" dapr.io/app-id: "publisher" dapr.io/app-port: "3000" containers: my-container: image: my-publisher:latest variables: PUBSUB_NAME: "${resources.pubsub.name}" service: ports: tcp: port: 3000 targetPort: 3000 resources: pubsub: type: dapr-pubsub ``` -------------------------------- ### Score.yaml for Dapr State Store Source: https://context7.com/score-spec/community-provisioners/llms.txt Defines a Score workload that utilizes a Dapr state store provisioned by Redis. ```yaml apiVersion: score.dev/v1b1 metadata: name: my-workload annotations: dapr.io/enabled: "true" dapr.io/app-id: "my-workload" dapr.io/app-port: "3000" containers: my-container: image: busybox command: ["/bin/sh"] args: ["-c", "while true; do echo $PUBSUB_NAME; echo '\n'; sleep 5; done"] variables: PUBSUB_NAME: "${resources.state-store.name}" service: ports: tcp: port: 3000 targetPort: 3000 resources: state-store: type: dapr-state-store ``` -------------------------------- ### SCORE Manifest for Horizontal Pod Autoscaler Source: https://context7.com/score-spec/community-provisioners/llms.txt SCORE manifest for configuring a Kubernetes HorizontalPodAutoscaler. It specifies min/max replicas and target CPU utilization. For Docker Compose, an empty object is generated as HPA is not supported. ```yaml # score.yaml - Workload with HPA apiVersion: score.dev/v1b1 metadata: name: my-workload containers: my-container: image: busybox command: ["/bin/sh"] args: ["-c", "while true; do echo Hello HPA; sleep 5; done"] resources: hpa: type: horizontal-pod-autoscaler params: minReplicas: 2 maxReplicas: 3 targetCPUUtilizationPercentage: 80 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.