score-v1b1.json Documentation

Official TypeScript developer resources and documentation for score-spec/score-v1b1.json. Verified technical context for AI.

0 stars TypeScript TypeScript 1 file ยท ~16,444 tokens
RAW Doc

1. Project Overview & Quickstart (score-spec/score-v1b1.json)

score-v1b1.json

Open-source repository score-spec/score-v1b1.json

Repository Details

Note: High-volume repository documentation is actively indexed and synchronized by YakaAI.

2. Official Technical Reference & Guides (score-spec/docs)

File: README.md

Docs

This section covers how to build the documentation site with Hugo.
For information on Score's style guide see the Style guide.

Running the website locally

`yarn`

We use yarn (for MacOS: brew install yarn) as a package manager to ensure the versions of Hugo and associated tools are up to date. All commands that execute those tools are prefixed with yarn run or are aliased in the package.json file.

To install the packages:

text
yarn install

To run the server locally:

text
yarn build

OR

yarn run hugo server

And then view it at http://localhost:1313.

`score-compose`

You can install score-compose and then build and run this hugo website as a container:

text
score-compose init --no-sample
score-compose generate score.yaml --build main=.

docker compose up --build -d

curl $(score-compose resources get-outputs dns.default#score-docs.dns --format '{{ .host }}:8080/docs/')

Deployment

This site is currently deployed through Github Pages with a CNAME directing docs.score.dev to score-spec.github.io. The DNS configuration is managed by Humanitec.

Format docs

The following section covers how to format and lint prose.

Formatters and linters

This project uses the dprint to format documentation. dprint is a command line application that automatically formats code.

Use dprint to format your documentation.

bash
yarn fmt

Example output.

bash
$ yarn fmt
Formatted 1 file.
โœจ  Done in 0.13s.

This project uses the Vale with a Vale-compatible implementation of the Google Developer Documentation Style Guide.

On MacOS, install it through brew install vale.

For example, to lint a document run:

bash
vale sync
vale styles/style-guide.md

Example output.

bash
styles/style-guide.md
 40:71  error  Did you really mean             Vale.Spelling
               'inclusivity'?

โœ– 1 error, 0 warnings and 0 suggestions in 1 file.

To lint all documents, run yarn lint.

Autogenerated content

Score example hub

This site uses content from external Git repositories to create and continuously update the "Score example hub" pages. The external repos are pulled in to the /gen/external-content folder.

The commands for the initial integration of the repos are:

bash
git remote add -f -t main --no-tags examples https://github.com/score-spec/examples.git
git remote add -f -t main --no-tags community-provisioners https://github.com/score-spec/community-provisioners.git
git remote add -f -t main --no-tags score-compose https://github.com/score-spec/score-compose.git
git remote add -f -t main --no-tags score-k8s https://github.com/score-spec/score-k8s.git
git remote add -f -t main --no-tags patch-templates https://github.com/score-spec/community-patchers.git
git read-tree --prefix=gen/external-content/score/specification -u examples/main:specification
git read-tree --prefix=gen/external-content/resource-provisioners/default/score-compose -u score-compose/main:internal/command
git read-tree --prefix=gen/external-content/score/resources/default-provisioners -u examples/main:resources
git read-tree --prefix=gen/external-content/score/resources/community-provisioners -u community-provisioners/main
git read-tree --prefix=gen/external-content/resource-provisioners/default/score-k8s -u score-k8s/main:internal/provisioners/default
git read-tree --prefix=gen/external-content/resource-provisioners/community -u community-provisioners/main
git read-tree --prefix=gen/external-content/patch-templates -u patch-templates/main
git add gen/external-content
git commit -s -S -m "Integrating external content"

These commands will not have to be repeated unless re-creating the repo integration, or moving the source location. In that case, remove the remote, delete the local contents, repeat these commands targeting the new location, and update the generation scripts.

To generate the example hub pages based on the external content, execute this command:

bash
yarn gen-example-pages

Pulling new content

To pull the current content from the remote example library repo, execute this command:

bash
yarn gen-get-external-content

Refer to the [package.json`](./package.json) to see the actual implementation of this command.

Troubleshooting documentation site builds

This section covers common build issues with Hugo.

Failed to resolve output format `print`

When building the server, you may receive the following error message.

bash
Error: from config: failed to resolve output format "print" from site config
error Command failed with exit code 255.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

To resolve this issue, delete the temporary Hugo cache directory. By default, -cacheDir is stored at $TMPDIR/hugo_cache.

bash
rm -rf $TMPDIR/hugo_cache

`package-lock.json` locked files

When running yarn, you may receive the following error message.

bash
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.

To resolve this issue, delete the package-lock.json file.

bash
rm package-lock.json

You can find our documentation at docs.score.dev.

Contribute

If you have a suggestion to improve our documentation, please fork the repo and create a pull request. You can also open an issue with the tag enhancement.

  1. Fork the Project.
  2. Create your Feature Branch. git checkout -b feature/feature-name
  3. Commit your Changes. git commit -s -m "Add some amazing documentation enhancement"
  4. Push to the Branch. git push origin feature/feature-name
  5. Open a Pull Request.

Read CONTRIBUTING for more information.

Roadmap

See Roadmap. You can submit an idea anytime.

License

Code of conduct


File: content/en/docs/community/_index.md


title: "Community"
linkTitle: "Community"
weight: 10
Victor_Hugo: "true"
Focus_Keyword: "Join the Score community"
url: /docs/community
aliases:

  • /docs/contribute
  • /docs/talks
  • /docs/presentations
  • /docs/cncf
  • /docs/samples
  • /docs/examples

Join the Score community

Score is open-source and a Cloud Native Computing Foundation (CNCF) Sandbox project!

Connect with fellow Score developers on our Slack channel on the CNCF Slack (slack.cncf.io) or start find your way to contribute to Score!

Got something to say or ask about Score? We're all ears! Weโ€™d love to discuss your ideas on where the project should go next or how we can improve.

We host regular community meetings to discuss updates, share ideas, and collaborate.

Watch talks about Score

Read external blog posts about Score

Leverage example projects using Score


File: content/en/docs/examples/included/backstage-score-compose.md


title: "Backstage" headless: true toc_hide: true

To begin, follow the installation instructions to install the latest version of score-compose.

`init`

Initialize your current score-compose workspace, run the following command in your terminal:

bash
score-compose init --no-sample \
    --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/dns/score-compose/10-dns-with-url.provisioners.yaml

The init command will create the .score-compose directory with the [default resource provisioners]({{< relref "/docs/score-implementation/score-compose/resources-provisioners/" >}}) available. We are also importing one external file to support the dns dependencies: dns provisioner.

You can see the resource provisioners available by running this command:

bash
score-compose provisioners list

The Score file example illustrated uses three resource types: postgres-instance, dns and route.

none
+-------------------+-------+------------------+--------------------------------+---------------------------------+
|     TYPE          | CLASS |      PARAMS      |            OUTPUTS             |          DESCRIPTION            |
+-------------------+-------+------------------+--------------------------------+---------------------------------+
| dns               | (any) |                  | host, url                      | Outputs a *.localhost domain as |
|                   |       |                  |                                | the hostname and associated URL |
|                   |       |                  |                                | in http on port 8080            |
+-------------------+-------+------------------+--------------------------------+---------------------------------+
| postgres-instance | (any) |                  | host, password, port, username | Provisions a dedicated          |
|                   |       |                  |                                | PostgreSQL instance             |
+-------------------+-------+------------------+--------------------------------+---------------------------------+
| route             | (any) | host, path, port |                                | Provisions an Ingress route on  |
|                   |       |                  |                                | a shared Nginx instance         |
+-------------------+-------+------------------+--------------------------------+---------------------------------+

`generate`

Convert the score.yaml file into a deployable compose.yaml, run the following command in your terminal:

bash
score-compose generate score.yaml --image ghcr.io/mathieu-benoit/backstage:latest

The generate command will add the input score.yaml workload with a particular container image to the .score-compose/state.yaml state file and generate the output compose.yaml.

If you want to build the container image when this compose.yaml will be deployed, you can run this generate command with the --build parameter instead:

bash
score-compose generate score.yaml --build 'main={"context":".","tags":["backstage:local"]}'

See the generated compose.yaml by running this command:

bash
cat compose.yaml

If you make any modifications to the score.yaml file, run score-compose generate score.yaml to regenerate the output compose.yaml.

`resources`

Get the information of the resources dependencies of the workload, run the following command:

bash
score-compose resources list
none
+----------------------------------------+--------------------------------+
|                  UID                   |            OUTPUTS             |
+----------------------------------------+--------------------------------+
| dns.default#backstage.dns              | host, url                      |
+----------------------------------------+--------------------------------+
| postgres-instance.default#backstage.pg | host, password, port, username |
+----------------------------------------+--------------------------------+
| route.default#backstage.route          |                                |
+----------------------------------------+--------------------------------+

At this stage, we can already see the value of the dns resource generated:

bash
score-compose resources get-outputs dns.default#backstage.dns
none
{
  "host": "dnsjdtv57.localhost",
  "url": "http://dnsjdtv57.localhost:8080"
}

Same for the postgres-instance resource:

bash
score-compose resources get-outputs postgres-instance.default#backstage.pg
none
{
  "host": "pg-OuoTNo",
  "password": "REDACTED",
  "port": 5432,
  "username": "REDACTED"
}

`docker compose`

Run docker compose up to execute the generated compose.yaml file:

bash
docker compose up -d
none
[+] Running 4/4
 โœ” Container deploy-backstage-with-score-pg-OuoTNo-1            Healthy 
 โœ” Container deploy-backstage-with-score-wait-for-resources-1   Exited 
 โœ” Container deploy-backstage-with-score-routing-6uaxax-1       Started 
 โœ” Container deploy-backstage-with-score-backstage-backstage-1  Started

`docker ps`

See the running containers:

bash
docker ps
none
CONTAINER ID   IMAGE                                     COMMAND                  CREATED       STATUS                                  PORTS                                              NAMES
9b2ff62333ff   ghcr.io/mathieu-benoit/backstage:latest   "node packages/backeโ€ฆ"   5 hours ago   Up 5 hours                                                                                 deploy-backstage-with-score-backstage-backstage-1
4b1203acbf41   mirror.gcr.io/postgres:17-alpine          "docker-entrypoint.sโ€ฆ"   5 hours ago   Up 5 hours (healthy)                    5432/tcp                                           deploy-backstage-with-score-pg-mwgmNx-1
716b626ad841   mirror.gcr.io/nginx:1-alpine              "/docker-entrypoint.โ€ฆ"   5 hours ago   Up 5 hours                              0.0.0.0:8080->80/tcp, [::]:8080->80/tcp            deploy-backstage-with-score-routing-idouo7-1

`curl localhost:8080`

Test the running container, run the following command:

bash
curl localhost:8080 -H "Host: dnsjdtv57.localhost"
none
...
<title>Scaffolded Backstage App</title>
...

Congrats! Youโ€™ve successfully deploy, with the score-compose implementation, a sample containerized Backstage workload talking to PostgreSQL and exposed via a DNS. You provisioned them through Docker, without writing the Docker Compose file by yourself.


File: content/en/docs/examples/included/backstage-score-k8s.md


title: "Backstage" headless: true toc_hide: true

To begin, follow the installation instructions to install the latest version of score-k8s.

`init`

Initialize your current score-k8s workspace, run the following command in your terminal:

bash
score-k8s init --no-sample \
    --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/dns/score-k8s/10-dns-with-url.provisioners.yaml

The init command will create the .score-k8s directory with the [default resource provisioners]({{< relref "/docs/score-implementation/score-k8s/resources-provisioners/" >}}) available. We are also importing one external file to support the dns dependencies: dns provisioner.

You can see the resource provisioners available by running this command:

bash
score-k8s provisioners list

The Score file example illustrated uses three resource types: postgres-instance, dns and route.

none
+-------------------+-------+------------------+--------------------------------+---------------------------------+
|     TYPE          | CLASS |      PARAMS      |            OUTPUTS             |          DESCRIPTION            |
+-------------------+-------+------------------+--------------------------------+---------------------------------+
| dns               | (any) |                  | host, url                      | Outputs a *.localhost domain as |
|                   |       |                  |                                | the hostname and associated URL |
|                   |       |                  |                                | in http on port 80              |
+-------------------+-------+------------------+--------------------------------+---------------------------------+
| postgres-instance | (any) |                  | host, password, port, username | Provisions a dedicated          |
|                   |       |                  |                                | PostgreSQL instance             |
+-------------------+-------+------------------+--------------------------------+---------------------------------+
| route             | (any) | host, path, port |                                | Provisions an Ingress route on  |
|                   |       |                  |                                | a shared Nginx instance         |
+-------------------+-------+------------------+--------------------------------+---------------------------------+

`generate`

Convert the score.yaml file into a deployable manifests.yaml, run the following command in your terminal:

bash
score-k8s generate score.yaml --image ghcr.io/mathieu-benoit/backstage:latest

The generate command will add the input score.yaml workload with a particular container image to the .score-k8s/state.yaml state file and generate the output manifests.yaml.

See the generated manifests.yaml by running this command:

bash
cat manifests.yaml

If you make any modifications to the score.yaml file, run score-k8s generate score.yaml to regenerate the output manifests.yaml.

`resources`

Get the information of the resources dependencies of the workload, run the following command:

bash
score-k8s resources list
none
+----------------------------------------+--------------------------------+
|              UID                       |            OUTPUTS             |
+----------------------------------------+--------------------------------+
| dns.default#backstage.dns              | host, url                      |
+----------------------------------------+--------------------------------+
| postgres-instance.default#backstage.pg | host, password, port, username |
+----------------------------------------+--------------------------------+
| route.default#backstage.route          |                                |
+----------------------------------------+--------------------------------+

At this stage, we can already see the value of the dns resource generated:

bash
score-k8s resources get-outputs dns.default#backstage.dns
none
{
  "host": "dnsnocrke.localhost",
  "url": "http://dnsnocrke.localhost:80"
}

Same for the postgres-instance resource:

bash
score-k8s resources get-outputs postgres-instance.default#backstage.pg
none
{
  "host": "pg-backstage-d7058793",
  "password": "REDACTED",
  "port": 5432,
  "username": "REDACTED"
}

`kubectl apply`

Here you will need to have access to a Kubernetes cluster to execute the following commands. You can follow these instructions if you want to set up a Kind cluster.

Run kubectl apply to execute the generated manifests.yaml file:

bash
kubectl apply -f manifests.yaml
none
secret/pg-backstage-d7058793 created
statefulset.apps/pg-backstage-d7058793 created
service/pg-backstage-d7058793 created
httproute.gateway.networking.k8s.io/route-backstage-76d19d47 created
service/backstage created
deployment.apps/backstage created

`kubectl get all`

See the running containers:

bash
kubectl get all,httproute
none
NAME                             READY   STATUS    RESTARTS   AGE
pod/backstage-7667f68bf9-vnlw9   1/1     Running   0          37s
pod/pg-backstage-d7058793-0      1/1     Running   0          37s

NAME                            TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
service/backstage               ClusterIP   10.96.146.148   <none>        7007/TCP   37s
service/pg-backstage-d7058793   ClusterIP   10.96.21.104    <none>        5432/TCP   37s

NAME                        READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/backstage   1/1     1            1           37s

NAME                                   DESIRED   CURRENT   READY   AGE
replicaset.apps/backstage-7667f68bf9   1         1         1       37s

NAME                                     READY   AGE
statefulset.apps/pg-backstage-d7058793   1/1     37s

NAME                                                           HOSTNAMES                 AGE
httproute.gateway.networking.k8s.io/route-backstage-76d19d47   ["dnsnocrke.localhost"]   37s

`curl localhost`

Test the running container, run the following command:

bash
curl localhost -H "Host: dnsnocrke.localhost"
none
...
<title>Scaffolded Backstage App</title>
...

Congrats! Youโ€™ve successfully deploy, with the score-k8s implementation, a sample containerized Backstage workload talking to PostgreSQL and exposed via a DNS. You provisioned them through kubectl, without writing the Kubernetes manifests file by yourself.


File: content/en/docs/examples/included/dapr-score-compose.md


title: "Dapr" headless: true toc_hide: true

To begin, follow the installation instructions to install the latest version of score-compose.

`init`

Initialize your current score-compose workspace, run the following command in your terminal:

bash
score-compose init --no-sample \
    --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/dapr-state-store/score-compose/10-redis-dapr-state-store.provisioners.yaml \
    --patch-templates https://raw.githubusercontent.com/score-spec/community-patchers/refs/heads/main/score-compose/dapr.tpl

The init command will create the .score-compose directory with the [default resource provisioners]({{< relref "/docs/score-implementation/score-compose/resources-provisioners/" >}}) available. We are also importing one external file to seamlessly generate a Dapr StateStore Component pointing to a Redis database: dapr-state-store provisioner.

You can see the resource provisioners available by running this command:

bash
score-compose provisioners list

The Score file example illustrated uses three resource types: dapr-state-store, dns and route.

none
+-------------------+-------+------------------+--------------------------------+---------------------------------+
|     TYPE          | CLASS |      PARAMS      |            OUTPUTS             |          DESCRIPTION            |
+-------------------+-------+------------------+--------------------------------+---------------------------------+
| dapr-state-store  | (any) |                  | name                           | Generates a Dapr StateStore     |
|                   |       |                  |                                | Component pointing to a Redis   |
|                   |       |                  |                                | Service.                        |
+-------------------+-------+------------------+--------------------------------+---------------------------------+
| dns               | (any) |                  | host                           | Outputs a *.localhost domain    |
|                   |       |                  |                                | as the hostname                 |
+-------------------+-------+------------------+--------------------------------+---------------------------------+
| route             | (any) | host, path, port |                                | Provisions an Ingress route on  |
|                   |       |                  |                                | a shared Nginx instance         |
+-------------------+-------+------------------+--------------------------------+---------------------------------+

By using the --patch-templates (in this case: dapr.tpl) we are seamlessly generating the Dapr scheduler and placement containers in addition to a Dapr Sidecar container for any Workload.

`generate`

Convert the score.yaml file into a deployable compose.yaml, run the following command in your terminal:

bash
score-compose generate score.yaml --image ghcr.io/dapr/samples/hello-k8s-node:latest

The generate command will add the input score.yaml workload with a particular container image to the .score-compose/state.yaml state file and generate the output compose.yaml.

If you want to build the container image when this compose.yaml will be deployed, you can run this generate command with the --build parameter instead:

bash
score-compose generate score.yaml --build 'main={"context":".","tags":["hello-dapr-node:local"]}'

See the generated compose.yaml by running this command:

bash
cat compose.yaml

If you make any modifications to the score.yaml file, run score-compose generate score.yaml to regenerate the output compose.yaml.

`resources`

Get the information of the resources dependencies of the workload, run the following command:

bash
score-compose resources list
none
+----------------------------------------------+---------+
|                     UID                      | OUTPUTS |
+----------------------------------------------+---------+
| dapr-state-store.default#nodeapp.state-store | name    |
+----------------------------------------------+---------+
| dns.default#nodeapp.dns                      | host    |
+----------------------------------------------+---------+
| route.default#nodeapp.route                  |         |
+----------------------------------------------+---------+

At this stage, we can already see the value of the dns resource generated:

bash
score-compose resources get-outputs dns.default#nodeapp.dns --format '{{ .host }}'
none
dnsbcsqnd.localhost

Same for the dapr-state-store resource:

bash
score-compose resources get-outputs dapr-state-store.default#nodeapp.state-store
none
{
  "name": "redis-PANgkO"
}

`docker compose`

Run docker compose up to execute the generated compose.yaml file:

bash
docker compose up -d
none
[+] Running 7/7
 โœ” Container dapr-redis-PANgkO-1             Started
 โœ” Container dapr-placement-1                Started
 โœ” Container dapr-scheduler-1                Started
 โœ” Container dapr-routing-aPCJB9-1           Started
 โœ” Container dapr-wait-for-resources-1       Exited
 โœ” Container dapr-nodeapp-nodeapp-1          Started
 โœ” Container dapr-nodeapp-nodeapp-sidecar-1  Started

`docker ps`

See the running containers:

bash
docker ps
none
CONTAINER ID   IMAGE                                        COMMAND                  CREATED              STATUS              PORTS                                              NAMES
3c7dfd658b1a   mirror.gcr.io/redis:7-alpine                 "redis-server /usr/lโ€ฆ"   About a minute ago   Up About a minute   6379/tcp                                           dapr-redis-PANgkO-1
85c836ae19d2   ghcr.io/dapr/daprd:latest                    "./daprd --app-id=noโ€ฆ"   8 hours ago          Up 59 seconds                                                          dapr-nodeapp-nodeapp-sidecar-1
1f7affe5d910   ghcr.io/dapr/samples/hello-k8s-node:latest   "docker-entrypoint.sโ€ฆ"   8 hours ago          Up About a minute   3000/tcp                                           dapr-nodeapp-nodeapp-1
e7e1ae181a28   mirror.gcr.io/nginx:1-alpine                 "/docker-entrypoint.โ€ฆ"   8 hours ago          Up About a minute   0.0.0.0:8080->80/tcp, [::]:8080->80/tcp            dapr-routing-aPCJB9-1
f2983452962a   ghcr.io/dapr/scheduler:latest                "./scheduler --port โ€ฆ"   8 hours ago          Up About a minute   0.0.0.0:50007->50007/tcp, :::50007->50007/tcp      dapr-scheduler-1
913af9a5c8fc   ghcr.io/dapr/placement:latest                "./placement --port โ€ฆ"   8 hours ago          Up About a minute   0.0.0.0:50006->50006/tcp, :::50006->50006/tcp      dapr-placement-1

`curl localhost:8080`

Test the running container, run the following command:

bash
curl localhost:8080 -H "Host: dnsbcsqnd.localhost"

This will get the expected error showing that the container is successfully running:

none
Cannot GET /

You can check the logs of the running container:

none
Node App listening on port 3000!

Congrats! Youโ€™ve successfully deploy, with the score-compose implementation, a sample containerized NodeJS workload talking to a Dapr StateStore (Redis) and exposed via a DNS. You provisioned them through Docker, without writing the Docker Compose file by yourself.


File: content/en/docs/examples/included/dapr-score-k8s.md


title: "Dapr" headless: true toc_hide: true

To begin, follow the installation instructions to install the latest version of score-k8s.

`init`

Initialize your current score-k8s workspace, run the following command in your terminal:

bash
score-k8s init --no-sample \
    --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/dapr-state-store/score-k8s/10-redis-dapr-state-store.provisioners.yaml

The init command will create the .score-k8s directory with the [default resource provisioners]({{< relref "/docs/score-implementation/score-k8s/resources-provisioners/" >}}) available. We are also importing one external file to generate a Dapr StateStore Component pointing to a Redis database: dapr-state-store provisioner.

You can see the resource provisioners available by running this command:

bash
score-k8s provisioners list

The Score file example illustrated uses three resource types: dapr-state-store, dns and route.

none
+------------------+-------+------------------+--------------------------------+---------------------------------+
|     TYPE         | CLASS |      PARAMS      |            OUTPUTS             |          DESCRIPTION            |
+------------------+-------+------------------+--------------------------------+---------------------------------+
| dapr-state-store | (any) |                  | name                           | Generates a Dapr StateStore     |
|                  |       |                  |                                | Component pointing to a Redis   |
|                  |       |                  |                                | StatefulSet.                    |
+------------------+-------+------------------+--------------------------------+---------------------------------+
| dns              | (any) |                  | host                           | Outputs a *.localhost domain    |
|                  |       |                  |                                | as the hostname                 |
+------------------+-------+------------------+--------------------------------+---------------------------------+
| route            | (any) | host, path, port |                                | Provisions an Ingress route on  |
|                  |       |                  |                                | a shared Nginx instance         |
+------------------+-------+------------------+--------------------------------+---------------------------------+

`generate`

Convert the score.yaml file into a deployable manifests.yaml, run the following command in your terminal:

bash
score-k8s generate score.yaml --image ghcr.io/dapr/samples/hello-k8s-node:latest

The generate command will add the input score.yaml workload with a particular container image to the .score-k8s/state.yaml state file and generate the output manifests.yaml.

See the generated manifests.yaml by running this command:

bash
cat manifests.yaml

If you make any modifications to the score.yaml file, run score-k8s generate score.yaml to regenerate the output manifests.yaml.

`resources`

Get the information of the resources dependencies of the workload, run the following command:

bash
score-k8s resources list
none
+----------------------------------------------+---------+
|                     UID                      | OUTPUTS |
+----------------------------------------------+---------+
| dapr-state-store.default#nodeapp.state-store | name    |
+----------------------------------------------+---------+
| dns.default#nodeapp.dns                      | host    |
+----------------------------------------------+---------+
| route.default#nodeapp.route                  |         |
+----------------------------------------------+---------+

At this stage, we can already see the value of the dns resource generated:

bash
score-k8s resources get-outputs dns.default#nodeapp.dns --format '{{ .host }}'
none
dnsutripw.localhost

Same for the dapr-state-store resource:

bash
score-k8s resources get-outputs dapr-state-store.default#nodeapp.state-store
none
{
  "name": "redis-nodeapp-58f89990"
}

`kubectl apply`

Here you will need to have access to a Kubernetes cluster to execute the following commands. You can follow these instructions if you want to set up a Kind cluster. Your Kubernetes cluster should also have Dapr installed in it.

Run kubectl apply to execute the generated manifests.yaml file:

bash
kubectl apply -f manifests.yaml
none
secret/redis-nodeapp-58f89990 created
statefulset.apps/redis-nodeapp-58f89990 created
service/redis-nodeapp-58f89990 created
component.dapr.io/redis-nodeapp-58f89990 created
httproute.gateway.networking.k8s.io/route-nodeapp-3f3a9362 created
service/nodeapp created
deployment.apps/nodeapp created

`kubectl get all`

See the running containers:

bash
kubectl get all
none
NAME                           READY   STATUS    RESTARTS   AGE
pod/nodeapp-859d5458f6-75wjj   1/1     Running   0          3m43s
pod/redis-nodeapp-58f89990-0   1/1     Running   0          3m43s

NAME                             TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                               AGE
service/nodeapp                  ClusterIP   10.96.138.145   <none>        3000/TCP                              3m43s
service/nodeapp-dapr             ClusterIP   None            <none>        80/TCP,50001/TCP,50002/TCP,9090/TCP   51s
service/redis-nodeapp-58f89990   ClusterIP   10.96.71.72     <none>        6379/TCP                              3m43s

NAME                      READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/nodeapp   1/1     1            1           3m43s

NAME                                 DESIRED   CURRENT   READY   AGE
replicaset.apps/nodeapp-859d5458f6   1         1         1       3m43s

NAME                                      READY   AGE
statefulset.apps/redis-nodeapp-58f89990   1/1     3m43s

`curl localhost`

Test the running container, run the following command:

bash
curl localhost -H "Host: dnsutripw.localhost"

This will get the expected error showing that the container is successfully running:

none
Cannot GET /

You can check the logs of the running container:

none
Node App listening on port 3000!

Congrats! Youโ€™ve successfully deploy, with the score-k8s implementation, a sample containerized NodeJS workload talking to a Dapr StateStore (Redis) and exposed via a DNS. You provisioned them through kubectl, without writing the Kubernetes manifests file by yourself.


File: content/en/docs/examples/included/frontend-and-backend-score-compose.md


title: "Frontend & Backend" headless: true toc_hide: true

To begin, follow the installation instructions to install the latest version of score-compose.

`init`

Initialize your current score-compose workspace, run the following command in your terminal:

bash
score-compose init --no-sample \
    --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/service/score-compose/10-service.provisioners.yaml \
    --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/dns/score-compose/10-dns-with-url.provisioners.yaml

The init command will create the .score-compose directory with the [default resource provisioners]({{< relref "/docs/score-implementation/score-compose/resources-provisioners/" >}}) available. We are also importing two external files to support the dns dependencies: dns provisioner and service dependencies: service provisioner.

You can see the resource provisioners available by running this command:

bash
score-compose provisioners list

The Score file example illustrated uses three resource types: postgres-instance, dns and route.

text
/* Detailed source-code truncated for AI context efficiency. */

`generate`

Convert the score-frontend.yaml and score-backend.yaml files into a deployable compose.yaml, run the following command in your terminal:

bash
score-compose generate score-backend.yaml \
    --image ghcr.io/mathieu-benoit/backstage-backend:latest

score-compose generate score-frontend.yaml \
    --image ghcr.io/mathieu-benoit/backstage-frontend:latest

The generate command will add the input score-frontend.yaml and score-backend.yaml workloads with a particular container image to the .score-compose/state.yaml state file and generate the output compose.yaml.

If you want to build the container image when this compose.yaml will be deployed, you can run this generate command with the --build parameter instead:

bash
score-compose generate score-backend.yaml --build 'main={"context":".","tags":["backend:local"]}'

See the generated compose.yaml by running this command:

bash
cat compose.yaml

If you make any modifications to the score-frontend.yaml or score-backend.yaml files, run score-compose generate score.yaml to regenerate the output compose.yaml.

`resources`

Get the information of the resources dependencies of the workload, run the following command:

bash
score-compose resources list
none
+--------------------------------------+--------------------------------+
|                 UID                  |            OUTPUTS             |
+--------------------------------------+--------------------------------+
| dns.default#dns                      | host, url                      |
+--------------------------------------+--------------------------------+
| postgres-instance.default#backend.pg | host, password, port, username |
+--------------------------------------+--------------------------------+
| service.default#frontend.backend     | name                           |
+--------------------------------------+--------------------------------+
| route.default#backend.route          |                                |
+--------------------------------------+--------------------------------+
| route.default#frontend.route         |                                |
+--------------------------------------+--------------------------------+

At this stage, we can already see the value of the dns resource generated:

bash
score-compose resources get-outputs dns.default#dns
none
{
  "host": "dnsjdtv57.localhost",
  "url": "http://dnsjdtv57.localhost:8080"
}

Same for the postgres-instance resource:

bash
score-compose resources get-outputs postgres-instance.default#backend.pg
none
{
  "host": "pg-OuoTNo",
  "password": "REDACTED",
  "port": 5432,
  "username": "REDACTED"
}

`docker compose`

Run docker compose up to execute the generated compose.yaml file:

bash
docker compose up -d
none
[+] Running 5/5
 โœ” Container deploy-backstage-with-score-routing-5QD6z8-1      Running
 โœ” Container deploy-backstage-with-score-pg-glZvLw-1           Healthy
 โœ” Container deploy-backstage-with-score-wait-for-resources-1  Exited
 โœ” Container deploy-backstage-with-score-backend-backend-1     Running
 โœ” Container deploy-backstage-with-score-frontend-frontend-1   Running

`docker ps`

See the running containers:

bash
docker ps
none
CONTAINER ID   IMAGE                                              COMMAND                  CREATED          STATUS                   PORTS                                                 NAMES
1712a2002838   ghcr.io/mathieu-benoit/backstage-frontend:latest   "/docker-entrypoint.โ€ฆ"   3 minutes ago    Up 2 minutes             80/tcp                                                deploy-backstage-with-score-frontend-frontend-1
6bf734ab9179   ghcr.io/mathieu-benoit/backstage-backend:latest    "node packages/backeโ€ฆ"   3 minutes ago    Up 2 minutes                                                                   -backend-backend-1
9a126ed0456c   mirror.gcr.io/nginx:1-alpine                       "/docker-entrypoint.โ€ฆ"   3 minutes ago    Up 2 minutes             0.0.0.0:8080->80/tcp, [::]:8080->80/tcp               deploy-backstage-with-score-routing-5QD6z8-1
5ec1732b6695   mirror.gcr.io/postgres:17-alpine                   "docker-entrypoint.sโ€ฆ"   3 minutes ago    Up 3 minutes (healthy)   5432/tcp                                              -pg-glZvLw-1

`curl localhost:8080`

Test the running container, run the following command:

bash
curl localhost:8080 -H "Host: dnsjdtv57.localhost"
none
...
<title>Scaffolded Backstage App</title>
...

Congrats! Youโ€™ve successfully deploy, with the score-compose implementation, a containerized Frontend application talking to a containerized Backend application exposed via a DNS. You provisioned them through Docker, without writing the Docker Compose file by yourself.


File: content/en/docs/examples/included/frontend-and-backend-score-k8s.md


title: "Frontend & Backend" headless: true toc_hide: true

To begin, follow the installation instructions to install the latest version of score-k8s.

`init`

Initialize your current score-k8s workspace, run the following command in your terminal:

bash
score-k8s init --no-sample \
    --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/service/score-k8s/10-service.provisioners.yaml \
    --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/dns/score-k8s/10-dns-with-url.provisioners.yaml

The init command will create the .score-k8s directory with the [default resource provisioners]({{< relref "/docs/score-implementation/score-k8s/resources-provisioners/" >}}) available. We are also importing two external files to support the dns dependencies: dns provisioner and service dependencies: service provisioner.

You can see the resource provisioners available by running this command:

bash
score-k8s provisioners list

The Score file example illustrated uses three resource types: postgres-instance, dns and route.

text
/* Detailed source-code truncated for AI context efficiency. */

`generate`

Convert the score-frontend.yaml and score-backend.yaml files into a deployable manifests.yaml, run the following command in your terminal:

bash
score-k8s generate score-backend.yaml \
    --image ghcr.io/mathieu-benoit/backstage-backend:latest

score-k8s generate score-frontend.yaml \
    --image ghcr.io/mathieu-benoit/backstage-frontend:latest

The generate command will add the input score-frontend.yaml and score-backend.yaml workloads with a particular container image to the .score-k8s/state.yaml state file and generate the output manifests.yaml.

See the generated manifests.yaml by running this command:

bash
cat manifests.yaml

If you make any modifications to the score-frontend.yaml or score-backend.yaml files, run score-k8s generate score.yaml to regenerate the output manifests.yaml.

`resources`

Get the information of the resources dependencies of the workload, run the following command:

bash
score-k8s resources list
none
+--------------------------------------+--------------------------------+
|                 UID                  |            OUTPUTS             |
+--------------------------------------+--------------------------------+
| dns.default#dns                      | host, url                      |
+--------------------------------------+--------------------------------+
| postgres-instance.default#backend.pg | host, password, port, username |
+--------------------------------------+--------------------------------+
| service.default#frontend.backend     | name                           |
+--------------------------------------+--------------------------------+
| route.default#backend.route          |                                |
+--------------------------------------+--------------------------------+
| route.default#frontend.route         |                                |
+--------------------------------------+--------------------------------+

At this stage, we can already see the value of the dns resource generated:

bash
score-k8s resources get-outputs dns.default#dns
none
{
  "host": "dnsnocrke.localhost",
  "url": "http://dnsnocrke.localhost:80"
}

Same for the postgres-instance resource:

bash
score-k8s resources get-outputs postgres-instance.default#backend.pg
none
{
  "host": "pg-backstage-d7058793",
  "password": "REDACTED",
  "port": 5432,
  "username": "REDACTED"
}

`kubectl apply`

Here you will need to have access to a Kubernetes cluster to execute the following commands. You can follow these instructions if you want to set up a Kind cluster.

Run kubectl apply to execute the generated manifests.yaml file:

bash
kubectl apply -f manifests.yaml
none
secret/pg-backend-61f0e7c1 created
statefulset.apps/pg-backend-61f0e7c1 created
service/pg-backend-61f0e7c1 created
httproute.gateway.networking.k8s.io/route-backend-711726ce created
httproute.gateway.networking.k8s.io/route-frontend-61f9e1b8 created
service/backend created
deployment.apps/backend created
service/frontend created
deployment.apps/frontend created

`kubectl get all`

See the running containers:

bash
kubectl get all,httproute
none
NAME                           READY   STATUS    RESTARTS   AGE
pod/backend-57fc5664d-4hg7l    1/1     Running   0          22s
pod/frontend-db644cf86-n9cjd   1/1     Running   0          22s
pod/pg-backend-61f0e7c1-0      1/1     Running   0          60m

NAME                          TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)    AGE
service/backend               ClusterIP   10.96.183.51   <none>        7007/TCP   60m
service/frontend              ClusterIP   10.96.90.135   <none>        3000/TCP   60m
service/pg-backend-61f0e7c1   ClusterIP   10.96.45.108   <none>        5432/TCP   60m

NAME                       READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/backend    1/1     1            1           60m
deployment.apps/frontend   1/1     1            1           60m

NAME                                  DESIRED   CURRENT   READY   AGE
replicaset.apps/backend-57fc5664d     1         1         1       22s
replicaset.apps/backend-64fc859b9d    0         0         0       60m
replicaset.apps/frontend-68ccb68884   0         0         0       60m
replicaset.apps/frontend-db644cf86    1         1         1       22s

NAME                                   READY   AGE
statefulset.apps/pg-backend-61f0e7c1   1/1     60m

NAME                                                          HOSTNAMES                 AGE
httproute.gateway.networking.k8s.io/route-backend-711726ce    ["dnsxmfazk.localhost"]   60m
httproute.gateway.networking.k8s.io/route-frontend-61f9e1b8   ["dnsxmfazk.localhost"]   60m

`curl localhost`

Test the running container, run the following command:

bash
curl localhost -H "Host: dnsnocrke.localhost"
none
...
<title>Scaffolded Backstage App</title>
...

Congrats! Youโ€™ve successfully deploy, with the score-k8s implementation, a containerized Frontend application talking to a containerized Backend application exposed via a DNS. You provisioned them through kubectl, without writing the Kubernetes manifests file by yourself.


File: content/en/docs/examples/included/llm-models-dmr.md


title: "LLM Models with Docker Model Runner" headless: true toc_hide: true

To begin, follow the installation instructions to install the latest version of score-compose.

{{% alert title="Prerequisites" %}}
Docker Model Runner (DMR) needs to be set up in your local environment. Follow the DMR get started guide to set it up.
{{% /alert %}}

`init`

Initialize your current score-compose workspace with the Docker Model Runner provisioner. Run the following command in your terminal:

bash
score-compose init --no-sample \
    --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/llm-model/score-compose/10-dmr-llm-model.provisioners.yaml

The init command will create the .score-compose directory with the [default resource provisioners]({{< relref "/docs/score-implementation/score-compose/resources-provisioners/" >}}) available, plus the Docker Model Runner-specific provisioner for the llm-model resource type.

You can see the resource provisioners available by running this command:

bash
score-compose provisioners list

The Score file example illustrated uses two resource types: llm-model and volume.

none
+---------------+-------+--------+--------------------+---------------------------------+
|     TYPE      | CLASS | PARAMS |      OUTPUTS       |          DESCRIPTION            |
+---------------+-------+--------+--------------------+---------------------------------+
| llm-model     | (any) | model  | url                | Provisions an LLM model via     |
|               |       |        |                    | Docker Model Runner             |
+---------------+-------+--------+--------------------+---------------------------------+
| volume        | (any) |        | source, type       | Creates a persistent volume     |
|               |       |        |                    | that can be mounted on a        |
|               |       |        |                    | workload.                       |
+---------------+-------+--------+--------------------+---------------------------------+

`generate`

Convert the score.yaml file into a deployable compose.yaml. Run the following command in your terminal:

bash
score-compose generate score.yaml \
    --image ghcr.io/open-webui/open-webui:main-slim \
    --publish 8080:open-webui:8080 \
    --override-property containers.open-webui.variables.WEBUI_NAME="Hello, DMR with Score Compose!" \
    --output compose.yaml

The generate command will add the input score.yaml workload with a particular container image to the .score-compose/state.yaml state file and generate the output compose.yaml.

The --publish flag exposes the Open WebUI port to the host so you can access it in your browser.

See the generated compose.yaml by running this command:

bash
cat compose.yaml

If you make any modifications to the score.yaml file, run score-compose generate score.yaml to regenerate the output compose.yaml.

`docker compose`

Run docker compose up to execute the generated compose.yaml file:

bash
docker compose up -d --wait

This will pull the requested LLM models (ai/gemma3:270M-UD-IQ2_XXS and ai/smollm2:135M-Q2_K) via Docker Model Runner, and then start the Open WebUI container connected to the DMR backend.

Verify

Check the Docker images, including the LLM model images pulled by Docker Model Runner:

bash
docker images
none
REPOSITORY             TAG                  SIZE
open-webui             main-slim            ...
ai/gemma3              270M-UD-IQ2_XXS      182MB
ai/smollm2             135M-Q2_K            56.9MB

See the running containers:

bash
docker ps

You should see the open-webui container running and connected to the Docker Model Runner backend.

Access Open WebUI

Open your browser and navigate to http://localhost:8080 to access the Open WebUI frontend. You can now chat with the LLM models you deployed!

Congrats! You've successfully deployed, with the score-compose implementation, local LLM models with Open WebUI and Docker Model Runner. You provisioned them through Docker, without writing the Docker Compose file by yourself.


File: content/en/docs/examples/included/llm-models-ollama.md


title: "LLM Models with Ollama" headless: true toc_hide: true

To begin, follow the installation instructions to install the latest version of score-compose.

`init`

Initialize your current score-compose workspace with the Ollama provisioner and patch template. Run the following command in your terminal:

bash
score-compose init --no-sample \
    --patch-templates https://raw.githubusercontent.com/score-spec/community-patchers/refs/heads/main/score-compose/ollama.tpl \
    --provisioners https://raw.githubusercontent.com/score-spec/community-provisioners/refs/heads/main/llm-model/score-compose/10-ollama-llm-model-service.provisioners.yaml

The init command will create the .score-compose directory with the [default resource provisioners]({{< relref "/docs/score-implementation/score-compose/resources-provisioners/" >}}) available, plus the Ollama-specific provisioner for the llm-model resource type.

The --patch-templates option adds the ollama.tpl patch template which configures the Ollama service integration in the generated Docker Compose file.

You can see the resource provisioners available by running this command:

bash
score-compose provisioners list

The Score file example illustrated uses two resource types: llm-model and volume.

none
+---------------+-------+--------+--------------------+---------------------------------+
|     TYPE      | CLASS | PARAMS |      OUTPUTS       |          DESCRIPTION            |
+---------------+-------+--------+--------------------+---------------------------------+
| llm-model     | (any) | model  | url                | Provisions an LLM model via     |
|               |       |        |                    | Ollama                          |
+---------------+-------+--------+--------------------+---------------------------------+
| volume        | (any) |        | source, type       | Creates a persistent volume     |
|               |       |        |                    | that can be mounted on a        |
|               |       |        |                    | workload.                       |
+---------------+-------+--------+--------------------+---------------------------------+

`generate`

Convert the score.yaml file into a deployable compose.yaml. Run the following command in your terminal:

bash
score-compose generate score.yaml \
    --image ghcr.io/open-webui/open-webui:main-slim \
    --publish 8080:open-webui:8080 \
    --override-property containers.open-webui.variables.WEBUI_NAME="Hello, Ollama with Score Compose!" \
    --output compose.yaml

The generate command will add the input score.yaml workload with a particular container image to the .score-compose/state.yaml state file and generate the output compose.yaml.

The --publish flag exposes the Open WebUI port to the host so you can access it in your browser.

See the generated compose.yaml by running this command:

bash
cat compose.yaml

If you make any modifications to the score.yaml file, run score-compose generate score.yaml to regenerate the output compose.yaml.

`docker compose`

Run docker compose up to execute the generated compose.yaml file:

bash
docker compose up -d --wait

This will pull the Ollama container image, start the Ollama service, pull the requested LLM models (gemma3:270m and smollm2:135m), and then start the Open WebUI container connected to the Ollama backend.

Verify

Check the Docker images that were pulled:

bash
docker images
none
REPOSITORY               TAG            SIZE
ollama/ollama            latest         3.33GB
open-webui               main-slim      ...

Check that the LLM models were successfully pulled by Ollama:

bash
curl localhost:11434/api/tags | jq -r .models[].name
none
gemma3:270m
smollm2:135m

See the running containers:

bash
docker ps

You should see the open-webui and ollama containers running, along with some exited "puller" containers that were used to download the models.

Access Open WebUI

Open your browser and navigate to http://localhost:8080 to access the Open WebUI frontend. You can now chat with the LLM models you deployed!

Congrats! You've successfully deployed, with the score-compose implementation, local LLM models with Open WebUI and Ollama. You provisioned them through Docker, without writing the Docker Compose file by yourself.