Skip to content

Declarative containers: more veth interfaces#15496

Merged
fpletz merged 2 commits intoNixOS:masterfrom
kampfschlaefer:containers_more_veth_interfaces
Jul 31, 2016
Merged

Declarative containers: more veth interfaces#15496
fpletz merged 2 commits intoNixOS:masterfrom
kampfschlaefer:containers_more_veth_interfaces

Conversation

@kampfschlaefer
Copy link
Copy Markdown
Contributor

@kampfschlaefer kampfschlaefer commented May 16, 2016

With these changes, a container can have more then one veth-pair. This allows for example to have LAN and DMZ as bridges on the host and add dedicated containers for proxies, ipv4-firewall and ipv6-firewall. Or to have a bridge for normal WAN, one bridge for administration and one bridge for customer-internal communication. So that web-server containers can be reached from outside per http, from the management via ssh and can talk to their database via the customer network.

The scripts to set up the containers are now rendered several times instead of just one template. The scripts now contain per-container code to configure the extra veth interfaces. The default template without support for extra-veths is still rendered for the imperative containers.

Also a test is there to see if extra veths can be placed into host-bridges or can be reached via routing.

cc @edolstra @fpletz


Things done

@mention-bot
Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified @edolstra, @mokasin and @oxij to be potential reviewers

@kampfschlaefer kampfschlaefer changed the title Containers more veth interfaces Declarative containers: more veth interfaces May 16, 2016
@joachifm joachifm added 0.kind: enhancement Add something new or improve an existing system. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS labels May 21, 2016
kampfschlaefer referenced this pull request May 26, 2016
Without the templating (which is still present for imperative containers), it
will be possible to set individual dependencies. Like depending on the network
only if the hostbridge or hardware interfaces are used.

Ported from #3021
@kampfschlaefer
Copy link
Copy Markdown
Contributor Author

I would rebase this PR to the current master (and have done so locally) with its updated systemd, but current master has broken containers…

@kampfschlaefer kampfschlaefer force-pushed the containers_more_veth_interfaces branch 3 times, most recently from c980022 to a0102ef Compare June 5, 2016 16:58
@fpletz fpletz self-assigned this Jun 26, 2016
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if condition then "foo" else "" is more neatly expressed as optionalString condition "foo".

@joachifm
Copy link
Copy Markdown
Contributor

@fpletz anything we can do to help move this along?

@kampfschlaefer kampfschlaefer force-pushed the containers_more_veth_interfaces branch 3 times, most recently from de225fa to 723eb97 Compare July 26, 2016 18:58
With these changes, a container can have more then one veth-pair. This allows for example to have LAN and DMZ as bridges on the host and add dedicated containers for proxies, ipv4-firewall and ipv6-firewall. Or to have a bridge for normal WAN, one bridge for administration and one bridge for customer-internal communication. So that web-server containers can be reached from outside per http, from the management via ssh and can talk to their database via the customer network.

The scripts to set up the containers are now rendered several times instead of just one template. The scripts now contain per-container code to configure the extra veth interfaces. The default template without support for extra-veths is still rendered for the imperative containers.

Also a test is there to see if extra veths can be placed into host-bridges or can be reached via routing.
@kampfschlaefer kampfschlaefer force-pushed the containers_more_veth_interfaces branch from 723eb97 to 07de11f Compare July 28, 2016 22:30
@kampfschlaefer
Copy link
Copy Markdown
Contributor Author

@fpletz ping?

Would be nice to get that into master before 16.09 is branched off…

@joachifm joachifm added this to the 16.09 milestone Jul 30, 2016
@fpletz
Copy link
Copy Markdown
Member

fpletz commented Jul 31, 2016

Sorry for the long wait. I just had another look, let's merge this! 👍

@fpletz fpletz merged commit d7f7ef4 into NixOS:master Jul 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.kind: enhancement Add something new or improve an existing system. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants