Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display info about what new-app is doing #5476

Merged

Conversation

smarterclayton
Copy link
Contributor

@bparees @csrwng @jwforres for review

Examples:

$ oc new-app php mysql
--> Found image dbaa6b2 (33 hours old) in image stream "php" under tag :latest for "php"
    * We will deploy this image in deployment config "php"
    * Port 8080/tcp will be load balanced by service "php"
--> Found image 11387c8 (5 days old) in image stream "mysql" under tag :latest for "mysql"
    * We will deploy this image in deployment config "mysql"
    * Port 3306/tcp will be load balanced by service "mysql"
--> Creating resources with label no-source=php-mysql ...
    DeploymentConfig "php" created
    DeploymentConfig "mysql" created
    Service "php" created
    Service "mysql" created
--> Success
    Run 'oc status' to view your app.
$ oc new-app ruby-helloworld-sample
--> Deploying template ruby-helloworld-sample for "ruby-helloworld-sample"
     With parameters:
      ADMIN_USERNAME=adminS10 # generated
      ADMIN_PASSWORD=7pjaeF8i # generated
      MYSQL_USER=user80T # generated
      MYSQL_PASSWORD=up3R6mOn # generated
      MYSQL_DATABASE=root
--> Creating resources with label app=helloworld ...
    Service "frontend" created
    Route "route-edge" created
    ImageStream "origin-ruby-sample" created
    ImageStream "ruby-20-centos7" created
    BuildConfig "ruby-sample-build" created
    DeploymentConfig "frontend" created
    Service "database" created
    DeploymentConfig "database" created
--> Success
    Build scheduled for "ruby-sample-build" - use the build-logs command to track its progress.
    Run 'oc status' to view your app.
$ oc new-app openshift/ruby-20-centos7~https://github.com/openshift/ruby-hello-world
--> Found Docker image 36f4145 (33 hours old) from Docker Hub for "openshift/ruby-20-centos7"
    * An image stream will be created as "ruby-20-centos7:latest" that will track this image
    * The source repository appears to match: ruby
    * We will perform a docker build using source code from https://github.com/openshift/ruby-hello-world
      * The resulting image will be pushed to image stream "ruby-hello-world:latest"
      * Every time "ruby-20-centos7:latest" changes a new build will be triggered
    * We will deploy this image in deployment config "ruby-hello-world"
    * Port 8080 will be load balanced by service "ruby-hello-world"
--> Creating resources with label app=ruby ...
    ImageStream "ruby-20-centos7" created
    ImageStream "ruby-hello-world" created
    BuildConfig "ruby-hello-world" created
    DeploymentConfig "ruby-hello-world" created
    Service "ruby-hello-world" created
--> Success
    Build scheduled for "ruby-hello-world" - use the build-logs command to track its progress.
    Run 'oc status' to view your app.
$ oc new-app installable:file 
error: installing "installable:file" requires that you grant the image access to run with your credentials

If you trust the provided image, include the flag --grant-install-rights.
You can see more information about the image by adding the --dry-run flag.
$ oc new-app installable:file --dry-run
--> Installing application from "installable:file"
    * Found image 33955e1 (6 weeks old) in image stream "installable" under tag :file for "installable:file"
    * Install will run in pod "installable-install"
    * The pod has access to your current session token through the secret "installable-install"
    * If you cancel the install, please ensure you delete the secret or log out of your session
$ oc new-app installable:file --grant-install-rights
--> Installing application from "installable:file"
    * Found image 33955e1 (6 weeks old) in image stream "installable" under tag :file for "installable:file"
    * Install will run in pod "installable-install"
    * The pod has access to your current session token through the secret "installable-install"
    * If you cancel the install, please ensure you delete the secret or log out of your session
--> Installing ...
OpenShift Application Platform

The OpenShift distribution of Kubernetes helps you build, deploy, and manage your applications on top of
Docker containers. To start an all-in-one server with the default configuration, run:

  $ openshift start &

Available Commands:
  start       Launch all-in-one server
  admin       Tools for managing a cluster
  cli         Command line tools for managing applications
  kube        Kubernetes cluster management via kubectl
  ex          Experimental commands under active development
  version     Display version
  help        Help about any command

Use "openshift help <command>" for more information about a given command.
Use "openshift options" for a list of global command-line options (applies to all commands).
--> Success

@smarterclayton
Copy link
Contributor Author

[test]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/6362/)

@smarterclayton
Copy link
Contributor Author

@liggitt

@@ -220,7 +220,7 @@ function tryuntil {
timeout=$(($(date +%s) + 90))
echo "++ Retrying until success or timeout: ${@}"
while [ 1 ]; do
if eval "${@}" 2>&1 >/dev/null; then
if eval "${@}" >/dev/null 2>&1; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

humph.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. Bash is AWESOME!!!!!1111!!11!!1!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like &> /dev/null

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

me too but i think that's considered deprecated syntax: http://wiki.bash-hackers.org/scripting/obsolete

@bparees
Copy link
Contributor

bparees commented Oct 29, 2015

i'm liking the examples, will review the code in the morning.

@smarterclayton smarterclayton force-pushed the display_info_on_new_app branch 3 times, most recently from 1ec450e to a931513 Compare October 29, 2015 04:59
@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 29, 2015
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 29, 2015
@jwforres
Copy link
Member

Comments on the examples:

  1. Feels like the list of resources should be indented underneath the "Creating resources..." message
  2. Is it possible to organize the list of resources being created by their kind?
  3. Mixing passive and active enough that it was bothering me. I'm also not sure i like the "We will"
    * We will deploy this image in deployment config "mysql"
    * Port 3306/tcp will be load balanced by service "mysql"

maybe

    * This image will be deployed in deployment config "mysql"
    * Port 3306/tcp will be load balanced by service "mysql"

@liggitt
Copy link
Contributor

liggitt commented Oct 29, 2015

Is it possible to organize the list of resources being created by their kind?

We should output in the create order... if we change anything, it should be the order we create in, though I assume it is the way it currently is for a reason

@smarterclayton
Copy link
Contributor Author

Yes, we generate and sort to get certain offerings.

On Oct 29, 2015, at 8:30 AM, Jordan Liggitt notifications@github.com
wrote:

Is it possible to organize the list of resources being created by their
kind?

We should output in the create order... if we change anything, it should be
the order we create in, though I assume it is the way it currently is for a
reason


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

@smarterclayton
Copy link
Contributor Author

[merge] will address other comments after i cut 1.0.7

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 93f4af3

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/6362/) (Image: devenv-rhel7_2592)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 93f4af3

openshift-bot pushed a commit that referenced this pull request Oct 29, 2015
@openshift-bot openshift-bot merged commit 67bb208 into openshift:master Oct 29, 2015
@coveralls
Copy link

coveralls commented Aug 25, 2017

Coverage Status

Changes Unknown when pulling 93f4af3 on smarterclayton:display_info_on_new_app into ** on openshift:master**.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants