在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:cloudfoundry/java-buildpack开源软件地址:https://github.com/cloudfoundry/java-buildpack开源编程语言:Ruby 99.1%开源软件介绍:Cloud Foundry Java BuildpackThe UsageTo 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/java-buildpack.git ExamplesThe following are very simple examples for deploying the artifact types that we support. Configuration and ExtensionThe buildpack default configuration can be overridden with an environment variable matching the configuration file you wish to override minus the $ 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 $ 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 $ 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 env:
JBP_CONFIG_SPRING_AUTO_RECONFIGURATION: '{ enabled: false }' This final example shows how to change the version of Tomcat that is used by the buildpack with an environment variable specified in the applications manifest file. env:
JBP_CONFIG_TOMCAT: '{ tomcat: { version: 8.0.+ } }' 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 PackagesThe buildpack can be packaged up so that it can be uploaded to Cloud Foundry using the 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 PackageThe 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/java-buildpack-cfd6b17.zip Offline PackageThe 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 To pin the version of dependencies used by the buildpack to the ones currently resolvable use the $ bundle install
$ bundle exec rake clean package OFFLINE=true PINNED=true
...
Creating build/java-buildpack-offline-cfd6b17.zip Only packages referenced in the $ bundle install
$ bundle exec rake clean package OFFLINE=true ADD_TO_CACHE=sap_machine_jre,ibm_jre
...
Caching https://public.dhe.ibm.com/ibmdl/export/pub/systems/cloud/runtimes/java/8.0.6.26/linux/x86_64/ibm-java-jre-8.0-6.26-x86_64-archive.bin
Caching https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10/sapmachine-jre-11.0.10_linux-x64_bin.tar.gz
...
Creating build/java-buildpack-offline-cfd6b17.zip Package VersioningKeeping track of different versions of the buildpack can be difficult. To help with this, the rake $ bundle install
$ bundle exec rake clean package VERSION=2.1
...
Creating build/java-buildpack-2.1.zip Packaging Caveats
See #892 for additional details. Running TestsTo run the tests, do the following: $ bundle install
$ bundle exec rake Running Cloud Foundry locally is useful for privately testing new features. ContributingPull requests are welcome; see the contributor guidelines for details. LicenseThis buildpack is released under version 2.0 of the Apache License. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论