ns8-kickstart
This is a template module for NethServer 8. To start a new module from it:
-
Click on Use this template. Name your repo with
ns8-
prefix (e.g.ns8-mymodule
). Do not end your module name with a number, like!ns8-baaad2
-
An automated initialization workflow starts: wait for its completion. You can follow the run inside the "Actions" tab, the workflow is named "Initial commit"
-
You can now clone the repository
-
Edit this
README.md
file, by replacing this section with your module description -
Adjust
.github/workflows
to your needs.clean-registry.yml
might need the proper list of image names to work correctly. Unused workflows can be disabled from the GitHub Actions interface. -
Commit and push your local changes
Install
Instantiate the module with:
add-module ghcr.io/nethserver/kickstart:latest 1
The output of the command will return the instance name. Output example:
{"module_id": "kickstart1", "image_name": "kickstart", "image_url": "ghcr.io/nethserver/kickstart:latest"}
Configure
Let's assume that the kickstart instance is named kickstart1
.
Launch configure-module
, by setting the following parameters:
<MODULE_PARAM1_NAME>
: <MODULE_PARAM1_DESCRIPTION><MODULE_PARAM2_NAME>
: <MODULE_PARAM2_DESCRIPTION>- ...
Example:
api-cli run module/kickstart1/configure-module --data '{}'
The above command will:
- start and configure the kickstart instance
- (describe configuration process)
- ...
Send a test HTTP request to the kickstart backend service:
curl http://127.0.0.1/kickstart/
Smarthost setting discovery
Some configuration settings, like the smarthost setup, are not part of the
configure-module
action input: they are discovered by looking at some
Redis keys. To ensure the module is always up-to-date with the
centralized smarthost
setup every time
kickstart starts, the command bin/discover-smarthost
runs and refreshes
the state/smarthost.env
file with fresh values from Redis.
Furthermore if smarthost setup is changed when kickstart is already
running, the event handler events/smarthost-changed/10reload_services
restarts the main module service.
See also the systemd/user/kickstart.service
file.
This setting discovery is just an example to understand how the module is expected to work: it can be rewritten or discarded completely.
Uninstall
To uninstall the instance:
remove-module --no-preserve kickstart1
Testing
Test the module using the test-module.sh
script:
./test-module.sh <NODE_ADDR> ghcr.io/nethserver/kickstart:latest
The tests are made using Robot Framework
UI translation
Translated with Weblate.
To setup the translation process:
- add GitHub Weblate app to your repository
- add your repository to [hosted.weblate.org]((https://hosted.weblate.org) or ask a NethServer developer to add it to ns8 Weblate project