-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add quickstart doc for porter configuration file (#2038)
* add quickstart doc for porter configuration file Signed-off-by: Yingrong Zhao <[email protected]> * rename file Signed-off-by: Yingrong Zhao <[email protected]> * address comments Signed-off-by: Yingrong Zhao <[email protected]>
- Loading branch information
Showing
2 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
title: "QuickStart: Configuration" | ||
descriptions: Control Porter's behavior with its config file | ||
layout: single | ||
--- | ||
|
||
You now know how to install a bundle, passing in a credential or parameter set | ||
with Porter's default settings. | ||
Porter can be configured with some global settings, which are separate from any | ||
bundle specific configuration, and which apply across all bundles. | ||
This QuickStart walks you through how to set up and utilize the configuration | ||
file to achieve some common tasks. | ||
|
||
## Create configuration file | ||
|
||
First, let's create the configuration file. | ||
|
||
In your PORTER_HOME directory, by default ~/.porter/, create a file with name | ||
config.yaml. | ||
```yaml | ||
touch ~/.porter/config.yaml | ||
``` | ||
|
||
## Define default global namespace for bundles | ||
|
||
Instead of explicitly setting namespace for multiple bundles one by one, we can define a global default namespace | ||
in the configuration file like so: | ||
```yaml | ||
namespace: "dev" | ||
``` | ||
## Work with bundle that contains sensitive data | ||
Porter does not persist sensitive data in its database, and instead stores it a | ||
secret store defined in the configuration file. When a secret store is not | ||
configured, Porter returns an error when sensitive data is detected during a bundle execution. To | ||
try out porter with bundles that contain sensitive data, such as using sensitive parameters | ||
or generating sensitive outputs, copy and paste below code into the | ||
configuration file: | ||
```yaml | ||
default-secrets-plugin: "filesystem" | ||
``` | ||
This enables the filesystem secret plugin to store any sensitive parameters | ||
provided by users, or sensitive outputs generated by bundles. | ||
The filesystem plugin should not be used in production environments since data | ||
is stored as plain text in Porter's home directory. Please use either the [azure-keyvault](/plugins/azure#secrets) | ||
or [hashicorp-vault](/plugins/hashicorp/#plugin-configuration) plugin for production. | ||
## Next Steps | ||
In this QuickStart you learned how to configure Porter to define global default | ||
value for bundles and porter itself. You also learned how to work with bundles | ||
that contains or produces sensitive data. | ||
* [Learn more about Porter's configuration file](/configuration) |