fabric8io / fabric8

fabric8 is an open source microservices platform based on Docker, Kubernetes and Jenkins
http://fabric8.io/
1.76k stars 504 forks source link

provide a mapping of profiles to docker images & kubelet YAML #2354

Open jstrachan opened 10 years ago

jstrachan commented 10 years ago

kube defines a YAML file for a pod (1..many containers) https://developers.google.com/compute/docs/containers/container_vms#container_manifest

we should have some way to define a pod (as being 1..N profiles) which then use/generate a docker image for each profile and then generate the YAML file based on the profile metadata (e.g. port mapping, environment vairables, labels, volumes etc).

For profiles for Java Containers this would involve generating docker container images on the fly; for Process Containers we'd do the same thing when this is fixed: https://github.com/fabric8io/fabric8/issues/1710

We'll need a way to define a pod though; a number of containers with names and associated profiles.

jstrachan commented 10 years ago

Incidentally the ports section of the YAML is interesting; inside kube and GCE folks assume the YAML can just hard code the host and container ports; since each pod gets its own IP address.

However thats probably not gonna work in all environments. e.g. using just vanilla linux and docker; the host port tends to be generated; so without some network stack magic, the mapping of container ports to host ports is gonna be different and not a hard coded set of things.

Being able to specify container & host ports sounds useful in situations when that can be done; otherwise we'll have to reuse the existing logic for docker/openshift where the host ports are dynamically generated and accessed via environment variables