From 7ef9dcbf505716436ea7ca94d8e26493e6d2fefe Mon Sep 17 00:00:00 2001 From: Elio Bischof Date: Fri, 15 Jul 2022 13:59:58 +0200 Subject: [PATCH] docs(installation): inline file contents (#3974) * docs(installation): align knative style * some fixes in configure section * show file contents inline --- .../guides/installation/configure/compose.mdx | 23 ++++++++++++--- .../installation/configure/configure.mdx | 3 +- .../guides/installation/configure/helm.mdx | 13 +++++++-- .../installation/configure/linuxunix.mdx | 20 ++++++++++--- ...g-example.md => loadbalancing-example.mdx} | 28 +++++++++++++++---- docs/docs/guides/installation/run/compose.mdx | 9 +++++- docs/docs/guides/installation/run/knative.mdx | 24 ++++++++-------- docs/docs/guides/installation/run/linux.mdx | 6 ++-- docs/package.json | 1 + docs/yarn.lock | 8 ++++++ 10 files changed, 104 insertions(+), 31 deletions(-) rename docs/docs/guides/installation/loadbalancing-example/{loadbalancing-example.md => loadbalancing-example.mdx} (71%) diff --git a/docs/docs/guides/installation/configure/compose.mdx b/docs/docs/guides/installation/configure/compose.mdx index 654498f023..ba9702542b 100644 --- a/docs/docs/guides/installation/configure/compose.mdx +++ b/docs/docs/guides/installation/configure/compose.mdx @@ -1,10 +1,25 @@ +import CodeBlock from '@theme/CodeBlock'; +import DockerComposeSource from '!!raw-loader!./docker-compose.yaml' +import ExampleZITADELConfigSource from '!!raw-loader!./example-zitadel-config.yaml' +import ExampleZITADELSecretsSource from '!!raw-loader!./example-zitadel-secrets.yaml' +import ExampleZITADELInitStepsSource from '!!raw-loader!./example-zitadel-init-steps.yaml' + The docker compose example mounts the example zitadel configuration files to the ZITADEL container. By executing the commands below, you will download the following files: -- [docker-compose.yaml](./docker-compose.yaml) -- [example-zitadel-config.yaml](./example-zitadel-config.yaml) -- [example-zitadel-secrets.yaml](./example-zitadel-secrets.yaml) -- [example-zitadel-init-steps.yaml](./example-zitadel-init-steps.yaml) + +
docker-compose.yaml + {DockerComposeSource} +
+
example-zitadel-config.yaml + {ExampleZITADELConfigSource} +
+
example-zitadel-secrets.yaml + {ExampleZITADELSecretsSource} +
+
example-zitadel-init-steps.yaml + {ExampleZITADELInitStepsSource} +
```bash # Download the docker compose example configuration for a secure CockroachDB. For example: diff --git a/docs/docs/guides/installation/configure/configure.mdx b/docs/docs/guides/installation/configure/configure.mdx index 15db50eb24..7f06b44667 100644 --- a/docs/docs/guides/installation/configure/configure.mdx +++ b/docs/docs/guides/installation/configure/configure.mdx @@ -48,9 +48,8 @@ You can pass the masterkey in either of three possible ways to the zitadel binar example-zitadel-values.yaml + {ExampleZITADELValuesSource} + +
example-zitadel-values-secrets.yaml + {ExampleZITADELValuesSecretsSource} +
```bash # Download and adjust the example configuration file containing standard configuration diff --git a/docs/docs/guides/installation/configure/linuxunix.mdx b/docs/docs/guides/installation/configure/linuxunix.mdx index 366fc006d2..22589f4ba2 100644 --- a/docs/docs/guides/installation/configure/linuxunix.mdx +++ b/docs/docs/guides/installation/configure/linuxunix.mdx @@ -1,9 +1,21 @@ +import CodeBlock from '@theme/CodeBlock'; +import ExampleZITADELConfigSource from '!!raw-loader!./example-zitadel-config.yaml' +import ExampleZITADELSecretsSource from '!!raw-loader!./example-zitadel-secrets.yaml' +import ExampleZITADELInitStepsSource from '!!raw-loader!./example-zitadel-init-steps.yaml' + ### Configure by Files By executing the commands below, you will download the following files: -- [example-zitadel-config.yaml](./example-zitadel-config.yaml) -- [example-zitadel-secrets.yaml](./example-zitadel-secrets.yaml) -- [example-zitadel-init-steps.yaml](./example-zitadel-init-steps.yaml) + +
example-zitadel-config.yaml + {ExampleZITADELConfigSource} +
+
example-zitadel-secrets.yaml + {ExampleZITADELSecretsSource} +
+
example-zitadel-init-steps.yaml + {ExampleZITADELInitStepsSource} +
```bash # Download and adjust the example configuration file containing standard configuration @@ -44,5 +56,5 @@ export ZITADEL_S3DEFAULTINSTANCE_ORG_HUMAN_PASSWORD="RootPassword1!" export ZITADEL_MASTERKEY="$(tr -dc A-Za-z0-9 docker-compose.yaml + {DockerComposeSource} + +
example-traefik.yaml + {ExampleTraefikSource} +
+
example-zitadel-config.yaml + {ExampleZITADELConfigSource} +
+
example-zitadel-secrets.yaml + {ExampleZITADELSecretsSource} +
+
example-zitadel-init-steps.yaml + {ExampleZITADELInitStepsSource} +
```bash # Download the docker compose example configuration. For example: diff --git a/docs/docs/guides/installation/run/compose.mdx b/docs/docs/guides/installation/run/compose.mdx index 86b63263f9..e5b3fbe672 100644 --- a/docs/docs/guides/installation/run/compose.mdx +++ b/docs/docs/guides/installation/run/compose.mdx @@ -1,6 +1,13 @@ +import CodeBlock from '@theme/CodeBlock'; +import DockerComposeSource from '!!raw-loader!./docker-compose.yaml' + The setup is tested against Docker version 20.10.17 and Docker Compose version v2.2.3 -By executing the commands below, you will download the file [docker-compose.yaml](./docker-compose.yaml) +By executing the commands below, you will download the following file: + +
docker-compose.yaml + {DockerComposeSource} +
```bash # Download the docker compose example configuration. For example: diff --git a/docs/docs/guides/installation/run/knative.mdx b/docs/docs/guides/installation/run/knative.mdx index 32a29e9fd1..28a77221c2 100644 --- a/docs/docs/guides/installation/run/knative.mdx +++ b/docs/docs/guides/installation/run/knative.mdx @@ -6,16 +6,16 @@ Follow the [Knative quickstart guide](https://knative.dev/docs/getting-started/q It is basically 4 commands on Mac: ```bash -#install knative +# Install knative brew install knative/client/kn -#install knative quickstart sandbox +# Install knative quickstart sandbox brew install knative-sandbox/kn-plugins/quickstart -#install kind +# Install kind brew install kind -#install quickstart cluster +# Install quickstart cluster kn quickstart kind ``` That will get you a ready to go knative/kubernetes environment. @@ -29,11 +29,11 @@ kubectl apply -f https://raw.githubusercontent.com/zitadel/zitadel/v2-alpha/depl ``` -## Start ZITADEL with Knative +## Start ZITADEL with Knative + +Either use the kn binary... + ```bash - -# start zitadel - kn service create zitadel \ --image ghcr.io/zitadel/zitadel:v2.0.0-v2-alpha.39-amd64 \ --port 8080 \ @@ -46,15 +46,17 @@ kn service create zitadel \ --arg "start-from-init" --arg "--masterkey" --arg "MasterkeyNeedsToHave32Characters" ``` -or use the knative service yaml +... or use the knative service yaml ```bash kubectl apply -f https://raw.githubusercontent.com/zitadel/zitadel/v2-alpha/deploy/knative/zitadel-knative-service.yaml ``` -## Get started with ZIDATEL +## Get started with ZITADEL + +Get ZITADEL URL + ```bash -#get ZIDATEL URL kn services list NAME URL LATEST AGE CONDITIONS READY REASON diff --git a/docs/docs/guides/installation/run/linux.mdx b/docs/docs/guides/installation/run/linux.mdx index 5652d5d419..819de99ff2 100644 --- a/docs/docs/guides/installation/run/linux.mdx +++ b/docs/docs/guides/installation/run/linux.mdx @@ -3,12 +3,14 @@ Download a `cockroach` binary as described [in the CockroachDB docs](https://www.cockroachlabs.com/docs/v22.1/install-cockroachdb). ZITADEL is tested against CockroachDB v22.1.0 and Ubuntu 20.04. -## Run CockroachDB and ZITADEL +## Run CockroachDB ```bash -# Run a CockroachDB instance cockroach start-single-node --insecure --background --http-addr :9090 --listen-addr=localhost +``` +## Run ZITADEL +```bash # Download the zitadel binary curl -s https://api.github.com/repos/zitadel/zitadel/releases/tags/v2.0.0-v2-alpha.39 | grep "browser_download_url.*zitadel_Linux_$(uname -i).tar.gz" | cut -d '"' -f 4 | xargs wget -qO - | sudo tar --extract --gzip --overwrite --directory /usr/local/bin zitadel && sudo chown $(id -u):$(id -g) /usr/local/bin/zitadel diff --git a/docs/package.json b/docs/package.json index 8be38247f6..bac30c0d4f 100644 --- a/docs/package.json +++ b/docs/package.json @@ -140,6 +140,7 @@ "postcss-zindex": "5.1.0", "prismjs": "1.28.0", "raw-body": "2.5.1", + "raw-loader": "^4.0.2", "react": "^17.0.2", "react-dev-utils": "12.0.1", "react-dom": "^17.0.2", diff --git a/docs/yarn.lock b/docs/yarn.lock index 0aba367184..cf47fd1ff5 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -6578,6 +6578,14 @@ raw-body@2.5.1: iconv-lite "0.4.24" unpipe "1.0.0" +raw-loader@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-4.0.2.tgz#1aac6b7d1ad1501e66efdac1522c73e59a584eb6" + integrity sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA== + dependencies: + loader-utils "^2.0.0" + schema-utils "^3.0.0" + rc@^1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"