这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@michaelshobbs
Copy link
Member

ref #1044

outputs container logs during check_deploy
output can be suppressed with --quiet

@michaelshobbs michaelshobbs force-pushed the 1044_mh-show-logs-on-deploy branch from 74d57c4 to 34c525b Compare March 20, 2015 15:31
@michaelshobbs michaelshobbs changed the title show logs on deploy success and failure. closes #1044 show logs on deploy success and failure Mar 20, 2015
@josegonzalez
Copy link
Member

What does the output look like with this change?

@michaelshobbs
Copy link
Member Author

example from clojure

remote: -----> Discovering process types
remote:        Procfile declares types -> web
remote:        Default process types for Clojure (Leiningen 2) -> web
remote: -----> Releasing test-clojure-29744...
remote: -----> Deploying test-clojure-29744...
remote: -----> Running pre-flight checks
remote:        CHECKS file not found in container: running simple container check...
remote: -----> Waiting for 35 seconds ...
remote: -----> test-clojure-29744 container output:
remote: Picked up JAVA_TOOL_OPTIONS:  -Djava.rmi.server.useCodebaseOnly=true
remote: (Retrieving org/clojure/tools.nrepl/0.2.3/tools.nrepl-0.2.3.pom from central)
remote: (Retrieving clojure-complete/clojure-complete/0.2.3/clojure-complete-0.2.3.pom from clojars)
remote: (Retrieving org/clojure/tools.nrepl/0.2.3/tools.nrepl-0.2.3.jar from central)
remote: (Retrieving clojure-complete/clojure-complete/0.2.3/clojure-complete-0.2.3.jar from clojars)
remote: Picked up JAVA_TOOL_OPTIONS:  -Djava.rmi.server.useCodebaseOnly=true
remote: 2015-03-20 15:38:02.300:INFO:oejs.Server:jetty-7.6.13.v20130916
remote: 2015-03-20 15:38:02.346:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:5000
remote: -----> container output end
remote: -----> Default check successful!
remote: -----> Running post-deploy
remote: -----> Creating new /home/dokku/test-clojure-29744/VHOST...
remote: -----> Configuring test-clojure-29744.dokku.me...
remote: -----> Creating http nginx.conf
remote: -----> Running nginx-pre-reload
remote:        Reloading nginx
remote: =====> Application deployed:
remote:        http://test-clojure-29744.dokku.me
remote: 

@josegonzalez
Copy link
Member

Can you indent that? I'm not sure how I feel about it being always output, so maybe we can make this an optional setting, similar to dokku trace on so I can turn it off?

@michaelshobbs
Copy link
Member Author

It's literally a docker logs call. I suppose just run it through sed or something?

I feel strongly that this will save a lot of troubleshooting time for folks new to dokku and docker. Thus, I really think this should be the default behavior.

@josegonzalez
Copy link
Member

Yeah sed is fine, though don't we have a method that does auto-indention? Also, the container output end bit should probably start with an uppercase C.

I'm fine with it being on by default, I'd just like to be able to turn it off :) S'okay if that's too much extra work though.

@michaelshobbs
Copy link
Member Author

I'll look

@michaelshobbs michaelshobbs force-pushed the 1044_mh-show-logs-on-deploy branch from 34c525b to 4fc0c27 Compare March 20, 2015 18:50
@michaelshobbs
Copy link
Member Author

New output:

node-js (CHECKS file check):

-----> Discovering process types
       Procfile declares types -> web
-----> Releasing node-js-app...
-----> Deploying node-js-app...
-----> Running pre-flight checks
-----> Waiting for 5 seconds ...
       CHECKS expected result:
       http://localhost/ => "Hello World"
-----> All checks successful!
=====> node-js-app container output:
       > node-js-sample@0.1.0 start /app
       > node index.js
       Node app is running at localhost:5000
=====> end node-js-app container output
-----> Running post-deploy
-----> Creating new /home/dokku/node-js-app/VHOST...
-----> Configuring node-js-app.dokku.me...
-----> Creating http nginx.conf
-----> Running nginx-pre-reload
       Reloading nginx
=====> Application deployed:
       http://node-js-app.dokku.me

node-js (with failure):

