can we install ruby gems in existing cf stacks (cflinuxfs2) without recreate stack


Lingesh Mouleeshwaran
 

Hi Cloudfoundry ,

Is there any simple way, we can update or install new libraries in existing
cf stacks (cflinuxf2) without creating new custom stacks ??

*Example :* Our modified java buildpack not running on existing stacks
because of few of the ruby gems are missing in the file system. so we would
require to install few ruby gem and use the modified java buildpack.

Share your thoughts and suggestions.

Regards
Lingesh M


DHR
 

I think you'd be better to get the gems to be deployed inside the buildpack zip & used by your buildpack bin scripts from when the zip is unpacked.
Maybe you could vendor the gems as part of your 'bundle install' command so that they appear inside your staging directory
Eg
$ bundle install --path staging/vendor/bundle
This should ensure the go into the buildpack zip.
And then set the BUNDLE_PATH variable to the same relative directory in the bin/detect, compile and/or release scripts.
More info about bundler here: http://bundler.io/v1.3/bundle_install.html

On 19 May 2016, at 18:36, Lingesh Mouleeshwaran <lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Cloudfoundry ,

Is there any simple way, we can update or install new libraries in existing cf stacks (cflinuxf2) without creating new custom stacks ??

Example : Our modified java buildpack not running on existing stacks because of few of the ruby gems are missing in the file system. so we would require to install few ruby gem and use the modified java buildpack.

Share your thoughts and suggestions.

Regards
Lingesh M


Sunil Babu <cloudgrp.assist@...>
 

Hi

Enable cloning with repo an make auto update enabled this there is no need
to install

On Thursday, May 19, 2016, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Cloudfoundry ,

Is there any simple way, we can update or install new libraries in
existing cf stacks (cflinuxf2) without creating new custom stacks ??

*Example :* Our modified java buildpack not running on existing stacks
because of few of the ruby gems are missing in the file system. so we would
require to install few ruby gem and use the modified java buildpack.

Share your thoughts and suggestions.

Regards
Lingesh M

--
Thanks & Regards
Sunil Babu K C
+91-81970-35608


Lingesh Mouleeshwaran
 

Thanks DHR and Sunil ,

@ DHR , I have followed your way to install the gem on staging directory ,
but it doesn't help. is this same way followed by existing cloudfoundry
java buildpack ??


@ Sunil ,

Please could you elaborate more on your approach , I coudn't get your
suggestion.


Regards
Lingesh M

On Fri, May 20, 2016 at 7:56 AM, Sunil Babu <cloudgrp.assist(a)gmail.com>
wrote:

Hi

Enable cloning with repo an make auto update enabled this there is no need
to install


On Thursday, May 19, 2016, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Cloudfoundry ,

Is there any simple way, we can update or install new libraries in
existing cf stacks (cflinuxf2) without creating new custom stacks ??

*Example :* Our modified java buildpack not running on existing stacks
because of few of the ruby gems are missing in the file system. so we would
require to install few ruby gem and use the modified java buildpack.

Share your thoughts and suggestions.

Regards
Lingesh M

--
Thanks & Regards
Sunil Babu K C
+91-81970-35608


Daniel Mikusa
 

On Mon, May 23, 2016 at 3:41 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Thanks DHR and Sunil ,

@ DHR , I have followed your way to install the gem on staging directory ,
but it doesn't help. is this same way followed by existing cloudfoundry
java buildpack ??
This is the way you should be doing it. What about this doesn't help /
work for you?

Dan





@ Sunil ,

Please could you elaborate more on your approach , I coudn't get your
suggestion.


Regards
Lingesh M

On Fri, May 20, 2016 at 7:56 AM, Sunil Babu <cloudgrp.assist(a)gmail.com>
wrote:

Hi

Enable cloning with repo an make auto update enabled this there is no
need to install


On Thursday, May 19, 2016, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Cloudfoundry ,

Is there any simple way, we can update or install new libraries in
existing cf stacks (cflinuxf2) without creating new custom stacks ??

*Example :* Our modified java buildpack not running on existing stacks
because of few of the ruby gems are missing in the file system. so we would
require to install few ruby gem and use the modified java buildpack.

Share your thoughts and suggestions.

Regards
Lingesh M

--
Thanks & Regards
Sunil Babu K C
+91-81970-35608


Lingesh Mouleeshwaran
 

Hi Dan ,

yes I have installed the require gem via *bundle install* to specify the
path of vendor staging directories which is available in below paths

/var/vcap/data/packages/dea_next/* /vendor/cache
/var/vcap/data/packages/warden/*/vendor/cache

using buildpack Gemfile.

