Skip to content

Proposal: split aspects of new-app and new-build into multiple commands #6752

Closed

Description

@smarterclayton

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

  1. smarterclayton commented on Jan 21, 2016

    @smarterclayton
    ContributorAuthor
  2. bparees commented on Jan 21, 2016

    @bparees
    Contributor

    oc new-build being an alias for oc build seems bad given that the behavior is significantly different. i'd rather just see oc new-build get 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.

    • volume configuration
    • secret configuration (for accessing a repo, for pulling/pushing images, etc)
    • deploymenthook configuration
    • readiness/liveness check configuration(should they create default ones always though?)
    • env variable definition/configuration
    • label definition/configuration
    • annotation definition/configuration
  3. bparees commented on Jan 21, 2016

    @bparees
    Contributor

    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 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)

  4. smarterclayton commented on Jan 22, 2016

    @smarterclayton
    ContributorAuthor

    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.

  5. mfojtik commented on Jan 22, 2016

    @mfojtik
    Contributor
  6. smarterclayton commented on Jan 22, 2016

    @smarterclayton
    ContributorAuthor

    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:

    @smarterclayton https://github.com/smarterclayton there is already a
    trello card for new-app redesign:
    https://trello.com/c/pjHs36Sa/713-5-update-oc-new-app-behavior

    —
    Reply to this email directly or view it on GitHub
    #6752 (comment).

  7. jwforres commented on Jan 25, 2016

    @jwforres
    Member

    will oc build do 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:

    • run a single build from a source repo
    • create a repeating build from a source repo
    • kick off a build of an existing build config

    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.

  8. smarterclayton commented on Jan 25, 2016

    @smarterclayton
    ContributorAuthor
  9. jwforres commented on Jan 25, 2016

    @jwforres
    Member

    Yeah but having "start-build" and "build" would also be really confusing :-\

    On Monday, January 25, 2016, Clayton Coleman [email protected]
    wrote:

    It probably needs to do some detection, so I think yes. Start
    arguments are hard - having complex start build flows be possible is
    still a reqt, so we may find that start build continues to exist in
    some form.

    —
    Reply to this email directly or view it on GitHub
    #6752 (comment).

  10. smarterclayton commented on Jan 25, 2016

    @smarterclayton
    ContributorAuthor
  11. openshift-bot commented on Feb 5, 2018

    @openshift-bot
    Contributor

    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

  12. added
    lifecycle/stale
    on Feb 5, 2018
  13. openshift-bot commented on Mar 7, 2018

    @openshift-bot
    Contributor

    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

  14. added
    lifecycle/rotten
    and removed
    lifecycle/stale
    on Mar 7, 2018
  15. openshift-bot commented on Apr 6, 2018

    @openshift-bot
    Contributor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

lifecycle/rottenpriority/P3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions