Re-staging due to sevrice binding

21 views
Skip to first unread message

Brian DePradine

unread,
Jan 16, 2014, 12:45:36 PM1/16/14
to vcap...@cloudfoundry.org
Hello,

I deployed my application to cloud foundry, and I used the 'cf bind-service' command to bind a service to it after deployment. I then restarted the app in order for the service binding to take effect. I noticed that the application was then re-staged at that point. Is this the expected behaviour going forward? The reason I ask is that there is lots of documentation stating the need to restart the application, but I can't find any that states that the application will be re-staged.

Brian

Mike Youngstrom

unread,
Jan 16, 2014, 12:52:58 PM1/16/14
to vcap...@cloudfoundry.org
Yes, when changing service bindings the application must be restaged since staging can be changed depending upon bound services.

Any documentation to the contrary should probably be updated.  Pull requests would probably be welcome. :)

Mike


To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.

Rohit Kelapure

unread,
Jan 17, 2014, 1:28:09 PM1/17/14
to vcap...@cloudfoundry.org

Will this behavior change in the future ? 
Do buildpacks need to evolve to do service dependency acquisition outside of the buildpack staging phase ?

-cheers,
Rohit

Mike Youngstrom

unread,
Jan 17, 2014, 1:38:56 PM1/17/14
to vcap...@cloudfoundry.org
I'm not aware of any plans for this behavior to change.  This behavior was introduced only 4 or 5 months ago and is being used extensively by the java-buildpack to supply database drivers and such to applications at stage time.  We use it extensively for our internal buildpacks too.

Does this behavior present a problem?

Thanks,
Mike

Rohit Kelapure

unread,
Jan 17, 2014, 3:01:59 PM1/17/14
to vcap...@cloudfoundry.org
Mike,

The behavior does not pose a problem. Like the Java BP the Liberty BP also relies on restaging after a service bind to acquire service dependencies like service clients, DB drivers etc. If this behavior changes our LBP code we will need to be rearchitected and re-implement major portions of the staging code.

-Thanks,.
Rohit

Mike Youngstrom

unread,
Jan 17, 2014, 3:05:07 PM1/17/14
to vcap...@cloudfoundry.org
Ah, same with us.  We'd also have to significantly re-architect a number of solutions.  Hopefully they won't decide to change it. :)

Mike

Patrick Mueller

unread,
Jan 17, 2014, 6:37:41 PM1/17/14
to vcap-dev
I'm not really happy with "restage whenever service bindings change".  For some stories, restaging when service bindings change doesn't make any sense at all.  For instance, I've not see a node buildpack that looks at service bindings in it's `compile` script, so the process of restaging won't change anything at all (basically).  It's complete overkill. It wouldn't be a problem if restaging had a very low cost, but it doesn't.

What other buildpacks perform activities based on their service bindings?
--
Patrick Mueller
http://muellerware.org
Reply all
Reply to author
Forward
0 new messages