All Projects → cloudfoundry-community → tomee-buildpack

cloudfoundry-community / tomee-buildpack

Licence: Apache-2.0 License
Cloud Foundry buildpack for running Java applications using TomEE

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to tomee-buildpack

swift-buildpack
IBM Cloud buildpack for Swift
Stars: ✭ 33 (+175%)
Mutual labels:  buildpack, cloud-foundry
btp-full-stack-typescript-app
A sample project to demonstrate how to implement a full-stack app with SAP Cloud Application Programming Model, plus SAPUI5 and TypeScript.
Stars: ✭ 27 (+125%)
Mutual labels:  cloud-foundry
cloud-native-workshop
1 day workshop to learn Spring Boot + Spring Cloud + Pivotal Cloud Foundry
Stars: ✭ 37 (+208.33%)
Mutual labels:  cloud-foundry
heroku-buildpack-deno
Heroku Buildpack for Deno
Stars: ✭ 72 (+500%)
Mutual labels:  cloud-foundry
cds-pg
PostgreSQL adapter for SAP CDS (CAP)
Stars: ✭ 84 (+600%)
Mutual labels:  cloud-foundry
bluechatter
Deploy & Scale a chat app using Cloud Foundry, Docker Container and Kubernetes
Stars: ✭ 64 (+433.33%)
Mutual labels:  cloud-foundry
cloud-cf-helloworld-nodejs
A "Hello World" application for Cloud Foundry using a simple RESTful API in Node.js with persistency in PostgreSQL and SAPUI5 UIs.
Stars: ✭ 45 (+275%)
Mutual labels:  cloud-foundry
abaplint-sci-server
Node backend application for running abaplint on ABAP
Stars: ✭ 15 (+25%)
Mutual labels:  cloud-foundry
Home
This is the old home for the Steeltoe project. Please refer to the SteeltoeOSS/steeltoe repository moving forward.
Stars: ✭ 49 (+308.33%)
Mutual labels:  cloud-foundry
heroku-buildpack-gradle
This is a Heroku buildpack for Gradle apps. It uses Gradle to build your application and OpenJDK to run it.
Stars: ✭ 58 (+383.33%)
Mutual labels:  buildpack
bluemix-go
Go library for accessing the Bluemix API
Stars: ✭ 37 (+208.33%)
Mutual labels:  cloud-foundry
logsearch-boshrelease
A BOSH-scalable ELK release
Stars: ✭ 45 (+275%)
Mutual labels:  cloud-foundry
custom-ssh-key-buildpack
🔑 Add an SSH key to you Heroku dyno 🔑
Stars: ✭ 49 (+308.33%)
Mutual labels:  buildpack
cf-butler
My purpose in life is to cleanup stale apps and services on a Cloud Foundry foundation. I can be configured to report on and remove orphaned services and stopped app instances older than a configurable duration. I do many other useful things too.
Stars: ✭ 31 (+158.33%)
Mutual labels:  cloud-foundry
Security
ASP.NET Security Providers for CloudFoundry
Stars: ✭ 27 (+125%)
Mutual labels:  cloud-foundry
cf-tools
Useful shell scripts for Cloud Foundry API v2
Stars: ✭ 22 (+83.33%)
Mutual labels:  cloud-foundry
cf-workshop
Cloud Foundry Workshop
Stars: ✭ 36 (+200%)
Mutual labels:  cloud-foundry
cloud-bulletinboard-ads
This is the bulletinboard-ads sample application code used in the openSAP course: Cloud-Native Development with SAP Business Technology Platform (formerly SAP Cloud Platform).
Stars: ✭ 75 (+525%)
Mutual labels:  cloud-foundry
cloud-native-pwas
Cloud Native Progressive Web Apps with Spring Boot and Angular
Stars: ✭ 31 (+158.33%)
Mutual labels:  cloud-foundry
oscm
An Enterprise-ready Cloud Services Management Software.
Stars: ✭ 32 (+166.67%)
Mutual labels:  tomee

Cloud Foundry TomEE Buildpack

The tomee-buildpack is a Cloud Foundry buildpack for running JVM-based applications. It is designed to run many JVM-based applications (Grails, Groovy, Java Main, Play Framework, Spring Boot, and Java EE Web Profile) with no additional configuration, but supports configuration of the standard components, and extension to add custom components. This buildpack has been customised to use TomEE. The standard Java Buildpack currently uses Tomcat.

Usage

To use this buildpack specify the URI of the repository when pushing an application to Cloud Foundry:

$ cf push <APP-NAME> -p <ARTIFACT> -b https://github.com/cloudfoundry-community/tomee-buildpack.git

Examples

The following are very simple examples for deploying the artifact types that we support.

Configuration and Extension

The buildpack default configuration can be overridden with an environment variable matching the configuration file you wish to override minus the .yml extension and with a prefix of JBP_CONFIG. It is not possible to add new configuration properties and properties with nil or empty values will be ignored by the buildpack (in this case you will have to extend the buildpack, see below). The value of the variable should be valid inline yaml, referred to as "flow style" in the yaml spec (Wikipedia has a good description of this yaml syntax). For example, to change the default version of Java to 11 and adjust the memory heuristics apply this environment variable to the application.

$ cf set-env my-application JBP_CONFIG_OPEN_JDK_JRE '{ jre: { version: 11.+ }, memory_calculator: { stack_threads: 25 } }'

If the key or value contains a special character such as : it should be escaped with double quotes. For example, to change the default repository path for the buildpack.

$ cf set-env my-application JBP_CONFIG_REPOSITORY '{ default_repository_root: "http://repo.example.io" }'

If the key or value contains an environment variable that you want to bind at runtime you need to escape it from your shell. For example, to add command line arguments containing an environment variable to a Java Main application.

$ cf set-env my-application JBP_CONFIG_JAVA_MAIN '{ arguments: "--server.port=9090 --foo=bar" }'

An example of configuration is to specify a javaagent that is packaged within an application.

$ cf set-env my-application JAVA_OPTS '-javaagent:app/META-INF/myagent.jar -Dmyagent.config_file=app/META-INF/my_agent.conf'

Environment variable can also be specified in the applications manifest file. For example, to specify an environment variable in an applications manifest file that disables Auto-reconfiguration.

env:
  JBP_CONFIG_SPRING_AUTO_RECONFIGURATION: '{ enabled: false }'

This final example shows how to change the version of TomEE that is used by the buildpack with an environment variable specified in the applications manifest file.

env:
  JBP_CONFIG_TOMEE: '{ tomee: { version: 1.7.+ } }'

See the Environment Variables documentation for more information.

To learn how to configure various properties of the buildpack, follow the "Configuration" links below.

The buildpack supports extension through the use of Git repository forking. The easiest way to accomplish this is to use GitHub's forking functionality to create a copy of this repository. Make the required extension changes in the copy of the repository. Then specify the URL of the new repository when pushing Cloud Foundry applications. If the modifications are generally applicable to the Cloud Foundry community, please submit a pull request with the changes. More information on extending the buildpack is available here.

Additional Documentation

Building Packages

The buildpack can be packaged up so that it can be uploaded to Cloud Foundry using the cf create-buildpack and cf update-buildpack commands. In order to create these packages, the rake package task is used.

Note that this process is not currently supported on Windows. It is possible it will work, but it is not tested, and no additional functionality has been added to make it work.

Online Package

The online package is a version of the buildpack that is as minimal as possible and is configured to connect to the network for all dependencies. This package is about 50K in size. To create the online package, run:

$ bundle install
$ bundle exec rake clean package
...
Creating build/tomee-buildpack-cfd6b17.zip

Offline Package

The offline package is a version of the buildpack designed to run without access to a network. It packages the latest version of each dependency (as configured in the config/ directory) and disables remote_downloads. This package is about 180M in size. To create the offline package, use the OFFLINE=true argument:

To pin the version of dependencies used by the buildpack to the ones currently resolvable use the PINNED=true argument. This will update the config/ directory to contain exact version of each dependency instead of version ranges.

$ bundle install
$ bundle exec rake clean package OFFLINE=true PINNED=true
...
Creating build/tomee-buildpack-offline-cfd6b17.zip

Package Versioning

Keeping track of different versions of the buildpack can be difficult. To help with this, the rake package task puts a version discriminator in the name of the created package file. The default value for this discriminator is the current Git hash (e.g. cfd6b17). To change the version when creating a package, use the VERSION=<VERSION> argument:

$ bundle install
$ bundle exec rake clean package VERSION=2.1
...
Creating build/tomee-buildpack-2.1.zip

Running Tests

To run the tests, do the following:

$ bundle install
$ bundle exec rake

Running Cloud Foundry locally is useful for privately testing new features.

Contributing

Pull requests are welcome; see the contributor guidelines for details.

License

This buildpack is released under version 2.0 of the Apache License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].