Takes an Input of an existing compose yaml file, then uses the data within t, to generate nethserver 8 Apps, specific code, which only requires allitle fine tuning to achieve a complete Application.
This reduces Module Development TIme By upto 70%
This Generator was significant Efforts by @kemboielvis22 to simplify and increase our efficiency in how fast we can bring new Apps into the Nethserver Ecosystem.
When launched the first time,
Shoutout to @stephdl Who provided simplified and imporved templates to work with @davidep Who we asked so many trivial questions to achieve this work @mrmarkuz whose brain we generously borrowed to brainstorm on ideas. @Shane_Treweek for testing and providing feedback on initial version.
This is to help making of modules faster.
Hoping in future and in later updates to be able to generate a full module that works out of the box on the initial generation.
As per now the module generates:
services
env variables
Actions
etc (for back up)
For any issues and improvements you can create an issue and will be glad to solve
You selected: /home/markus/compose.yaml
The name of the app(Should be one word or separated by hyphen)?
> Wordpress
Enter the relative output path(use `pwd` )?
> generated-module2
Initialise and Push to Git(yes or no)
> no
Progress: +Inf% (1/0)
Copy complete! 1 items copied.
Parsing through service: wordpress
Parsed Environment for wordpress: map[WORDPRESS_DB_HOST:db WORDPRESS_DB_NAME:exampledb WORDPRESS_DB_PASSWORD:examplepass WORDPRESS_DB_USER:exampleuser]
Parsing through service: db
Parsed Environment for db: map[MYSQL_DATABASE:exampledb MYSQL_PASSWORD:examplepass MYSQL_RANDOM_ROOT_PASSWORD:1 MYSQL_USER:exampleuser]
Volume: wordpress
Value: <nil>
Volume: db
Value: <nil>
Error processing NS8 module: error while processing build image: error while replacing content in the file: File Path does not exist: generated-module2/build-images.sh
exit status 1
Progress: +Inf% (1/0)
Copy complete! 1 items copied.
Error processing NS8 module: error while processing build image: error while replacing content in the file: File Path does not exist: generated-module/build-images.sh
exit status 1
I tested it on OpenSuse with Go 1.24.
Could you share a working docker-compose.yaml file?
Thanks, that was the issue, after removing the template directory, it gets downloaded again and works.
I tried uploading the “Wordpress” project to github using a token and it worked, see see GitHub - mrmarkuz/ns8-wordpress
I needed to delete my old ns8-wordpress before.
I tried to build uptime-kuma using your nice module generator and it worked!
After creating the repo which uploaded the module I needed to do following changes:
I found that following is not working in ../actions/get-configuration/20read.
The last line needs to be intended correctly and there shouldn’t be an empty line in between.
if os.path.exists("uptime-kuma.env"):
data = agent.read_envfile("uptime-kuma.env")
else:
json.dump(config, fp=sys.stdout)
In ../actions/configure-module/10configure_environment_vars I needed to comment out the following as there are no variables used.
It should be UPTIME_KUMA_IMAGE, see Images | NS8 dev manual
As volume just use uptime-kuma-data instead of ./uptime-kuma-data to create a data volume.
If you use “./uptime-kuma-data” the directory needs to exist inside the state dir.
Auto-appending “:Z” to the volume would be nice too.
The right port needs to be set (3001 instead of 80), maybe this could be automated, the port is in the compose file.
Edit /home/uptime-kuma1/.config/systemd/user/uptime-kuma.service to set the port:
This is wonderful news. Thank you @mrmarkuz for testing.
@kemboielvis22 took all the knowledge and experience from building hundreds of NS8 Modules, and Applied it to implement Automations for Modules Creation. This is truly forward thinking. Kudos @kemboielvis22 for your work on the module generator, this will surely save hundreds of hours of dev time for implementing new Modules, and Make NS8 truly the de facto server for hosting business Applications.
Hopefully, scratchpad could also be improved to feature these works @davidep
A logo grabber would be nice as I hate to search for logos and sometimes need to add a transparent layer…don’t know if it’s possible
That would be nice but I don’t know if it’s possible as the generator doesn’t know what the app does so it’s hard to automatically create tests I think.
I don’t know if it’s needed as those are different approaches.
Scratchpad provides a playground inside NS8 to play around with podman and check if module creation is possible etc.
This is nice for beginners to get into podman and developing modules.
The module generator creates a module that preconfigures a lot and lets you install a module on NS8. One already needs to know stuff about modules.
On the Module testing, we are not looking at generally the module functionality, but the module adherence to defined rules for a module, we already have working templates, we have a complete yaml and env file, we can be able to test if the built module has everything necessary for the module to function. Of course the actual testing needs the module to be installed, but we could in actual sense, implement, SSh into server, install module, Configure Module, get config files, to verify the module can be installed and can be configured on an NS8 instance.
We could then wait, and run curl(fqdn) and listen to response
Thanks for your great work! I tried to integrate planka (see Twenty CRM 1.0.2 - #2 by transocean) using the generator and it worked but there were some minor things:
Please allow to also open .yml files, not only .yaml.
Maybe it’s just style but I think using \ line breaks to be able to see all parameters at a glance in the podman run command makes sense.