-
Notifications
You must be signed in to change notification settings - Fork 0
Initial setup
Before version 0.6.0, the nuts tool compiled its plugin permanently. It couldn't be changed. With version 0.6.0 the nuts tool uses a plugin system. Different backends can be used with the tool. A backend plugin is a binary file that needs to be built additionally. Next, it needs to be configured for nuts and attached to a container.
In this example we use the nuts-directory plugin. It is included with the nuts project and has also been used in versions < 0.6.0. This means that all existing containers can still be used.
Here we simply use cargo install to install the nuts tool and the nuts-directory plugin.
cargo install nuts-tool
cargo install nuts-directory --features=plugin
For the nuts-directory crate, the plugin feature must be activated in order for the plugin to be activated.
There is a Docker image that can be used to try out nuts. Details can be found here.
The plugin must be configured for the nuts tool:
nuts plugin add directory --path nuts-directory
- Here
directoryis the name of the plugin. You can this identifier to identify the plugin. -
nuts-directoryis the path to the executable file previously installed.
When creating a container, you have to specify the plugin:
nuts container create sample --plugin=directory
This creates a container with the name sample, which uses the directory plugin.
Containers created before version 0.6.0 can easily be connected to the plugin system.
NUTS_CONTAINER=sample nuts container attach directory
This command attaches the directory plugin to the sample container.