Components
Connect and configure your App using your existing container images, infrastructure as code, and DevOps automation.
Nuon supports several different Component types that allow you to connect your existing DevOps automation, infrastructure as code, and containers to your app.
What is a Component?
A Component represents a part of your App. Nuon supports the following Component types:
- Docker - Any Dockerfile that can be built
- Container Images - Any prebuilt OCI image
- Helm Charts - Any Helm chart located in a repository
- Terraform - Any Terraform module
How do you configure a Component?
A Component is configured in an individual <component name>.toml
file inside a directory called components
in the root of your App Config directory. e.g., a Helm chart Component named whoami
would be defined in a file named whoami.toml
inside a directory named components
.
Alternatively, you can nest individual Component files inside directories inside the components
directory. For example, you could have a directory named infra
inside the components
directory, and define an S3 Bucket Component named buckets.toml
.
Additional Component configuration files can be added to the components
directory or another directory in the App Config directory like src
, and referenced in the Component’s config file. e.g., you can have a values.yaml
file for a Helm chart Component located the root of the components
directory.
You can configure Components to use either a public repo (using a public_repo
block) or a private GitHub
repo (using a connected_repo
block). Read more about VCS configuration here.
By default, every Component must have a git
repository to store its source files, but you can include them in the App Config directory and reference the same App Config repo in the Component TOML file. e.g., a Terraform Component named lamdba
that uses a variables.tf
file and Python code can be located in the App Config directory’s src
directory and referenced as the Public Repo in the Component’s config file:
Component Management
The CLI exposes many operational commands to manage components.
To see all available commands, run: nuon components --help
.
Make sure to select an App using nuon apps select
before using the nuon components
commands, or pass the -a
flag to each
nuon component
command.
Pinning a Component
You can pin a Component, which will set its ID as a default argument to all nuon component
commands. This is helpful to avoid
having to pass -c
to each command.
Each example below assumes you have run nuon components select
first.
To show the currently pinned Component:
Component Management Commands
Commands for working with Components:
Components can only be created using a configuration file.
Get a Component
List Components - List Components for an App.
Delete a Component - Delete a Component.
It is not recommended to delete Components using the CLI. Instead, manage them using config files.
Print a Component config - Print the latest configuration for a Component.
Component Builds
All Components must be built before releasing. The release commands support an -auto-build
flag which will trigger a
Build.
Create a Build - Create a Build using the latest Component configuration.
List Builds - List Builds for a Component.
Get a Build - Print out Build details.
Logs - Show logs for a Build.
Print Plan - Print a Build plan with configuration for the Build.