Coder Social home page Coder Social logo

davgordo / fuse-client-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rh-ei-stp/fuse-client-app

0.0 1.0 0.0 61 KB

A Spring Boot application written with Red Hat Fuse components that acts as an AMQP message producer and consumer.

Java 100.00%

fuse-client-app's Introduction

Multi-Datacenter Reference Architecture :: Fuse AMQP Client Application

A Spring Boot application written with Red Hat Fuse components that acts as an AMQP message producer and consumer.

Building the application

Build the application:

mvn clean install

Creating a container image with s2i

Get the latest Fuse image streams:

oc apply -f https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.fuse-730065-redhat-00002/fis-image-streams.json -n openshift

Create a binary s2i build configuration:

oc process -f openshift/build.yml -o yaml | oc apply -f -

Source application artifact and run image build:

oc start-build fuse-client-app --from-file=target/fuse-client-app-1.0-SNAPSHOT.jar --follow

Deploying the application image

Apply a configmap for application configuration:

oc create configmap fuse-client-app --from-file=src/main/resources/application.properties --dry-run -o yaml | oc apply -f -

Apply the application template:

oc process -f openshift/application.yml -o yaml | oc apply -f -

Rollout the latest deployment

oc rollout latest dc/fuse-client-app

Follow the progress of the deployment

oc rollout status dc/fuse-client-app --watch

Using a Jenkins pipeline for building and deploying

Get the latest Fuse image streams:

oc apply -f https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.fuse-730065-redhat-00002/fis-image-streams.json -n openshift

Create a project for CI

oc new-project ci

Deploy a Jenkins master

oc process jenkins-persistent MEMORY_LIMIT=2Gi ENABLE_OAUTH=false -o yaml -n openshift | oc apply -f -

Note: I did not have luck with Jenkins OAuth in an RHPDS v4.1 cluster. Turning off OAuth means the you log into the console with username: admin password: password

Apply the application pipeline

oc apply -f openshift/pipeline.yml

Note: At this time the pipeline is assuming we are deploying the app to the datacenter-a namespace. We can target other namespaces by changing the constants in the Jenkinsfile and configuring a Role Binding for the Jenkins service account in pipeline.yml.

Start the pipeline build

oc start-build fuse-client-app-pipeline

Integration Testing

The example includes a fabric8 arquillian OpenShift Integration Test. Once the container image has been built and deployed in OpenShift, the integration test can be run with:

mvn test -Dtest=*KT

The test is disabled by default and has to be enabled using -Dtest.

fuse-client-app's People

Contributors

davgordo avatar vbkgithub avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.