Browse Source

/changed for red hat versions and images.

pull/4/head
Andrea Tarocchi 8 years ago
parent
commit
0fe753a734
  1. 22
      .openshiftio/application.yaml
  2. 46
      README.adoc
  3. 13
      pom.xml

22
.openshiftio/application.yaml

@ -39,19 +39,29 @@ objects:
- apiVersion: v1 - apiVersion: v1
kind: ImageStream kind: ImageStream
metadata: metadata:
name: fabric8-s2i-java name: fis-java-openshift
spec: spec:
tags: tags:
- name: "latest" - name: "1.0"
annotations: annotations:
description: Fabric8 Java S2I images. description: JBoss Fuse Integration Services 1.0 Java S2I images.
iconClass: icon-jboss iconClass: icon-jboss
supports: 'jboss-fuse:7,java:8,xpaas:1.2' supports: 'jboss-fuse:6.2.1,java:8,xpaas:1.2'
tags: 'builder,jboss-fuse,java,xpaas,hidden' tags: 'builder,jboss-fuse,java,xpaas,hidden'
version: '1.0' version: '1.0'
from: from:
kind: DockerImage kind: DockerImage
name: 'fabric8-s2i-java:latest' name: 'registry.access.redhat.com/jboss-fuse-6/fis-java-openshift:1.0'
- name: "2.0"
annotations:
description: JBoss Fuse Integration Services 2.0 Java S2I images.
iconClass: icon-jboss
supports: 'jboss-fuse:6.3.0,java:8,xpaas:1.2'
tags: 'builder,jboss-fuse,java,xpaas'
version: '2.0'
from:
kind: DockerImage
name: 'registry.access.redhat.com/jboss-fuse-6/fis-java-openshift:2.0'
- apiVersion: v1 - apiVersion: v1
kind: ImageStream kind: ImageStream
metadata: metadata:
@ -95,7 +105,7 @@ objects:
forcePull: true forcePull: true
from: from:
kind: ImageStreamTag kind: ImageStreamTag
name: fabric8-s2i-java:latest name: fis-java-openshift:2.0
incremental: true incremental: true
type: Source type: Source
triggers: triggers:

46
README.adoc

@ -46,6 +46,10 @@ $ mvn spring-boot:run
If you have a single-node OpenShift cluster, such as Minishift or the Red Hat Container Development Kit, link:http://appdev.openshift.io/docs/minishift-installation.html[installed and running], you can deploy your booster there. If you have a single-node OpenShift cluster, such as Minishift or the Red Hat Container Development Kit, link:http://appdev.openshift.io/docs/minishift-installation.html[installed and running], you can deploy your booster there.
A single-node OpenShift cluster provides you with access to a cloud environment that is similar to a production environment. A single-node OpenShift cluster provides you with access to a cloud environment that is similar to a production environment.
IMPORTANT: You need to run this example on Container Development Kit 3.3 or OpenShift 3.7.
Both of these products have suitable Fuse images pre-installed.
If you run it in an evironment where those images are not preinstalled follow the steps described in <<single-node-without-preinstalled-images>>.
To deploy your booster to a running single-node OpenShift cluster: To deploy your booster to a running single-node OpenShift cluster:
. Download the project and extract the archive on your local filesystem. . Download the project and extract the archive on your local filesystem.
@ -77,11 +81,51 @@ Wait until you can see that the pod for the `fuse-rest-http-booster` application
. Just above the entry for the `fuse-rest-http-booster` application on the `Overview` page, there is a URL of the form `http://fuse-rest-http-booster-MY_PROJECT_NAME.OPENSHIFT_IP_ADDR.nip.io`. . Just above the entry for the `fuse-rest-http-booster` application on the `Overview` page, there is a URL of the form `http://fuse-rest-http-booster-MY_PROJECT_NAME.OPENSHIFT_IP_ADDR.nip.io`.
Click on the URL to access the greetings service application and follow the instructions on that page. Click on the URL to access the greetings service application and 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 fis-java-openshift:2.0 --from=registry.access.redhat.com/jboss-fuse-6/fis-java-openshift:2.0 --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/fis-java-openshift:2.0
----
. 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.
. Just above the entry for the `fuse-rest-http-booster` application on the `Overview` page, there is a URL of the form `http://fuse-rest-http-booster-MY_PROJECT_NAME.OPENSHIFT_IP_ADDR.nip.io`.
Click on the URL to access the greetings service application and follow the instructions on that page.
== Running the booster on OpenShift Online == Running the booster on OpenShift Online
You can deploy the circuit breaker booster directly to OpenShift Online when you create the project at link:{launchURL}[]. You can deploy the circuit breaker booster directly to OpenShift Online when you create the project at link:{launchURL}[].
. Visit link:{launchURL}[]. . Visit link:{launchURL}[].
. At the *Deployment step*, select *Use OpenShift Online*. . At the *Deployment step*, select *Use OpenShift Online*.
. Follow the on-screen instructions to create a new *REST API Level 0* project using the *Fuse* runtime. . Follow the on-screen instructions to create a new *REST API Level 0ee* project using the *Fuse* runtime.
NOTE: As part of the process of creating this booster, link:{launchURL}[] sets up a project with a CI/CD deployment of this booster. You can see the status of this deployment in your Single-node OpenShift Cluster or OpenShift Online Web Console. NOTE: As part of the process of creating this booster, link:{launchURL}[] sets up a project with a CI/CD deployment of this booster. You can see the status of this deployment in your Single-node OpenShift Cluster or OpenShift Online Web Console.

13
pom.xml

@ -13,19 +13,20 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spring-boot.version>1.5.12.RELEASE</spring-boot.version> <spring-boot.version>1.5.4.RELEASE</spring-boot.version>
<camel.version>2.21.0</camel.version> <camel.version>2.21.0.000033-fuse-000001-redhat-1</camel.version>
<fis.version>2.3.7.fuse-000036-redhat-2</fis.version>
<!-- versions of Maven plugins --> <!-- versions of Maven plugins -->
<fmp.version>3.5.33</fmp.version> <fmp.version>3.5.32.fuse-000040-redhat-2</fmp.version>
</properties> </properties>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>io.fabric8</groupId>
<artifactId>spring-boot-dependencies</artifactId> <artifactId>fabric8-project-bom-camel-spring-boot</artifactId>
<version>${spring-boot.version}</version> <version>${fis.version}</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>

Loading…
Cancel
Save