Kickstart module Up to Date?

I am working on building a module and after cloning the kickstart module,

i have noticed the information presented there, compared to other modules published is vastly different,

is the kickstart module up to date, or are there components that have been added, which are yet to be updated to the kickstart module.

I was deriving my comparisions based on the doukuwiki module, as since its the simplest module of the batch thats functional.

this:
image

Compared to this

under the dokuwiki Module the traefik configs have been implemented in a seprate file, while in the kickstart, they are implemented together with the config, is there something i am missing?

2 Likes

each action does something, it is a best practice to separate actions, the action is ordered by the number, 10 first 20 second etc

dokuwiki is really a start, you have to do a lot to make something … please continue

1 Like

and i had assumed that if you define the configs, they will automagically appear in the settings interface… shock unto me when i ran what i built, Nada…

1 Like

is there a creteria to the numbering, eg, in dokuwiki,

under configure module, we move from 20, 30 then 60 why not 40 or 50

1 Like

When I code
validation are under 10
then service often 80
after for action that needs the service have been restarted but like you decide your convention, action are applied from 1 to 100 (maybe more never tried)

1 Like

well a bit more complicated for now please keep a focus on the API we could help you for the UI later

you need a get-configuration to prepare the data to the UI
you need a configure-module to retrieve from the UI and configure the backend

to understand how to use the API please read https://github.com/NethServer/ns8-roundcubemail/blob/main/README.md

keep in mind when you code to update your readme, it will save your life

2 Likes

so basically if a given module has multiple Module has way too many actions to be performed, then the execution will follow the numbering order as goes.

NOw i am curious regarding parsing settings and configs, especially in more detailed setups… (i am looking at matrix for future with all its goodies) for later discussion

Are configs defined under configure automatically the ones defined for ENV file of the docker, or that needs to be worked on seprately

1 Like

this is an example to make an env file for roundcubemail

we will load here : https://github.com/NethServer/ns8-roundcubemail/blob/main/imageroot/systemd/user/roundcubemail-app.service#L14

1 Like

when you use agent.set_env('FOOVAR",“foovar”) you write the value of foovar to an environment vars automatically

1 Like

huh, discovered this while working on the module

these seem to have been defined correctly

i think i got the hang of configuring these fixed settings.

What i am deeply curious about would be how to handle ports and ports forwards, not for the solution i am working on now, but almost all the future ones make use of shit load of ports

Si there no need to touch them, or those have to be modified in some capacity as well.

2 Likes

you can define range of port, you can define to use the host network like ejabberd and open them in the FW, many possible solutions

1 Like

Sorry mates, just a note about the terms “action” and “step”. The action is for example configure-module, whilst the “step” is 10EnvRoundcubemail.

2 Likes

how do i get the installed app to appear under installed applcations, i can get to its setting page though, but without the notification cetre there is o other way to access it

to the Dev team, i am curious, why did you choose to use VueJS V2 instead of VueJS V3?

considering VueJS V2 support will end In December 2023?

After Installing Said Module, i am getting the followign error:

Traceback (most recent call last):
  File "/home/ns8-paperless-ngx1/.config/actions/get-configuration/20read", line 15, in <module>
    env = f'module/{os.environ["MODULE_ID"]}/environment'
                    ^^
NameError: name 'os' is not defined

what could be causing this error

MAnaged to resolve the error. Now my config dont seem to be saving

Could you kindly Help me to figure out the following on this module.

Why is the servcie failing to start, its disabled and inactive
and secondly, why do the configurations fail to save as well, is it because its disabled?

1 Like

Add

import os

1 Like

I could see many errors I think

First in configure module you have some vars not defined

agent.set_env(“PAPERLESS_SECRET_KEY”, PAPERLESS_SECRET_KEY)

2 Likes

Second in systemd you need to change the https://github.com/compgeniuses/ns8-paperless-ngx/blob/ca2d7d2b9941c51d794ca50ab6b1f8c14e14fd6c/imageroot/systemd/user/ns8-paperless-ngx.service#L28

To the name of your container image that you can read in .config/state/environment

2 Likes

so, there must be default values that have been pre-defined… ok noted.

on which section is it not added that its required kindly.

i think i am abit lost on this part.