Still I am not seeing these require gem is available in staging container.
So staging container during compile phase.


Regards
Lingesh M

On Mon, May 23, 2016 at 5:35 PM, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:

On Mon, May 23, 2016 at 3:41 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Thanks DHR and Sunil ,

@ DHR , I have followed your way to install the gem on staging directory
, but it doesn't help. is this same way followed by existing cloudfoundry
java buildpack ??
This is the way you should be doing it. What about this doesn't help /
work for you?

Dan





@ Sunil ,

Please could you elaborate more on your approach , I coudn't get your
suggestion.


Regards
Lingesh M

On Fri, May 20, 2016 at 7:56 AM, Sunil Babu <cloudgrp.assist(a)gmail.com>
wrote:

Hi

Enable cloning with repo an make auto update enabled this there is no
need to install


On Thursday, May 19, 2016, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Cloudfoundry ,

Is there any simple way, we can update or install new libraries in
existing cf stacks (cflinuxf2) without creating new custom stacks ??

*Example :* Our modified java buildpack not running on existing stacks
because of few of the ruby gems are missing in the file system. so we would
require to install few ruby gem and use the modified java buildpack.

Share your thoughts and suggestions.

Regards
Lingesh M

--
Thanks & Regards
Sunil Babu K C
+91-81970-35608


Daniel Mikusa
 

You need to bundle install the gem in the staging container. The build
pack would generally do this.

Dan


On Mon, May 23, 2016 at 8:25 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Dan ,

yes I have installed the require gem via *bundle install* to specify the
path of vendor staging directories which is available in below paths

/var/vcap/data/packages/dea_next/* /vendor/cache
/var/vcap/data/packages/warden/*/vendor/cache

using buildpack Gemfile.

Still I am not seeing these require gem is available in staging container.
So staging container during compile phase.


Regards
Lingesh M

On Mon, May 23, 2016 at 5:35 PM, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:

On Mon, May 23, 2016 at 3:41 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Thanks DHR and Sunil ,

@ DHR , I have followed your way to install the gem on staging directory
, but it doesn't help. is this same way followed by existing cloudfoundry
java buildpack ??
This is the way you should be doing it. What about this doesn't help /
work for you?

Dan





@ Sunil ,

Please could you elaborate more on your approach , I coudn't get your
suggestion.


Regards
Lingesh M

On Fri, May 20, 2016 at 7:56 AM, Sunil Babu <cloudgrp.assist(a)gmail.com>
wrote:

Hi

Enable cloning with repo an make auto update enabled this there is no
need to install


On Thursday, May 19, 2016, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Cloudfoundry ,

Is there any simple way, we can update or install new libraries in
existing cf stacks (cflinuxf2) without creating new custom stacks ??

*Example :* Our modified java buildpack not running on existing
stacks because of few of the ruby gems are missing in the file system. so
we would require to install few ruby gem and use the modified java
buildpack.

Share your thoughts and suggestions.

Regards
Lingesh M

--
Thanks & Regards
Sunil Babu K C
+91-81970-35608


Lingesh Mouleeshwaran
 

yes Dan,


we have used below commands to package the buildpack .

bundle install
bundle exec rake package version=custom-java-buildpack

after that we will take the zip and create a offline buildpack using cf cli.

Regards
Lingesh M

On Mon, May 23, 2016 at 7:16 PM, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:

You need to bundle install the gem in the staging container. The build
pack would generally do this.

Dan


On Mon, May 23, 2016 at 8:25 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Dan ,

yes I have installed the require gem via *bundle install* to specify the
path of vendor staging directories which is available in below paths

/var/vcap/data/packages/dea_next/* /vendor/cache
/var/vcap/data/packages/warden/*/vendor/cache

using buildpack Gemfile.

Still I am not seeing these require gem is available in staging
container. So staging container during compile phase.


Regards
Lingesh M

On Mon, May 23, 2016 at 5:35 PM, Daniel Mikusa <dmikusa(a)pivotal.io>
wrote:

On Mon, May 23, 2016 at 3:41 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Thanks DHR and Sunil ,

@ DHR , I have followed your way to install the gem on staging
directory , but it doesn't help. is this same way followed by existing
cloudfoundry java buildpack ??
This is the way you should be doing it. What about this doesn't help /
work for you?

Dan





@ Sunil ,

Please could you elaborate more on your approach , I coudn't get your
suggestion.


Regards
Lingesh M

On Fri, May 20, 2016 at 7:56 AM, Sunil Babu <cloudgrp.assist(a)gmail.com>
wrote:

Hi

Enable cloning with repo an make auto update enabled this there is no
need to install


