All Projects → paketo-buildpacks → graalvm

paketo-buildpacks / graalvm

Licence: Apache-2.0 license
A Cloud Native Buildpack that provides the GraalVM implementations of JREs and JDKs

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to graalvm

bellsoft-liberica
A Cloud Native Buildpack that provides the Bellsoft Liberica implementations of JREs and JDKs
Stars: ✭ 33 (+57.14%)
Mutual labels:  jvm, cnb, jvm-applications
java
A Cloud Native Buildpack with an order definition suitable for Java applications
Stars: ✭ 66 (+214.29%)
Mutual labels:  cnb, jvm-applications
kotlin-graalvm-custom-aws-lambda-runtime-talk
This is the demo code for a talk on improving cold startup times for JVM-based lambdas using GraalVM and Custom AWS Lambda Runtimes.
Stars: ✭ 24 (+14.29%)
Mutual labels:  jvm, graalvm
JVMByPython
《自己动手写Java虚拟机》JVM的python实现
Stars: ✭ 110 (+423.81%)
Mutual labels:  jvm
go
A Cloud Native Buildpack for Go
Stars: ✭ 53 (+152.38%)
Mutual labels:  cnb
LogoRRR
A log viewer which visualises log events such that it is easy to identify problems or events of interest. This app was implemented using Scala and JavaFX, GluonHQ toolchain and GraalVM as platform.
Stars: ✭ 40 (+90.48%)
Mutual labels:  graalvm
JavaResolver
Java class file inspection library for .NET.
Stars: ✭ 39 (+85.71%)
Mutual labels:  jvm
review-notes
团队分享学习、复盘笔记资料共享。Java、Scala、Flink...
Stars: ✭ 27 (+28.57%)
Mutual labels:  jvm
hsdis-macos
macOS Build artifacts for hsdis HotSpot Plugin
Stars: ✭ 22 (+4.76%)
Mutual labels:  jvm
netty-native-demo
Instant Netty startup using GraalVM's Native Image Generation
Stars: ✭ 58 (+176.19%)
Mutual labels:  graalvm
LGP
A robust Linear Genetic Programming implementation on the JVM using Kotlin.
Stars: ✭ 14 (-33.33%)
Mutual labels:  jvm
linux.gpio.clj
Use the standard Linux GPIO API from Clojure JVM
Stars: ✭ 24 (+14.29%)
Mutual labels:  jvm
Lastik
Kotlin Multiplatform + Jetpack Compose pet project, based on www.last.fm/api (in development)
Stars: ✭ 37 (+76.19%)
Mutual labels:  jvm
SevenFacette
7Facette is an open-source multiplatform test automation library supporting JVM and JS.
Stars: ✭ 28 (+33.33%)
Mutual labels:  jvm
harry-potter-quarkus
Showcases in a web application Quarkus and Infinispan
Stars: ✭ 16 (-23.81%)
Mutual labels:  graalvm
rxjava2-http
Transmit RxJava2 Flowable over http with non-blocking backpressure
Stars: ✭ 19 (-9.52%)
Mutual labels:  jvm
Hephaistos
NBT & Anvil save format library
Stars: ✭ 22 (+4.76%)
Mutual labels:  jvm
wasm.cljc
Spec compliant WebAssembly compiler, decompiler, and generator
Stars: ✭ 178 (+747.62%)
Mutual labels:  jvm
jellyfin-sdk-kotlin
Kotlin SDK for Jellyfin, supporting Android and JVM Targets
Stars: ✭ 43 (+104.76%)
Mutual labels:  jvm
tools jvm autodeps
Automatic Dependency Management Tools for JVM Languages
Stars: ✭ 48 (+128.57%)
Mutual labels:  jvm

gcr.io/paketo-buildpacks/graalvm

The Paketo GraalVM Buildpack is a Cloud Native Buildpack that provides the GraalVM implementations of the JDK and GraalVM Native Image builder.

This buildpack is designed to work in collaboration with other buildpacks which request contributions of JREs, JDKs, or Native Image builder.

Behavior

This buildpack will participate if any of the following conditions are met

  • Another buildpack requires jdk
  • Another buildpack requires jre
  • Another buildpack requires native-image-builder

The buildpack will do the following if a JDK is requested:

  • Contributes a JDK to a layer marked build and cache with all commands on $PATH
  • Contributes $JAVA_HOME configured to the build layer
  • Contributes $JDK_HOME configure to the build layer

The buildpack will do the following if native-image-builder is requested:

  • Contribute a JDK (see above)
  • Installs the Native Image Substrate VM into the JDK
  • Prevents the JRE from being installed, even if requested

