From 4a0f0262832fb00f67a97cdb3597718ebf7ee180 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Wed, 16 Oct 2024 12:54:35 +0000 Subject: [PATCH 1/6] Implementations improvements Signed-off-by: Mathieu Benoit --- .../en/docs/How to/environment-variables.md | 3 +- .../docs/score implementation/Other/_index.md | 6 - .../Other/included/_index.md | 6 - .../Other/included/install-score-helm-bash.md | 58 ------ .../included/install-score-helm-curl-mac.md | 41 ---- .../Other/included/install-wget-helm.md | 66 ------ .../Other/included/install-windows.md | 12 -- .../score implementation/Other/score-helm.md | 173 ---------------- .../Other/score-humanitec.md | 18 -- .../included/install-score-compose-bash.md | 2 +- .../install-score-compose-curl-mac.md | 2 +- .../included/install-score-k8s-bash.md | 2 +- .../included/install-score-k8s-curl-mac.md | 2 +- .../included/install-wget-compose.md | 2 +- .../included/install-wget-k8s.md | 2 +- .../included/install-windows-compose.md | 2 +- .../included/install-windows-k8s.md | 2 +- .../score-compose/_index.md | 15 ++ .../cli.md} | 128 +++--------- .../score-compose/examples.md | 12 ++ .../score-compose/installation.md | 79 +++++++ .../score-compose/resources-provisioners.md | 32 +++ .../en/docs/score implementation/score-k8s.md | 194 ------------------ .../score implementation/score-k8s/_index.md | 10 + .../score implementation/score-k8s/cli.md | 150 ++++++++++++++ .../score-k8s/installation.md | 41 ++++ .../score-k8s/resources-provisioners.md | 27 +++ 27 files changed, 401 insertions(+), 686 deletions(-) delete mode 100644 content/en/docs/score implementation/Other/_index.md delete mode 100644 content/en/docs/score implementation/Other/included/_index.md delete mode 100644 content/en/docs/score implementation/Other/included/install-score-helm-bash.md delete mode 100644 content/en/docs/score implementation/Other/included/install-score-helm-curl-mac.md delete mode 100644 content/en/docs/score implementation/Other/included/install-wget-helm.md delete mode 100644 content/en/docs/score implementation/Other/included/install-windows.md delete mode 100644 content/en/docs/score implementation/Other/score-helm.md delete mode 100644 content/en/docs/score implementation/Other/score-humanitec.md create mode 100644 content/en/docs/score implementation/score-compose/_index.md rename content/en/docs/score implementation/{score-compose.md => score-compose/cli.md} (55%) create mode 100644 content/en/docs/score implementation/score-compose/examples.md create mode 100644 content/en/docs/score implementation/score-compose/installation.md create mode 100644 content/en/docs/score implementation/score-compose/resources-provisioners.md delete mode 100644 content/en/docs/score implementation/score-k8s.md create mode 100644 content/en/docs/score implementation/score-k8s/_index.md create mode 100644 content/en/docs/score implementation/score-k8s/cli.md create mode 100644 content/en/docs/score implementation/score-k8s/installation.md create mode 100644 content/en/docs/score implementation/score-k8s/resources-provisioners.md diff --git a/content/en/docs/How to/environment-variables.md b/content/en/docs/How to/environment-variables.md index 57ed49b2..66d450ba 100644 --- a/content/en/docs/How to/environment-variables.md +++ b/content/en/docs/How to/environment-variables.md @@ -21,5 +21,4 @@ The Score Specification supports declaring environment variables in a configurat For more information, see -- [Environment variables in score-compose](https://github.com/score-spec/score-compose/tree/main/examples/02-environment) -- [Environment variables in score-helm](https://github.com/score-spec/score-helm/tree/main/examples/02-environment) +- [Environment variables in `score-compose`](https://github.com/score-spec/score-compose/tree/main/examples/02-environment) diff --git a/content/en/docs/score implementation/Other/_index.md b/content/en/docs/score implementation/Other/_index.md deleted file mode 100644 index 5901d1a0..00000000 --- a/content/en/docs/score implementation/Other/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "Available implementation CLIs" -linkTitle: "Other" -weight: 3 -description: "An overview of open-source Score implementation CLIs" ---- diff --git a/content/en/docs/score implementation/Other/included/_index.md b/content/en/docs/score implementation/Other/included/_index.md deleted file mode 100644 index 11a0fa86..00000000 --- a/content/en/docs/score implementation/Other/included/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "score-helm installation" -headless: true -toc_hide: true -hide_summary: true ---- diff --git a/content/en/docs/score implementation/Other/included/install-score-helm-bash.md b/content/en/docs/score implementation/Other/included/install-score-helm-bash.md deleted file mode 100644 index 4754fe97..00000000 --- a/content/en/docs/score implementation/Other/included/install-score-helm-bash.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: "score-helm install on macOS" -description: "Installation for score-helm on macOS." -headless: true -toc_hide: true ---- - -**1.** Download the latest compressed Tar file for your operating system from the [GitHub release page](https://github.com/score-spec/score-helm/releases). By default, the tarball will be saved to your `~/Downloads` directory. If you choose to use a different location, you'll need to change that in the following steps. - -```bash -score-helm.y.z_osx-amd64.tar.gz -``` - -**2.** Install into your `local` directory - -In your terminal, enter the following to create the `score-spec` directory. - -```bash -cd /usr/local/bin/ -# create the directory if needed -mkdir -pv score-spec -``` - -Extract the compressed Tar file (You may need to run the previous command with elevated permissions). - -```bash -tar -xvzf ~/Downloads/score-helm_darwin_arm64.tar.gz -C /usr/local/bin/ -``` - -You should see the following output: - -```bash -x LICENSE -x README.md -x score-helm -``` - -**3.** Export PATH - -Future terminal sessions may require you add this path to your `~/.zshrc` or `~/.bashrc` file, if it isn’t there already. - -```bash -export PATH=$PATH:/usr/local/bin/ -``` - -**4.** Verify installation - -```bash -score-helm --version -``` - -The command returns the following output: - -```bash -score-helm x.y.z -``` - -You’ve successfully installed the score-helm CLI! diff --git a/content/en/docs/score implementation/Other/included/install-score-helm-curl-mac.md b/content/en/docs/score implementation/Other/included/install-score-helm-curl-mac.md deleted file mode 100644 index 34f42f6b..00000000 --- a/content/en/docs/score implementation/Other/included/install-score-helm-curl-mac.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: "score-helm install on macOS" -description: "Installation for score-helm on macOS." -headless: true -toc_hide: true ---- - -**1.** Download the latest release from the [GitHub release page](https://github.com/score-spec/score-helm/releases): - -```bash -wget https://github.com/score-spec/score-helm/releases/download//score-helm_.tar.gz -``` - -**2.** Unpack the latest release - -```bash -tar xvzf score-helm.tgz -``` - -The following is the output of the previous command: - -```bash -x LICENSE -x README.md -x score-helm -``` - -**3.** Clean up the tar file - -```bash -rm score-helm.tgz README.md LICENSE -``` - -**4.** Move the binary to PATH - -```bash -sudo mv ./score-helm /usr/local/bin/score-helm -sudo chown root: /usr/local/bin/score-helm -``` - -You’ve successfully installed the score-helm CLI! diff --git a/content/en/docs/score implementation/Other/included/install-wget-helm.md b/content/en/docs/score implementation/Other/included/install-wget-helm.md deleted file mode 100644 index dd1c1aae..00000000 --- a/content/en/docs/score implementation/Other/included/install-wget-helm.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: "score-helm install with wget" -description: "Installation for score-helm with wget." -headless: true -toc_hide: true ---- - -**1.** Download the latest release from the [GitHub release page](https://github.com/score-spec/score-helm/releases): - -```bash -wget https://github.com/score-spec/score-helm/releases/download//score-helm_.tar.gz -``` - -You should see something similar to the following output: - -```bash -Saving to: score-helm_.tar.gz - -score-helm_ 100%[===================>] 2.85M 5.28MB/s in 0.5s -``` - -**2.** Install into your `local` directory - -In your terminal, enter the following to create the `score-spec` directory. - -```bash -cd /usr/local/bin/ -# create the directory if needed -mkdir -pv score-spec -``` - -Extract the compressed Tar file (You may need to run this command with elevated permissions): - -```bash -tar -xvzf ~//score-helm__.tar.gz -``` - -You should see the following output: - -```bash -x LICENSE -x README.md -x score-helm -``` - -**3:** Export PATH - -Future terminal sessions may require you add this path to your `~/.zshrc` or `~/.bashrc` file, if it isn’t there already. - -```bash -export PATH=$PATH:/usr/local/bin/ -``` - -**4:** Verify installation - -```bash -score-helm --version -``` - -The command returns the following output: - -```bash -score-helm -``` - -You've successfully installed the score-helm CLI! diff --git a/content/en/docs/score implementation/Other/included/install-windows.md b/content/en/docs/score implementation/Other/included/install-windows.md deleted file mode 100644 index 39785a13..00000000 --- a/content/en/docs/score implementation/Other/included/install-windows.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "score-helm install on Windows" -description: "Installation for score-helm on Windows." -headless: true -toc_hide: true ---- - -**1.** Download the latest release from the [GitHub release page](https://github.com/score-spec/score-helm/releases). - -**2.** Decompress the `zip` file, and move the binary to your `PATH`. - -You've successfully installed the score-helm CLI! diff --git a/content/en/docs/score implementation/Other/score-helm.md b/content/en/docs/score implementation/Other/score-helm.md deleted file mode 100644 index d68a3c88..00000000 --- a/content/en/docs/score implementation/Other/score-helm.md +++ /dev/null @@ -1,173 +0,0 @@ ---- -title: "score-helm" -linkTitle: "score-helm" -description: "Get started with the score-helm CLI" -weight: 4 -aliases: -- /docs/reference/score-cli/score-helm-run/ -- /docs/reference/score-cli/score-helm/ ---- - -{{< alert context="info" >}} Deprecation Notice: We have deprecated the score-helm CLI implementation. To get started with Score, we recommend using one of our reference implementations [score-compose]({{< relref "/docs/score implementation/score-compose" >}}) or [score-k8s]({{< relref "/docs/score implementation/score-k8s" >}}). If you're interested in developing a score-helm reference implementation, we'd love to support you! Please [reach out](https://github.com/score-spec/spec?tab=readme-ov-file#-get-in-touch) to us for assistance and collaboration. {{< /alert >}} - -# Overview - -The score-helm CLI allows developers to translate their Score specification into Helm values files. Below you'll find an overview of: - -- [Installation options](#installation) -- [CLI reference](#cli-reference) -- [Examples](#examples) - -For additional details and opportunities to contribute to the project, visit the [score-helm](https://github.com/score-spec/score-helm) GitHub repository. - -## Installation - -You can install the score-helm CLI in a variety of ways: - -- [Homebrew](#homebrew) -- [Go](#go) -- [Docker](#docker) -- [Manual download](#manual-download) - -### Homebrew - -Prerequisites: You must have [brew](https://brew.sh) installed. - -```bash -brew install score-spec/tap/score-helm -``` - -### Go - -Prerequisites: You must have [Go](https://go.dev/dl/) installed. - -```bash -go install -v github.com/score-spec/score-helm/cmd/score-helm@latest -``` - -### Docker - -Prerequisites: You must have [Docker](https://docs.docker.com/get-docker/) installed. - -1. Download the repository. - The following example uses the GitHub CLI to download the project. - -```bash -gh repo clone score-spec/score-helm -``` - -2. Change directories into `score-helm`. - -```bash -cd score-helm -``` - -3. Build the Docker image by running the following command in the same directory as the Dockerfile. - -```bash -docker build -t score-helm:latest . -``` - -4. Run the Docker image by using the `docker run` command. - -```bash -docker run -it score-helm:latest -``` - -If you want to run `score-helm` with the `--help` flag to view the available options, you would run the following command. - -```bash -docker run -it score-helm:latest --help -``` - -This will start a new container based on the image you built, run `score-helm` with the `--help` flag, and then stop the container. - -### Manual download - -The following methods download the score-helm CLI from its [GitHub release page](https://github.com/score-spec/score-helm/releases): - -{{< tabs name="Manual installation methods">}} -{{< tab name="curl on macOS" include="included/install-score-helm-curl-mac.md" />}} -{{< tab name="wget on macOS/Linux" include="included/install-wget-helm.md" />}} -{{< tab name="Github DLs on macOS/Linux" include="included/install-score-helm-bash.md" />}} -{{< tab name="Windows" include="included/install-windows.md" />}} -{{< /tabs >}} - -## CLI Reference - -The score-helm CLI provides a set of commands and flags to enable the generation of Helm values files from Score specifications. - -## Commands - -## `run` - -Translates the Score file into a Helm `values.yaml` file. - -```bash -score-helm run --file ./score.yaml \ - --output ./values.yaml -``` - -#### Flags - -The `run` command can be combined with the following flags: - -#### `--file` | `-f` - -Specifies a Score file to initialize. By default this is `./score.yaml.` - -```bash -score-helm run -f ./another-score.yaml -``` - -#### `--help` | `-h` - -Help for the `run` command. - -```bash -score-helm run -h -``` - -#### `--output` | `-o` - -The output location of the helm file. Uses the default value `./helm.yaml` if the flag isn't specified. - -```bash -score-helm run -f ./score.yaml -o ./another-helm.yaml -``` - -#### `--overrides` - -Specifies the path to the override file. Uses the default value `./overrides.score.yaml` if the flag isn't specified. - -```bash -score-helm run -f ./score.yaml \ - -o ./values.yaml \ - --overrides ./overrides.score.yaml -``` - -#### `--property` - -Overrides selected property value. - -#### `--values` - -Specifies the path that declares reference dependencies, or resource property, values that are environment-specific. - -```bash -score-helm run -f ./score.yaml --values ./env.yaml -o ./values.yaml -``` - -#### `--verbose` - -Enables a stream to which error messages are sent. - -```bash -score-helm run -f ./score.yaml -o ./values.yaml --verbose -``` - -## Examples - -Explore examples for score-helm in the [examples library](https://github.com/score-spec/score-helm/tree/main/examples) on GitHub. - -If you encounter any issues or have questions, feel free to reach out to us in the [Score](https://cloud-native.slack.com/archives/C07DN0D1UCW) channel on the CNCF Slack (). diff --git a/content/en/docs/score implementation/Other/score-humanitec.md b/content/en/docs/score implementation/Other/score-humanitec.md deleted file mode 100644 index c664fc6b..00000000 --- a/content/en/docs/score implementation/Other/score-humanitec.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "score-humanitec" -linkTitle: "score-humanitec" -description: "Get started with Score and the Humanitec Platform Orchestrator" -weight: 4 -aliases: -- /docs/environment-variables/environment-variables-humanitec/ -- /docs/reference/humanitec-extension/ -- /docs/reference/score-cli/score-humanitec-run/ -- /docs/reference/score-cli/score-humanitec-delta/ -- /docs/reference/score-cli/score-humanitec/ ---- - -The Humanitec Platform Orchestrator offers native support for Score, enabling the translation of Score files into a Humanitec Deployment Set for deployment to a remote environment. - -For detailed instructions on usage and configuration, please refer to the [Humanitec developer documentation](https://developer.humanitec.com/score/overview/#how-do-score-and-the-platform-orchestrator-work-together). - -If you have any questions or concerns regarding this implementation, feel free to [reach out to the Humanitec team directly](https://developer.humanitec.com/support/contact). diff --git a/content/en/docs/score implementation/included/install-score-compose-bash.md b/content/en/docs/score implementation/included/install-score-compose-bash.md index 54f6cacf..665c449b 100644 --- a/content/en/docs/score implementation/included/install-score-compose-bash.md +++ b/content/en/docs/score implementation/included/install-score-compose-bash.md @@ -55,4 +55,4 @@ The command returns the following output: score-compose x.y.z ``` -You’ve successfully installed the score-compose CLI! +You’ve successfully installed the `score-compose` CLI! diff --git a/content/en/docs/score implementation/included/install-score-compose-curl-mac.md b/content/en/docs/score implementation/included/install-score-compose-curl-mac.md index c16b4998..8fd327e2 100644 --- a/content/en/docs/score implementation/included/install-score-compose-curl-mac.md +++ b/content/en/docs/score implementation/included/install-score-compose-curl-mac.md @@ -38,4 +38,4 @@ sudo mv ./score-compose /usr/local/bin/score-compose sudo chown root: /usr/local/bin/score-compose ``` -You’ve successfully installed the score-compose CLI! +You’ve successfully installed the `score-compose` CLI! diff --git a/content/en/docs/score implementation/included/install-score-k8s-bash.md b/content/en/docs/score implementation/included/install-score-k8s-bash.md index 4fa8c4f6..9175dda4 100644 --- a/content/en/docs/score implementation/included/install-score-k8s-bash.md +++ b/content/en/docs/score implementation/included/install-score-k8s-bash.md @@ -55,4 +55,4 @@ The command returns the following output: score-k8s x.y.z ``` -You’ve successfully installed the score-k8s CLI! +You’ve successfully installed the `score-k8s` CLI! diff --git a/content/en/docs/score implementation/included/install-score-k8s-curl-mac.md b/content/en/docs/score implementation/included/install-score-k8s-curl-mac.md index da730a1f..b8cf3e79 100644 --- a/content/en/docs/score implementation/included/install-score-k8s-curl-mac.md +++ b/content/en/docs/score implementation/included/install-score-k8s-curl-mac.md @@ -38,4 +38,4 @@ sudo mv ./score-k8s /usr/local/bin/score-k8s sudo chown root: /usr/local/bin/score-k8s ``` -You’ve successfully installed the score-k8s CLI! +You’ve successfully installed the `score-k8s` CLI! diff --git a/content/en/docs/score implementation/included/install-wget-compose.md b/content/en/docs/score implementation/included/install-wget-compose.md index 9907865e..8f24ab20 100644 --- a/content/en/docs/score implementation/included/install-wget-compose.md +++ b/content/en/docs/score implementation/included/install-wget-compose.md @@ -63,4 +63,4 @@ The command returns the following output: score-compose ``` -You've successfully installed the score-compose CLI! +You've successfully installed the `score-compose` CLI! diff --git a/content/en/docs/score implementation/included/install-wget-k8s.md b/content/en/docs/score implementation/included/install-wget-k8s.md index 92af0f75..a0c7fdf9 100644 --- a/content/en/docs/score implementation/included/install-wget-k8s.md +++ b/content/en/docs/score implementation/included/install-wget-k8s.md @@ -63,4 +63,4 @@ The command returns the following output: score-k8s ``` -You've successfully installed the score-k8s CLI! +You've successfully installed the `score-k8s` CLI! diff --git a/content/en/docs/score implementation/included/install-windows-compose.md b/content/en/docs/score implementation/included/install-windows-compose.md index 0a48e48c..2e81efe8 100644 --- a/content/en/docs/score implementation/included/install-windows-compose.md +++ b/content/en/docs/score implementation/included/install-windows-compose.md @@ -9,4 +9,4 @@ toc_hide: true **2.** Decompress the `zip` file, and move the binary to your `PATH`. -You've successfully installed the score-compose CLI! +You've successfully installed the `score-compose` CLI! diff --git a/content/en/docs/score implementation/included/install-windows-k8s.md b/content/en/docs/score implementation/included/install-windows-k8s.md index 3fd61789..16381c84 100644 --- a/content/en/docs/score implementation/included/install-windows-k8s.md +++ b/content/en/docs/score implementation/included/install-windows-k8s.md @@ -9,4 +9,4 @@ toc_hide: true **2.** Decompress the `zip` file, and move the binary to your `PATH`. -You've successfully installed the score-k8s CLI! +You've successfully installed the `score-k8s` CLI! diff --git a/content/en/docs/score implementation/score-compose/_index.md b/content/en/docs/score implementation/score-compose/_index.md new file mode 100644 index 00000000..f74b2915 --- /dev/null +++ b/content/en/docs/score implementation/score-compose/_index.md @@ -0,0 +1,15 @@ +--- +title: "score-compose" +linkTitle: "score-compose" +description: "Get started with the score-compose reference implementation" +weight: 1 +aliases: +- /docs/reference/score-cli/score-compose-run/ +- /docs/reference/score-cli/score-compose/ +--- + +# Overview + +The `score-compose` serves as a reference implementation for the Score specification, providing a standard for the creation of custom Score CLIs. `score-compose` can be utilized both as a reference point for implementation and for practical use in local development with Docker Compose. + +For additional details and opportunities to contribute to the project, visit the [`score-compose`](https://github.com/score-spec/score-compose) GitHub repository. \ No newline at end of file diff --git a/content/en/docs/score implementation/score-compose.md b/content/en/docs/score implementation/score-compose/cli.md similarity index 55% rename from content/en/docs/score implementation/score-compose.md rename to content/en/docs/score implementation/score-compose/cli.md index e21b6f4f..eed9ef0d 100644 --- a/content/en/docs/score implementation/score-compose.md +++ b/content/en/docs/score implementation/score-compose/cli.md @@ -1,98 +1,12 @@ --- -title: "score-compose" -linkTitle: "score-compose" -description: "Get started with the score-compose reference implementation" -weight: 1 +title: "score-compose CLI reference" +linkTitle: "CLI reference" +description: "CLI reference for score-compose" +weight: 2 aliases: -- /docs/reference/score-cli/score-compose-run/ -- /docs/reference/score-cli/score-compose/ +- /docs/reference/score-cli/score-compose/cli --- -# Overview - -The score-compose CLI serves as a reference implementation for the Score specification, providing a standard for the creation of custom Score CLIs. Score-compose can be utilized both as a reference point for implementation and for practical use in local development with Docker Compose. Below you'll find an overview of: - -- [Installation options](#installation) -- [CLI reference](#cli-reference) -- [Examples](#examples) - -For additional details and opportunities to contribute to the project, visit the [score-compose](https://github.com/score-spec/score-compose) GitHub repository. - -## Installation - -You can install the score-compose CLI in a variety of ways: - -- [Homebrew](#homebrew) -- [Go](#go) -- [Docker](#docker) -- [Manual download](#manual-download) - -### Homebrew - -Prerequisites: You must have [brew](https://brew.sh) installed. - -```bash -brew install score-spec/tap/score-compose -``` - -### Go - -Prerequisites: You must have [Go](https://go.dev/dl/) installed. - -```bash -go install -v github.com/score-spec/score-compose/cmd/score-compose@latest -``` - -### Docker - -Prerequisites: You must have [Docker](https://docs.docker.com/get-docker/) installed. - -1. Download the repository. - The following example uses the GitHub CLI to download the project. - -```bash -gh repo clone score-spec/score-compose -``` - -2. Change directories into `score-compose`. - -```bash -cd score-compose -``` - -3. Build the Docker image by running the following command in the same directory as the Dockerfile. - -```bash -docker build -t score-compose:latest . -``` - -4. Run the Docker image by using the `docker run` command. - -```bash -docker run -it score-compose:latest -``` - -If you want to run `score-compose` with the `--help` flag to view the available options, you would run the following command. - -```bash -docker run -it score-compose:latest --help -``` - -This will start a new container based on the image you built, run `score-compose` with the `--help` flag, and then stop the container. - -### Manual download - -The following methods download the score-compose CLI from its [GitHub release page](https://github.com/score-spec/score-compose/releases): - -{{< tabs name="Manual installation methods">}} -{{< tab name="curl on macOS" include="included/install-score-compose-curl-mac.md" />}} -{{< tab name="wget on macOS/Linux" include="included/install-wget-compose.md" />}} -{{< tab name="Github DLs on macOS/Linux" include="included/install-score-compose-bash.md" />}} -{{< tab name="Windows" include="included/install-windows-compose.md" />}} -{{< /tabs >}} - -## CLI Reference - The score-compose CLI provides a set of commands and flags to enable the generation of Docker Compose files from Score specifications. ## Commands @@ -130,7 +44,15 @@ score-compose init --no-sample Sets the name of the Docker Compose project. By default, the project name is the same as the current directory name. ```bash -score-compose init --project custom_project_name.yaml +score-compose init --project score-compose2 +``` + +#### `--provisioners` | `-p` + +Loads additional provisoners from a remote url. May be specified multiple times. Supports http://host/file, https://host/file, git-ssh://git@host/repo.git/file, and git-https://host/repo.git/file formats. + +```bash +score-compose init --provisioners https://raw.githubusercontent.com/user/repo/main/example.yaml ``` #### `--help` | `-h` @@ -143,7 +65,7 @@ score-compose init --help ## `generate` -The generate command converts the Score file(s) in the current Score Compose project into a combined Docker Compose manifest. All resources and links between Workloads will be resolved and provisioned as required. Please be aware that score-compose [init](#init) must be run first. An error will be thrown if the project directory is not present. +The `generate` command converts the Score file(s) in the current Score Compose project into a combined Docker Compose manifest. All resources and links between Workloads will be resolved and provisioned as required. Please be aware that [`score-compose init`](#init) must be run first. An error will be thrown if the project directory is not present. ```bash score-compose generate [flags] @@ -201,6 +123,14 @@ Specifies an optional file of Score overrides to merge in. score-compose generate score.yaml --overrides-file=./overrides.score.yaml ``` +#### `--publish` + +Specifies an optional set of HOST_PORT::CONTAINER_PORT to publish on the host system. could be either for the workload (example: 8080:my-workload:80) or for a resource (example: 5432:postgres#my-workload.db.host:5432). + +```bash +score-compose generate score.yaml --publish 8080:my-workload:80 +``` + #### `--help` | `-h` Displays help information for `generate`, providing a short description of the command along with examples and compatible flags. @@ -211,7 +141,7 @@ score-compose generate --help ## `completion` -The completion command generates an autocompletion script for score-compose in the specified shell. +The `completion` command generates an autocompletion script for `score-compose` in the specified shell. ```bash score-compose completion [command] @@ -238,7 +168,7 @@ score-compose completion [command] --help ## `run (deprecated)` -The run command translates the Score file into a Docker Compose file. Please note that this command is deprecated as it does not support resource provisioning out of the box. Please use the [generate](#generate) command instead. +The `run` command translates the Score file into a Docker Compose file. Please note that this command is deprecated as it does not support resource provisioning out of the box. Please use the [generate](#generate) command instead. ```bash score-compose run --file ./score.yaml \ @@ -334,10 +264,4 @@ Displays the version of score-compose. ```bash score-compose --version -``` - -## Examples - -Explore a variety of examples for score-compose, ranging from simple "hello world" setups to more complex configurations, including resource provisioning and multiple workloads. You can find these examples in our [examples library](https://github.com/score-spec/score-compose/tree/main/examples). - -If you encounter any issues or have questions, feel free to reach out to us in the the [Score](https://cloud-native.slack.com/archives/C07DN0D1UCW) channel on the CNCF Slack (). +``` \ No newline at end of file diff --git a/content/en/docs/score implementation/score-compose/examples.md b/content/en/docs/score implementation/score-compose/examples.md new file mode 100644 index 00000000..f5dd058e --- /dev/null +++ b/content/en/docs/score implementation/score-compose/examples.md @@ -0,0 +1,12 @@ +--- +title: "score-compose examples" +linkTitle: "Examples" +description: "Examples for score-compose" +weight: 4 +aliases: +- /docs/reference/score-cli/score-compose/examples +--- + +Explore a variety of examples for `score-compose`, ranging from simple "hello world" setups to more complex configurations, including resource provisioning and multiple workloads. You can find these examples in our [examples library](https://github.com/score-spec/score-compose/tree/main/examples). + +If you encounter any issues or have questions, feel free to reach out to us in the the [Score](https://cloud-native.slack.com/archives/C07DN0D1UCW) channel on the CNCF Slack (). \ No newline at end of file diff --git a/content/en/docs/score implementation/score-compose/installation.md b/content/en/docs/score implementation/score-compose/installation.md new file mode 100644 index 00000000..9340b8e0 --- /dev/null +++ b/content/en/docs/score implementation/score-compose/installation.md @@ -0,0 +1,79 @@ +--- +title: "score-compose installation" +linkTitle: "Installation" +description: "Installation of score-compose" +weight: 1 +aliases: +- /docs/reference/score-cli/score-compose/install +--- + +You can install the `score-compose` CLI in a variety of ways: + +- [Homebrew](#homebrew) +- [Go](#go) +- [Docker](#docker) +- [Manual download](#manual-download) + +## Homebrew + +Prerequisites: You must have [brew](https://brew.sh) installed. + +```bash +brew install score-spec/tap/score-compose +``` + +## Go + +Prerequisites: You must have [Go](https://go.dev/dl/) installed. + +```bash +go install -v github.com/score-spec/score-compose/cmd/score-compose@latest +``` + +## Docker + +Prerequisites: You must have [Docker](https://docs.docker.com/get-docker/) installed. + +1. Download the repository. + The following example uses the GitHub CLI to download the project. + +```bash +gh repo clone score-spec/score-compose +``` + +2. Change directories into `score-compose`. + +```bash +cd score-compose +``` + +3. Build the Docker image by running the following command in the same directory as the Dockerfile. + +```bash +docker build -t score-compose:latest . +``` + +4. Run the Docker image by using the `docker run` command. + +```bash +docker run -it score-compose:latest +``` + +If you want to run `score-compose` with the `--help` flag to view the available options, you would run the following command. + +```bash +docker run -it score-compose:latest --help +``` + +This will start a new container based on the image you built, run `score-compose` with the `--help` flag, and then stop the container. + +## Manual download + +The following methods download the `score-compose` CLI from its [GitHub release page](https://github.com/score-spec/score-compose/releases): + +{{< tabs name="Manual installation methods">}} +{{< tab name="curl on macOS" include="../included/install-score-compose-curl-mac.md" />}} +{{< tab name="wget on macOS/Linux" include="../included/install-wget-compose.md" />}} +{{< tab name="GitHub DLs on macOS/Linux" include="../included/install-score-compose-bash.md" />}} +{{< tab name="Windows" include="../included/install-windows-compose.md" />}} +{{< /tabs >}} \ No newline at end of file diff --git a/content/en/docs/score implementation/score-compose/resources-provisioners.md b/content/en/docs/score implementation/score-compose/resources-provisioners.md new file mode 100644 index 00000000..a931d9ce --- /dev/null +++ b/content/en/docs/score implementation/score-compose/resources-provisioners.md @@ -0,0 +1,32 @@ +--- +title: "score-compose resources provisioners" +linkTitle: "Resources provisioners" +description: "resources provisioners of score-compose" +weight: 3 +aliases: +- /docs/reference/score-cli/score-compose/provisioners +- /docs/reference/score-cli/score-compose/resources-provisioners +- /docs/reference/score-cli/score-compose/resources +--- + +`score-compose` comes with out-of-the-box support for: + +| Type | Class | Params | Output | +| --------------- | --------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `amqp` | `default` | (none) | `host`, `port`, `vhost`, `username`, `password` | +| `dns` | `default` | (none) | `host` | +| `elasticsearch` | `default` | (none) | `host`, `port`, `username`, `password` | +| `environment` | `default` | (none) | `${KEY}` | +| `kafka-topic` | `default` | (none) | `host`, `port`, `name`, `num_partitions` | +| `mongodb` | `default` | (none) | `host`, `port`, `username`, `password`, `connection` | +| `mysql` | `default` | (none) | `host`, `port`, `name` (aka `database`), `username`, `password` | +| `postgres` | `default` | (none) | `host`, `port`, `name` (aka `database`), `username`, `password` | +| `redis` | `default` | (none) | `host`, `port`, `username`, `password` | +| `route` | `default` | `host`, `path`, `port` | | +| `service-port` | `default` | `workload`, `port` | `hostname`, `port` | +| `s3` | `default` | (none) | `endpoint`, `access_key_id`, `secret_key`, `bucket`, with `region=""`, `aws_access_key_id=`, and `aws_secret_key=` for compatibility | +| `volume` | `default` | (none) | `source` | + +These can be found in the default provisioners file. You are encouraged to write your own provisioners and add them to the `.score-compose` directory (with the `.provisioners.yaml` extension) or contribute them upstream to the [default.provisioners.yaml](https://github.com/score-spec/score-compose/blob/main/internal/command/default.provisioners.yaml) file. + +Users are encouraged to write their own custom provisioners to support new resource types or to modify the implementations above. See [example here](https://score.dev/blog/writing-a-custom-score-compose-provisioner-for-apache-kafka/). \ No newline at end of file diff --git a/content/en/docs/score implementation/score-k8s.md b/content/en/docs/score implementation/score-k8s.md deleted file mode 100644 index 60472fc4..00000000 --- a/content/en/docs/score implementation/score-k8s.md +++ /dev/null @@ -1,194 +0,0 @@ ---- -title: "score-k8s" -linkTitle: "score-k8s" -description: "Get started with the score-k8s reference implementation" -weight: 1 ---- - -# Overview - -The score-k8s CLI serves as a reference implementation for the Score specification, providing a standard for the creation of custom Score CLIs. Score-k8s can be utilized both as a reference point for implementation and for practical use in development with Kubernetes. Below you'll find an overview of: - -- [Installation options](#installation) -- [CLI reference](#cli-reference) - -For additional details and opportunities to contribute to the project, visit the [score-k8s](https://github.com/score-spec/score-k8s) GitHub repository. - -# Installation - -You can install the score-k8s CLI in a variety of ways: - -- [Homebrew](#homebrew) -- [Go](#go) -- [Manual download](#manual-download) - -### Homebrew - -Prerequisites: You must have [brew](https://brew.sh) installed. - -```bash -brew install score-spec/tap/score-k8s -``` - -### Go - -Prerequisites: You must have [Go](https://go.dev/dl/) installed. - -```bash -$ go install -v github.com/score-spec/score-k8s@latest -``` - -### Manual download - -The following methods download the score-k8s CLI from its [GitHub release page](https://github.com/score-spec/score-k8s/releases): - -{{< tabs name="Manual installation methods">}} -{{< tab name="curl on macOS" include="included/install-score-k8s-curl-mac.md" />}} -{{< tab name="wget on macOS/Linux" include="included/install-wget-k8s.md" />}} -{{< tab name="Github DLs on macOS/Linux" include="included/install-score-k8s-bash.md" />}} -{{< tab name="Windows" include="included/install-windows-k8s.md" />}} -{{< /tabs >}} - -## CLI Reference - -The score-k8s CLI provides a set of commands and flags to enable the generation of Kubernetes manifests from Score specifications. - -## Commands - -## `init` - -The init command will prepare the current directory for working with score-k8s and write the initial empty state and default provisioners file into the `'.score-k8s'` subdirectory. The `'.score-k8s'` directory contains state that will be used to generate any Kubernetes resource manifests including potentially sensitive data and raw secrets, so this should not be checked into generic source control. - -```bash -score-k8s init [flags] -``` - -#### Flags - -The `init` command can be combined with the following flags: - -#### `--file` | `-f` - -Specifies a Score file to initialize. By default this is `./score.yaml`. - -```bash -score-k8s init --file custom_file_name.yaml -``` - -#### `--no-sample` - -Disables the generation of the sample Score file if you already have a Score file in place. - -```bash -score-k8s init --no-sample -``` - -#### `--help` | `-h` - -Displays help information for `init`, providing a short description of the command along with examples and compatible flags. - -```bash -score-k8s init --help -``` - -## `generate` - -The generate command will convert Score files in the current Score state into a combined set of Kubernetes manifests. All resources and links between Workloads will be resolved and provisioned as required. `score-k8s init` must be run first. An error will be thrown if the project directory is not present. - -```bash -score-k8s generate [flags] -``` - -#### Flags - -The `generate` command can be combined with the following flags: - -#### `--image` - -Specifies an optional container image to use for any container with `image == '.'`. - -```bash -score-k8s generate --image your_container_image -``` - -#### `--output` | `-o` - -Specifies the output file to write the manifest to. By default, the output file is named `manifest.yaml`. - -```bash -score-k8s generate --output your_output_file.yaml -``` - -#### `--override-property` - -Specifies an optional set of path=key overrides to set or remove. - -```bash -score-k8s generate --override-property path1=value1 -``` - -#### `--overrides-file` - -Specifies an optional file of Score overrides to merge in. - -```bash -score-k8s generate score.yaml --overrides-file=./overrides.score.yaml -``` - -#### `--patch-manifests` - -Specifies an optional set of `//path=key` operations for the output manifests. - -```bash -score-k8s generate --patch-manifests 'Deployment/my-workload/spec.replicas=3' -``` - -#### `--help` | `-h` - -Displays help information for `generate`, providing a short description of the command along with examples and compatible flags. - -```bash -score-k8s generate --help -``` - -## `help` - -The help command provides information on all commands. - -```bash -score-k8s help [command] [flags] -``` - -## Global flags - -#### `--help` | `-h` - -Displays help information for score-k8s, includig available commands and flags. - -```bash -score-k8s --help -``` - -#### `--quiet` - -Mutes any logging output. - -```bash -score-k8s --quiet -``` - -#### `--verbose count` | `-v` - -Increases log verbosity and detail by specifying this flag one or more times. - -```bash -score-k8s --verbose count -``` - -#### `--version` - -Displays the version of score-k8s. - -```bash -score-k8s --version -``` diff --git a/content/en/docs/score implementation/score-k8s/_index.md b/content/en/docs/score implementation/score-k8s/_index.md new file mode 100644 index 00000000..f6e2b59f --- /dev/null +++ b/content/en/docs/score implementation/score-k8s/_index.md @@ -0,0 +1,10 @@ +--- +title: "score-k8s" +linkTitle: "score-k8s" +description: "Get started with the score-k8s reference implementation" +weight: 2 +--- + +The `score-k8s` CLI serves as a reference implementation for the Score specification, providing a standard for the creation of custom Score CLIs. `score-k8s` can be utilized both as a reference point for implementation and for practical use in development with Kubernetes. + +For additional details and opportunities to contribute to the project, visit the [`score-k8s`](https://github.com/score-spec/score-k8s) GitHub repository. \ No newline at end of file diff --git a/content/en/docs/score implementation/score-k8s/cli.md b/content/en/docs/score implementation/score-k8s/cli.md new file mode 100644 index 00000000..f5ae31bb --- /dev/null +++ b/content/en/docs/score implementation/score-k8s/cli.md @@ -0,0 +1,150 @@ +--- +title: "score-k8s CLI reference" +linkTitle: "CLI reference" +description: "CLI reference for score-k8s" +weight: 2 +aliases: +- /docs/reference/score-cli/score-k8s/cli +--- + +The `score-k8s` CLI provides a set of commands and flags to enable the generation of Kubernetes manifests from Score specifications. + +## Commands + +## `init` + +The `init` command will prepare the current directory for working with `score-k8s` and write the initial empty state and default provisioners file into the `'.score-k8s'` subdirectory. The `'.score-k8s'` directory contains state that will be used to generate any Kubernetes resource manifests including potentially sensitive data and raw secrets, so this should not be checked into generic source control. + +```bash +score-k8s init [flags] +``` + +#### Flags + +The `init` command can be combined with the following flags: + +#### `--file` | `-f` + +Specifies a Score file to initialize. By default this is `./score.yaml`. + +```bash +score-k8s init --file custom_file_name.yaml +``` + +#### `--no-sample` + +Disables the generation of the sample Score file if you already have a Score file in place. + +```bash +score-k8s init --no-sample +``` + +#### `--help` | `-h` + +Displays help information for `init`, providing a short description of the command along with examples and compatible flags. + +```bash +score-k8s init --help +``` + +## `generate` + +The `generate` command will convert Score files in the current Score state into a combined set of Kubernetes manifests. All resources and links between Workloads will be resolved and provisioned as required. `score-k8s init` must be run first. An error will be thrown if the project directory is not present. + +```bash +score-k8s generate [flags] +``` + +#### Flags + +The `generate` command can be combined with the following flags: + +#### `--image` + +Specifies an optional container image to use for any container with `image == '.'`. + +```bash +score-k8s generate --image your_container_image +``` + +#### `--output` | `-o` + +Specifies the output file to write the manifest to. By default, the output file is named `manifest.yaml`. + +```bash +score-k8s generate --output your_output_file.yaml +``` + +#### `--override-property` + +Specifies an optional set of path=key overrides to set or remove. + +```bash +score-k8s generate --override-property path1=value1 +``` + +#### `--overrides-file` + +Specifies an optional file of Score overrides to merge in. + +```bash +score-k8s generate score.yaml --overrides-file=./overrides.score.yaml +``` + +#### `--patch-manifests` + +Specifies an optional set of `//path=key` operations for the output manifests. + +```bash +score-k8s generate --patch-manifests 'Deployment/my-workload/spec.replicas=3' +``` + +#### `--help` | `-h` + +Displays help information for `generate`, providing a short description of the command along with examples and compatible flags. + +```bash +score-k8s generate --help +``` + +## `help` + +The `help` command provides information on all commands. + +```bash +score-k8s help [command] [flags] +``` + +## Global flags + +#### `--help` | `-h` + +Displays help information for `score-k8s`, includig available commands and flags. + +```bash +score-k8s --help +``` + +#### `--quiet` + +Mutes any logging output. + +```bash +score-k8s --quiet +``` + +#### `--verbose count` | `-v` + +Increases log verbosity and detail by specifying this flag one or more times. + +```bash +score-k8s --verbose count +``` + +#### `--version` + +Displays the version of `score-k8s`. + +```bash +score-k8s --version +``` diff --git a/content/en/docs/score implementation/score-k8s/installation.md b/content/en/docs/score implementation/score-k8s/installation.md new file mode 100644 index 00000000..2e5dd70c --- /dev/null +++ b/content/en/docs/score implementation/score-k8s/installation.md @@ -0,0 +1,41 @@ +--- +title: "score-k8s installation" +linkTitle: "Installation" +description: "Installation of score-k8s" +weight: 1 +aliases: +- /docs/reference/score-cli/score-k8s/install +--- + +You can install the `score-k8s` CLI in a variety of ways: + +- [Homebrew](#homebrew) +- [Go](#go) +- [Manual download](#manual-download) + +### Homebrew + +Prerequisites: You must have [brew](https://brew.sh) installed. + +```bash +brew install score-spec/tap/score-k8s +``` + +### Go + +Prerequisites: You must have [Go](https://go.dev/dl/) installed. + +```bash +$ go install -v github.com/score-spec/score-k8s@latest +``` + +### Manual download + +The following methods download the `score-k8s` CLI from its [GitHub release page](https://github.com/score-spec/score-k8s/releases): + +{{< tabs name="Manual installation methods">}} +{{< tab name="curl on macOS" include="../included/install-score-k8s-curl-mac.md" />}} +{{< tab name="wget on macOS/Linux" include="../included/install-wget-k8s.md" />}} +{{< tab name="GitHub DLs on macOS/Linux" include="../included/install-score-k8s-bash.md" />}} +{{< tab name="Windows" include="../included/install-windows-k8s.md" />}} +{{< /tabs >}} \ No newline at end of file diff --git a/content/en/docs/score implementation/score-k8s/resources-provisioners.md b/content/en/docs/score implementation/score-k8s/resources-provisioners.md new file mode 100644 index 00000000..7647120a --- /dev/null +++ b/content/en/docs/score implementation/score-k8s/resources-provisioners.md @@ -0,0 +1,27 @@ +--- +title: "score-k8s resources provisioners" +linkTitle: "Resources provisioners" +description: "resources provisioners of score-k8s" +weight: 3 +aliases: +- /docs/reference/score-cli/score-k8s/provisioners +- /docs/reference/score-cli/score-k8s/resources-provisioners +- /docs/reference/score-cli/score-k8s/resources +--- + +`score-k8s` comes with out-of-the-box support for: + +| Type | Class | Params | Output | +| --------------- | --------- | ---------------------- |-----------------------------------------------------------------| +| `ampq` | `default` | (none) | `host`, `port`, `username`, `password`, `vhost` | +| `dns` | `default` | (none) | `host` | +| `mongodb` | `default` | (none) | `host`, `port`, `username`, `password`, `name`, `connection` | +| `mysql` | `default` | (none) | `host`, `port`, `name` (aka `database`), `username`, `password` | +| `postgres` | `default` | (none) | `host`, `port`, `name` (aka `database`), `username`, `password` | +| `redis` | `default` | (none) | `host`, `port`, `username`, `password` | +| `route` | `default` | `host`, `path`, `port` | | +| `volume` | `default` | (none) | `source` | + +These can be found in the default provisioners file. You are encouraged to write your own provisioners and add them to the `.score-k8s` directory (with the `.provisioners.yaml` extension) or contribute them upstream to the [default.provisioners.yaml](https://github.com/score-spec/score-k8s/blob/main/internal/provisioners/default/zz-default.provisioners.yaml) file. + +Users are encouraged to write their own custom provisioners to support new resource types or to modify the implementations above. See [example here](https://score.dev/blog/writing-a-custom-score-compose-provisioner-for-apache-kafka/). \ No newline at end of file From e6e6e295e0079420316d3380fa98fef963f7e89a Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Wed, 16 Oct 2024 13:00:32 +0000 Subject: [PATCH 2/6] dprint fmt Signed-off-by: Mathieu Benoit --- .../score-compose/_index.md | 2 +- .../score implementation/score-compose/cli.md | 4 ++-- .../score-compose/examples.md | 2 +- .../score-compose/installation.md | 2 +- .../score-compose/resources-provisioners.md | 2 +- .../score implementation/score-k8s/_index.md | 2 +- .../score-k8s/installation.md | 2 +- .../score-k8s/resources-provisioners.md | 22 +++++++++---------- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/content/en/docs/score implementation/score-compose/_index.md b/content/en/docs/score implementation/score-compose/_index.md index f74b2915..923e9133 100644 --- a/content/en/docs/score implementation/score-compose/_index.md +++ b/content/en/docs/score implementation/score-compose/_index.md @@ -12,4 +12,4 @@ aliases: The `score-compose` serves as a reference implementation for the Score specification, providing a standard for the creation of custom Score CLIs. `score-compose` can be utilized both as a reference point for implementation and for practical use in local development with Docker Compose. -For additional details and opportunities to contribute to the project, visit the [`score-compose`](https://github.com/score-spec/score-compose) GitHub repository. \ No newline at end of file +For additional details and opportunities to contribute to the project, visit the [`score-compose`](https://github.com/score-spec/score-compose) GitHub repository. diff --git a/content/en/docs/score implementation/score-compose/cli.md b/content/en/docs/score implementation/score-compose/cli.md index eed9ef0d..b3f54377 100644 --- a/content/en/docs/score implementation/score-compose/cli.md +++ b/content/en/docs/score implementation/score-compose/cli.md @@ -49,7 +49,7 @@ score-compose init --project score-compose2 #### `--provisioners` | `-p` -Loads additional provisoners from a remote url. May be specified multiple times. Supports http://host/file, https://host/file, git-ssh://git@host/repo.git/file, and git-https://host/repo.git/file formats. +Loads additional provisoners from a remote url. May be specified multiple times. Supports http://host/file, https://host/file, git-ssh://git@host/repo.git/file, and git-https://host/repo.git/file formats. ```bash score-compose init --provisioners https://raw.githubusercontent.com/user/repo/main/example.yaml @@ -264,4 +264,4 @@ Displays the version of score-compose. ```bash score-compose --version -``` \ No newline at end of file +``` diff --git a/content/en/docs/score implementation/score-compose/examples.md b/content/en/docs/score implementation/score-compose/examples.md index f5dd058e..d9f2df30 100644 --- a/content/en/docs/score implementation/score-compose/examples.md +++ b/content/en/docs/score implementation/score-compose/examples.md @@ -9,4 +9,4 @@ aliases: Explore a variety of examples for `score-compose`, ranging from simple "hello world" setups to more complex configurations, including resource provisioning and multiple workloads. You can find these examples in our [examples library](https://github.com/score-spec/score-compose/tree/main/examples). -If you encounter any issues or have questions, feel free to reach out to us in the the [Score](https://cloud-native.slack.com/archives/C07DN0D1UCW) channel on the CNCF Slack (). \ No newline at end of file +If you encounter any issues or have questions, feel free to reach out to us in the the [Score](https://cloud-native.slack.com/archives/C07DN0D1UCW) channel on the CNCF Slack (). diff --git a/content/en/docs/score implementation/score-compose/installation.md b/content/en/docs/score implementation/score-compose/installation.md index 9340b8e0..8f8ff0c9 100644 --- a/content/en/docs/score implementation/score-compose/installation.md +++ b/content/en/docs/score implementation/score-compose/installation.md @@ -76,4 +76,4 @@ The following methods download the `score-compose` CLI from its [GitHub release {{< tab name="wget on macOS/Linux" include="../included/install-wget-compose.md" />}} {{< tab name="GitHub DLs on macOS/Linux" include="../included/install-score-compose-bash.md" />}} {{< tab name="Windows" include="../included/install-windows-compose.md" />}} -{{< /tabs >}} \ No newline at end of file +{{< /tabs >}} diff --git a/content/en/docs/score implementation/score-compose/resources-provisioners.md b/content/en/docs/score implementation/score-compose/resources-provisioners.md index a931d9ce..9760f057 100644 --- a/content/en/docs/score implementation/score-compose/resources-provisioners.md +++ b/content/en/docs/score implementation/score-compose/resources-provisioners.md @@ -29,4 +29,4 @@ aliases: These can be found in the default provisioners file. You are encouraged to write your own provisioners and add them to the `.score-compose` directory (with the `.provisioners.yaml` extension) or contribute them upstream to the [default.provisioners.yaml](https://github.com/score-spec/score-compose/blob/main/internal/command/default.provisioners.yaml) file. -Users are encouraged to write their own custom provisioners to support new resource types or to modify the implementations above. See [example here](https://score.dev/blog/writing-a-custom-score-compose-provisioner-for-apache-kafka/). \ No newline at end of file +Users are encouraged to write their own custom provisioners to support new resource types or to modify the implementations above. See [example here](https://score.dev/blog/writing-a-custom-score-compose-provisioner-for-apache-kafka/). diff --git a/content/en/docs/score implementation/score-k8s/_index.md b/content/en/docs/score implementation/score-k8s/_index.md index f6e2b59f..02d510af 100644 --- a/content/en/docs/score implementation/score-k8s/_index.md +++ b/content/en/docs/score implementation/score-k8s/_index.md @@ -7,4 +7,4 @@ weight: 2 The `score-k8s` CLI serves as a reference implementation for the Score specification, providing a standard for the creation of custom Score CLIs. `score-k8s` can be utilized both as a reference point for implementation and for practical use in development with Kubernetes. -For additional details and opportunities to contribute to the project, visit the [`score-k8s`](https://github.com/score-spec/score-k8s) GitHub repository. \ No newline at end of file +For additional details and opportunities to contribute to the project, visit the [`score-k8s`](https://github.com/score-spec/score-k8s) GitHub repository. diff --git a/content/en/docs/score implementation/score-k8s/installation.md b/content/en/docs/score implementation/score-k8s/installation.md index 2e5dd70c..ebd04d64 100644 --- a/content/en/docs/score implementation/score-k8s/installation.md +++ b/content/en/docs/score implementation/score-k8s/installation.md @@ -38,4 +38,4 @@ The following methods download the `score-k8s` CLI from its [GitHub release page {{< tab name="wget on macOS/Linux" include="../included/install-wget-k8s.md" />}} {{< tab name="GitHub DLs on macOS/Linux" include="../included/install-score-k8s-bash.md" />}} {{< tab name="Windows" include="../included/install-windows-k8s.md" />}} -{{< /tabs >}} \ No newline at end of file +{{< /tabs >}} diff --git a/content/en/docs/score implementation/score-k8s/resources-provisioners.md b/content/en/docs/score implementation/score-k8s/resources-provisioners.md index 7647120a..60698b2e 100644 --- a/content/en/docs/score implementation/score-k8s/resources-provisioners.md +++ b/content/en/docs/score implementation/score-k8s/resources-provisioners.md @@ -11,17 +11,17 @@ aliases: `score-k8s` comes with out-of-the-box support for: -| Type | Class | Params | Output | -| --------------- | --------- | ---------------------- |-----------------------------------------------------------------| -| `ampq` | `default` | (none) | `host`, `port`, `username`, `password`, `vhost` | -| `dns` | `default` | (none) | `host` | -| `mongodb` | `default` | (none) | `host`, `port`, `username`, `password`, `name`, `connection` | -| `mysql` | `default` | (none) | `host`, `port`, `name` (aka `database`), `username`, `password` | -| `postgres` | `default` | (none) | `host`, `port`, `name` (aka `database`), `username`, `password` | -| `redis` | `default` | (none) | `host`, `port`, `username`, `password` | -| `route` | `default` | `host`, `path`, `port` | | -| `volume` | `default` | (none) | `source` | +| Type | Class | Params | Output | +| ---------- | --------- | ---------------------- | --------------------------------------------------------------- | +| `ampq` | `default` | (none) | `host`, `port`, `username`, `password`, `vhost` | +| `dns` | `default` | (none) | `host` | +| `mongodb` | `default` | (none) | `host`, `port`, `username`, `password`, `name`, `connection` | +| `mysql` | `default` | (none) | `host`, `port`, `name` (aka `database`), `username`, `password` | +| `postgres` | `default` | (none) | `host`, `port`, `name` (aka `database`), `username`, `password` | +| `redis` | `default` | (none) | `host`, `port`, `username`, `password` | +| `route` | `default` | `host`, `path`, `port` | | +| `volume` | `default` | (none) | `source` | These can be found in the default provisioners file. You are encouraged to write your own provisioners and add them to the `.score-k8s` directory (with the `.provisioners.yaml` extension) or contribute them upstream to the [default.provisioners.yaml](https://github.com/score-spec/score-k8s/blob/main/internal/provisioners/default/zz-default.provisioners.yaml) file. -Users are encouraged to write their own custom provisioners to support new resource types or to modify the implementations above. See [example here](https://score.dev/blog/writing-a-custom-score-compose-provisioner-for-apache-kafka/). \ No newline at end of file +Users are encouraged to write their own custom provisioners to support new resource types or to modify the implementations above. See [example here](https://score.dev/blog/writing-a-custom-score-compose-provisioner-for-apache-kafka/). From 6aa258c66cbb3121138b6e785d5a55b39c2fb277 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Wed, 16 Oct 2024 13:37:09 +0000 Subject: [PATCH 3/6] score-helm is deprecated Signed-off-by: Mathieu Benoit --- content/en/docs/How to/github.md | 4 ++-- .../docs/How to/included/optional-score-configs-bash-mac.md | 2 +- content/en/docs/score specification/score-schema-reference.md | 2 +- styles/Vocab/Base/accept.txt | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/content/en/docs/How to/github.md b/content/en/docs/How to/github.md index e0a7c8cf..0b4b7c8d 100644 --- a/content/en/docs/How to/github.md +++ b/content/en/docs/How to/github.md @@ -34,9 +34,9 @@ This will download and cache the specified version of the `score-compose` CLI an The action accepts the following inputs: -- `file` - The Score CLI tool to install. For example `score-compose` or `score-helm`. +- `file` - The Score CLI tool to install. For example `score-compose` or `score-k8s`. -- `version` - The version of the CLI to install. You can retrieve the latest version from the release page of the respective CLI tool you're working with. For example [score-compose releases](https://github.com/score-spec/score-compose/releases) or [score-helm releases](https://github.com/score-spec/score-helm/releases). +- `version` - The version of the CLI to install. You can retrieve the latest version from the release page of the respective CLI tool you're working with. For example [score-compose releases](https://github.com/score-spec/score-compose/releases) or [score-k8s releases](https://github.com/score-spec/score-k8s/releases). - `token` - The Github Actions Token in the environment (`${{ secrets.GITHUB_TOKEN }}`). diff --git a/content/en/docs/How to/included/optional-score-configs-bash-mac.md b/content/en/docs/How to/included/optional-score-configs-bash-mac.md index 2df9ba73..50b2b50a 100644 --- a/content/en/docs/How to/included/optional-score-configs-bash-mac.md +++ b/content/en/docs/How to/included/optional-score-configs-bash-mac.md @@ -53,7 +53,7 @@ You now have to ensure that the Score completion script gets sourced in all your ``` ```bash - echo 'source <(score-helm completion bash)' >>~/.bash_profile + echo 'source <(score-k8s completion bash)' >>~/.bash_profile ``` - Add the completion script to the `/usr/local/etc/bash_completion.d` directory: diff --git a/content/en/docs/score specification/score-schema-reference.md b/content/en/docs/score specification/score-schema-reference.md index 779eb04b..7a8c25b0 100644 --- a/content/en/docs/score specification/score-schema-reference.md +++ b/content/en/docs/score specification/score-schema-reference.md @@ -8,7 +8,7 @@ aliases: - /docs/reference/score-schema-reference/ --- -The Score schema is a JSON schema that defines the structure of a Score file. It's used to validate the Score file before an implementation CLI (such as `score-compose` or `score-helm`) is executed. +The Score schema is a JSON schema that defines the structure of a Score file. It's used to validate the Score file before an implementation CLI (such as `score-compose` or `score-k8s`) is executed. The Score implementation CLI validates the Score file against the schema before generating the platform-specific configuration, by default. - For access to the full schema, visit the repository [here](https://github.com/score-spec/spec/blob/main/score-v1b1.json). diff --git a/styles/Vocab/Base/accept.txt b/styles/Vocab/Base/accept.txt index 6685c2a7..f8ac7dee 100644 --- a/styles/Vocab/Base/accept.txt +++ b/styles/Vocab/Base/accept.txt @@ -2,4 +2,5 @@ Humanitec glossary_tooltip score-humanitec score-helm -score-compose \ No newline at end of file +score-compose +score-k8s \ No newline at end of file From dbc5aa44c1e779e4e19b4936c9fb32cc26a9333c Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Wed, 16 Oct 2024 13:48:29 +0000 Subject: [PATCH 4/6] Fix links Signed-off-by: Mathieu Benoit --- content/en/docs/get started/_index.md | 12 ++++++------ content/en/docs/overview/_index.md | 6 +++--- content/en/docs/overview/score-for-devs.md | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/content/en/docs/get started/_index.md b/content/en/docs/get started/_index.md index f4499783..bf3d2562 100644 --- a/content/en/docs/get started/_index.md +++ b/content/en/docs/get started/_index.md @@ -11,11 +11,11 @@ aliases: ## Overview -If you're new to Score, we recommend starting with the [score-compose](https://github.com/score-spec/score-compose) reference implementation. It provides a helpful blueprint for using Score and allows you to become familiar with the [Score specification](/docs/score-specification/score-spec-reference) before exploring further implementation options. +If you're new to Score, we recommend starting with the [`score-compose`](https://github.com/score-spec/score-compose) reference implementation. It provides a helpful blueprint for using Score and allows you to become familiar with the [Score specification](/docs/score-specification/score-spec-reference) before exploring further implementation options. -## Hello world with score-compose +## Hello world with `score-compose` -**1.** To begin, follow the [installation instructions](/docs/score-implementation/score-compose#installation) to install the latest version of score-compose. +**1.** To begin, follow the [installation instructions](/docs/score-implementation/score-compose/installation) to install the latest version of `score-compose`. **2.** Open your IDE and paste in the following `score.yaml` file, which describes a simple service based on a `busybox` Docker image: @@ -76,10 +76,10 @@ Congrats! You’ve successfully run your first Score Implementation with a Hello ## Next steps -- **Explore more examples**: Check out the [examples folder](https://github.com/score-spec/score-compose/tree/main/examples) for score-compose to dive into further use cases and experiment with different configurations. +- **Explore more examples**: Check out the [examples folder](https://github.com/score-spec/score-compose/tree/main/examples) for `score-compose` to dive into further use cases and experiment with different configurations. -- **Learn more about score-compose**: Investigate the inner workings of the score-compose reference implementation by exploring its CLI reference [here](/docs/score-implementation/score-compose#cli-reference). +- **Learn more about `score-compose`**: Investigate the inner workings of the `score-compose` reference implementation by exploring its CLI reference [here](/docs/score-implementation/score-compose/cli). -- **Explore other implementations**: Play around with [other available open-source Score implementations](/docs/score-implementation/). For example, you could continue by running the same Score file used in the example above via the score-k8s CLI to generate a Kubernetes manifest. +- **Explore other implementations**: Play around with [other available open-source Score implementations](/docs/score-implementation/). For example, you could continue by running the same Score file used in the example above via the `score-k8s` CLI to generate a Kubernetes manifest. - **Join the Score community Slack**: If you encounter any issues or have questions, feel free to reach out to us in the [Score](https://cloud-native.slack.com/archives/C07DN0D1UCW) channel on the CNCF Slack (). diff --git a/content/en/docs/overview/_index.md b/content/en/docs/overview/_index.md index ed47764a..405d4839 100644 --- a/content/en/docs/overview/_index.md +++ b/content/en/docs/overview/_index.md @@ -69,13 +69,13 @@ The Score specification is characterised by being: ## How does Score work? -The Score Specification can be run against a Score Implementation (CLI) such as [score-compose](/docs/score-implementation/score-compose) or [score-k8s](/docs/score-implementation/score-k8s/) to generate a platform configuration file such as `docker-compose.yaml` or a Kubernetes `manifest.yaml` file. +The Score Specification can be run against a Score Implementation (CLI) such as [`score-compose`](/docs/score-implementation/score-compose) or [`score-k8s`](/docs/score-implementation/score-k8s/) to generate a platform configuration file such as `docker-compose.yaml` or a Kubernetes `manifest.yaml` file. The generated configuration file can then be combined with environment-specific parameters to run the workload in the target environment. ![how-score-works](/images/how-score-works.png) -For more hands-on examples, visit the [examples library](https://github.com/score-spec/score-compose/tree/main/examples) available for score-compose. +For more hands-on examples, visit the [examples library](https://github.com/score-spec/score-compose/tree/main/examples) available for `score-compose`. ## Benefits @@ -85,7 +85,7 @@ Score reduces cognitive load by providing a single, easy to understand specifica ### Eliminates configuration mismanagement -Development teams risk configuration inconsistencies when promoting workloads between environments that run on different technology stacks. For example, if you're running a testing environment with Docker Compose and a production environment on Kubernetes, keeping your Wwrkloads' configuration in sync can be challenging as each platform comes with its own set of APIs, semantics, syntax and configuration constructs. With Score, developers describe their workloads once with `score.yaml` and any required platform-specific configuration can be automatically generated via a Score Implementation (e.g. score-compose or score-k8s). This significantly reduces the risk of configuration mismatch between environments. +Development teams risk configuration inconsistencies when promoting workloads between environments that run on different technology stacks. For example, if you're running a testing environment with Docker Compose and a production environment on Kubernetes, keeping your Wwrkloads' configuration in sync can be challenging as each platform comes with its own set of APIs, semantics, syntax and configuration constructs. With Score, developers describe their workloads once with `score.yaml` and any required platform-specific configuration can be automatically generated via a Score Implementation (e.g. `score-compose` or `score-k8s`). This significantly reduces the risk of configuration mismatch between environments. ### Enables separation of concerns diff --git a/content/en/docs/overview/score-for-devs.md b/content/en/docs/overview/score-for-devs.md index 1264a84f..f9d858c5 100644 --- a/content/en/docs/overview/score-for-devs.md +++ b/content/en/docs/overview/score-for-devs.md @@ -51,11 +51,11 @@ resources: port: 8080 ``` -You can now use this Score file for deploying your workload to a specific platform such as Docker Compose or Kubernetes. Run it through a Score implementation CLI to generate the configuration manifests, and apply them using the standard platform tooling. In the graphic below, this process is illustrated with our reference implementations: [score-compose](https://github.com/score-spec/score-compose) (for Docker Compose files) and [score-kubernetes](https://github.com/score-spec/score-k8s) (for Kubernetes manifests). +You can now use this Score file for deploying your workload to a specific platform such as Docker Compose or Kubernetes. Run it through a Score implementation CLI to generate the configuration manifests, and apply them using the standard platform tooling. In the graphic below, this process is illustrated with our reference implementations: [`score-compose`](https://github.com/score-spec/score-compose) (for Docker Compose files) and [`score-k8s`](https://github.com/score-spec/score-k8s) (for Kubernetes manifests). ![how-score-works](/images/how-score-works.png) -If you’re curious about how this looks in practice, check out the recording below where we walk through examples using [score-compose](https://github.com/score-spec/score-compose) and [score-k8s](https://github.com/score-spec/score-k8s) to generate manifests for Docker Compose and Kubernetes, both derived from the same Score spec. +If you’re curious about how this looks in practice, check out the recording below where we walk through examples using [`score-compose`](https://github.com/score-spec/score-compose) and [`score-k8s`](https://github.com/score-spec/score-k8s) to generate manifests for Docker Compose and Kubernetes, both derived from the same Score spec.
@@ -67,7 +67,7 @@ When working with Score, there are three main components to consider: - **The Score file**: A file based on the Score specification that is used to describe your workload’s configuration declaratively. The spec is platform-agnostic, enabling you to use common language and not having to worry about platform-specific syntax from container orchestration tooling like Kubernetes. -- **A Score Implementation**: An implementation, typically a CLI, of the Score specification for target platforms such as Kubernetes, Helm or Google Cloud Run. It is typically developed and maintained by the platform team and can be utilised via a simple set of commands such as score- to generate the required config file. +- **A Score Implementation**: An implementation, typically a CLI, of the Score specification for target platforms such as Kubernetes, Helm or Google Cloud Run. It is typically developed and maintained by the platform team and can be utilised via a simple set of commands such as `score-` to generate the required config file. - **The platform configuration files**: The generated configuration file can be executed natively by the target platform. If needed it can be combined with environment-specific parameters to run the workload in the target environment. From 30322d4c80b0d9fa1f7032ad8e57ffb31258fa45 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Wed, 16 Oct 2024 20:41:38 -0400 Subject: [PATCH 5/6] Update _index.md - TNS blog post in community page Signed-off-by: Mathieu Benoit --- content/en/docs/community/_index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/en/docs/community/_index.md b/content/en/docs/community/_index.md index 2da6dc5f..c1f824bc 100644 --- a/content/en/docs/community/_index.md +++ b/content/en/docs/community/_index.md @@ -37,6 +37,7 @@ We host [regular community meetings](https://github.com/score-spec/spec?tab=read ## Read external blog posts about Score - [What if the `Azure-Samples/aks-store-demo` was using Score?](https://itnext.io/what-if-the-azure-samples-aks-store-demo-was-using-score-655c55f1c3dd) +- [Score: New CNCF Sandbox Tool for Infrastructure-Centric Dev](https://thenewstack.io/score-new-cncf-sandbox-tool-for-infrastructure-centric-dev/) - [Dapr with Score and Humanitec — Improving the Developer Experience of your Platform, on steroids!](https://medium.com/@mabenoit/dapr-with-score-and-humanitec-developer-experience-with-your-platform-on-steroids-a848f2de0a5a) - [Mastering Workload Specifications: Finding the Right Fit for Your Developers](https://www.infracloud.io/blogs/mastering-workload-specifications/) From 0efb192d5ca4f5eb6eba7f8fd5e9c0d0145bc78f Mon Sep 17 00:00:00 2001 From: Tobias Babin Date: Thu, 17 Oct 2024 08:18:20 +0200 Subject: [PATCH 6/6] Added aliases for removed implementations Signed-off-by: Tobias Babin --- content/en/docs/score implementation/_index.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/content/en/docs/score implementation/_index.md b/content/en/docs/score implementation/_index.md index fef53c68..74c65f34 100644 --- a/content/en/docs/score implementation/_index.md +++ b/content/en/docs/score implementation/_index.md @@ -5,4 +5,7 @@ weight: 3 aliases: - /docs/reference/score-cli/ - /docs/get-started/install +- /docs/score-implementation/other +- /docs/score-implementation/other/score-helm +- /docs/score-implementation/other/score-humanitec ---