Giter Club home page Giter Club logo

s2i-payara's Introduction

Payara 5 s2i Builder for OpenShift

The s2i-payara builder simplifies build, configuration and deployment of ThinWARs in cloud native environments like OpenShift and docker.

Getting started

The s2i-payara inherits from the payara5-s2i and indirectly java8-s2i docker images from Docklands. The base CentOS 7 operating system, Java and Payara 5 are inherited.

Instead of building the universe, s2i-payara configures the Payara 5 server using stock pre-boot scripts, copies 3rd-party libraries like e.g. JDBC-drivers and deploys a ThinWAR from the local folder.

Also checkout the thin.war example.

Payara configuration

Create a asadmin-preboot or asadmin-postboot scripts to configure the application server: https://docs.payara.fish/documentation/payara-micro/asadmin/pre-and-post-boot-scripts.html

Building the builder

The build is based on Payara5 s2i base image from docklands, published to dockerhub airhacks/payara-s2i:5.184.

  1. Clone https://github.com/AdamBien/docklands.git
  2. cd java/java8-s2i/ and docker build -t airhacks/java-s2i .
  3. cd payara-s2i and docker build -t airhacks/payara-s2i:5.184

Now build the builder:

  1. git clone https://github.com/AdamBien/s2i-payara
  2. docker build -t airhacks/s2i-payara .

Installing on OpenShift

  1. Import the image into an image stream: oc import-image s2i-payara --from=airhacks/s2i-payara:latest --confirm
  2. Create an app from the imported image: oc new-app s2i-payara:latest~/. --name=thinwar
  3. Start a build: oc start-build --from-dir . thinwar from a directory with the following contents:
File Required? Description
*.war Yes The ThinWar / microservice
ext/*.jar No JDBC drivers and external libraries
asadmin-preboot No Payara configuration preeboot script
asadmin-postboot No Payara configuration postboot script
env-file No Build-time env-entries

Also see a ThinWAR example

s2i in action

ThinWARs with Payara and OpenShift

s2i-payara's People

Contributors

adambien avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

s2i-payara's Issues

Build error running oc start-build command

Hi Adam,

I know that this is a quite old project now (3 years) but was looking for an openshift builder for Payara and found this one. Unfortunately, following the guide, I get the following in the bc log:

_=/usr/bin/printenv
ls: cannot access /tmp/src/*.war: No such file or directory
### Installing Thin WARs  into /opt/deploy
cp: cannot stat '/tmp/src/*.war': No such file or directory
error: build error: error building at STEP "RUN /usr/libexec/s2i/assemble": error while running runtime: exit status 1

Here is the sequence of commands that I'm running:

$ git clone https://github.com/AdamBien/s2i-payara
$ cd s2i-payara
$ docker build -t airhacks/s2i-payara .
$ oc import-image s2i-payara --from=airhacks/s2i-payara:latest --confirm
$ oc new-app s2i-payara:latest~/. --name=thinwar
$ cd sample
$ oc start-build --from-dir . thinwar

What obviously happens is that the WAR is expected to be found in /tmp/src and, in my case, this isn't the case, of course, as it is in the /s2i-payara/sample directory, as cloned from your GIT repository. Looking in the assemble file, I can see that the SRC environment variable is initialized to /tmp/src. Interesting thing, modifying this to ../sample or even moving the /s2i-payara/sample into /tmp/src doesn't change anything and it raises the same exception.

Would you be so kind to assist how could I get this running ?

Many thanks in advance.

Kind regards,

Nicolas DUMINIL

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.