Repository navigation
Description
As we add more features to builds, rely more on upstreamed deployments, and cover more use cases in the product, we more clearly know the use cases that new-app and new-build need to solve, and with that knowledge we can more clearly decompose them into multiple commands.
This proposal describes how that split may be accomplished, with emphasis on ensuring no specific workflow is lost and the clarity and composability of the client commands is enhanced. We should be able to articulate clear and understandable entry points for three types of users:
- users new to paas or docker, who want to construct applications primarily via their core input (source, language, dependencies) and let the platform manage the optimal setup
- users who want to construct individual pieces of the application pipeline in order to specify options at each step - these users are more familiar with the concepts of the platform
- users who want to quickly construct complex setups which they can later fill in with details via direct yaml manipulation - these users want to avoid manually specifying every detail of an app, but still have a more complex workflow than individually creating each step.
Propose the following commands and responsibilities:
- oc new-app - walks a user through creating a single deployment pipeline or template, with help for understanding how the pieces fit
- oc build - by default, takes local or remote source and executes a single build to a destination image stream (inferred from the names of inputs), can also accept a flag to make this a repeating build
- oc run - as with upstream kubectl, focuses on creating a deployment config that has a minimum set of defaults. Should be image stream and search aware - if we need more flexibility than upstream can handle, we will create:
- oc deploy - like oc run, but creates a service and autoselects appropriate defaults. Most like "oc new-app imagestream" today, cannot create builds. Existing deploy function goes to oc rollout as per upstream changes
- oc expose continues to be the primary way to create services and routes
- oc compose - handles special syntax style for complex scripted creation.
In this model new-app is for new paas users who don't need complexity. compose is for advanced users. The remainder are intermediate users who want more flexibility and fine grained pipeline control.
- The function of start-build would be rolled into build and left as legacy
- oc deploy moves to oc rollout
- oc new-build is an alias for build
- we drop complex function on new-app (Git URL or image or both, and template).
Activity
smarterclayton commentedon Jan 21, 2016
@bparees @jwforres
bparees commentedon Jan 21, 2016
oc new-buildbeing an alias foroc buildseems bad given that the behavior is significantly different. i'd rather just seeoc new-buildget deprecated and ultimately removed.Let's talk about things these commands will and won't ever deal with (list for discussion, not intended to be definitive one way or the other). Now that these commands will only be constructing a single thing (eg a single BuildConfig), it would be less painful to have arguments for these items ("--source-secret=foo") so i'm more open to having them, but if we're trying to avoid complexity and delegate to editing yaml, then having a command line flag for every API object field might miss the mark. So I guess i just want to discuss which ones we definitely do/do not want to expose as configurable.
bparees commentedon Jan 21, 2016
I see no way w/ your proposed commands to deploy combinations of things (create a webapp pod and a db pod, or create a single pod with two containers). Is that an intentional restriction? I'm fine with it if, so, just want to make it explicit.
does
oc buildonly produce the image? so you'd need to then runoc runto get a deployment config for that image to get it running? (oroc deploy)smarterclayton commentedon Jan 22, 2016
On Jan 21, 2016, at 3:00 PM, Ben Parees [email protected] wrote:
I see no way w/ your proposed commands to deploy combinations of things
(create a webapp pod and a db pod, or create a single pod with two
containers). Is that an intentional restriction? I'm fine with it if, so,
just want to make it explicit.
I think so. Multi containers probably has to be an additional step or
compose, unless we drastically limit what they can do.
does oc build only produce the image? so you'd need to then run oc run to
get a deployment config for that image to get it running? (or oc deploy)
I think so. The one ugly outcome is that when we do build first until the
build completes you have no metadata for the image to use in deploy, so you
can't automatically set ports or read labels, unless we have deploy walk
from the image back to a source build and from. That's disconcerting - id
like to not have to make that trade off.
mfojtik commentedon Jan 22, 2016
@smarterclayton there is already a trello card for new-app redesign: https://trello.com/c/pjHs36Sa/713-5-update-oc-new-app-behavior
smarterclayton commentedon Jan 22, 2016
I'd prefer design and proposal discussions to happen here. Trello should
mention this issue.
On Fri, Jan 22, 2016 at 8:36 AM, Michal Fojtik [email protected]
wrote:
jwforres commentedon Jan 25, 2016
will
oc builddo different build types, do a Docker build if it detects a Dockerfile in the source repo?and just for written clarity... in the current proposal, oc build is still doing multiple tasks:
The first two its easy to see how adding a single flag could go from single build to generating a repeating build. A little worried how kicking off an existing BC is going to fit into that. Need to plan args / flags carefully for the new command.
smarterclayton commentedon Jan 25, 2016
jwforres commentedon Jan 25, 2016
Yeah but having "start-build" and "build" would also be really confusing :-\
On Monday, January 25, 2016, Clayton Coleman [email protected]
wrote:
smarterclayton commentedon Jan 25, 2016
openshift-bot commentedon Feb 5, 2018
Issues go stale after 90d of inactivity.
Mark the issue as fresh with
/remove-lifecycle stale.Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with
/close./lifecycle stale
openshift-bot commentedon Mar 7, 2018
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting
/remove-lifecycle rotten.Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting
/lifecycle frozen.If this issue is safe to close now please do so with
/close./lifecycle rotten
/remove-lifecycle stale
openshift-bot commentedon Apr 6, 2018
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting
/reopen.Mark the issue as fresh by commenting
/remove-lifecycle rotten.Exclude this issue from closing again by commenting
/lifecycle frozen./close