-----> Discovering process types
       Procfile declares types -> web
-----> Releasing node-js-app...
-----> Deploying node-js-app...
-----> Running pre-flight checks
-----> Waiting for 5 seconds ...
       CHECKS expected result:
       http://localhost/ => "Hello World"
----->
curl: (7) Failed to connect to 172.17.1.54 port 5000: No route to host
=====> node-js-app container output:
       > node-js-sample@0.1.0 start /app
       > node index1.js
       module.js:340
           throw err;
                 ^
       Error: Cannot find module '/app/index1.js'
           at Function.Module._resolveFilename (module.js:338:15)
           at Function.Module._load (module.js:280:25)
           at Function.Module.runMain (module.js:497:10)
           at startup (node.js:119:16)
           at node.js:935:3
       npm ERR! node-js-sample@0.1.0 start: `node index1.js`
       npm ERR! Exit status 8
       npm ERR!
       npm ERR! Failed at the node-js-sample@0.1.0 start script.
       npm ERR! This is most likely a problem with the node-js-sample package,
       npm ERR! not with npm itself.
       npm ERR! Tell the author that this fails on your system:
       npm ERR!     node index1.js
       npm ERR! You can get their info via:
       npm ERR!     npm owner ls node-js-sample
       npm ERR! There is likely additional logging output above.
       npm ERR! System Linux 3.13.0-36-generic
       npm ERR! command "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
       npm ERR! cwd /app
       npm ERR! node -v v0.10.37
       npm ERR! npm -v 1.4.28
       npm ERR! code ELIFECYCLE
       npm ERR!
       npm ERR! Additional logging details can be found in:
       npm ERR!     /app/npm-debug.log
       npm ERR! not ok code 0
=====> end node-js-app container output
remote: /usr/local/bin/dokku: line 49: 17138 Killed                  dokku deploy "$APP"

clojure (default container check):

-----> Discovering process types
       Procfile declares types -> web
       Default process types for Clojure (Leiningen 2) -> web
-----> Releasing clojure-test-app...
-----> Deploying clojure-test-app...
-----> Running pre-flight checks
       CHECKS file not found in container: running simple container check...
-----> Waiting for 35 seconds ...
-----> Default container check successful!
=====> clojure-test-app container output:
       Picked up JAVA_TOOL_OPTIONS: -Xmx384m -Xss512k -Dfile.encoding=UTF-8 -Djava.rmi.server.useCodebaseOnly=true
       Retrieving org/clojure/tools.nrepl/0.2.6/tools.nrepl-0.2.6.pom from central
       Retrieving clojure-complete/clojure-complete/0.2.3/clojure-complete-0.2.3.pom from clojars
       Retrieving org/clojure/tools.nrepl/0.2.6/tools.nrepl-0.2.6.jar from central
       Retrieving clojure-complete/clojure-complete/0.2.3/clojure-complete-0.2.3.jar from clojars
       Picked up JAVA_TOOL_OPTIONS: -Xmx384m -Xss512k -Dfile.encoding=UTF-8 -Djava.rmi.server.useCodebaseOnly=true
       2015-03-20 18:43:08.565:INFO:oejs.Server:jetty-7.6.13.v20130916
       2015-03-20 18:43:08.594:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:5000
=====> end clojure-test-app container output
-----> Running post-deploy
-----> Creating new /home/dokku/clojure-test-app/VHOST...
-----> Configuring clojure-test-app.dokku.me...
-----> Creating http nginx.conf
-----> Running nginx-pre-reload
       Reloading nginx
=====> Application deployed:
       http://clojure-test-app.dokku.me

@michaelshobbs michaelshobbs force-pushed the 1044_mh-show-logs-on-deploy branch from 4fc0c27 to 77257c4 Compare March 20, 2015 19:32
@josegonzalez
Copy link
Member

Seems legit.

josegonzalez added a commit that referenced this pull request Mar 20, 2015
show logs on deploy success and failure
@josegonzalez josegonzalez merged commit d6c5b64 into master Mar 20, 2015
@josegonzalez josegonzalez deleted the 1044_mh-show-logs-on-deploy branch March 20, 2015 20:17
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.

3 participants