No yaml openshift resources created but build is success

333 views
Skip to first unread message

cmou...@redhat.com

unread,
May 11, 2017, 1:17:03 PM5/11/17
to fabric8
Hi,

When I execute this maven command "mvn clean install fabric8:deploy -Pintegration" using this profile & f-m-p 3.2.28

<plugin>
 
<groupId>io.fabric8</groupId>
 
<artifactId>fabric8-maven-plugin</artifactId>
 
<version>${fabric8.maven.plugin.version}</version>
 
<executions>
 
<execution>
 
<id>fmp</id>
 
<goals>
 
<goal>resource</goal>
 
<goal>build</goal>
 
</goals>
 
</execution>
 
</executions>
</plugin>



the project is well compiled but the openshift.yml file created under the target directory is empty.

INFO] --- fabric8-maven-plugin:3.2.28:resource (fmp) @ greeting-service ---
[INFO] F8: Running in OpenShift mode
[INFO] F8: Using docker image name of namespace: circuitbreaker
[INFO] F8: Using resource templates from /Users/chmoulli/Code/spring/spring-cloud/spring-cloud-kubernetes-fk/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/src/main/fabric8
...
[INFO] --- fabric8-maven-plugin:3.2.28:build (fmp) @ greeting-service ---
[INFO] F8: Using OpenShift build with strategy S2I
[WARNING] F8: No image build configuration found or detected
[INFO] 
...
INFO] --- fabric8-maven-plugin:3.2.28:deploy (default-cli) @ greeting-service ---
[INFO] F8: Using OpenShift at https://192.168.64.25:8443/ in namespace circuitbreaker with manifest /Users/chmoulli/Code/spring/spring-cloud/spring-cloud-kubernetes-fk/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/greeting-service/target/classes/META-INF/fabric8/openshift.yml 
[INFO] OpenShift platform detected
[INFO] Using project: circuitbreaker
[INFO] F8: HINT: Use the command `oc get pods -w` to watch your pods start up
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

What could be the issue ?

Regards

Charles



Roland Huss

unread,
May 11, 2017, 1:28:57 PM5/11/17
to cmou...@redhat.com, fabric8
You checked the proper location, target/classes/META-INF/fabric8/openshift.yml, right ? 

If the log output is read correctly it says that "[WARNING] F8: No image build configuration found or detected", which means that no image configuration is given and no generator kicked in.

Could this be the case ?

... roland

--
You received this message because you are subscribed to the Google Groups "fabric8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
... roland

Charles Moulliard

unread,
May 11, 2017, 1:34:35 PM5/11/17
to Roland Huss, fabric8
On Thu, May 11, 2017 at 7:28 PM, Roland Huss <rolan...@gmail.com> wrote:
You checked the proper location, target/classes/META-INF/fabric8/openshift.yml, right ?

Yes --> As you can see it just contains the file copied from src/main/fabric8/route.yaml

more target/classes/META-INF/fabric8/openshift.yml
---
apiVersion: v1
kind: List
items:
- apiVersion: v1
  kind: Route
  metadata:
    labels:
      provider: fabric8
      project: greeting-service
      version: 0.2.0.BUILD-SNAPSHOT
      group: org.springframework.cloud
    name: greeting-service
  spec:
    port:
      targetPort: 8080
    to:
      kind: Service
      name: greeting-service
 
 

If the log output is read correctly it says that "[WARNING] F8: No image build configuration found or detected", which means that no image configuration is given and no generator kicked in.

Could this be the case ?

>> As this is a Spring Boot project, why the generator wasn't kicked in ? 

... roland

To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
... roland

James Strachan

unread,
May 11, 2017, 1:49:34 PM5/11/17
to Charles Moulliard, Roland Huss, fabric8
You don't need to hand craft a route.yml as fabric8-maven-plugin will make one for you.

Could you post your entire pom.xml? 


... roland

To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
... roland

--
You received this message because you are subscribed to the Google Groups "fabric8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
James
-------
Red Hat

Twitter: @jstrachan
Email: james.s...@gmail.com
Blog: https://medium.com/@jstrachan/

open source development platform

open source event based lambda programming

James Strachan

unread,
May 11, 2017, 1:53:27 PM5/11/17
to Charles Moulliard, Roland Huss, fabric8
Btw 3.2.x is 3 months old, I'd recommend upgrading to a newer version

cmou...@redhat.com

unread,
May 11, 2017, 2:38:24 PM5/11/17
to fabric8

cmou...@redhat.com

unread,
May 12, 2017, 1:48:18 AM5/12/17
to fabric8
If I use 3.3.5, I get this error 

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project name-service: Failed to install artifact org.springframework.cloud:name-service:yml:is:0.2.0.BUILD-SNAPSHOT: /Users/chmoulli/Code/spring/spring-cloud/spring-cloud-kubernetes-fk/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/name-service/target/name-service-is.yml (No such file or directory) -> [Help 1]




On Thursday, May 11, 2017 at 7:17:03 PM UTC+2, cmou...@redhat.com wrote:

Roland Huss

unread,
May 12, 2017, 2:27:25 AM5/12/17
to cmou...@redhat.com, fabric8
You don't declare the spring-boot-maven-plugin in your pom.xml. That is the trigger for the fmp to detect a spring-boot application.

... roland

--
You received this message because you are subscribed to the Google Groups "fabric8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
... roland

Charles Moulliard

unread,
May 12, 2017, 2:39:51 AM5/12/17
to Roland Huss, fabric8
I'm the guilty as this is documented - https://maven.fabric8.io/#generator-spring-boot
Many thanks Roland ;-)

To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
... roland

James Strachan

unread,
May 12, 2017, 3:13:24 AM5/12/17
to Charles Moulliard, fabric8
Could you post the command line you typed and the full maven output please? It might be there's a missing ${basedir} somewhere in the is.yml generation - did it get generated in the parent mavne module instead?


--
You received this message because you are subscribed to the Google Groups "fabric8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

cmou...@redhat.com

unread,
May 12, 2017, 4:06:29 AM5/12/17
to fabric8


On Thursday, May 11, 2017 at 7:17:03 PM UTC+2, cmou...@redhat.com wrote:

James Strachan

unread,
May 12, 2017, 4:10:40 AM5/12/17
to Charles Moulliard, fabric8
Cool.

I'd still like your CLI and maven output from your previous email as there could be a multi-module bug around the use of "is.yml" - from this email:

On 12 May 2017 at 06:48, <cmou...@redhat.com> wrote:
If I use 3.3.5, I get this error 

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project name-service: Failed to install artifact org.springframework.cloud:name-service:yml:is:0.2.0.BUILD-SNAPSHOT: /Users/chmoulli/Code/spring/spring-cloud/spring-cloud-kubernetes-fk/spring-cloud-kubernetes-examples/kubernetes-circuitbreaker-ribbon-example/name-service/target/name-service-is.yml (No such file or directory) -> [Help 1]

Reply all
Reply to author
Forward
0 new messages