buildpack-packager | provides tooling to package a buildpack for upload to Cloud | Cloud library
kandi X-RAY | buildpack-packager Summary
kandi X-RAY | buildpack-packager Summary
A RubyGem that provides tooling to package a buildpack for upload to Cloud Foundry. For officially supported Cloud Foundry buildpacks, it is used in conjunction with compile-extensions.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Checks if the version of the given version exists .
- Validates the manifest
- Validates the metadata for the given manifest
- Checks that the dependencies have been installed .
- Validates that the default version_name is present
- Wrap the error messages for the given command
- Create a list of dependencies
- Checks if the collection is valid
buildpack-packager Key Features
buildpack-packager Examples and Code Snippets
---
language: ruby
url_to_dependency_map:
- match: bundler-(\d+\.\d+\.\d+)
name: bundler
version: $1
- match: ruby-(\d+\.\d+\.\d+)
name: ruby
version: $1
dependencies:
- name: bundler
version: 1.7.12
uri: https://pivotal-buildpack
buildpack-packager list
+----------------------------+------------------------------+------------+
| name | version | cf_stacks |
+----------------------------+------------------------------+------------+
gem 'buildpack-packager', git: 'https://github.com/cloudfoundry/buildpack-packager', tag: 'v2.2.6'
Community Discussions
Trending Discussions on buildpack-packager
QUESTION
currently I'm trying to connect a PHP App in Cloud Foundry with an Oracle Database. For this I need to build the binaries for php with the oci8 driver in order to use pdo_oci in my application. For this I'm using
https://github.com/cloudfoundry/binary-builder
with docker. This seems to work fine. However after this, I don't know how to move on.
I've read the Cloud Foundry Docs about custom Buildpacks ( https://docs.cloudfoundry.org/buildpacks/custom.html ). There they describe the creation of custom Buildpacks in three steps:
Ensure that you have installed the buildpack-packager.
Create a manifest.yml in your buildpack.
Run the packager in cached mode (...)
I've installed the buildpack-manager on my local machine and simply tried to run in against the binaries I've got from the binary builder. I thought it could working since there is a sources.yml file which looks similar to a manifest.yml
...ANSWER
Answered 2019-Jun-20 at 14:44To build a custom PHP buildpack, typically done to include proprietary dependencies like Oracle or SQL Server drivers you can do the following.
Build PHP. This is done with binary-builder. Follow the instructions here. Build as many versions of PHP as you require. This will produce tgz files that contain the binaries.
Host your custom binaries on a web server. This could be local or public, it depends on your needs (see step #5) below.
Clone the PHP Buildpack and checkout one of the stable release tags. Do not build from master as that makes it really hard to know what you're getting or recreate your build. When in doubt, pick the latest tagged release.
Edit the
manifest.yml
file. If it already has entries for the versions of PHP that you built, you can just modify theuri
,sha256
hash andmodules
. You need to add in the additional extensions you compiled to themodules
list. For example, appendoci8
orpdo_oci
to that list. If you're compiling a version of PHP that doesn't existing in the manifest, copy an existing entry and edit all the properties. You can also adjust the manifest to change default versions of PHP or to remove versions you don't want and slim down the buildpack.At this point, you can either commit your changes, push to a fork of the PHP buildpack and set
cf push -b
to point to your fork, or alternatively, you can run the build pack packager and create a buildpack file. You can then take that andcf create-buildpack
orcf update-buildpack
in your foundation (requires admin permissions).If you use
cf push -b
then the binaries you are hosting in step #2 must be accessible from the CF foundation where you are running your application. If you create and upload a buildpack, then the binaries only need to be accessible from the VM where you run build pack packager.
Hope that helps!
QUESTION
I have a file on git https://github.ibm.com/********/buildpack_resource/blob/master/*****.tgz that I want to download (to Win10) with the following code:
...ANSWER
Answered 2018-Jun-28 at 12:21Download raw from GitHub portal with browser
If the download itself is satisfactory ?raw=true
to the URL of the browsed file on GitHub portal.
Or follow: Download single files from GitHub
Download file with wget / curl / other script
Is possible, but authorization needs to be carried out: How can I download a single raw file from a private github repo using the command line?
Clone the repository
Or actually clone the repository. To get only the last revision, switch --depth=1
may be used.
QUESTION
I'm running cmd command buildpack-packer --uncached
(or any other option of buildpack-packer). I had many error messages prior that. They were caused by bad content of manifest.yml. I corrected them. So now I receive this error message: Zip is not installed (RuntimeError)
I used gem install
to install zip gem and rubyzip gem (as first did not work, so I tried a second). So now both not helping to get rid of this error message.
Here is a part of the installed gem list:
And here is the code that drops this error (found it based on the error message in file: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/buildpack-packager-2.3.4/lib/buildpack/packager.rb
):
I'm quite new in Ruby, so maybe I do some very basic mistake...
Thx in advance!!
...ANSWER
Answered 2018-Jun-27 at 09:04Please don't use pictures or screenshots in your post. Use plaintext only.
I think you are misunderstanding the code:
_, _, status = Open3.capture3('which zip')
It checks if you have any zip program (executable) installed not a ruby gem (library). It actually executes which zip
in your cmd shell.
For example on my system it found an oracle one:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install buildpack-packager
On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page