diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..248dbbf
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,30 @@
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
+target/
+.idea/
+*.iml
+.vscode/
+.classpath
+.project
+.settings/
diff --git a/.openshiftio/application.yaml b/.openshiftio/application.yaml
new file mode 100644
index 0000000..de5c544
--- /dev/null
+++ b/.openshiftio/application.yaml
@@ -0,0 +1,224 @@
+apiVersion: v1
+kind: Template
+metadata:
+ name: launchpad-builder-fuse-rest-http-booster
+ annotations:
+ description: This template creates a Build Configuration using an S2I builder.
+ tags: instant-app
+parameters:
+- name: SOURCE_REPOSITORY_URL
+ description: The source URL for the application
+ displayName: Source URL
+ required: true
+- name: SOURCE_REPOSITORY_REF
+ description: The branch name for the application
+ displayName: Source Branch
+ value: master
+ required: true
+- name: SOURCE_REPOSITORY_DIR
+ description: The location within the source repo of the application
+ displayName: Source Directory
+ value: .
+ required: true
+- name: ARTIFACT_COPY_ARGS
+ description: Syntax to be used to copy uberjar files to the target directory
+ displayName: Copy Args
+ value: '*-exec.jar'
+ required: true
+- name: GITHUB_WEBHOOK_SECRET
+ description: A secret string used to configure the GitHub webhook.
+ displayName: GitHub Webhook Secret
+ required: true
+ from: '[a-zA-Z0-9]{40}'
+ generate: expression
+- name: MAVEN_MIRROR_URL
+ description: Maven Nexus Repository to be used during build phase
+ displayName:
+ required: false
+objects:
+- apiVersion: v1
+ kind: ImageStream
+ metadata:
+ name: fis-java-openshift
+ spec:
+ tags:
+ - name: "1.0"
+ annotations:
+ description: JBoss Fuse Integration Services 1.0 Java S2I images.
+ iconClass: icon-jboss
+ supports: 'jboss-fuse:6.2.1,java:8,xpaas:1.2'
+ tags: 'builder,jboss-fuse,java,xpaas,hidden'
+ version: '1.0'
+ from:
+ kind: DockerImage
+ 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
+ kind: ImageStream
+ metadata:
+ name: fuse-rest-http-booster
+ spec: {}
+- apiVersion: v1
+ kind: BuildConfig
+ metadata:
+ name: fuse-rest-http-booster
+ labels:
+ app: fuse-rest-http-booster
+ group: com.redhat.fuse.boosters
+ provider: fabric8
+ spec:
+ output:
+ to:
+ kind: ImageStreamTag
+ name: fuse-rest-http-booster:latest
+ postCommit: {}
+ resources: {}
+ runPolicy: Serial
+ source:
+ git:
+ uri: ${SOURCE_REPOSITORY_URL}
+ ref: ${SOURCE_REPOSITORY_REF}
+ #contextDir: ${SOURCE_REPOSITORY_DIR}
+ type: Git
+ strategy:
+ sourceStrategy:
+ env:
+ - name: BUILD_LOGLEVEL
+ value: '5'
+ - name: MAVEN_ARGS_APPEND
+ value: "-pl ${SOURCE_REPOSITORY_DIR}"
+ - name: ARTIFACT_DIR
+ value: "${SOURCE_REPOSITORY_DIR}/target"
+ - name: MAVEN_MIRROR_URL
+ value: "${MAVEN_MIRROR_URL}"
+ - name: ARTIFACT_COPY_ARGS
+ value: "${ARTIFACT_COPY_ARGS}"
+ forcePull: true
+ from:
+ kind: ImageStreamTag
+ name: fis-java-openshift:2.0
+ incremental: true
+ type: Source
+ triggers:
+ - github:
+ secret: ${GITHUB_WEBHOOK_SECRET}
+ type: GitHub
+ - type: ConfigChange
+ - imageChange: {}
+ type: ImageChange
+ status:
+ lastVersion: 0
+- apiVersion: v1
+ kind: Service
+ metadata:
+ annotations:
+ prometheus.io/port: "9779"
+ prometheus.io/scrape: "true"
+ labels:
+ expose: "true"
+ app: fuse-rest-http-booster
+ provider: fabric8
+ group: com.redhat.fuse.boosters
+ name: fuse-rest-http-booster
+ spec:
+ ports:
+ - name: http
+ port: 8080
+ protocol: TCP
+ targetPort: 8080
+ selector:
+ app: fuse-rest-http-booster
+ provider: fabric8
+ group: com.redhat.fuse.boosters
+- apiVersion: v1
+ kind: DeploymentConfig
+ metadata:
+ labels:
+ app: fuse-rest-http-booster
+ provider: fabric8
+ group: com.redhat.fuse.boosters
+ name: fuse-rest-http-booster
+ spec:
+ replicas: 1
+ revisionHistoryLimit: 2
+ selector:
+ app: fuse-rest-http-booster
+ provider: fabric8
+ group: com.redhat.fuse.boosters
+ strategy:
+ rollingParams:
+ timeoutSeconds: 3600
+ type: Rolling
+ template:
+ metadata:
+ labels:
+ app: fuse-rest-http-booster
+ provider: fabric8
+ group: com.redhat.fuse.boosters
+ spec:
+ containers:
+ - env:
+ - name: KUBERNETES_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ image: fuse-rest-http-booster:latest
+ imagePullPolicy: IfNotPresent
+ livenessProbe:
+ httpGet:
+ path: /health
+ port: 8080
+ scheme: HTTP
+ initialDelaySeconds: 180
+ name: fuse-rest-http-booster
+ ports:
+ - containerPort: 8080
+ name: http
+ protocol: TCP
+ - containerPort: 9779
+ name: prometheus
+ protocol: TCP
+ - containerPort: 8778
+ name: jolokia
+ protocol: TCP
+ readinessProbe:
+ httpGet:
+ path: /health
+ port: 8080
+ scheme: HTTP
+ initialDelaySeconds: 10
+ securityContext:
+ privileged: false
+ triggers:
+ - type: ConfigChange
+ - imageChangeParams:
+ automatic: true
+ containerNames:
+ - fuse-rest-http-booster
+ from:
+ kind: ImageStreamTag
+ name: fuse-rest-http-booster:latest
+ type: ImageChange
+- apiVersion: v1
+ kind: Route
+ metadata:
+ labels:
+ app: fuse-rest-http-booster
+ provider: fabric8
+ group: com.redhat.fuse.boosters
+ name: fuse-rest-http-booster
+ spec:
+ port:
+ targetPort: 8080
+ to:
+ kind: Service
+ name: fuse-rest-http-booster
diff --git a/README.adoc b/README.adoc
new file mode 100644
index 0000000..08fcf0c
--- /dev/null
+++ b/README.adoc
@@ -0,0 +1,87 @@
+:launchURL: https://developers.redhat.com/launch
+
+= REST API Level 0 - Fuse Booster
+
+== Overview
+The REST API Level 0 mission shows how to map business operations to a remote procedure call endpoint over HTTP using a REST framework. This corresponds to Level 0 in the Richardson Maturity Model.
+Creating an HTTP endpoint using REST and its underlying principles to define your API lets you quickly prototype and design the API flexibly.
+
+This booster introduces the mechanics of interacting with a remote (exposed by Apache Camel) service using the HTTP protocol. It allows you to:
+. Execute an HTTP GET request on `api/greetings/{name}`` endpoint; using the url parameter `{name}` and producing a response in JSON format with a payload of Hello, $name! with $name replaced by the value of the url parameter used into the request.
+. Browse the api's Swagger page.
+
+== Deployment options
+
+This booster can run in the following modes:
+
+* Standalone on your machine
+* Single-node OpenShift cluster
+* OpenShift Online at link:{launchURL}[]
+
+The most effective way to demonstrate the booster is to deploy and run the project on OpenShift.
+For more details about running this booster on a single-node OpenShift cluster, CI/CD deployments, as well as the rest of the runtime, see the link:http://appdev.openshift.io/docs/spring-boot-runtime.html[Spring Boot Runtime Guide].
+
+IMPORTANT: This booster requires Java 8 JDK or greater and Maven 3.3.x or greater.
+
+== Running the booster standalone on your machine
+You can run this booster as a standalone project on your local machine:
+
+. Download the project and extract the archive on your local filesystem.
+. Build the project:
++
+[source,bash,options="nowrap",subs="attributes+"]
+----
+$ cd PROJECT_DIR
+$ mvn clean package
+----
+. then run the services as follows:
++
+[source,bash,options="nowrap",subs="attributes+"]
+----
+$ mvn spring-boot:run
+----
+. Visit link:http://localhost:8080[] and follow the instructions on that page.
+
+== Running the booster on a single-node OpenShift cluster
+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.
+
+To deploy your booster to a running single-node OpenShift cluster:
+
+. 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
+----
+
+. Build and deploy the project to the OpenShift cluster:
++
+[source,bash,options="nowrap",subs="attributes+"]
+----
+$ mvn clean -DskipTests fabric8:deploy -Popenshift
+----
+
+. 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
+You can deploy the circuit breaker booster directly to OpenShift Online when you create the project at link:{launchURL}[].
+
+. Visit link:{launchURL}[].
+. 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.
+
+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.
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..3d9c22e
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,215 @@
+
+
+ The REST API Level 0 mission shows how to map business operations to a remote procedure call endpoint over HTTP using a REST framework. This corresponds to Level 0 in the Richardson Maturity Model. + Creating an HTTP endpoint using REST and its underlying principles to define your API lets you quickly prototype and design the API flexibly. +
++ This booster introduces the mechanics of interacting with a remote (exposed by Apache Camel) service using the HTTP protocol. It allows you to: +
{name} and produce a response in JSON format with a payload of Hello, $name! with $name replaced by the value of the url parameter used into the request.