Compare commits

..

3 Commits

Author SHA1 Message Date
Andrea Tarocchi 68a6a522e1
Bump FMP version to 4.3.1 (#37) 6 years ago
svor 29527583ca Update FMP version to 4.3.1 6 years ago
svor 3affacd4da Bump fmp version to 4.0.0 6 years ago
  1. 8
      .openshiftio/application.yaml
  2. 2
      Jenkinsfile
  3. 45
      README.adoc
  4. 40
      pom.xml
  5. 4
      src/test/java/com/redhat/fuse/boosters/rest/http/HttpRequestKT.java

8
.openshiftio/application.yaml

@ -38,7 +38,7 @@ parameters:
- name: BUILDER_IMAGE_NAME
description: Name of the image to use as a builder image
displayName: Builder Image Name
value: 'registry.access.redhat.com/fuse7/fuse-java-openshift:1.0'
value: 'fabric8/s2i-java:latest'
required: true
objects:
- apiVersion: v1
@ -47,9 +47,9 @@ objects:
name: fuse-java-openshift
spec:
tags:
- name: "1.0"
- name: "latest"
annotations:
description: Red Hat Fuse 7.0 Java S2I images.
description: Fabric8 Java S2I images.
iconClass: icon-jboss
tags: 'builder,jboss-fuse,java,xpaas,hidden'
version: '1.0'
@ -99,7 +99,7 @@ objects:
forcePull: true
from:
kind: ImageStreamTag
name: fuse-java-openshift:1.0
name: fuse-java-openshift:latest
incremental: true
type: Source
triggers:

2
Jenkinsfile vendored

@ -13,4 +13,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
boosterBuild("registry.access.redhat.com/fuse7/fuse-java-openshift:1.0")
boosterBuild()

45
README.adoc

@ -1,7 +1,4 @@
:launchURL: https://developers.redhat.com/launch
:image-registry: registry.access.redhat.com
:image-prefix: /fuse7/
:image-name-version: fuse-java-openshift:1.0
= REST API Level 0 - Fuse Booster
@ -78,48 +75,6 @@ Wait until you can see that the pod for the `fuse-rest-http-booster` application
. Click the URL to access the Greeting Service and then follow the instructions on that page.
[#single-node-without-preinstalled-images]
=== Running the booster on a single-node OpenShift cluster without preinstalled images
To deploy your booster to a running single-node OpenShift cluster without preinstalled images:
. Download the project and extract the archive on your local filesystem.
. Log in to your OpenShift cluster:
+
[source,bash,options="nowrap",subs="attributes+"]
----
$ oc login -u developer -p developer
----
. Create a new OpenShift project for the booster:
+
[source,bash,options="nowrap",subs="attributes+"]
----
$ oc new-project MY_PROJECT_NAME
----
. Import base images in your newly created project (MY_PROJECT_NAME):
+
[source,bash,options="nowrap",subs="attributes+"]
----
$ oc import-image {image-name-version} --from={image-registry}{image-prefix}{image-name-version} --confirm
----
. Build and deploy the project to the OpenShift cluster:
+
[source,bash,options="nowrap",subs="attributes+"]
----
$ mvn clean -DskipTests fabric8:deploy -Popenshift -Dfabric8.generator.fromMode=istag -Dfabric8.generator.from=MY_PROJECT_NAME/{image-name-version}
----
. In your browser, navigate to the `MY_PROJECT_NAME` project in the OpenShift console.
Wait until you can see that the pod for the `fuse-rest-http-booster` application has started up.
. On the project's `Overview` page, locate the URL for the `fuse-rest-http-booster` application. The URL uses this form:
`http://fuse-rest-http-booster-MY_PROJECT_NAME.OPENSHIFT_IP_ADDR.nip.io`.
. Click the URL to access the greetings service application and then follow the instructions on that page.
== Running the booster on OpenShift Online
To deploy this booster directly to OpenShift Online when you create the project at link:{launchURL}[].

40
pom.xml

@ -7,7 +7,7 @@
<groupId>com.redhat.fuse.boosters</groupId>
<artifactId>fuse-rest-http-booster</artifactId>
<version>7.0.0.fuse-760004</version>
<version>7.0.0.redhat-SNAPSHOT</version>
<name>Fuse :: Boosters :: Rest HTTP</name>
@ -15,19 +15,31 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<fuse.bom.version>7.4.0.fuse-740036-redhat-00002</fuse.bom.version>
<spring-boot.version>1.5.13.RELEASE</spring-boot.version>
<camel.version>2.21.2</camel.version>
<!-- versions of Maven plugins -->
<fmp.version>4.3.1</fmp.version>
<!-- version of Arquillian -->
<arquillian.cube.version>1.17.1</arquillian.cube.version>
<arquillian.version>1.4.0.Final</arquillian.version>
<openshift-client.version>4.0.7</openshift-client.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.redhat-fuse</groupId>
<artifactId>fuse-springboot-bom</artifactId>
<version>${fuse.bom.version}</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring-boot-dependencies</artifactId>
<version>${camel.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@ -94,10 +106,6 @@
<groupId>org.apache.camel</groupId>
<artifactId>camel-swagger-java-starter</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>openshift-client</artifactId>
</dependency>
<!-- Test -->
<dependency>
@ -132,7 +140,11 @@
<version>${arquillian.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>openshift-client</artifactId>
<version>${openshift-client.version}</version>
</dependency>
</dependencies>
<build>
@ -159,9 +171,9 @@
</configuration>
</plugin>
<plugin>
<groupId>org.jboss.redhat-fuse</groupId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${fuse.bom.version}</version>
<version>${spring-boot.version}</version>
<executions>
<execution>
<goals>
@ -225,9 +237,9 @@
<build>
<plugins>
<plugin>
<groupId>org.jboss.redhat-fuse</groupId>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${fuse.bom.version}</version>
<version>${fmp.version}</version>
<executions>
<execution>
<goals>

4
src/test/java/com/redhat/fuse/boosters/rest/http/HttpRequestKT.java

@ -16,6 +16,7 @@
package com.redhat.fuse.boosters.rest.http;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@ -42,8 +43,7 @@ public class HttpRequestKT {
public void templateTest() {
File template = new File(".openshiftio/application.yaml");
assertTrue(template.exists());
Map<String, String> templateParameters = Collections.singletonMap("SOURCE_REPOSITORY_URL",
"https://github.com/jboss-fuse/fuse-rest-http-booster");
Map<String, String> templateParameters = Collections.singletonMap("SOURCE_REPOSITORY_URL","https://github.com/jboss-fuse/fuse-rest-http-booster");
List<HasMetadata> resources = client.templates().load(template).process(templateParameters).getItems();
for(HasMetadata res : resources){

Loading…
Cancel
Save