Configuration

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.

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:

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:

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 or hashicorp-vault 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.