spring-cloud / spring-cloud-deployer

The Spring Cloud Deployer project defines an SPI for deploying long lived applications and short lived tasks
162 stars 87 forks source link

AppDeploymentRequest should support multiple resources #105

Open waseemh opened 8 years ago

waseemh commented 8 years ago

SPI assumes that an app deployment has a single resource. This is enforced in AppDeploymentRequest which allows a single Resource object. However in real-world use cases it might not be always correct.

For example: when deploying a web application with UI and backend, each component runs on a separate container from different Docker images -> multiple DockerResources for same deployment request.

Another realistic example comes from Kubernetes world - A Pod is a single unit of deployment which might include multiple containers of different images. Such scenario is impossible to implement using current SPI and spring-cloud-deployer-kubernetes module: http://kubernetes.io/docs/user-guide/pods/multi-container/#sample-file

To solve this issue, AppDeploymentRequest should include a list of Resource objects, rather than a single object.

markfisher commented 8 years ago

Would you consider this covered by https://github.com/spring-cloud/spring-cloud-deployer/issues/99 ?

waseemh commented 8 years ago

It depends whether application grouping takes into consideration mutiple resources or not. For example it should allow mapping each application to its resource. Also apps in group should be in same deployment context to be considered as a 'single unit of deployment'

waseemh commented 8 years ago

Want to mention also that different resources might require different deployment properties in same app deployment context (i.e: app is composed of nginx and apache containers - nginx DockerResource requires 1025Mi while Apache DockerResource requires 512Mi)