xebialabs-community / xld-openshift-plugin

Plugin to deploy war files on jboss gears in open shift and support for OpenShift v3 on Kubernetes
2 stars 6 forks source link

Design does not support multiple projects in the same server well #4

Closed MarkRx closed 7 years ago

MarkRx commented 7 years ago

The current model of the plugin stores the target project in the deployed. XLD does not allow multiple instances of the same application to be deployed to the same infrastructure item. As a result it isn't possible to have multiple projects have the same application deployed at once on the same openshift.Server object.

To work around this one would have to create an openshift.Server instance for each concurrent openshift project. This seems strange and results in duplication.

jdewinne commented 7 years ago

Hi Mark,

Would it work if we allow multiple projects to be set as part of the deployed? So change the kind from string into set_of_string.

Regards, Joris

MarkRx commented 7 years ago

Hello,

That will not work because separate projects may live on different lifecycles. For example, if I have a qa and an int project on the same openshift instance I don't want to go to both at the same time. I don't want to have to rely on the user selecting which infrastructure items to create/update/delete nor do I want to risk having one project accidentally update another one simply because they are part of the same deployment.

I think for now what we are going to do is create duplicate openshift.Server items - one for each pipeline stage (dev, qa, int, etc).

MarkRx commented 7 years ago

@px-djozis any thoughts?

px-djozis commented 7 years ago

This doesn't affect us.

MarkRx commented 7 years ago

I'm going to close this. The issue still exists but we are just going to work around it by having duplicate openshift.Servers. Changing our setup (especially if it were a breaking change) doesn't sound nice.

jdewinne commented 7 years ago

I want to reopen this issue and improve the way we're handling projects by allowing to provision them using the XLD 6.x provisioning mechanism. That should also allow to deploy openshift deployables directly to an openshift.Project and not to an openshift.Server

jdewinne commented 7 years ago

Changed this in v7.0.0, making a project also provisionable. Remark: This release ain't backwards compatible, as it is a design change from target container perspective.

px-djozis commented 7 years ago

Is there any chance of migration scripts or documentation on how to navigate this breaking change?

jdewinne commented 7 years ago

Can you let me know how many projects/deployeds you currently have under openshift? My first thought would be to remove them from XLD repository (while keeping them in OpenShift), and after that recreating them in XLD and running the needed deployments, while skipping all the steps. Would that work?