TODO: separate chapters for project template settings, and tips for setting up proxies and version control commands.
By default only the basic plugin is enabled. You can configure your default settings in ~/.taito/taito-config.sh
file and organization specific overrides in ~/.taito/taito-config-ORGANIZATION.sh
file.
Project specific settings are defined in taito-config.sh
file placed at your project root folder. See taito-config.sh of full-stack-template as an example.
Settings are defined as environment variables. If an environment variable contains multiple values, just write them using whitespace as delimiter, for example:
taito_environments="dev test canary prod"
TIP: You can easily use project specific taito-config.sh
settings in your own custom scripts even without Taito CLI. For example post-build.sh script of react-native-template uses taito-config.sh settings to send Slack notification after App Center build has ended:
# Read settings from taito-config.sh
export taito_target_env=${APPCENTER_BRANCH/master/prod}
. taito-config.sh
User specific overrides may be defined in taito-user-config.sh
file located at project root folder. In this file you can define additional variables or override any variables set in taito-config.sh
The user specific file should not be committed to version control.
The full-stack-template also supports TAITO_CONFIG_OVERRIDE
environment variable. With the TAITO_CONFIG_OVERRIDE
environment variable you may define path to an additional configuration overrides file. These overrides will be included to the configurations just before provider specific settings. The file may be either local file (e.g. ./my-overrides.sh
) or reside remotely (e.g. https://mydomain.com/configs/my-overrides.sh
). The TAITO_CONFIG_OVERRIDE
setting is useful in some CI/CD scenarios (e.g. the same git branch is automatically deployed to multiple environments).
The following settings are shared among plugins. All of them are optional.
ghcr.io/taitounited/taito-cli:cli
.Plugins named with a -global
suffix are designed to be used globally. That is, you configure them in your default or additional configuration file.
TODO: In template plugin README.md (templatedefaultciexecdeploy false for security critical environments, etc.)
The following settings are shared among plugins. All of them are optional.
Basic settings:
ghcr.io/taitounited/taito-cli:cli
.1
.Project labeling:
api
(you can usually leave this empty)Assets:
Environments:
demo
, dev
, test
, uat
, stag
, canary
, prod
). You also can multiple environments of the same type by using environment type as prefix (e.g. prod-us
, prod-eu
). You can also define feature environments using f-
as prefix (e.g. f-create-user
).URLs:
my-project-dev.mydomain.com
.https://my-project-dev.mydomain.com
.https://my-project-dev.mydomain.com/admin/
.https://cdn-dev.mydomain.com/my-project-dev/
.Provider and namespaces:
aws
, azure
, gcp
, onpremise
).Repositories:
Stack:
"client server database storage"
.taito build[:BUILD_TARGET]
command. By default taito_targets are used as taitobuildtargets."my-project-dev"
.docker-compose.yaml
. Usually just "default"
.Stack types:
TODO
Database settings:
pg
, mysql
).Messaging:
slack
).Uptime monitoring:
admin client server
./admin/uptimez /uptimez /api/uptimez
.2s 2s 5s
.projects/myproject/notificationChannels/1234567890
.Continuos integration settings:
Plugin specific settings are prefixed with the plugin name and documented in README.md file of each plugin.
TODO: Write README.md for each plugin.
You can use bash script constructs to define different values for different environments, for example:
# Overrides for different environments
case $taito_env in
prod)
# settings for production
;;
stag)
# settings for staging
;;
test)
# settings for testing
;;
dev)
# settings for development
;;
local)
# settings for local
;;
esac
TODO: feature environment support is still work-in-progress
You can also create an environment for your your feature branch. See the example below for feat/orders
.
Configure f-orders
environment in taito-config.sh
:
# Environments
taito_environments="f-orders dev test prod"
# Overrides for different environments
case $taito_env in
...
...
dev|f-orders)
# settings for dev and feat/orders
;;
...
...
esac
taito env apply:f-orders
.feat/orders
branch and your application should be deployed automatically.You can create a canary environment by renaming canary
environment to prod
at the beginning of the project specific configuration file (see the example below). This means that the canary release is deployed to the same cluster and namespace as production, and it also uses all the same resources as production (database, storage, 3rd party services).
# Environments
taito_env=${taito_env/canary/prod} # canary -> prod
# Overrides for different environments
case $taito_env in
prod)
# settings for production
if [[ $taito_target_env == "canary" ]]; then
# settings for canary
fi
;;
stag)
...
...
esac
You can make an alternative environment for A/B testing the same way that you do with canary. In the following example the feat/orders-b
uses resources of production environment. Thus, you can do A/B testing in production by routing some of the users to the feat/orders-b
release that is running side-by-side with the production version.
# Environments
taito_env=${taito_env/f-orders-b/prod} # f-orders-b -> prod
# Overrides for different environments
case $taito_env in
prod)
# settings for production
if [[ $taito_target_env == "f-orders-b" ]]; then
# settings for feat/orders-b
fi
;;
stag)
...
...
esac
You can define parameters for your e2e and integration test suites by using test_TARGET_
as prefix. See the taito-config.sh file of full-stack-template as an example.
Plugins require secrets to perform some of the operations. Secrets are configured in taito-config.sh
using the taito_secrets
variable and secret values can be managed with the taito env apply:ENV
and taito secret rotate:ENV
commands. See taito-config.sh of full-stack-template for examples.
TIP: You can also use
taito_remote_secrets
andtaito_local_secrets
in addition totaito_secrets
if some of the secrets should be defined for remote or local environments only.
Secret naming convention is name.property[/namespace]:method. You should avoid undescores in secret names as they are not valid in Kubernetes. For example:
htpasswd-plain
instead of htpasswd
if you want to store the passwords in plain text (e.g. for development purposes).You can use the following methods in your secret definition:
random
: Randomly generated string (30 characters).random-N
: Randomly generated string (N characters).random-words
: Randomly generated words (6 words).random-words-N
: Randomly generated words (N words).random-uuid
: Randomly generated UUID.manual
: Manually entered string (min 8 characters).manual-N
: Manually entered string (min N characters).file
: File. The file path is entered manually.template-NAME
: File generated from a template by substituting environment variables and secrets values.htpasswd
: htpasswd file that contains 1-N user credentials. User credentials are entered manually.htpasswd-plain
: htpasswd file that contains 1-N user credentials. Passwords are stored in plain text. User credentials are entered manually.csrkey
: Secret key generated for certificate signing request (CSR).provided
: Secret that is provided by one of the plugins. For example azure-access-token.ossRdbms:provided
.See the secret management section of the plugins page for more information. 6.4. Define a secret chapter of Taito CLI tutorial may also be useful.