From 9e3231e039aa8b67ce53f0dd9ba0070708fd965e Mon Sep 17 00:00:00 2001 From: Chingis Sandanov Date: Wed, 23 Oct 2024 18:21:02 +0300 Subject: [PATCH] Wodby 2 documentation improvements --- 2.0/docs/apps/builds.md | 23 + 2.0/docs/apps/deploys.md | 18 + 2.0/docs/apps/endpoints.md | 4 +- 2.0/docs/apps/env.md | 14 + 2.0/docs/apps/tokens.md | 10 +- 2.0/docs/integrations/index.md | 48 +- 2.0/docs/integrations/providers.md | 7 + 2.0/docs/integrations/types.md | 62 + 2.0/docs/services/actions.md | 26 +- 2.0/docs/services/annotations.md | 3 + 2.0/docs/services/backups.md | 11 +- 2.0/docs/services/build.md | 16 + 2.0/docs/services/cron.md | 3 + 2.0/docs/services/endpoints.md | 12 + 2.0/docs/services/imports.md | 11 +- 2.0/docs/services/template.md | 1707 +++++++++++++++++++++++----- 2.0/docs/services/tokens.md | 2 +- 2.0/docs/services/types.md | 31 + 2.0/mkdocs.yml | 11 +- 19 files changed, 1665 insertions(+), 354 deletions(-) create mode 100644 2.0/docs/integrations/providers.md create mode 100644 2.0/docs/integrations/types.md create mode 100644 2.0/docs/services/annotations.md create mode 100644 2.0/docs/services/build.md create mode 100644 2.0/docs/services/cron.md create mode 100644 2.0/docs/services/endpoints.md create mode 100644 2.0/docs/services/types.md diff --git a/2.0/docs/apps/builds.md b/2.0/docs/apps/builds.md index c018098..bce348d 100644 --- a/2.0/docs/apps/builds.md +++ b/2.0/docs/apps/builds.md @@ -1,3 +1,26 @@ # Application builds +Some [services are buildable](../services/build.md), for such app services we expect a [CI system](../cicd/index.md) to build container images and trigger deployment via Wodby CLI. +## Build sources and buildable services + +1. There are app services that have a connected git repository from a git integration as a build source +2. There are associated app services that also buildable but do not have a build source. We expect users to build images from both of these services during a build and triggering a deployment that provides build information for both of those services + +A simple example will be an app with Nginx and PHP services, where a git repository that contains both backend and frontend connected to a PHP service. During the build in addition to backend build (e.g. composer) user can build frontend code (e.g. nodejs) for Nginx. After building container images for the both services a user will run a release (`wodby ci release` to push to associated docker registry) and deployment (`wodby ci deploy`). + +## Build info + +A build always provides the following information: + +- Main app service with the build source (git repository) that provides the build pipeline +- Build number +- Associated stack revision +- CI system that produced this build ([Wodby CI](../cicd/wodby-ci.md) by default) +- Associated git repository +- Related git commit information +- Resulting docker images that should be deployed + +## Needs rebuild + +Similar to [`needs_redeploy`](deploys.md#needs-redeploy) app instance with buildable services will be marked as `needs rebuild` when buildable services changed. It is to indicate although there were changes they may not have yet applied, for example an environment variable value changed that may affect the build process. diff --git a/2.0/docs/apps/deploys.md b/2.0/docs/apps/deploys.md index 1ee679f..c22836c 100644 --- a/2.0/docs/apps/deploys.md +++ b/2.0/docs/apps/deploys.md @@ -1,3 +1,21 @@ # Application Deployments +Deployments are selective and can be performed for specific services. During the first deployment all services deployed except buildable services. For buildable services the app instance's status set to `awaiting` until deployment with the build information triggered from [CI system](../cicd/index.md). +A deployment always associated with a specific revision of app instance's stack's revision. + +## Build deployment + +Deployments from CI system can be triggered with `wodby ci deploy` command. For build deployment request a new deployment created associated with the build. Associated build can have multiple app service builds associated. Deployment from CI can optionally disable run of post-deployment scripts for the built services. + +## New deployment + +A new application deployment can be manually run from _Apps > [App] > Deploys > New Deployment_ page. Services to include to the deployment can optionally be run with the force flag, for such deployments a random hash will be added to the Kubernetes annotations to force actual resources deployment even if there are no changes in manifests. Post-deployments are enabled by default for services that provide them but can be disabled. For buildable service last successful build selected by default but can be chosen to older builds as long as the build's associated stack revision and the current app instance's stack revision are the same. + +## Needs redeploy + +When app service's configuration changed app instance's will be marked as `needs redeploy`. It is to indicate that although changes has been done to the app services they are not yet applied. + +!!! warning "Auto redeployment" + + Please note that app instance can sometimes be redeployed automatically, for example when domains' certificates renewed the associated app services will be redeployed automatically when renewal succeeded. diff --git a/2.0/docs/apps/endpoints.md b/2.0/docs/apps/endpoints.md index fe04da7..807df88 100644 --- a/2.0/docs/apps/endpoints.md +++ b/2.0/docs/apps/endpoints.md @@ -8,9 +8,9 @@ Endpoints represent accessible endpoints to your app services. Endpoints consist By default, Wodby will generate technical domains for services in your application that have enabled HTTP routes. The technical domains built in the following way – `....wodby.app`. We will also automatically issue Let's Encrypt certificates for technical domains. Additionally, the main service with http routes will have a technical domain without a service name – `...wodby.app`. -### TLS Certificates +### SSL Certificates -Wodby provides a simple way to issue a TLS (SSL) certificate for a domain in your endpoint. Currently, we support only [Let's Encrypt](https://letsencrypt.org/) issuer. We will automatically renew Let's Encrypt certificates before they expire. You can also review all certificates that we issued from your organization settings page. +Wodby provides a simple way to issue a SSL (TLS) certificate for a domain in your endpoint. Currently, we support only [Let's Encrypt](https://letsencrypt.org/) issuer. We will automatically renew Let's Encrypt certificates before they expire. You can also review all certificates that we issued from your organization settings page. Custom certificates not currently supported. diff --git a/2.0/docs/apps/env.md b/2.0/docs/apps/env.md index ce607df..4c4b815 100644 --- a/2.0/docs/apps/env.md +++ b/2.0/docs/apps/env.md @@ -1,3 +1,17 @@ # Environment +Environment is the category of application instance designed to separate production, development, testing and staging. +Environments can be created by a user in addition to default environments. + +Environment has a type, at least one environment must per type. + +## Type + +The following environment types supported: + +- `dev` +- `prod` +- `staging` +- `testing` +- `feature` diff --git a/2.0/docs/apps/tokens.md b/2.0/docs/apps/tokens.md index 23da69d..82a4860 100644 --- a/2.0/docs/apps/tokens.md +++ b/2.0/docs/apps/tokens.md @@ -4,11 +4,11 @@ Tokens are text values that can have a plain value or a regular expression that In an app tokens compiled and overridden from different levels: -- Service defined tokens -- Stack service define tokens -- Stack-wide tokens -- App instance tokens -- App service tokens +1. Service defined tokens +2. Stack service define tokens +3. Stack-wide tokens +4. App instance tokens +5. App service tokens In addition to custom user-defined Wodby provides the following tokens available depending on the context: diff --git a/2.0/docs/integrations/index.md b/2.0/docs/integrations/index.md index e26b212..267fb91 100644 --- a/2.0/docs/integrations/index.md +++ b/2.0/docs/integrations/index.md @@ -1,6 +1,6 @@ # Integrations -Wodby provides native integration with third-party services through _providers_. _Integration_ represents a single connection between your Wodby account with your third-party service account. For example, you create a new integration of the AWS provider to connect your AWS account to Wodby to e.g. create a new EKS cluster. +Wodby provides native integration with third-party services through [providers](providers.md). _Integration_ represents a single connection between your Wodby account with your third-party service account. For example, you create a new integration of the AWS provider to connect your AWS account to Wodby to e.g. create a new EKS cluster. ## Provider @@ -8,48 +8,4 @@ Apart from [variable](variable.md) type providers, all providers offered and mai ## Types -Every provider can have multiple integration types it offers. When you create a new integration you can select which type you want to create. Supported integration types listed below: - -### Kubernetes - -- [Google Cloud Platform GKE](gcp.md#gke) -- [Amazon Web Services EKS](aws.md#eks) -- [Azure AKS](azure.md#aks) -- [DigitalOcean DOKS](digitalocean.md#doks) -- [OVH Kubernetes](ovh.md#kubernetes) -- [Linode](linode.md#lke) - -### Databases - -- [Google Cloud Platform Cloud SQL](gcp.md#cloud-sql) -- [Amazon Web Services RDS](aws.md#rds) -- [Azure Databases](azure.md#databases) -- [DigitalOcean Managed Database](digitalocean.md#managed-database) - -### Storage - -- [Amazon Web Services S3](aws.md#s3) -- [Google Cloud Platform Cloud Storage](gcp.md#cloud-storage) -- [Azure Blob Storage](azure.md#blob-storage) -- [DigitalOcean Spaces](digitalocean.md#spaces) - -### CI/CD - -- [Wodby CI](../cicd/wodby-ci.md) -- [CircleCI](circleci.md) -- [GitHub Actions](github.md#actions) - -### Docker registry - -- [Wodby Registry](../cicd/wodby-registry.md) -- [Docker Hub](docker.md) - -### Monitoring - -- [NewRelic](newrelic.md) -- [Datadog](datadog.md) - -### Variable - -- [NewRelic](newrelic.md) -- [Sentry](sentry.md) +Every provider can have multiple [integration types](types.md) it offers. When you create a new integration you can select which type you want to create. diff --git a/2.0/docs/integrations/providers.md b/2.0/docs/integrations/providers.md new file mode 100644 index 0000000..bfa75d7 --- /dev/null +++ b/2.0/docs/integrations/providers.md @@ -0,0 +1,7 @@ +# Integration provider + +Provider is the representation of Wodby's integration with third-party services. One provider can have multiple [integration types](types.md) that can optionally be selected when a new integration created. + +Except generic [variable integration](variable.md) all providers have a certain implementation logic depending on their type, for example for providers with kubernetes integration Wodby offers native-integration with the cloud services that provide managed Kubernetes solution. + +Only _variable_ providers can be created by users, all others provided by Wodby. If you miss a certain provider feel free to [contact us](../support.md) and suggest. diff --git a/2.0/docs/integrations/types.md b/2.0/docs/integrations/types.md new file mode 100644 index 0000000..23cd658 --- /dev/null +++ b/2.0/docs/integrations/types.md @@ -0,0 +1,62 @@ +# Integration types + +Every provider can have multiple integration types it offers. When you create a new integration you can select which type you want to create. Supported integration types listed below: + +## Git + +Machine name: `git` + +- [GitHub](github.md) +- [GitLab](gitlab.md) +- [BitBucket](bitbucket.md) + +## Kubernetes + +Machine name: `kubernetes` + +- [Google Cloud Platform GKE](gcp.md#gke) +- [Amazon Web Services EKS](aws.md#eks) +- [Azure AKS](azure.md#aks) +- [DigitalOcean DOKS](digitalocean.md#doks) +- [OVH Kubernetes](ovh.md#kubernetes) +- [Linode](linode.md#lke) + +## Databases + +Machine name: `database` + +- [Google Cloud Platform Cloud SQL](gcp.md#cloud-sql) +- [Amazon Web Services RDS](aws.md#rds) +- [Azure Databases](azure.md#databases) +- [DigitalOcean Managed Database](digitalocean.md#managed-database) + +## Storage + +Machine name: `storage` + +- [Amazon Web Services S3](aws.md#s3) +- [Google Cloud Platform Cloud Storage](gcp.md#cloud-storage) +- [Azure Blob Storage](azure.md#blob-storage) +- [DigitalOcean Spaces](digitalocean.md#spaces) + +## CI/CD + +Machine name: `ci` + +- [Wodby CI](../cicd/wodby-ci.md) +- [CircleCI](circleci.md) +- [GitHub Actions](github.md#actions) + +## Docker registry + +Machine name: `docker-registry` + +- [Wodby Registry](../cicd/wodby-registry.md) +- [Docker Hub](docker.md) + +## Variable + +Machine name: `variable` + +- [NewRelic](newrelic.md) +- [Sentry](sentry.md) diff --git a/2.0/docs/services/actions.md b/2.0/docs/services/actions.md index 81cd946..a98ebad 100644 --- a/2.0/docs/services/actions.md +++ b/2.0/docs/services/actions.md @@ -1,3 +1,27 @@ # Service actions -Service can define an action that will execute an operation in an app. Such actions are accessible to run from Wodby Dashboard. Usually, it will be a kubernetes job that will run a copy of a main container with overridden `args` and/or `command` params. +Service can define an action that will execute an operation in an app. When an action executed it will run a kubernetes job with the provided overridden args/commands and optionally privileged permissions. A task containing the logs of the execution will be created. + +Service with multiple actions will run all actions simultaneously unless there are action with dependency order specified. + +## Type + +Action's type defines how and when the action will be executed. + +### `button` + +Action's of this type will be shown as a button in Wodby dashboard. + +### `post_deploy` + +Post-deployment action that will run after every service deployment. If deploy contains more than one service, the action will run only when all deployments succeeded. Can be limited to run only when a specific build source templates selected. + +### `post_deploy_once` + +Same as `post_deploy` but run only during first deployment. Can be limited to run only when a specific build source templates selected. + +### `post_upgrade` + +Post-upgrade action + + diff --git a/2.0/docs/services/annotations.md b/2.0/docs/services/annotations.md new file mode 100644 index 0000000..0f595ae --- /dev/null +++ b/2.0/docs/services/annotations.md @@ -0,0 +1,3 @@ +# Service annotations + +Service can provide annotations that will be added as Kubernetes annotations if associated Helm chart supports extra annotations. diff --git a/2.0/docs/services/backups.md b/2.0/docs/services/backups.md index 0023a1e..ea6211d 100644 --- a/2.0/docs/services/backups.md +++ b/2.0/docs/services/backups.md @@ -2,7 +2,12 @@ Service can define data backups. There are two main methods of backups: -1. Simple files backups from a path -2. Action to create a backup, such as database backup +## 1. Simple files backup -In both cases, the resulting archive will be uploaded to a cloud storage bucket of a connected integration. +We create a tarball with files from the specified directory. The tarball can optionally be gzipped. + +The tarball will be uploaded to a cloud storage bucket of a connected integration. + +## 2. Through action + +We run a kubernetes job with provided overridden args/command to create the backup archive. We expect to get an archive placed in the same volume as the result. The resulting archive will be uploaded to a cloud storage bucket of a connected integration. diff --git a/2.0/docs/services/build.md b/2.0/docs/services/build.md new file mode 100644 index 0000000..e99f829 --- /dev/null +++ b/2.0/docs/services/build.md @@ -0,0 +1,16 @@ +# Service build + +Non-external services can be buildable. Such services will expect to receive a related build info during app deployment. + +There are two main types of buildable services: + +1. Services that require a git repository connected +2. Services that do not have a git repository but still expected to be built in [CI](../cicd/index.md) process + +## Build templates + +Services that require a git repository can also have build templates, those a public git repositories that contain a boilerplate and a pipeline. You can clone a build template repository under a selected [git integration](../integrations/index.md#git). + +## Dockerfile + +Services may specify a custom Dockerfile located in the same repository. This Dockerfile will be used during `wodby ci build [service]` command when [Wodby CI](../cicd/wodby-ci.md) used. diff --git a/2.0/docs/services/cron.md b/2.0/docs/services/cron.md new file mode 100644 index 0000000..da06046 --- /dev/null +++ b/2.0/docs/services/cron.md @@ -0,0 +1,3 @@ +# Cron schedules + +Service can define cron schedules to run. A schedule has a command/args to override for a kubernetes job to run and a schedule in crontab format. A schedule will run a cron job in accordance with the specified crontab. The cron job will have task associated that contains execution logs. diff --git a/2.0/docs/services/endpoints.md b/2.0/docs/services/endpoints.md new file mode 100644 index 0000000..f020ee8 --- /dev/null +++ b/2.0/docs/services/endpoints.md @@ -0,0 +1,12 @@ +# Service endpoints + +Services that provide public ports can define endpoints. An endpoint is the collection of ports and domains. Services can define only ports in their manifests, domains can be added later after app creation. + +An endpoint designed to represent a single kubernetes service. + +There are three type of ports: +1. `http` - such ports allow domains with TLS certificates to be attached +2. `udp` - such ports can be publicly exposed +3. `tcp` - such ports can be publicly exposed + +One port per endpoint can be marked as main. When `http` port marked as main in the main endpoint, a main technical domain will be attached to it during app creation. diff --git a/2.0/docs/services/imports.md b/2.0/docs/services/imports.md index 4f5ecd7..5a387c8 100644 --- a/2.0/docs/services/imports.md +++ b/2.0/docs/services/imports.md @@ -2,7 +2,12 @@ Service can define data imports. There are two types of how imports performed: -1. Simple files import from an archive -2. A mount of an archive to a path known to a container, a container will perform the import on a start-up. Normally used for databases +## 1. Simple files import -In #1 we run import directly in the running volume. In #2 we switch replace persistent volume to a new volume with new data only if the import via start-uip was successful. +In this case we run import directly in the running volume by unpacking a provided tarball to a specified path. It's not transactional. + +## 2. Through init volume + +In this case we mount the import archive to the init volume provided by the service, a container will perform the import from the init volume during a start-up. Normally used for databases. + +This import is transactional. We spin up a copy of the app service with a new persistent volume, if the import successful we perform a service redeploy during which a new persistent volume with the imported files mounted. diff --git a/2.0/docs/services/template.md b/2.0/docs/services/template.md index e2489a5..abd4f1b 100644 --- a/2.0/docs/services/template.md +++ b/2.0/docs/services/template.md @@ -1,6 +1,7 @@ # Service template -Services can be created only via templates. You can connect your git integration and import a custom service from a template. +Services can be created only via templates. You can connect your git integration and import a custom service from a +template. ## Example @@ -10,291 +11,1124 @@ type: service from: php title: PHP (Drupal 11) labels: -- drupal -- drupal11 + - drupal + - drupal11 options: -- version: '8.3' - default: true - eol: '2026-11-23T00:00:00+00:00' + - version: '8.3' + default: true + eol: '2026-11-23T00:00:00+00:00' + +update: auto + +containers: + - name: php + image: wodby/drupal-php + +links: + - name: files + title: Files storage + required: true + selectors: + - type: storage + - name: solr + title: Solr + env: + - name: SOLR_CLOUD_SERVER + value: '{{link.host}}' + - name: SOLR_CLOUD_PASSWORD + value: '{{link.tokens.password}}' + secret: true + selectors: + - type: search + labels: + - solr + - name: redis + title: Redis + env: + - name: REDIS_PORT + value: '{{link.port}}' + - name: REDIS_HOST + value: '{{link.host}}' + - name: REDIS_PASSWORD + value: '{{link.tokens.password}}' + secret: true + selectors: + - type: datastore + labels: + - redis + - type: datastore + labels: + - valkey + +volumes: + - name: files + title: Files + shared: true + size: 10 + link: files + path: /mnt/files + import: + owner: 82 + group: 82 + +cron: + - name: drush + title: drush cron + command: drush -r ${HTTP_ROOT} -l ${WODBY_PRIMARY_URL} cron + schedule: 0 0 * * * + +env: + - name: DRUPAL_FILES_SYNC_SALT + value: '{{sync_salt}}' + secret: true + - name: DRUPAL_HASH_SALT + value: '{{hash_salt}}' + secret: true + - name: DRUPAL_VERSION + value: '11' + - name: HTTP_ROOT + value: "${APP_ROOT}/${DOCROOT_SUBDIR}" + +build: + dockerfile: Dockerfile + connect: true + templates: + - name: vanilla + title: Vanilla Drupal + repo: https://github.com/wodby/drupal-vanilla + branch: 11.x + +settings: + - name: docroot + title: Drupal root subdirectory + description: Composer-based projects have Drupal under 'web' directory by default + placeholder: path/relative/to/git/root + default: web + var: DOCROOT_SUBDIR + - name: sitedir + title: Drupal site dir + required: true + default: default + var: DRUPAL_SITE + +tokens: + - name: sync_salt + generate: + regex: '[0-9a-z]{32}' + - name: hash_salt + generate: + regex: '[0-9a-z]{32}' + +actions: + - name: clear_cache + args: [ 'drush', 'cc', 'all' ] + type: button + title: Clear all cache + - name: user_login + args: [ 'make', 'user-login' ] + type: output + title: Generate one-time login link + privileged: true +``` + +## Reference + +### `name` + +Type: `string`. + +Machine name of a service, must be unique, cannot be changed. Only alphanumeric and dash symbols allowed. + +Required. + +### `type` + +Type: `enum`. Required. + +[Service type](types). + +Following values allowed: + +- `service` +- `db` +- `infrastructure` +- `storage` +- `datastore` +- `search` +- `ssh` + +Can be used in selectors. + +### `icon` + +Type: `string`. + +Icon name in Wodby dashboard. + +### `from` + +Type: `string`. + +Inherit specified service. Must specify existing service from Wodby catalog. + +### `title` + +Type: `string`. + +Human-readable title of a service. + +Required. + +### `hostname` + +Type: `string`. + +Hostname that will be used as the name of a kubernetes service. Mandatory for non-external services. + +### `scalable` + +Type: `boolean`. Default: `false` + +Whether this service support scalability. Should be always `true` for stateless services. For stateful services depends +on the implementation. + +### `labels` + +Type: `string list`. + +List of text labels for a service, to be used in selectors. + +### `options` + +Option represent version and variants of service. Mandatory to specify at least on option. + +#### `options.[].version` + +Type: `string`. Required. + +Human-readable version + +#### `options.[].tag` + +Type: `string`. + +Image docker for the selected version. If not set, `version` will be used instead. + +#### `options.[].default` + +Type: `boolean`. + +Whether selected version should be selected by default. If none specified, first option will be chosen as default. + +#### `options.[].eol` + +Type: `string`. + +Optional date of end of life (EOL) of the version. Specify in format `YYYY-MM-DDT00:00:00+00:00` + +### `containers` + +Definition of containers of a service. Not allowed for external services. Mandatory for non-external services. + +#### `containers.[].name` + +Type: `string`. Required. + +Machine name of the container. + +#### `containers.[].image` + +Type: `string`. Required. + +Docker image of the container. + +### `build` + +Configuration for [buildable services](build.md). + +#### `build.dockerfile` + +Type: `string`. + +Dockerfile file name from service repository. + +#### `build.connect` + +Type: `boolean`. + +Whether this service requires a git repository to be connected. +Otherwise, assumed the service will be built as a part of a build of different service. + +#### `build.templates` + +List of build templates (boilerplate) user can choose from for Demo purposes or clone to own repository. + +##### `build.templates.[].name` + +Type: `string`. Required. + +Machine name of template. Must be unique, cannot be changed. + +##### `build.templates.[].title` + +Type: `string`. Required. + +Human-readable title. + +##### `build.templates.[].repo` + +Type: `string`. Required. + +Address to a git repository from GitHub (must be specified in `https://` format) + +##### `build.templates.[].branch` + +Type: `string`. + +Branch name of a git repository, if not specified default branch will be used. + +### `endpoints` + +Collection of [service endpoints](endpoints.md). + +#### `endpoints.[].name` + +Type: `string`. Alphanumeric and dash symbols allowed. Required. + +Endpoint's machine name. + +#### `endpoints.[].ports` + +Collection of a service endpoint's ports. + +##### `endpoints.[].ports.[].name` + +Type: `string`. Alphanumeric and dash symbols allowed. Required. + +Endpoint's port machine name. + +##### `endpoints.[].ports.[].number` + +Type: `integer`. Required. + +Endpoint's port number. + +##### `endpoints.[].ports.[].type` + +Type: `enum`. Allowed values are `tcp`, `udp` and `http` + +Endpoint port's type. + +##### `endpoints.[].ports.[].main` + +Type: `boolean`. + +Set to true to mark the port as main. Only one per endpoint. If none marked the first one set as main. + +### `links` + +Collection of [service links](links.md). + +#### `links.[].name` + +Type: `string`. Required. + +Machine name of a link. Must be unique, cannot be changed. + +#### `links.[].title` + +Type: `string`. + +Human-readable title of a link. + +#### `links.[].required` + +Type: `boolean`. + +When set to true, the link is required to set in a stack. + +#### `links.[].selectors` + +Collection of selectors that a linked service must match. Must match at least one of the selectors. + +##### `links.[].selectors.[].type` + +Type: `enum`. + +[Type](types.md) of service that can be linked. + +Following values allowed: + +- `service` +- `db` +- `storage` +- `datastore` +- `search` +- `ssh` + +##### `links.[].selectors.[].labels` + +Type: `string list`. + +List of labels that a linked service must have. + +#### `links.[].env` + +Collection of environment variables that will be added when the link set. + +##### `links.[].env.[].name` + +Type: `string`. Required. + +Name of the environment variable. + +##### `links.[].env.[].value` + +Type: `string`. + +Value of the environment variable. Can contain [`{{tokens}}`](tokens.md). + +##### `links.[].env.[].env` + +Type: `enum`. + +If set, the environment variable will be added only to application instances that have the provided [environment type](../apps/env.md#type). + +##### `links.[].env.[].secret` + +Type: `boolean`. + +True if the environment variable should be secret. Secret environment variable's value stored in Kubernetes secret resource and not shown in Wodby dashboard. + +### `volumes` + +Collection of [service volumes](volumes.md) + +#### `volumes.[].name` + +Type: `string`. Required. + +Volume's machine name. Must be unique, cannot be changed. + +#### `volumes.[].title` + +Type: `string`. + +Volume's human-readable title. + +#### `volumes.[].size` + +Type: `int`. + +Default size of the volume, in GB. + +#### `volumes.[].optional` + +Type: `boolean`. + +True if volume is optional. When a volume optional and size not specified during new app creation, the persistent volume +won't be created. + +#### `volumes.[].helm` + +Additional Helm configuration for the volume. + +##### `volumes.[].helm.values` + +Collection of helm values. + +###### `volumes.[].helm.values.[].name` + +Type: `string` + +Name of the helm value. + +###### `volumes.[].helm.values.[].value` + +Type: `string`, `string list`, `object` + +Value of the helm value. Can contain [`{{tokens}}`](tokens.md). + +### `integrations` + +Collection of [service integrations](integrations.md) + +#### `integrations.[].name` + +Type: `string`. Required. + +Integration's machine name. Must be unique, cannot be changed. + +#### `integrations.[].title` + +Type: `string`. + +Integration's human-readable title. + +#### `integrations.[].type` + +Type: `enum`. + +[Type of integration](../integrations/types.md) that can be connected. + +#### `integrations.[].required` + +Type: `boolean`. + +Set to true when it's mandatory to connect at least one integration. + +#### `integrations.[].multiple` + +Type: `boolean`. + +Set to true when multiple integrations can be connected. + +#### `integrations.[].providers` + +Collection of extra configurations for specific providers. + +##### `integrations.[].providers.[].name` + +Machine name of the [provider](../integrations/providers.md) for which this configuration should apply. + +##### `integrations.[].providers.[].env` + +Collection of extra environment variables that will be added when integration of the specific provider added. + +###### `integrations.[].providers.[].env.[].name` + +Type: `string`. Required. + +Name of the environment variable. + +###### `integrations.[].providers.[].env.[].value` + +Type: `string`. + +Value of the environment variable. Can contain [`{{tokens}}`](tokens.md). + +###### `integrations.[].providers.[].env.[].env` + +Type: `enum`. + +If set, the environment variable will be added only to application instances that have the provided [environment type](../apps/env.md#type). + +###### `integrations.[].providers.[].env.[].secret` + +Type: `boolean`. + +True if the environment variable should be secret. Secret environment variable's value stored in Kubernetes secret resource and not shown in Wodby dashboard. + +### `settings` + +Collection of [service settings](settings.md) + +#### `settings.[].name` + +Type: `string`. Required. + +Setting's machine name. Must be unique, cannot be changed. + +#### `settings.[].title` + +Type: `string`. + +Setting's human-readable title. + +#### `settings.[].var` + +Type: `string`. Required. + +Name of the setting's environment variable that will be added with the value of the setting. + +#### `settings.[].description` + +Type: `string`. + +Setting's description. Will be shown in Wodby's dashboard. + +#### `settings.[].placeholder` + +Type: `string`. + +Setting's placeholder for the setting's input. Will be shown in Wodby's dashboard. + +#### `settings.[].default` + +Type: `string`. + +Setting's default value. + +### `backups` + +Collection of [service backups](backups.md). + +Example #1 [simple files backup](backups.md#1-simple-files-backup): + +```yml +backups: + - name: files +title: Files backup +upload: + dir: /export + gzip: false +``` + +Example #2 backup [through action](backups.md#2-through-action): + +```yml +backups: + - name: database + title: Default database backup + create: + args: + - make + - backup + - 'host="{{database.host}}"' + - 'db="{{database.db.name}}"' + - 'ignore="{{db_backup_ignore_tables}}"' + - 'filepath=/var/lib/mysql/backup.sql.gz' + upload: + filepath: /var/lib/mysql/backup.sql.gz + extension: sql.gz +``` + +#### `backups.[].name` + +Type: `string`. Required. + +Backup's machine name. Must be unique, cannot be changed. + +#### `backups.[].title` + +Type: `string`. + +Backup's human-readable title. + +#### `backups.[].create` + +Container's configuration for the backup creation action. App service's pod container will be used to run a Kubernetes +job with the provided configuration to create a backup. The job should result in an archive file. + +Mandatory unless it's a [simple files backup](backups.md#1-simple-files-backup). + +##### `backups.[].create.args` + +Type: `string list`. + +List of container's args to override for the action. Can contain [`{{tokens}}`](tokens.md). + +##### `backups.[].create.command` + +Type: `string list`. + +Container's command to override for the action. + +#### `backups.[].upload` + +Configuration for how to upload the backup archive to the cloud storage of the attached integration. + +##### `backups.[].upload.filepath` + +Type: `string`. Mandatory unless it's a [simple files backup](backups.md#1-simple-files-backup). + +Filepath of the backup archive. + +##### `backups.[].upload.extension` + +Type: `string`. Mandatory unless it's a [simple files backup](backups.md#1-simple-files-backup). + +Extension of the archive file for the cloud storage. + +##### `backups.[].upload.dir` + +Type: `string`. Mandatory for [simple files backups](backups.md#1-simple-files-backup). + +Directory with files that should be backed up. + +##### `backups.[].upload.gzip` + +Type: `boolean`. Only for [simple files backups](backups.md#1-simple-files-backup). + +If set to true, the files tarball will be additionally gzipped. + +### `imports` + +Collection of [service imports](imports.md). + +Example #1 [simple files import](imports.md#1-simple-files-import): + +```yml +imports: + - name: files + volume: data + title: Files import + destination: '/export/pvc-{{import_pvc_uid}}' + extensions: + - tar + - tar.gz + - tgz + - zip +``` + +Example #2 import [through init volume](imports.md#2-through-init-volume): + +```yml +imports: + - name: database + title: Database import + volume: data + init: + mount: /docker-entrypoint-initdb.d + env: + - name: MYSQL_DATABASE + value: '{{database.db.name}}' + extensions: + - gz + - tar.gz + - tgz + - zip +``` + +#### `imports.[].name` + +Type: `string`. Required. + +Import's machine name. Must be unique, cannot be changed. + +#### `imports.[].title` + +Type: `string`. + +Import's human-readable title. + +#### `imports.[].volume` + +Type: `string`. + +Machine name of the [volume](volumes.md) where import should be imported to. + +###### `imports.[].extensions` + +Type: `string list`. + +List of support import archive extensions. + +#### `imports.[].destination` + +Type: `string`. Can contain [`{{tokens}}`](tokens.md). Supports extra token `{{import_pvc_uid}}` that has UID of the +volume PVC. + +Destination path in a container where to unpack a tarball with files. Only +for [simple files import](imports.md#1-simple-files-import) + +#### `imports.[].init` + +Configuration for [import through init volume](imports.md#2-through-init-volume). + +##### `imports.[].init.mount` + +Type: `string`. Required. + +Mount path in a container of the init volume that implements import. + +##### `imports.[].init.env` + +Collection of additional environment variables to be added during import. + +###### `imports.[].init.env.[].name` + +Type: `string`. Required. + +Name of the environment variable. + +###### `imports.[].init.env.[].value` + +Type: `string`. + +Value of the environment variable. Can contain [`{{tokens}}`](tokens.md). + +###### `imports.[].init.env.[].env` + +Type: `enum`. + +If set, the environment variable will be added only to application instances that have the provided [environment type](../apps/env.md#type). + +###### `imports.[].init.env.[].secret` + +Type: `boolean`. + +True if the environment variable should be secret. Secret environment variable's value stored in Kubernetes secret resource and not shown in Wodby dashboard. + +### `tokens` + +Collection of [service tokens](tokens.md). A token must specify either a plain text value or a regular expression to +generate a random value. + +#### `tokens.[].name` + +Type: `string`. Required. + +Token's name. Must be unique, cannot be changed. + +#### `tokens.[].value` + +Type: `string`. + +Token's plain text value. + +#### `tokens.[].generate` + +Configuration for how to randomly generate token's value. + +##### `tokens.[].generate.regex` + +Type: `string`. + +Regular expression to use for generating a random token's value. + +##### `tokens.[].secret` + +Type: `boolean`. + +True if the token should be secret. Secret token's value stored in Kubernetes secret resource and not shown in Wodby dashboard. + +##### `tokens.[].env` + +Type: `enum`. + +If set, the token will be added only to application instances that have the provided [environment type](../apps/env.md#type). + +### `actions` + +Collection of [service actions](actions.md) + +#### `actions.[].name` + +Type: `string`. Required. + +Action's name. Must be unique, cannot be changed. + +#### `actions.[].title` + +Type: `string`. + +Action's human-readable title. + +#### `actions.[].args` + +Type: `string list`. + +List of container args to override of the main container for the kubernetes job when action executed. + +#### `actions.[].command` + +Type: `string list`. + +Container's command to override of the main container for the kubernetes job when action executed. + +#### `actions.[].type` + +Type: `enum`. Allowed values: `button`, `post_upgrade`, `post_deploy`, `post_deploy_once` + +[Action's type](actions.md#type). Defines how and when action will be executed. + +#### `actions.[].template` + +Type: `string`. + +Used only for `post_deploy` and `post_deploy_once`. Limits action to be run only if specified build source template +selected. + +#### `actions.[].privileged` + +Type: `boolean`. + +When set true, privileged permissions will be set for the action's kubernetes job. + +#### `actions.[].depends` + +Type: `string list`. + +A list of existing actions that this action depends on. The action will run only after all specified actions +successfully executed. + +### `helm` + +Configuration for [service Helm integration](helm.md). Mandatory for non-external services. + +Example: + +```yml +helm: + name: wodby + source: oci://registry-1.docker.io/wodby/nfs-provisioner + chart: oci://registry-1.docker.io/wodby/nfs-provisioner + version: 0.1.2 + configurations: + - name: nfs + annotations: podAnnotations + labels: podLabels + env: envVars + resources: resources +``` + +#### `helm.name` + +Type: `string`. Required. + +Helm repository's name. + +#### `helm.source` + +Type: `string`. Required. + +Helm repository's source. Supports `oci://` and `https://` sources. + +#### `helm.chart` + +Type: `string`. Required. + +Helm chart's name. + +#### `helm.version` + +Type: `string`. Required. + +Helm chart's version. + +#### `helm.configurations` + +Collection of Helm configurations. Required. + +##### `helm.configurations.[].name` + +Type: `string`. Required. + +Helm configuration's name. Must be the same as main container's name. + +##### `helm.configurations.[].annotations` + +Type: `string`. + +Helm value's key for adding extra annotations. + +##### `helm.configurations.[].resources` + +Type: `string`. + +Helm value's key for setting kubernetes resources. + +##### `helm.configurations.[].env` + +Type: `string`. + +Helm value's key for adding environment variables. + +##### `helm.configurations.[].labels` + +Type: `string`. + +Helm value's key for adding labels. + +##### `helm.configurations.[].volumes` -update: auto +Type: `string`. -containers: -- name: php - image: wodby/drupal-php +Helm value's key for adding volumes. -links: -- name: files - title: Files storage - required: true - selectors: - - type: storage -- name: solr - title: Solr - env: - - name: SOLR_CLOUD_SERVER - value: '{{link.host}}' - - name: SOLR_CLOUD_PASSWORD - value: '{{link.tokens.password}}' - secret: true - selectors: - - type: search - labels: - - solr -- name: redis - title: Redis - env: - - name: REDIS_PORT - value: '{{link.port}}' - - name: REDIS_HOST - value: '{{link.host}}' - - name: REDIS_PASSWORD - value: '{{link.tokens.password}}' - secret: true - selectors: - - type: datastore - labels: - - redis - - type: datastore - labels: - - valkey +##### `helm.configurations.[].mounts` -volumes: -- name: files - title: Files - shared: true - size: 10 - link: files - path: /mnt/files - import: - owner: 82 - group: 82 +Type: `string`. -cron: -- name: drush - title: drush cron - command: drush -r ${HTTP_ROOT} -l ${WODBY_PRIMARY_URL} cron - schedule: 0 0 * * * +Helm value's key for adding volume mounts. -env: -- name: DRUPAL_FILES_SYNC_SALT - value: '{{sync_salt}}' - secret: true -- name: DRUPAL_HASH_SALT - value: '{{hash_salt}}' - secret: true -- name: DRUPAL_VERSION - value: '11' -- name: HTTP_ROOT - value: "${APP_ROOT}/${DOCROOT_SUBDIR}" +##### `helm.configurations.[].sidecars` -build: - dockerfile: Dockerfile - connect: true - templates: - - name: vanilla - title: Vanilla Drupal - repo: https://github.com/wodby/drupal-vanilla - branch: 11.x +Type: `string`. -settings: -- name: docroot - title: Drupal root subdirectory - description: Composer-based projects have Drupal under 'web' directory by default - placeholder: path/relative/to/git/root - default: web - var: DOCROOT_SUBDIR -- name: sitedir - title: Drupal site dir - required: true - default: default - var: DRUPAL_SITE +Helm value's key for adding sidecar containers. -tokens: -- name: sync_salt - generate: - regex: '[0-9a-z]{32}' -- name: hash_salt - generate: - regex: '[0-9a-z]{32}' +#### `helm.values` -actions: -- name: clear_cache - args: ['drush', 'cc', 'all'] - type: button - title: Clear all cache -# - name: drush9_alias -# args: ['make', 'drush9-alias'] -# type: output -# title: Generate drush 9 alias -- name: user_login - args: ['make', 'user-login'] - type: output - title: Generate one-time login link - privileged: true -``` +Extra helm values to add. -## Reference +###### `helm.values.[].name` -### `name` +Type: `string` -Machine name of a service, must be unique, cannot be changed. Only alphanumeric and dash symbols allowed. +Name of the helm value. -Mandatory. +###### `helm.values.[].value` -### `type` +Type: `string`, `string list`, `object` -Service type, can be one of the following: +Value of the helm value. Can contain [`{{tokens}}`](tokens.md). -- `service` stateless (e.g. Nginx) or a stateful (e.g. OpenSMTPD) service. Can be scalable -- `db` database servers, stateful services -- `infrastructure` used in infrastructure applications, currently, can be added only by Wodby. -- `storage` used for distributed storage services, e.g. NFS or Rook -- `datastore` memory storages like Redis and Memcached, stateful services -- `search` stateful services, search engines like Elasticsearch and Solr Cloud. -- `ssh` SSH server, usually used as derivative services +### `certs` -Can be used in selectors. +Collection of service's [self-signed certificates](certs.md) to generate. -Mandatory. +Example: -### `icon` +```yml +certs: + - name: webhook + days: 36500 + key: + type: rsa + length: 4096 + dns: + - aws-load-balancer-webhook-service.{{service.name}}.svc + - aws-load-balancer-webhook-service.{{service.name}}.svc.cluster.local + helm: + cert: webhookTLS.cert + key: webhookTLS.key + ca: webhookTLS.caCert +``` -Icon name in Wodby dashboard. +#### `certs.[].name` -### `from` +Type: `string`. Alphanumeric and dash symbols allowed. Required. -Inherit specified service. +Certificate's name. -### `title` +#### `certs.[].days` -Human-readable title of a service, can be changed. +Type: `int`. Required. -Mandatory. +Certificate's days to expiration. -### `hostname` +#### `certs.[].key` -Hostname that will be used as the name of a kubernetes service. Mandatory for non-external services. +Certificate key configuration. Required. -### `scalable` +##### `certs.[].key.type` -Whether this service support scalability. Should be always `true` for stateless services. For stateful services depends on the implementation. +Type: `enum`. Required. Allowed values: `rsa` -### `labels` +Certificate key's type. -List of text labels for a service, to be used in selectors. +##### `certs.[].key.length` -### `options` +Type: `int`. Required. -Option represent version and variants of service. Mandatory to specify at least on option. +Certificate key's length. -### `containers` +#### `certs.[].dns` -Definition of containers of a service. Not allowed for external services. Mandatory for non-external services. +Type: `string list`. -### `build` +Domains names of certificate subject. Can contain [`{{tokens}}`](tokens.md). -Configuration for buildable services. +#### `certs.[].helm` -### `derivatives` +Helm integration configuration to add generated certificates to the Helm chart. + +##### `certs.[].helm.cert` + +Helm value's key to add a base64 encoded certificate in PEM format. + +##### `certs.[].helm.key` + +Helm value's key to add a base64 encoded private key in PEM format. + +##### `certs.[].helm.ca` + +Helm value's key to add a base64 encoded CA certificate in PEM format. + +### `configs` -Configuration of derivative services. +Collection of [service configs](configs.md). Example: ```yml -derivatives: -- name: php-sshd - icon: ssh - title: SSHD - args: ['sudo', '/usr/sbin/sshd', '-De'] - type: ssh - default: true - required: false - endpoints: - - name: sshd - ports: - - name: sshd - main: true - number: 22 - type: tcp - env: - - name: SSHD_GATEWAY_PORTS - value: clientspecified - helm: - values: - - name: livenessProbe - value: "" - - name: readinessProbe - value: "" - - name: containerPort.name - value: sshd - - name: containerPort.number - value: 22 +configs: + - name: main + title: Main + filepath: /etc/gotpl/config/nginx.conf.tmpl + config: nginx.conf.tmpl + - name: vhost + title: Virtual host + filepath: /etc/gotpl/vhost.conf.tmpl + config: vhost.conf.tmpl ``` -### `links` +#### `configs.[].name` -Configuration of [service links](links.md). +Type: `string`. Alphanumeric and dash symbols allowed. Required. -### `volumes` +Config's machine name. -Configuration of [service volumes](volumes.md) +#### `configs.[].title` -### `integrations` +Type: `string`. -Configuration of [service integrations](integrations.md) +Config's human-readable title. -### `settings` +#### `configs.[].filepath` -Configuration of [service settings](settings.md) +Type: `string`. -### `backups` +Filepath where to mount the config file in a container. -Configuration of [service backups](backups.md) +#### `configs.[].config` -### `imports` +Type: `string`. -Configuration of [service imports](imports.md) +Filepath to the default config file in a service's repository. -### `tokens` +### `cron` -Configuration of [service tokens](tokens.md) +Collection of [cron schedules](cron.md). -### `actions` +#### `cron.[].name` -Configuration of [service actions](actions.md) +Type: `string`. Alphanumeric and dash symbols allowed. Required. -### `helm` +Cron schedule's machine name. -Configuration of [service helm integration](helm.md). Mandatory for non-external services. +#### `cron.[].title` -### `certs` +Type: `string`. -Configuration of [service certificates](certs.md). +Cron schedule's human-readable title. -Example: +#### `cron.[].command` -```yml -certs: -- name: webhook - days: 36500 - key: - type: rsa - length: 4096 - dns: - - aws-load-balancer-webhook-service.{{service.name}}.svc - - aws-load-balancer-webhook-service.{{service.name}}.svc.cluster.local - helm: - cert: webhookTLS.cert - key: webhookTLS.key - ca: webhookTLS.caCert -``` +Type: `string`. -### `configs` +Cron schedule's command for kubernetes job. + +#### `cron.[].schedule` + +Type: `string`. + +Cron schedule's schedule in crontab format. + +### `annotations` + +Collection of [service annotations](annotations.md). + +### `annotations.[].name` + +Type: `string`. Alphanumeric and dash symbols allowed. Required. -Configuration of [service configs](configs.md). +Annotation's machine name. + +### `annotations.[].value` + +Type: `string`. + +Annotation's value. + +### `annotations.[].env` + +Type: `enum`. + +If set, the annotation will be added only to application instances that have the provided [environment type](../apps/env.md#type). ### `database` @@ -313,126 +1147,119 @@ database: ssl: true root: username: root - password: '{{root_password}}' + password: '{{root_password}}' db: name: '{{app.name}}_{{instance.name}}' charset: 'utf8mb4' - collation: 'utf8mb4_unicode_520_ci' + collation: 'utf8mb4_unicode_520_ci' actions: create: args: - - make - - create-db - - 'name="{{database.db.name}}"' - - 'charset="{{database.db.charset}}"' - - 'collation="{{database.db.collation}}"' - - 'host="{{database.host}}"' + - make + - create-db + - 'name="{{database.db.name}}"' + - 'charset="{{database.db.charset}}"' + - 'collation="{{database.db.collation}}"' + - 'host="{{database.host}}"' drop: args: - - make - - drop-db - - 'name="{{database.db.name}}"' - - 'host="{{database.host}}"' + - make + - drop-db + - 'name="{{database.db.name}}"' + - 'host="{{database.host}}"' user: - name: '{{app.name}}_{{instance.name}}' + name: '{{app.name}}_{{instance.name}}' password: '{{password}}' actions: - create: + create: args: - - make - - create-user - - 'username="{{database.user.name}}"' - - 'password="{{database.user.password}}"' - - 'host="{{database.host}}"' + - make + - create-user + - 'username="{{database.user.name}}"' + - 'password="{{database.user.password}}"' + - 'host="{{database.host}}"' drop: args: - - make - - drop-user - - 'username="{{database.user.name}}"' - - 'host="{{database.host}}"' + - make + - drop-user + - 'username="{{database.user.name}}"' + - 'host="{{database.host}}"' grant: args: - - make - - grant-user-db - - 'username="{{database.user.name}}"' - - 'db="{{database.db.name}}"' - - 'host="{{database.host}}"' + - make + - grant-user-db + - 'username="{{database.user.name}}"' + - 'db="{{database.db.name}}"' + - 'host="{{database.host}}"' revoke: args: - - make - - revoke-user-db - - 'username="{{database.user.name}}"' - - 'db="{{database.db.name}}"' - - 'host="{{database.host}}"' + - make + - revoke-user-db + - 'username="{{database.user.name}}"' + - 'db="{{database.db.name}}"' + - 'host="{{database.host}}"' charsets: - - name: utf16 - title: UTF-16 Unicode - collation: utf16_general_ci - - name: utf16le - title: UTF-16LE Unicode - collation: utf16le_general_ci - - name: utf32 - title: UTF-32 Unicode - collation: utf32_general_ci - - name: utf8 - title: UTF-8 Unicode - collation: utf8_general_ci - - name: utf8mb4 - title: 4-Byte UTF-8 Unicode - collation: utf8mb4_unicode_520_ci - default: true + - name: utf16 + title: UTF-16 Unicode + collation: utf16_general_ci + - name: utf16le + title: UTF-16LE Unicode + collation: utf16le_general_ci + - name: utf32 + title: UTF-32 Unicode + collation: utf32_general_ci + - name: utf8 + title: UTF-8 Unicode + collation: utf8_general_ci + - name: utf8mb4 + title: 4-Byte UTF-8 Unicode + collation: utf8mb4_unicode_520_ci + default: true ``` #### `database.type` -Machine name of a specific database type. Mandatory for database. +Type: `string`. Required. + +Machine name of a specific database type. #### `database.kind` +Type: `enum`. Required. + Can be one of the following kinds: - `mysql` - `mariadb` - `postgres` -Mandatory for database. - #### `database.port` -Database connection port number. +Type: `int`. Required. -Mandatory for database. +Database connection port number. #### `database.ssl` +Type: `boolean`. + +Whether to use SSL connection for connecting to the database server. #### `database.root` -Database super admin (root) user details. Mandatory for database. +Database super admin (root) user details. Required. ##### `database.root.username` -Database super admin (root) username. Mandatory for database. - -##### `database.root.password` - -Database super admin (root) password. Mandatory for database. - -#### `database.charsets` - -List of charsets supported by database. - -#### `database.charsets.[].name` - -Machine name of a charset. +Type: `string`. Required. -#### `database.charsets.[].title` +Database super admin (root) username. -Human-readable title of a charset. +##### `database.root.password` -#### `database.charsets.[].collaction` +Type: `string`. Required. -Charset collation. +Database super admin (root) password. #### `database.db` @@ -440,33 +1267,331 @@ Database DB configuration settings. ##### `database.db.name` -Name of DB to create, tokens usage allowed. +Type: `string`. Required. + +Name of DB to create. Can contain [`{{tokens}}`](tokens.md). ##### `database.db.charset` +Type: `string`. Required. + Default charset for a DB. ##### `database.db.collation` +Type: `string`. Required. + Default collation for a DB. ##### `database.db.actions` Defines actions for container-based database to run a kubernetes job to create and to drop DBs. +##### `database.db.actions.create` + +Action to create a database DB. + +###### `database.db.actions.create.args` + +Type: `string list`. + +Container's args for action's kubernetes job to override. + +###### `database.db.actions.create.command` + +Type: `string list`. + +Container's command for action's kubernetes job to override. + +##### `database.db.actions.drop` + +Action to drop a database DB. + +###### `database.db.actions.drop.args` + +Type: `string list`. + +Container's args for action's kubernetes job to override. + +###### `database.db.actions.drop.command` + +Type: `string list`. + +Container's command for action's kubernetes job to override. + #### `database.user` -Database user configuration settings. +Database user configuration settings. Required. ##### `database.user.name` -Database user's name, tokens usage allowed. +Type: `string`. Required. + +Database user's name. Can contain [`{{tokens}}`](tokens.md). ##### `database.user.password` -Database user's password, tokens usage allowed. +Type: `string`. Required. + +Database user's password. Can contain [`{{tokens}}`](tokens.md). ##### `database.user.actions` Defines actions for container-based database to run kubernetes job to create/drop database users and to grant/revoke permissions to a DB. +##### `database.user.actions.create` + +Action to create a database user. + +###### `database.user.actions.create.args` + +Type: `string list`. + +Container's args for action's kubernetes job to override. + +###### `database.user.actions.create.command` + +Type: `string list`. + +Container's command for action's kubernetes job to override. + +##### `database.user.actions.drop` + +Action to drop a database user. + +###### `database.user.actions.drop.args` + +Type: `string list`. + +Container's args for action's kubernetes job to override. + +###### `database.user.actions.drop.command` + +Type: `string list`. + +Container's command for action's kubernetes job to override. + +##### `database.user.actions.grant` + +Action to drop a database user. + +###### `database.user.actions.grant.args` + +Type: `string list`. + +Container's args for action's kubernetes job to override. + +###### `database.user.actions.grant.command` + +Type: `string list`. + +Container's command for action's kubernetes job to override. + +##### `database.user.actions.revoke` + +Action to drop a database user. + +###### `database.user.actions.revoke.args` + +Type: `string list`. + +Container's args for action's kubernetes job to override. + +###### `database.user.actions.revoke.command` + +Type: `string list`. + +Container's command for action's kubernetes job to override. + +#### `database.charsets` + +List of charsets supported by database. + +##### `database.charsets.[].name` + +Type: `string`. Required. + +Machine name of a charset. + +##### `database.charsets.[].title` + +Type: `string`. + +Human-readable title of a charset. + +##### `database.charsets.[].collation` + +Type: `string`. + +Charset collation. + +### `derivatives` + +Configuration of [derivative services](derivatives.md). + +Example: + +```yml +derivatives: + - name: php-sshd + icon: ssh + title: SSHD + args: [ 'sudo', '/usr/sbin/sshd', '-De' ] + type: ssh + default: true + required: false + endpoints: + - name: sshd + ports: + - name: sshd + main: true + number: 22 + type: tcp + env: + - name: SSHD_GATEWAY_PORTS + value: clientspecified + helm: + values: + - name: livenessProbe + value: "" + - name: readinessProbe + value: "" + - name: containerPort.name + value: sshd + - name: containerPort.number + value: 22 +``` + +#### `derivatives.[].name` + +Type: `string`. Alphanumeric and dash symbols allowed. Required. + +Derivative's machine name. + +#### `derivatives.[].title` + +Type: `string`. Required. + +Derivative's human-readable title. + +#### `derivatives.[].icon` + +Type: `string`. + +Icon name of the derivative, shown in Wodby dashboard. + +#### `derivatives.[].type` + +Type: `enum`. + +Override type of the derivative service. + +#### `derivatives.[].args` + +Type: `string list`. + +List of container args to override. + +#### `derivatives.[].command` + +Type: `string list`. + +Container command to override. + +#### `derivatives.[].default` + +Type: `boolean`. + +True to make derivative be enabled by default when the parent service selected. + +#### `derivatives.[].required` + +Type: `boolean`. + +True to make derivative required mandatory when the parent service selected. + +#### `derivatives.[].env` + +Extra environment variables for the derivative. + +##### `derivatives.[].env.[].name` + +Type: `string`. Required. + +Environment variable's name. + +##### `derivatives.[].env.[].value` + +Type: `string`. + +Environment variable's value. Can contain [`{{tokens}}`](tokens.md). + +##### `derivatives.[].env.[].env` + +Type: `enum`. + +If set, the environment variable will be added only to application instances that have the provided [environment type](../apps/env.md#type). + +##### `derivatives.[].env.[].secret` + +Type: `boolean`. + +True if the environment variable should be secret. Secret environment variable's value stored in Kubernetes secret resource and not shown in Wodby dashboard. + +#### `derivatives.[].endpoints` + +Collection of [endpoints](endpoints.md) for the derivative. This will override parent service endpoints. + +##### `derivatives.[].endpoints.[].name` + +Type: `string`. Alphanumeric and dash symbols allowed. Required. + +Machine name of the endpoint. + +##### `derivatives.[].endpoints.[].ports` + +Collection of endpoint's ports. + +###### `derivatives.[].endpoints.[].ports.[].name` + +Type: `string`. Alphanumeric and dash symbols allowed. Required. + +Endpoint port's machine name. + +###### `derivatives.[].endpoints.[].ports.[].main` + +Type: `boolean`. + +True to make the derivative's endpoint's port as main. If none marked as main, the first port will be chosen as main. + +###### `derivatives.[].endpoints.[].ports.[].number` + +Type: `integer`. + +Port's number. + +###### `derivatives.[].endpoints.[].ports.[].type` + +Type: `enum`. Allowed values are `tcp`, `udp` and `http` + +Port's type. + +#### `derivatives.[].helm` + +Extra helm configuration for the derivative. + +##### `derivatives.[].helm.values` + +Collection of helm values. + +###### `derivatives.[].helm.values.[].name` + +Type: `string` + +Name of the helm value. + +###### `derivatives.[].helm.values.[].value` + +Type: `string`, `string list`, `object` + +Value of the helm value. Can contain [`{{tokens}}`](tokens.md). diff --git a/2.0/docs/services/tokens.md b/2.0/docs/services/tokens.md index 7a6cda7..ce72684 100644 --- a/2.0/docs/services/tokens.md +++ b/2.0/docs/services/tokens.md @@ -2,4 +2,4 @@ Service tokens are text values that can have a plain value or a regular expression that will be used to generate a random secret value when an app services created/updated. Tokens can be used in environment variables' values. -In addition to custom user-defined Wodby provides the following tokens available depending on the context: +See [app tokens](tokens.md) for the list of supported tokens. diff --git a/2.0/docs/services/types.md b/2.0/docs/services/types.md new file mode 100644 index 0000000..ceb1295 --- /dev/null +++ b/2.0/docs/services/types.md @@ -0,0 +1,31 @@ +# Service type + +Every service has a type, depending on the type there will be + +## `service` + +These types of services are usually stateless (e.g. Nginx) or a stateful (if none other match) service. Can be scalable. + +## `db` + +Used for [Database services](database.md), stateful services. + +## `storage` + +Used for distributed storage services, e.g. NFS or Rook. + +## `datastore` + +Memory storages like Redis and Memcached, stateful services + +## `search` + +Stateful services, search engines like Elasticsearch and Solr Cloud. + +## `ssh` + +SSH server, usually used as derivative services. + +## `infrastructure` + +Used in infrastructure applications, currently, can be added only by Wodby. diff --git a/2.0/mkdocs.yml b/2.0/mkdocs.yml index 877fac3..7159323 100644 --- a/2.0/mkdocs.yml +++ b/2.0/mkdocs.yml @@ -127,8 +127,10 @@ nav: - Services: - Overview: services/index.md - Template: services/template.md - - Derivatives: services/derivatives.md + - Types: services/types.md + - Endpoints: services/endpoints.md - Links: services/links.md + - Derivatives: services/derivatives.md - Integrations: services/integrations.md - Helm: services/helm.md - Actions: services/actions.md @@ -137,10 +139,15 @@ nav: - Settings: services/settings.md - Backups: services/backups.md - Imports: services/imports.md - - Database services: services/database.md - Volumes: services/volumes.md + - Cron: services/cron.md + - Annotations: services/annotations.md + - Buildable services: services/build.md + - Database services: services/database.md - Integrations: - Overview: integrations/index.md + - Providers: integrations/providers.md + - Types: integrations/types.md - Variable integration: integrations/variable.md - Google Cloud Platform: integrations/gcp.md - Amazon Web Service: integrations/aws.md