progmaticltd / homebox

A set of ansible scripts to build a personal mail server / private cloud / etc.
https://homebox.space/
GNU General Public License v3.0
465 stars 52 forks source link

Devel tools #296

Closed fredericmoulins closed 4 years ago

fredericmoulins commented 4 years ago

Add a set of containers for:

Also add the following options:

And generalize the tag "certificates" on the certificates role imports so that it can be used to fully (re-)generate all certificates when needed.

Please find more details in the commit messages.

fredericmoulins commented 4 years ago

Works beautifully, nice code and nice documentation, thank you.

Thanks!

Maybe I will add section in the dev documentation to attach a KVM guestto the docker bridge.

I've had my machine running as a router for I don't know how long, and I completely forgot that aspect. I would be curious to know how you did it.

There is another thing I haven't mentioned: there is a docker container module. If the containers were defined with it, the network configuration aspect (IP subnet and addresses, bridge) could be configurable. As it is now it is quite static in the certificates and tests roles. I wanted to make the Pebble integration work first, so it stayed with the docker-compose and Dockerfiles definitions, and the URLs hardcoded in the playbooks.

Let me know if you think that would be useful or easier to manage.

arodier commented 4 years ago

I've had my machine running as a router for I don't know how long, and I completely forgot that aspect. I would be curious to know how you did it.

When you are using kvm/libvirt, it creates a virtual network interface, called vnetX (X=0..9). When you start the docker compose, it creates a bridge, br-X****, (X=0..9) The only thing needed is to attach the virtual interface to the bridge, using this command:

brctl addif br-1aee0650c679 vnet0
fredericmoulins commented 4 years ago

When you start the docker compose, it creates a bridge, br-X****, (X=0..9) The only thing needed is to attach the virtual interface to the bridge, using this command:

Yes, but then there is no DHCP server on that bridge for the VM, right? Well, it's just to find out how to do document it in a simple way: to have the VM addressed on the same bridge as the containers.

arodier commented 4 years ago

I attach the virtual interface when the virtual machine is already started. Anyway, the IP address is taken from my home router.

fredericmoulins commented 4 years ago

I've had my machine running as a router for I don't know how long, and I completely forgot that aspect.

As a matter of fact, I did not explicitly configure my machine to behave as an IPv4 router. It seems that libvirt is successfully doing it (for virt-manager ; this is an ubuntu install). That's why I did not need to configure the interfaces and bridges.