On Thursday, May 19, 2016, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Cloudfoundry ,

Is there any simple way, we can update or install new libraries in
existing cf stacks (cflinuxf2) without creating new custom stacks ??

*Example :* Our modified java buildpack not running on existing
stacks because of few of the ruby gems are missing in the file system. so
we would require to install few ruby gem and use the modified java
buildpack.

Share your thoughts and suggestions.

Regards
Lingesh M

--
Thanks & Regards
Sunil Babu K C
+91-81970-35608


Daniel Mikusa
 

OK, my fault. I misunderstood what you're trying to do here. I was
thinking that your application needed the gems, but it's your build pack
that needs them.

You originally said...

*Example :* Our modified java buildpack not running on existing stacks
because of few of the ruby gems are missing in the file system. so we would
require to install few ruby gem and use the modified java buildpack.

If the build pack needs additional gems then you would want to pack the
gems with the build pack. I'm not sure what the best way to do this would
be, I'm sure someone with more ruby experience can say. Ideas that come to
mind: add it as a git submodule, vendor it (seems like what you're doing),
maybe just copy the src in if it's small.

Basically the build pack needs to be self contained (especially so that it
works in offline environments). Anything it needs, should be included with
the build pack.

Dan



On Tue, May 24, 2016 at 1:37 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

yes Dan,


we have used below commands to package the buildpack .

bundle install
bundle exec rake package version=custom-java-buildpack

after that we will take the zip and create a offline buildpack using cf
cli.

Regards
Lingesh M



On Mon, May 23, 2016 at 7:16 PM, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:

You need to bundle install the gem in the staging container. The build
pack would generally do this.

Dan


On Mon, May 23, 2016 at 8:25 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Dan ,

yes I have installed the require gem via *bundle install* to specify
the path of vendor staging directories which is available in below paths

/var/vcap/data/packages/dea_next/* /vendor/cache
/var/vcap/data/packages/warden/*/vendor/cache

using buildpack Gemfile.

Still I am not seeing these require gem is available in staging
container. So staging container during compile phase.


Regards
Lingesh M

On Mon, May 23, 2016 at 5:35 PM, Daniel Mikusa <dmikusa(a)pivotal.io>
wrote:

On Mon, May 23, 2016 at 3:41 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Thanks DHR and Sunil ,

@ DHR , I have followed your way to install the gem on staging
directory , but it doesn't help. is this same way followed by existing
cloudfoundry java buildpack ??
This is the way you should be doing it. What about this doesn't help /
work for you?

Dan





@ Sunil ,

Please could you elaborate more on your approach , I coudn't get your
suggestion.


Regards
Lingesh M

On Fri, May 20, 2016 at 7:56 AM, Sunil Babu <cloudgrp.assist(a)gmail.com
wrote:
Hi

Enable cloning with repo an make auto update enabled this there is no
need to install


On Thursday, May 19, 2016, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Cloudfoundry ,

Is there any simple way, we can update or install new libraries in
existing cf stacks (cflinuxf2) without creating new custom stacks ??

*Example :* Our modified java buildpack not running on existing
stacks because of few of the ruby gems are missing in the file system. so
we would require to install few ruby gem and use the modified java
buildpack.

Share your thoughts and suggestions.

Regards
Lingesh M

--
Thanks & Regards
Sunil Babu K C
+91-81970-35608


Lingesh Mouleeshwaran
 

not an issue .Thanks Dan !!!

On Tue, May 24, 2016 at 4:56 PM, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:

OK, my fault. I misunderstood what you're trying to do here. I was
thinking that your application needed the gems, but it's your build pack
that needs them.

You originally said...

*Example :* Our modified java buildpack not running on existing stacks
because of few of the ruby gems are missing in the file system. so we would
require to install few ruby gem and use the modified java buildpack.

If the build pack needs additional gems then you would want to pack the
gems with the build pack. I'm not sure what the best way to do this would
be, I'm sure someone with more ruby experience can say. Ideas that come to
mind: add it as a git submodule, vendor it (seems like what you're doing),
maybe just copy the src in if it's small.

Basically the build pack needs to be self contained (especially so that it
works in offline environments). Anything it needs, should be included with
the build pack.

Dan



On Tue, May 24, 2016 at 1:37 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

yes Dan,


we have used below commands to package the buildpack .

bundle install
bundle exec rake package version=custom-java-buildpack

after that we will take the zip and create a offline buildpack using cf
cli.

Regards
Lingesh M



On Mon, May 23, 2016 at 7:16 PM, Daniel Mikusa <dmikusa(a)pivotal.io>
wrote:

You need to bundle install the gem in the staging container. The build
pack would generally do this.

Dan


On Mon, May 23, 2016 at 8:25 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Dan ,

yes I have installed the require gem via *bundle install* to specify
the path of vendor staging directories which is available in below paths

/var/vcap/data/packages/dea_next/* /vendor/cache
/var/vcap/data/packages/warden/*/vendor/cache

using buildpack Gemfile.

Still I am not seeing these require gem is available in staging
container. So staging container during compile phase.


Regards
Lingesh M

On Mon, May 23, 2016 at 5:35 PM, Daniel Mikusa <dmikusa(a)pivotal.io>
wrote:

On Mon, May 23, 2016 at 3:41 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Thanks DHR and Sunil ,

@ DHR , I have followed your way to install the gem on staging
directory , but it doesn't help. is this same way followed by existing
cloudfoundry java buildpack ??
This is the way you should be doing it. What about this doesn't help
/ work for you?

Dan





@ Sunil ,

Please could you elaborate more on your approach , I coudn't get your
suggestion.


Regards
Lingesh M

On Fri, May 20, 2016 at 7:56 AM, Sunil Babu <
cloudgrp.assist(a)gmail.com> wrote:

Hi

Enable cloning with repo an make auto update enabled this there is
no need to install


On Thursday, May 19, 2016, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Cloudfoundry ,

Is there any simple way, we can update or install new libraries in
existing cf stacks (cflinuxf2) without creating new custom stacks ??

*Example :* Our modified java buildpack not running on existing
stacks because of few of the ruby gems are missing in the file system. so
we would require to install few ruby gem and use the modified java
buildpack.

Share your thoughts and suggestions.

Regards
Lingesh M

--
Thanks & Regards
Sunil Babu K C
+91-81970-35608


DHR
 

So I think your problem is that your gems are on the DEA at staging time but aren't being found by the Ruby layer, right?
If so the normal approach is to point to them via an env Var (eg BUNDLE_PATH, GEM_PATH), however your compile, detect, release scripts are already in Ruby (not bash) so perhaps you could load them using Gem.paths. Example on
http://stackoverflow.com/questions/28764389/set-gem-home-path-or-gem-path-programmatically

On 24 May 2016, at 18:08, Lingesh Mouleeshwaran <lingeshmouleeshwaran(a)gmail.com> wrote:

not an issue .Thanks Dan !!!

On Tue, May 24, 2016 at 4:56 PM, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:
OK, my fault. I misunderstood what you're trying to do here. I was thinking that your application needed the gems, but it's your build pack that needs them.

You originally said...

Example : Our modified java buildpack not running on existing stacks because of few of the ruby gems are missing in the file system. so we would require to install few ruby gem and use the modified java buildpack.
If the build pack needs additional gems then you would want to pack the gems with the build pack. I'm not sure what the best way to do this would be, I'm sure someone with more ruby experience can say. Ideas that come to mind: add it as a git submodule, vendor it (seems like what you're doing), maybe just copy the src in if it's small.

Basically the build pack needs to be self contained (especially so that it works in offline environments). Anything it needs, should be included with the build pack.

Dan



On Tue, May 24, 2016 at 1:37 AM, Lingesh Mouleeshwaran <lingeshmouleeshwaran(a)gmail.com> wrote:
yes Dan,


we have used below commands to package the buildpack .

bundle install
bundle exec rake package version=custom-java-buildpack

after that we will take the zip and create a offline buildpack using cf cli.

Regards
Lingesh M



On Mon, May 23, 2016 at 7:16 PM, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:
You need to bundle install the gem in the staging container. The build pack would generally do this.

Dan


On Mon, May 23, 2016 at 8:25 AM, Lingesh Mouleeshwaran <lingeshmouleeshwaran(a)gmail.com> wrote:
Hi Dan ,

yes I have installed the require gem via bundle install to specify the path of vendor staging directories which is available in below paths

/var/vcap/data/packages/dea_next/* /vendor/cache
/var/vcap/data/packages/warden/*/vendor/cache

using buildpack Gemfile.

Still I am not seeing these require gem is available in staging container. So staging container during compile phase.


Regards
Lingesh M

On Mon, May 23, 2016 at 5:35 PM, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:
On Mon, May 23, 2016 at 3:41 AM, Lingesh Mouleeshwaran <lingeshmouleeshwaran(a)gmail.com> wrote:
Thanks DHR and Sunil ,

@ DHR , I have followed your way to install the gem on staging directory , but it doesn't help. is this same way followed by existing cloudfoundry java buildpack ??
This is the way you should be doing it. What about this doesn't help / work for you?

Dan




@ Sunil ,

Please could you elaborate more on your approach , I coudn't get your suggestion.


Regards
Lingesh M

On Fri, May 20, 2016 at 7:56 AM, Sunil Babu <cloudgrp.assist(a)gmail.com> wrote:
Hi

Enable cloning with repo an make auto update enabled this there is no need to install


On Thursday, May 19, 2016, Lingesh Mouleeshwaran <lingeshmouleeshwaran(a)gmail.com> wrote:
Hi Cloudfoundry ,

Is there any simple way, we can update or install new libraries in existing cf stacks (cflinuxf2) without creating new custom stacks ??

Example : Our modified java buildpack not running on existing stacks because of few of the ruby gems are missing in the file system. so we would require to install few ruby gem and use the modified java buildpack.

Share your thoughts and suggestions.

Regards
Lingesh M

--
Thanks & Regards
Sunil Babu K C
+91-81970-35608


Lingesh Mouleeshwaran
 

Thanks DHR Team. Yes your correct like the required gem is not available in
staging container stack. but these stacks are pre packaged in cf release.
Not sure how we can do this Gem.path update for all DEA's . Let me try it
out !!.

Regards
Lingesh M

On Tue, May 24, 2016 at 11:35 PM, DHR <lists(a)dhrapson.com> wrote:

So I think your problem is that your gems are on the DEA at staging time
but aren't being found by the Ruby layer, right?
If so the normal approach is to point to them via an env Var (eg
BUNDLE_PATH, GEM_PATH), however your compile, detect, release scripts are
already in Ruby (not bash) so perhaps you could load them using Gem.paths.
Example on

http://stackoverflow.com/questions/28764389/set-gem-home-path-or-gem-path-programmatically

On 24 May 2016, at 18:08, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

not an issue .Thanks Dan !!!

On Tue, May 24, 2016 at 4:56 PM, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:

OK, my fault. I misunderstood what you're trying to do here. I was
thinking that your application needed the gems, but it's your build pack
that needs them.

You originally said...

*Example :* Our modified java buildpack not running on existing stacks
because of few of the ruby gems are missing in the file system. so we would
require to install few ruby gem and use the modified java buildpack.

If the build pack needs additional gems then you would want to pack the
gems with the build pack. I'm not sure what the best way to do this would
be, I'm sure someone with more ruby experience can say. Ideas that come to
mind: add it as a git submodule, vendor it (seems like what you're doing),
maybe just copy the src in if it's small.

Basically the build pack needs to be self contained (especially so that
it works in offline environments). Anything it needs, should be included
with the build pack.

Dan



On Tue, May 24, 2016 at 1:37 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

yes Dan,


we have used below commands to package the buildpack .

bundle install
bundle exec rake package version=custom-java-buildpack

after that we will take the zip and create a offline buildpack using cf
cli.

Regards
Lingesh M



On Mon, May 23, 2016 at 7:16 PM, Daniel Mikusa <dmikusa(a)pivotal.io>
wrote:

You need to bundle install the gem in the staging container. The build
pack would generally do this.

Dan


On Mon, May 23, 2016 at 8:25 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Dan ,

yes I have installed the require gem via *bundle install* to specify
the path of vendor staging directories which is available in below paths

/var/vcap/data/packages/dea_next/* /vendor/cache
/var/vcap/data/packages/warden/*/vendor/cache

using buildpack Gemfile.

Still I am not seeing these require gem is available in staging
container. So staging container during compile phase.


Regards
Lingesh M

On Mon, May 23, 2016 at 5:35 PM, Daniel Mikusa <dmikusa(a)pivotal.io>
wrote:

On Mon, May 23, 2016 at 3:41 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Thanks DHR and Sunil ,

@ DHR , I have followed your way to install the gem on staging
directory , but it doesn't help. is this same way followed by existing
cloudfoundry java buildpack ??
This is the way you should be doing it. What about this doesn't help
/ work for you?

Dan





@ Sunil ,

Please could you elaborate more on your approach , I coudn't get
your suggestion.


Regards
Lingesh M

On Fri, May 20, 2016 at 7:56 AM, Sunil Babu <
cloudgrp.assist(a)gmail.com> wrote:

Hi

Enable cloning with repo an make auto update enabled this there is
no need to install


On Thursday, May 19, 2016, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Cloudfoundry ,

Is there any simple way, we can update or install new libraries in
existing cf stacks (cflinuxf2) without creating new custom stacks ??

*Example :* Our modified java buildpack not running on existing
stacks because of few of the ruby gems are missing in the file system. so
we would require to install few ruby gem and use the modified java
buildpack.

Share your thoughts and suggestions.

Regards
Lingesh M

--
Thanks & Regards
Sunil Babu K C
+91-81970-35608


Daniel Mikusa
 

It's not an issue of pointing to the gems. The build pack runs (staging)
in it's own container. The container is completely isolated from the DEA
or Diego Cell where it's running. You can't access resources that you've
installed on the DEA from inside the container. Anything the build pack
needs should be packaged with it. That's the only way to guarantee it will
be available when the build pack runs.

The only exception is if you can guarantee that your build pack will only
run when the Internet is available. In that case, you could download
additional dependencies. That's not a good assumption to make though as a
lot of people run without the Internet or behind aggressive firewalls that
block the Internet.

Dan

On Tue, May 24, 2016 at 2:05 PM, DHR <lists(a)dhrapson.com> wrote:

So I think your problem is that your gems are on the DEA at staging time
but aren't being found by the Ruby layer, right?
If so the normal approach is to point to them via an env Var (eg
BUNDLE_PATH, GEM_PATH), however your compile, detect, release scripts are
already in Ruby (not bash) so perhaps you could load them using Gem.paths.
Example on

http://stackoverflow.com/questions/28764389/set-gem-home-path-or-gem-path-programmatically

On 24 May 2016, at 18:08, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

not an issue .Thanks Dan !!!

On Tue, May 24, 2016 at 4:56 PM, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:

OK, my fault. I misunderstood what you're trying to do here. I was
thinking that your application needed the gems, but it's your build pack
that needs them.

You originally said...

*Example :* Our modified java buildpack not running on existing stacks
because of few of the ruby gems are missing in the file system. so we would
require to install few ruby gem and use the modified java buildpack.

If the build pack needs additional gems then you would want to pack the
gems with the build pack. I'm not sure what the best way to do this would
be, I'm sure someone with more ruby experience can say. Ideas that come to
mind: add it as a git submodule, vendor it (seems like what you're doing),
maybe just copy the src in if it's small.

Basically the build pack needs to be self contained (especially so that
it works in offline environments). Anything it needs, should be included
with the build pack.

Dan



On Tue, May 24, 2016 at 1:37 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

yes Dan,


we have used below commands to package the buildpack .

bundle install
bundle exec rake package version=custom-java-buildpack

after that we will take the zip and create a offline buildpack using cf
cli.

Regards
Lingesh M



On Mon, May 23, 2016 at 7:16 PM, Daniel Mikusa <dmikusa(a)pivotal.io>
wrote:

You need to bundle install the gem in the staging container. The build
pack would generally do this.

Dan


On Mon, May 23, 2016 at 8:25 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Dan ,

yes I have installed the require gem via *bundle install* to specify
the path of vendor staging directories which is available in below paths

/var/vcap/data/packages/dea_next/* /vendor/cache
/var/vcap/data/packages/warden/*/vendor/cache

using buildpack Gemfile.

Still I am not seeing these require gem is available in staging
container. So staging container during compile phase.


Regards
Lingesh M

On Mon, May 23, 2016 at 5:35 PM, Daniel Mikusa <dmikusa(a)pivotal.io>
wrote:

On Mon, May 23, 2016 at 3:41 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Thanks DHR and Sunil ,

@ DHR , I have followed your way to install the gem on staging
directory , but it doesn't help. is this same way followed by existing
cloudfoundry java buildpack ??
This is the way you should be doing it. What about this doesn't help
/ work for you?

Dan





@ Sunil ,

Please could you elaborate more on your approach , I coudn't get
your suggestion.


Regards
Lingesh M

On Fri, May 20, 2016 at 7:56 AM, Sunil Babu <
cloudgrp.assist(a)gmail.com> wrote:

Hi

Enable cloning with repo an make auto update enabled this there is
no need to install


On Thursday, May 19, 2016, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Cloudfoundry ,

Is there any simple way, we can update or install new libraries in
existing cf stacks (cflinuxf2) without creating new custom stacks ??

*Example :* Our modified java buildpack not running on existing
stacks because of few of the ruby gems are missing in the file system. so
we would require to install few ruby gem and use the modified java
buildpack.

Share your thoughts and suggestions.

Regards
Lingesh M

--
Thanks & Regards
Sunil Babu K C
+91-81970-35608


DHR
 

Agree on all counts. We've already suggested vendoring the gems inside the buildpack to ensure they're there on the staging container.
I'm now suggesting that the bin scripts just can't find the gems, so Lingesh could try using Gem.paths list the gem locations that the bin scripts have got access to & ensure the vendored gems are on the path.

Hope it makes sense

On 24 May 2016, at 20:25, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:

It's not an issue of pointing to the gems. The build pack runs (staging) in it's own container. The container is completely isolated from the DEA or Diego Cell where it's running. You can't access resources that you've installed on the DEA from inside the container. Anything the build pack needs should be packaged with it. That's the only way to guarantee it will be available when the build pack runs.

The only exception is if you can guarantee that your build pack will only run when the Internet is available. In that case, you could download additional dependencies. That's not a good assumption to make though as a lot of people run without the Internet or behind aggressive firewalls that block the Internet.

Dan


On Tue, May 24, 2016 at 2:05 PM, DHR <lists(a)dhrapson.com> wrote:
So I think your problem is that your gems are on the DEA at staging time but aren't being found by the Ruby layer, right?
If so the normal approach is to point to them via an env Var (eg BUNDLE_PATH, GEM_PATH), however your compile, detect, release scripts are already in Ruby (not bash) so perhaps you could load them using Gem.paths. Example on
http://stackoverflow.com/questions/28764389/set-gem-home-path-or-gem-path-programmatically

On 24 May 2016, at 18:08, Lingesh Mouleeshwaran <lingeshmouleeshwaran(a)gmail.com> wrote:

not an issue .Thanks Dan !!!

On Tue, May 24, 2016 at 4:56 PM, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:
OK, my fault. I misunderstood what you're trying to do here. I was thinking that your application needed the gems, but it's your build pack that needs them.

You originally said...

Example : Our modified java buildpack not running on existing stacks because of few of the ruby gems are missing in the file system. so we would require to install few ruby gem and use the modified java buildpack.
If the build pack needs additional gems then you would want to pack the gems with the build pack. I'm not sure what the best way to do this would be, I'm sure someone with more ruby experience can say. Ideas that come to mind: add it as a git submodule, vendor it (seems like what you're doing), maybe just copy the src in if it's small.

Basically the build pack needs to be self contained (especially so that it works in offline environments). Anything it needs, should be included with the build pack.

Dan



On Tue, May 24, 2016 at 1:37 AM, Lingesh Mouleeshwaran <lingeshmouleeshwaran(a)gmail.com> wrote:
yes Dan,


we have used below commands to package the buildpack .

bundle install
bundle exec rake package version=custom-java-buildpack

after that we will take the zip and create a offline buildpack using cf cli.

Regards
Lingesh M



On Mon, May 23, 2016 at 7:16 PM, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:
You need to bundle install the gem in the staging container. The build pack would generally do this.

Dan


On Mon, May 23, 2016 at 8:25 AM, Lingesh Mouleeshwaran <lingeshmouleeshwaran(a)gmail.com> wrote:
Hi Dan ,

yes I have installed the require gem via bundle install to specify the path of vendor staging directories which is available in below paths

/var/vcap/data/packages/dea_next/* /vendor/cache
/var/vcap/data/packages/warden/*/vendor/cache

using buildpack Gemfile.

Still I am not seeing these require gem is available in staging container. So staging container during compile phase.


Regards
Lingesh M

On Mon, May 23, 2016 at 5:35 PM, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:
On Mon, May 23, 2016 at 3:41 AM, Lingesh Mouleeshwaran <lingeshmouleeshwaran(a)gmail.com> wrote:
Thanks DHR and Sunil ,

@ DHR , I have followed your way to install the gem on staging directory , but it doesn't help. is this same way followed by existing cloudfoundry java buildpack ??
This is the way you should be doing it. What about this doesn't help / work for you?

Dan




@ Sunil ,

Please could you elaborate more on your approach , I coudn't get your suggestion.


Regards
Lingesh M

On Fri, May 20, 2016 at 7:56 AM, Sunil Babu <cloudgrp.assist(a)gmail.com> wrote:
Hi

Enable cloning with repo an make auto update enabled this there is no need to install


On Thursday, May 19, 2016, Lingesh Mouleeshwaran <lingeshmouleeshwaran(a)gmail.com> wrote:
Hi Cloudfoundry ,

Is there any simple way, we can update or install new libraries in existing cf stacks (cflinuxf2) without creating new custom stacks ??

Example : Our modified java buildpack not running on existing stacks because of few of the ruby gems are missing in the file system. so we would require to install few ruby gem and use the modified java buildpack.

Share your thoughts and suggestions.

Regards
Lingesh M

--
Thanks & Regards
Sunil Babu K C
+91-81970-35608


Daniel Mikusa
 

Ah, gotcha. +1 to that.

On Tue, May 24, 2016 at 3:39 PM, DHR <lists(a)dhrapson.com> wrote:

Agree on all counts. We've already suggested vendoring the gems inside the
buildpack to ensure they're there on the staging container.
I'm now suggesting that the bin scripts just can't find the gems, so
Lingesh could try using Gem.paths list the gem locations that the bin
scripts have got access to & ensure the vendored gems are on the path.

Hope it makes sense

On 24 May 2016, at 20:25, Daniel Mikusa <dmikusa(a)pivotal.io> wrote:

It's not an issue of pointing to the gems. The build pack runs (staging)
in it's own container. The container is completely isolated from the DEA
or Diego Cell where it's running. You can't access resources that you've
installed on the DEA from inside the container. Anything the build pack
needs should be packaged with it. That's the only way to guarantee it will
be available when the build pack runs.

The only exception is if you can guarantee that your build pack will only
run when the Internet is available. In that case, you could download
additional dependencies. That's not a good assumption to make though as a
lot of people run without the Internet or behind aggressive firewalls that
block the Internet.

Dan


On Tue, May 24, 2016 at 2:05 PM, DHR <lists(a)dhrapson.com> wrote:

So I think your problem is that your gems are on the DEA at staging time
but aren't being found by the Ruby layer, right?
If so the normal approach is to point to them via an env Var (eg
BUNDLE_PATH, GEM_PATH), however your compile, detect, release scripts are
already in Ruby (not bash) so perhaps you could load them using Gem.paths.
Example on

http://stackoverflow.com/questions/28764389/set-gem-home-path-or-gem-path-programmatically

On 24 May 2016, at 18:08, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

not an issue .Thanks Dan !!!

On Tue, May 24, 2016 at 4:56 PM, Daniel Mikusa <dmikusa(a)pivotal.io>
wrote:

OK, my fault. I misunderstood what you're trying to do here. I was
thinking that your application needed the gems, but it's your build pack
that needs them.

You originally said...

*Example :* Our modified java buildpack not running on existing stacks
because of few of the ruby gems are missing in the file system. so we would
require to install few ruby gem and use the modified java buildpack.

If the build pack needs additional gems then you would want to pack the
gems with the build pack. I'm not sure what the best way to do this would
be, I'm sure someone with more ruby experience can say. Ideas that come to
mind: add it as a git submodule, vendor it (seems like what you're doing),
maybe just copy the src in if it's small.

Basically the build pack needs to be self contained (especially so that
it works in offline environments). Anything it needs, should be included
with the build pack.

Dan



On Tue, May 24, 2016 at 1:37 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

yes Dan,


we have used below commands to package the buildpack .

bundle install
bundle exec rake package version=custom-java-buildpack

after that we will take the zip and create a offline buildpack using cf
cli.

Regards
Lingesh M



On Mon, May 23, 2016 at 7:16 PM, Daniel Mikusa <dmikusa(a)pivotal.io>
wrote:

You need to bundle install the gem in the staging container. The
build pack would generally do this.

Dan


On Mon, May 23, 2016 at 8:25 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Dan ,

yes I have installed the require gem via *bundle install* to specify
the path of vendor staging directories which is available in below paths

/var/vcap/data/packages/dea_next/* /vendor/cache
/var/vcap/data/packages/warden/*/vendor/cache

using buildpack Gemfile.

Still I am not seeing these require gem is available in staging
container. So staging container during compile phase.


Regards
Lingesh M

On Mon, May 23, 2016 at 5:35 PM, Daniel Mikusa <dmikusa(a)pivotal.io>
wrote:

On Mon, May 23, 2016 at 3:41 AM, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Thanks DHR and Sunil ,

@ DHR , I have followed your way to install the gem on staging
directory , but it doesn't help. is this same way followed by existing
cloudfoundry java buildpack ??
This is the way you should be doing it. What about this doesn't
help / work for you?

Dan





@ Sunil ,

Please could you elaborate more on your approach , I coudn't get
your suggestion.


Regards
Lingesh M

On Fri, May 20, 2016 at 7:56 AM, Sunil Babu <
cloudgrp.assist(a)gmail.com> wrote:

Hi

Enable cloning with repo an make auto update enabled this there is
no need to install


On Thursday, May 19, 2016, Lingesh Mouleeshwaran <
lingeshmouleeshwaran(a)gmail.com> wrote:

Hi Cloudfoundry ,

Is there any simple way, we can update or install new libraries
in existing cf stacks (cflinuxf2) without creating new custom stacks ??

*Example :* Our modified java buildpack not running on existing
stacks because of few of the ruby gems are missing in the file system. so
we would require to install few ruby gem and use the modified java
buildpack.

Share your thoughts and suggestions.

Regards
Lingesh M

--
Thanks & Regards
Sunil Babu K C
+91-81970-35608