Podman-compose to automate setup

Hi, is there anyone working on automating the setup of a Nethserver 8 with domain and modules, e.g. using Podman-compose and environment parameters?

It would be very good when setting it up for several different organizations and just having to put the information in an env file and then boot up and then be pretty much ready to start using it.


1 Like

Helle Pelle!

I’ve tried podman-compose in the past but it never worked well.
But I doubt you would like to have all modules and all domains configured in the same way. :slight_smile:
Still, what you’re asking for can be achieved using a bash script with some parameters.

Something like this:

curl https://raw.githubusercontent.com/NethServer/ns8-core/main/core/install.sh | bash
create-cluster <fqdn>:55820 Nethesis,1234
add-module ghcr.io/nethserver/openldap:latest
api-cli run module/openldap1/configure-module --data '{"provision":"new-domain","admuser":"admin","admpass":"secret","domain":"dom.test"}'
1 Like

Thanks. For most systems we are using Openshift and Helm but Podman is also OK.
The script is a doable solution. We want to be able to automate all setup including domain name and all modules needed. I will check the script way.

By the way, is it possible to set separate volumes to store data (mail and database)? We want to store data on some NFS mounted shares.

Yes, the simplest solution would be mount on NFS the /home directory.
Some rootfull container will save some data also inside /var/lib/nethserver and podman default dirs (depending on the distro config).

1 Like

We use something more powerfull than docker-compose it is called systemd. Each pod or container is started by a specific systemd service with requiring to other containers’s services. Systemd is able to start a container by loading an environment files and to perform tasks before or after the start.

Believe me it is solid as a rock

1 Like

speaking of which, how would one go about installing normal docker and docker compose programs in ns

No tested the two together. It should work however with podman you use the container from docker hub so I saw few interests of it

A container image from docker hub does not make a NS8 module by itself, like a RPM from RepoForge does not make a module for NS7 by itself.

The developer docs explain how to build a module.

1 Like