Coder Social home page Coder Social logo

glassfish4-clickstart's Introduction

GlassFish clickstart

This clickstart sets up a build service, repository and a basic GlassFish app with continuous deployment. All built by maven.

Launch this clickstart and glory could be yours too ! Use it as a building block if you like. You can launch this on Cloudbees via a clickstart automatically, or follow the instructions below.

This is based on the GlassFish stack that you can read more about here.

Deploying manually:

Create a Glassfish4 container

bees app:create -a my-glassfish4-app -t glassfish4

Create a MySQL Database

bees db:create my-glassfish4-db

Bind the MySQL Database to the Glassfish container

bees app:bind -a my-glassfish4-app -db my-glassfish4-db -as mydb

Supported JNDI names:

  • jdbc/mydb : unqualified relative JNDI name is supported / OK
  • java:comp/env/jdbc/mydb: qualified private name is supported / OK
  • java:jdbc/mydb and java:/jdbc/mydb: qualified relative names are not supported by Glassfish / KO
  • java:global/env/jdbc/mydb: qualified global name is not supported by Glassfish / KO

Samples:

Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("jdbc/mydb");
DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/mydb");

Configure Jdbc Realm

bees config:set -a my-glassfish4-app -R glassfish4.auth-realm.database=mydb

Deploy Application

bees app:deploy -a my-glassfish4-app path/to/my/app.war

Jenkins Job

Create a new Maven project in Jenkins, changing the following:

  • Add this git repository (or yours, with this code) on Jenkins

  • Also check "Deploy to CloudBees" with those parameters:

      Applications: First Match
      Application Id: MYAPP_ID
      Filename Pattern: target/*.war
    

where MYAPP_IDis the name of your application.

glassfish4-clickstart's People

Contributors

cyrille-leclerc avatar swashbuck1r avatar

Watchers

James Cloos 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.