The buildpack will do the following if a JRE is requested:

  • Contributes a JDK to a layer with all commands on $PATH (GraalVM does not distribute a standalone JRE)
  • Contributes $JAVA_HOME configured to the layer
  • Contributes -XX:ActiveProcessorCount to the layer
  • Contributes -XX:+ExitOnOutOfMemoryError to the layer
  • Contributes -XX:+UnlockDiagnosticVMOptions,-XX:NativeMemoryTracking=summary & -XX:+PrintNMTStatistics to the layer (Java NMT)
  • If BPL_JMX_ENABLED = true
    • Contributes -Djava.rmi.server.hostname=127.0.0.1, -Dcom.sun.management.jmxremote.authenticate=false, -Dcom.sun.management.jmxremote.ssl=false & -Dcom.sun.management.jmxremote.rmi.port=5000
  • If BPL_DEBUG_ENABLED = true
    • Contributes -agentlib:jdwp=transport=dt_socket,server=y,address=*:8000,suspend=n.
  • If BPL_JFR_ENABLED = true
    • Contributes -XX:StartFlightRecording=dumponexit=true,filename=/tmp/recording.jfr
  • Contributes $MALLOC_ARENA_MAX to the layer
  • Disables JVM DNS caching if link-local DNS is available
  • If metadata.build = true
    • Marks layer as build and cache
  • If metadata.launch = true
    • Marks layer as launch
  • Contributes Memory Calculator to a layer marked launch
  • Contributes Heap Dump helper to a layer marked launch

Configuration

Environment Variable Description
$BP_JVM_VERSION Configure a specific JVM version (e.g. 11, 17). The buildpack will download JDK and Native Image Substrate VM assets that are compatible with this version of the JVM specification. Since the buildpack only ships a single version of each supported line, updates to the buildpack can change the exact version of the JDK or JRE. In order to hold the JDK and JRE versions stable, the buildpack version itself must be stable.

Buildpack releases (and the dependency versions for each release) can be found here. Few users will use this buildpack directly, instead consuming a language buildpack like paketo-buildpacks/java who's releases (and the individual buildpack versions and dependency versions for each release) can be found here. Finally, some users will will consume builders like paketobuildpacks/builder:base who's releases can be found here. To determine the individual buildpack versions and dependency versions for each builder release use the pack inspect-builder <image> functionality.

$BPL_JVM_HEAD_ROOM Configure the percentage of headroom the memory calculator will allocated. Defaults to 0.
$BPL_JVM_LOADED_CLASS_COUNT Configure the number of classes that will be loaded at runtime. Defaults to 35% of the number of classes.
$BPL_JVM_THREAD_COUNT Configure the number of user threads at runtime. Defaults to 250.
$BPL_JAVA_NMT_ENABLED Configure whether Java Native Memory Tracking (NMT) is enabled. Defaults to true. Set this to false to disable NMT functionality.
$BPL_JAVA_NMT_LEVEL Configure the level of detail for Java Native Memory Tracking (NMT) output. Defaults to summary. Set this to detail for detailed NMT output.
$BPL_JMX_ENABLED Configure whether Java Management Extensions (JMX) is enabled. Defaults to false. Set this to true to enable JMX functionality.
$BPL_JMX_PORT Configure the port number for JMX. Defaults to 5000. When running the container, this value should match the port published locally, i.e. for Docker: --publish 5000:5000
$BPL_DEBUG_ENABLED Configure whether remote debugging features are enabled. Defaults to false. Set this to true to enable remote debugging.
$BPL_DEBUG_PORT Configure the port number for remote debugging. Defaults to 8000.
$BPL_DEBUG_SUSPEND Configure whether to suspend execution until a debugger has attached. Defaults to false.
$BPL_JFR_ENABLED Configure whether Java Flight Recording (JFR) is enabled. If no arguments are specified via BPL_JFR_ARGS, the default config args dumponexit=true,filename=/tmp/recording.jfr are added.
$BPL_JFR_ARGS Configure custom arguments to Java Flight Recording, via a comma-separated list, e.g. duration=10s,maxage=1m. If any values are specified, no default args are supplied.
$BPL_HEAP_DUMP_PATH Configure the location for writing heap dumps in the event of an OutOfMemoryError exception. Defaults to ``, which disables writing heap dumps. The path set must be writable by the JVM process.
$JAVA_TOOL_OPTIONS Configure the JVM launch flags

Bindings

The buildpack optionally accepts the following bindings:

Type: dependency-mapping

Key Value Description
<dependency-digest> <uri> If needed, the buildpack will fetch the dependency with digest <dependency-digest> from <uri>

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].