david, this is so cool! i'd been thinking about something like this for awhile. it's so so useful! scott frederick and others will thank you profusely i'm sure.
have you thought about stacking the buildpacks together with multi-buildpack so you could use this buildpack with an app such that an app's actual buildpack gets run through it's compile phase too, but then this buildpack gets wrapped around it, it could start the app in a different process (perhaps with the web-ui) / perhaps proxies traffic to it locally in the container (since you only get one port) or maybe uses virtual hosts or something? worst case i suppose you can use curl from the web-ui to send it requests. very glad you did this!
nic, mark kropf is the pm for runtime and has a currently de-prioritized workstream around something the team has been calling 'taskmaster' that would enable one-off commands from an existing droplet like migrations, interactive commands like a terminal session, and eventually scheduled commands.
this work is something i would like to see done soon, but it's not as high priority as:
- fixing very important bugs, found some issues in the dea's that can cause instability and unbalanced app/staging behavior that strains some deas in larger deployments
- getting our build pipeline clean, you may have noticed that we didn't do a release this week, which is extremely important that we be able to release with confidence whenever we want to, and we couldn't do that this week
- improving the reliability and our confidence in health manager (HM9000 work)
- working on admin buildpacks to support things like ibm liberty buildpack
- garbage collection of no longer used blob store entries that have broken user deployments
i'm also very concerned about the mental model of how this all works given the existing simple construct of apps and services. i really like the heroku process model [1] and i'm hesitant to introduce separate constructs. mark has a different view that tasks are a separate concept from the main app process we have today.
i view the app as a codebase, and the named process types as different commands you can execute on that app/codebase. today we only have a single app process / command, it's 1:1 to the codebase. but we need to plan for how we think about multiple types of processes using the same codebase, and how that is conceptually represented to users and exposed via the api.
- is a Heroku inspired process model something Cloud Foundry should adopt?
- should short-lived tasks / app processes simply be just an attribute of a process type such that the system doesn't restart them when they exit?
- should tasks be conceptually separate from a long-running web app process?
- how many processes should be routable? just the web process or any app process that has routes associated?
we have lots of conceptual issues to resolve before this taskmaster work will be completed. in the meantime, i'm thrilled we have this new buildpack contribution! thanks david!