[systemd-devel] Linking containers
Peter Paule
systemd-devel at fedux.org
Tue Feb 24 02:00:33 PST 2015
Hi,
while playing around with "systemd-nspawn" a lot in the last few days
two things
I'm really missing are links between containers like dkr supports
https://docs.docker.com/userguide/dockerlinks/ and getting an ip within the
container when running a single application like /usr/sbin/nginx and no
container-internal dhcp-server.
Are there plans to support something like that in future versions? Or
are there better options to do the same things?
Example:
systemd-nspawn -x -M db1 -D /var/lib/machines/centos-postgresql
/usr/bin/postgresql
systemd-nspawn -x -M web_app2 -D /var/lib/machines/centos-nginx
--link-with db1 /usr/sbin/nginx
I know that that there are some new options introduced with systemd 219, but I
was not able to make it work for my use case.
* --port
* --private-network
* --network-veth
Did I understand it correctly, that I need to install systemd-networkd or some
other dhcp-daemon to get an ip address for now?
# The use case #
Here's my use case. I would like to run everything in containers to better
separate web applications which use different software stacks - ruby, python,
native code etc. - security is important for me but not my main concern using
containers.
[ Client ] --> [ Web Server 1 ] -+-> [ Web App 1 ] -+-> [ Database 1 ]
| |
+-> [ Web App 2 ] -+
|
+-> [ Web Server 2 ]
My idea is to run an nginx-webserver as reverse proxy in front of some web
application and other web servers. It should be responsible to route requests
to the web applications/server.
Thanks.
Cheers
/pp
More information about the systemd-devel
mailing list