 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        [JBoss JIRA] (JBIDE-25504) Support hot deploy for workspace dependencies for SpringBoot applications on OpenShift
                                
                                
                                
                                    
                                        by Andre Dietisheim (JIRA)
                                    
                                
                                
                                        
    [ https://issues.jboss.org/browse/JBIDE-25504?page=com.atlassian.jira.plugi... ] 
Andre Dietisheim edited comment on JBIDE-25504 at 4/6/18 5:34 PM:
------------------------------------------------------------------
[~jeffmaury] to sum things up for now: 
restart & running the new classes only work if I copy the classes (org folder) directly to 
* */deployments/BOOT-INF/classes* (folder that contains the classes for the main springboot app)
* OR */deployments/BOOT-INF/lib/* (folder that contains the dependencies of the main springboot app)
It doesn't if I use an intermediary folder (aka I exploded the jar to a folder with the same/different name).
Thoughts?
was (Author: adietish):
[~jeffmaury] to sum things up for now: 
restart & running the new classes only work if I copy the classes (org folder) directly to 
* */deployments/BOOT-INF/classes*
* OR */deployments/BOOT-INF/lib/*
It doesn't if I use an intermediary folder (aka I exploded the jar to a folder with the same/different name).
Thoughts?
> Support hot deploy for workspace dependencies for SpringBoot applications on OpenShift
> --------------------------------------------------------------------------------------
>
>                 Key: JBIDE-25504
>                 URL: https://issues.jboss.org/browse/JBIDE-25504
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: openshift
>    Affects Versions: 4.5.2.AM2
>            Reporter: Jeff MAURY
>            Assignee: Andre Dietisheim
>              Labels: openshift, openshift_v3, server_adapter
>             Fix For: 4.5.3.Final
>
>         Attachments: springboot-dependencies.zip
>
>
> When a SpringBoot application is being deployed on OpenShift with the server adapter, we should support the following use case:
> * the SpringBoot app has a dependency which is avalailable in the workspace
> * when a modifiction is done on the dependency code, it should be synced to OpenShift by the server adapter
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
                                
                         
                        
                                
                                7 years, 6 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        [JBoss JIRA] (JBIDE-25504) Support hot deploy for workspace dependencies for SpringBoot applications on OpenShift
                                
                                
                                
                                    
                                        by Andre Dietisheim (JIRA)
                                    
                                
                                
                                        
    [ https://issues.jboss.org/browse/JBIDE-25504?page=com.atlassian.jira.plugi... ] 
Andre Dietisheim edited comment on JBIDE-25504 at 4/6/18 5:34 PM:
------------------------------------------------------------------
[~jeffmaury] to sum things up for now: 
restart & running the new classes only work if I copy the classes (org folder) directly to 
* */deployments/BOOT-INF/classes* (folder that contains the classes for the main springboot app)
* OR */deployments/BOOT-INF/lib/* (folder that contains the dependencies of the main springboot app)
It doesn't if I use an intermediary folder (aka I exploded the jar to a folder with the same/different name).
In both cases I can end up overwriting existing files since I cannot copy the classes to some intermediary folder. Thoughts?
was (Author: adietish):
[~jeffmaury] to sum things up for now: 
restart & running the new classes only work if I copy the classes (org folder) directly to 
* */deployments/BOOT-INF/classes* (folder that contains the classes for the main springboot app)
* OR */deployments/BOOT-INF/lib/* (folder that contains the dependencies of the main springboot app)
It doesn't if I use an intermediary folder (aka I exploded the jar to a folder with the same/different name).
Thoughts?
> Support hot deploy for workspace dependencies for SpringBoot applications on OpenShift
> --------------------------------------------------------------------------------------
>
>                 Key: JBIDE-25504
>                 URL: https://issues.jboss.org/browse/JBIDE-25504
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: openshift
>    Affects Versions: 4.5.2.AM2
>            Reporter: Jeff MAURY
>            Assignee: Andre Dietisheim
>              Labels: openshift, openshift_v3, server_adapter
>             Fix For: 4.5.3.Final
>
>         Attachments: springboot-dependencies.zip
>
>
> When a SpringBoot application is being deployed on OpenShift with the server adapter, we should support the following use case:
> * the SpringBoot app has a dependency which is avalailable in the workspace
> * when a modifiction is done on the dependency code, it should be synced to OpenShift by the server adapter
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
                                
                         
                        
                                
                                7 years, 6 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        [JBoss JIRA] (JBIDE-25504) Support hot deploy for workspace dependencies for SpringBoot applications on OpenShift
                                
                                
                                
                                    
                                        by Andre Dietisheim (JIRA)
                                    
                                
                                
                                        
    [ https://issues.jboss.org/browse/JBIDE-25504?page=com.atlassian.jira.plugi... ] 
Andre Dietisheim commented on JBIDE-25504:
------------------------------------------
[~jeffmaury] to sum things up for now: 
restart & running the new classes only work if I copy the classes (org folder) directly to 
* */deployments/BOOT-INF/classes*
* OR */deployments/BOOT-INF/lib/*
It doesn't if I use an intermediary folder (aka I exploded the jar to a folder with the same/different name).
Thoughts?
> Support hot deploy for workspace dependencies for SpringBoot applications on OpenShift
> --------------------------------------------------------------------------------------
>
>                 Key: JBIDE-25504
>                 URL: https://issues.jboss.org/browse/JBIDE-25504
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: openshift
>    Affects Versions: 4.5.2.AM2
>            Reporter: Jeff MAURY
>            Assignee: Andre Dietisheim
>              Labels: openshift, openshift_v3, server_adapter
>             Fix For: 4.5.3.Final
>
>         Attachments: springboot-dependencies.zip
>
>
> When a SpringBoot application is being deployed on OpenShift with the server adapter, we should support the following use case:
> * the SpringBoot app has a dependency which is avalailable in the workspace
> * when a modifiction is done on the dependency code, it should be synced to OpenShift by the server adapter
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
                                
                         
                        
                                
                                7 years, 6 months
                        
                        
                 
         
 
        
            
        
        
        
            
        
        
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        [JBoss JIRA] (JBIDE-25830) After starting CDK server adapter OpenShift Connection does not work when oc is not on path
                                
                                
                                
                                    
                                        by Rob Stryker (JIRA)
                                    
                                
                                
                                        
    [ https://issues.jboss.org/browse/JBIDE-25830?page=com.atlassian.jira.plugi... ] 
Rob Stryker commented on JBIDE-25830:
-------------------------------------
I just checked nad tested, and I can't replicate this bug. 
1) I removed oc from my path
2) I ensured no minishift_home is set
3) I start my eclipse environment
4) I open the openshift 3 preference page and verify there is no workspace setting for oc location
5) I create a cdk server, pointing to a cdk3.2 instance, and a minishift_home of ~/.minishift
6) I start the cdk server adapter
7) I wait
8) I get asked to approve an SSL connection, which I approve
9) The openshift connection is created
10) I edit the openshift connection, and expand the advanced section
11) I verify that "override oc location' is checked
12) I verify that the path to oc is set to /home/rob/.minishift/cache/oc/v3.6.173.0.21/oc
Since the usecase succeeded as expected, I then went to check the code to verify this wasn't magic. 
CDKOpenshiftUtility has the following logic:
{code}
		String ocLoc = env.get(ServiceManagerEnvironmentLoader.OC_LOCATION_KEY);
		if (ocLoc != null) {
			((Connection) con).setExtendedProperty(ICommonAttributes.OC_LOCATION_KEY, ocLoc);
			((Connection) con).setExtendedProperty(ICommonAttributes.OC_OVERRIDE_KEY, true);
		}
{code}
This means it is pulling the oc location from a "ServiceManagerEnvironment". Where did the service manager environment get it from? MinishiftServiceManagerEnvironmentLoader has some clues:
{code}
	private File findOCLocation(IServer server) {
		String profileHome = getMinishiftProfileHome(server);
		File root = new File(profileHome);
		if (root.exists()) {
			File cache = new File(root, "cache");
			File oc = new File(cache, "oc");
			if (oc.exists()) {
				String[] names = oc.list();
				if (names != null && names.length > 0) {
					Arrays.sort(names);
					String latest = names[names.length - 1];
					File latestF = new File(oc, latest);
					String platformDep = (Platform.getOS().equals(Platform.OS_WIN32) ? "oc.exe" : "oc");
					File ocBin = new File(latestF, platformDep);
					if (ocBin.exists())
						return ocBin;
				}
			}
		}
		return null;
	}
{code}
This seems to properly return ~/.minishift/cache/oc/v3.6.173.0.21/oc
Can you explain where this is going wrong for you? It seems to work 100% as expected for me. 
> After starting CDK server adapter OpenShift Connection does not work when oc is not on path
> -------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-25830
>                 URL: https://issues.jboss.org/browse/JBIDE-25830
>             Project: Tools (JBoss Tools)
>          Issue Type: Enhancement
>          Components: cdk, openshift
>    Affects Versions: 4.5.3.AM3
>            Reporter: Josef Kopriva
>            Assignee: Rob Stryker
>              Labels: cdk_server_adapter, connection
>             Fix For: 4.5.3.Final
>
>
> OpenShift connection should be working, when user starts CDK server adapter, even if you do not have oc on path. In my opinion OpenShift connection should be working "out of box" when user starts CDK server adapter.
> steps:
> # ASSERT: oc is not on path
> # EXEC: Start CDK server adapter
> # ASSERT: OpenShift connection is created, but does not fully work (all oc related operations wont)
> Error: oc is not set for OpenShift connection to CDK and OpenShift connection does not work.
> Expected: OpenShift connection should be working without user touch.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
                                
                         
                        
                                
                                7 years, 6 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        [JBoss JIRA] (JBIDE-25677) Server adapter: Timers are incorrectly managed
                                
                                
                                
                                    
                                        by Andre Dietisheim (JIRA)
                                    
                                
                                
                                        
    [ https://issues.jboss.org/browse/JBIDE-25677?page=com.atlassian.jira.plugi... ] 
Andre Dietisheim commented on JBIDE-25677:
------------------------------------------
[~jeffmaury] I dont even know what timer was killing your adapter (I looked through code and only saw timeouts when we launch, not when publishing). Do you remember what timer made your adapter fail?
> Server adapter: Timers are incorrectly managed
> ----------------------------------------------
>
>                 Key: JBIDE-25677
>                 URL: https://issues.jboss.org/browse/JBIDE-25677
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>    Affects Versions: 4.5.2.Final
>            Reporter: Jeff MAURY
>            Assignee: Andre Dietisheim
>              Labels: openshift, openshift_v3, server_adapter
>             Fix For: 4.5.3.Final
>
>
> Timers are incorrectly managed in OpenShift server adapter. I tried to create a NodeJS server adapter on OpenShift Online Starter. As the first rsync is long (thanks to .npm and node_modules), it may take more than 5mns as OpenShift Online Starter is resource limited. I think we should rather monitor the activity of the rsync operation (through messages) and set a timer related to this activity.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
                                
                         
                        
                                
                                7 years, 6 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        [JBoss JIRA] (JBIDE-25677) Server adapter: Timers are incorrectly managed
                                
                                
                                
                                    
                                        by Andre Dietisheim (JIRA)
                                    
                                
                                
                                        
    [ https://issues.jboss.org/browse/JBIDE-25677?page=com.atlassian.jira.plugi... ] 
Andre Dietisheim commented on JBIDE-25677:
------------------------------------------
[~jeffmaury] I can't replicate any error when starting the adapter into devmode (as opposed to debugging). The deeper reason for sure is that we now dont sync .npm, .git any more: JBIDE-25506
> Server adapter: Timers are incorrectly managed
> ----------------------------------------------
>
>                 Key: JBIDE-25677
>                 URL: https://issues.jboss.org/browse/JBIDE-25677
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>    Affects Versions: 4.5.2.Final
>            Reporter: Jeff MAURY
>            Assignee: Andre Dietisheim
>              Labels: openshift, openshift_v3, server_adapter
>             Fix For: 4.5.3.Final
>
>
> Timers are incorrectly managed in OpenShift server adapter. I tried to create a NodeJS server adapter on OpenShift Online Starter. As the first rsync is long (thanks to .npm and node_modules), it may take more than 5mns as OpenShift Online Starter is resource limited. I think we should rather monitor the activity of the rsync operation (through messages) and set a timer related to this activity.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
                                
                         
                        
                                
                                7 years, 6 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        [JBoss JIRA] (JBIDE-25677) Server adapter: Timers are incorrectly managed
                                
                                
                                
                                    
                                        by Andre Dietisheim (JIRA)
                                    
                                
                                
                                        
    [ https://issues.jboss.org/browse/JBIDE-25677?page=com.atlassian.jira.plugi... ] 
Andre Dietisheim edited comment on JBIDE-25677 at 4/6/18 11:32 AM:
-------------------------------------------------------------------
[~jeffmaury] what is the exact error that you see? OpenShift Online works for me mostly and if something fails then it's getting into debugging in the 1st try as in JBIDE-25000.
was (Author: adietish):
[~jeffmaury] what is the exact error that you see? OpenShift Online works for me mostly and if something fails the it's getting into debugging in the 1st try as in JBIDE-25000.
> Server adapter: Timers are incorrectly managed
> ----------------------------------------------
>
>                 Key: JBIDE-25677
>                 URL: https://issues.jboss.org/browse/JBIDE-25677
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>    Affects Versions: 4.5.2.Final
>            Reporter: Jeff MAURY
>            Assignee: Andre Dietisheim
>              Labels: openshift, openshift_v3, server_adapter
>             Fix For: 4.5.3.Final
>
>
> Timers are incorrectly managed in OpenShift server adapter. I tried to create a NodeJS server adapter on OpenShift Online Starter. As the first rsync is long (thanks to .npm and node_modules), it may take more than 5mns as OpenShift Online Starter is resource limited. I think we should rather monitor the activity of the rsync operation (through messages) and set a timer related to this activity.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
                                
                         
                        
                                
                                7 years, 6 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        [JBoss JIRA] (JBIDE-25871) Server adapter: spring-boot-camel-xml adapter cannot rsync: no rsync nor tar available
                                
                                
                                
                                    
                                        by Andre Dietisheim (JIRA)
                                    
                                
                                
                                        
    [ https://issues.jboss.org/browse/JBIDE-25871?page=com.atlassian.jira.plugi... ] 
Andre Dietisheim edited comment on JBIDE-25871 at 4/6/18 11:29 AM:
-------------------------------------------------------------------
I currently experience odd behaviours with OSO (east1, east2), the camel/springboot demo app template is not fully executing, it won't create the service. When then trying to remove the partial resources nothing happens, in Eclipse and in Web UI.
was (Author: adietish):
I currently experience odd behaviours with OSO east2, the camel/springboot demo app template is not fully executing, it won't create the service. When then trying to remove the partial resources nothing happens, in Eclipse and in Web UI.
> Server adapter: spring-boot-camel-xml adapter cannot rsync: no rsync nor tar available
> --------------------------------------------------------------------------------------
>
>                 Key: JBIDE-25871
>                 URL: https://issues.jboss.org/browse/JBIDE-25871
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>    Affects Versions: 4.5.2.AM3
>            Reporter: Andre Dietisheim
>            Assignee: Andre Dietisheim
>              Labels: rsync, server_adapter, springboot
>             Fix For: 4.5.3.Final
>
>         Attachments: fuse-on-openshift.zip, pod-running.png, rsync-fails.png
>
>
> # ASSERT: have project *camel-ose-springboot-xml* imported to your workspace (from attached archive fuse-on-openshift)
> # ASSERT: have a connection to https://console.starter-us-east-2.openshift.com with a project *<username>-stage* 
> # EXEC: deploy project *camel-ose-springboot-xml* project via fabric-8 maven plugin:
> {code}
> mvn clean install fabric8:deploy \
> -Dkubernetes.master=https://console.starter-us-east-2.openshift.com \
> -Dkubernetes.namespace=adietish-stage \
> -Dkubernetes.auth.basic.username=<username> \
> -Dkubernetes.auth.basic.password=<password> \
> -Dfabric8.mode=openshift \
> -Dkubernetes.trust.certificates=true \
> -Dfabric8.build.strategy=s2i \
> -Dkubernetes.auth.tryServiceAccount=false \
> -Dfabric8.generator.from=fabric8/s2i-java \
> -Dfabric8.generator.fromMode=docker \
> -Dkubernetes.auth.tryKubeConfig=false
> {code}
> # ASSERT: you have a pod running for a service *camel-ose-springboot-xml*
>  !pod-running.png!
> # EXEC: create a server adapter for your service *camel-ose-springboot-xml*
> # ASSERT: adapter starts automatically and starts to sync local project to OpenShift
> Result: 
> RSync fails, you're told that the container has no strategy for syncing, neither rsync nor tar are available.
>  !rsync-fails.png! 
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
                                
                         
                        
                                
                                7 years, 6 months