Downloading Buildpack Bits from Cloud Foundry


Owais Mohamed
 

Hello,

Is there anyway to download the bits of an uploaded buildpack from a Cloud Foundry Installation? Due to an internal mess up we are not able to have one to one mapping from buildpack version to code version in SCM.

I do see packaged files in Cloud Foundry Blobstore related to Buildpacks but can't make out which file belongs to which buildpack because GUIDs are used for all file names in cloud foundry blob store.

Regards,
Owais


Matthew Sykes <matthew.sykes@...>
 

If you're on a new enough level, you can try the droplet download endpoint
[1].

[1]:
https://apidocs.cloudfoundry.org/225/apps/downloads_the_staged_droplet_for_an_app.html

On Thu, Dec 3, 2015 at 10:39 AM, Mohamed, Owais <Owais.Mohamed(a)covisint.com>
wrote:

Hello,

Is there anyway to download the bits of an uploaded buildpack from a Cloud
Foundry Installation? Due to an internal mess up we are not able to have
one to one mapping from buildpack version to code version in SCM.

I do see packaged files in Cloud Foundry Blobstore related to Buildpacks
but can’t make out which file belongs to which buildpack because GUIDs are
used for all file names in cloud foundry blob store.

Regards,
Owais


--
Matthew Sykes
matthew.sykes(a)gmail.com


Matthew Sykes <matthew.sykes@...>
 

Sorry - misread the question. You're looking for the actual buildpacks
instead of the droplets.

You can construct the file names from the information in the admin
buildpack table. I'll post details in a moment.

On Thu, Dec 3, 2015 at 11:51 AM, Matthew Sykes <matthew.sykes(a)gmail.com>
wrote:

If you're on a new enough level, you can try the droplet download endpoint
[1].

[1]:
https://apidocs.cloudfoundry.org/225/apps/downloads_the_staged_droplet_for_an_app.html

On Thu, Dec 3, 2015 at 10:39 AM, Mohamed, Owais <
Owais.Mohamed(a)covisint.com> wrote:

Hello,

Is there anyway to download the bits of an uploaded buildpack from a
Cloud Foundry Installation? Due to an internal mess up we are not able to
have one to one mapping from buildpack version to code version in SCM.

I do see packaged files in Cloud Foundry Blobstore related to Buildpacks
but can’t make out which file belongs to which buildpack because GUIDs are
used for all file names in cloud foundry blob store.

Regards,
Owais


--
Matthew Sykes
matthew.sykes(a)gmail.com


--
Matthew Sykes
matthew.sykes(a)gmail.com


Matthew Sykes <matthew.sykes@...>
 

The blob names in the store should match the buildpack key from the
buildpacks table in the CCDB. (The key is basically the buildpack guid
concatenated with the sha1 hash of the buildpack bits by an underscore.)
If you can access the blob store directly, you can just get them out that
way.

The other option (if you have the credentials for the staging user and
direct access to a cloud controller) is to hit the endpoint the DEAs use:
`/v2/buildpacks/${buildpack-guid}/download`. The URLs are in the NATS
staging messages and look like this for bosh-lite:

http://upload-user:upload-password(a)10.244.0.134:9022/v2/buildpacks/f2f882e5-7295-4613-a749-2bf94ff45927/download

Hope that helps a bit.

On Thu, Dec 3, 2015 at 11:56 AM, Matthew Sykes <matthew.sykes(a)gmail.com>
wrote:

Sorry - misread the question. You're looking for the actual buildpacks
instead of the droplets.

You can construct the file names from the information in the admin
buildpack table. I'll post details in a moment.

On Thu, Dec 3, 2015 at 11:51 AM, Matthew Sykes <matthew.sykes(a)gmail.com>
wrote:

If you're on a new enough level, you can try the droplet download
endpoint [1].

[1]:
https://apidocs.cloudfoundry.org/225/apps/downloads_the_staged_droplet_for_an_app.html

On Thu, Dec 3, 2015 at 10:39 AM, Mohamed, Owais <
Owais.Mohamed(a)covisint.com> wrote:

Hello,

Is there anyway to download the bits of an uploaded buildpack from a
Cloud Foundry Installation? Due to an internal mess up we are not able to
have one to one mapping from buildpack version to code version in SCM.

I do see packaged files in Cloud Foundry Blobstore related to Buildpacks
but can’t make out which file belongs to which buildpack because GUIDs are
used for all file names in cloud foundry blob store.

Regards,
Owais


--
Matthew Sykes
matthew.sykes(a)gmail.com


--
Matthew Sykes
matthew.sykes(a)gmail.com


--
Matthew Sykes
matthew.sykes(a)gmail.com