lunes, 2 de abril de 2018

Heroku CalculatorWebService



C:\Users\Bext\Documents\NetBeansProjects\exercise\CalculatorWSAppMavenWebApp>heroku create
heroku-cli: Updating to 6.13.17-275c5ef... 11.9 MB/11.9 MB
Creating app... done, vast-dawn-97446
 !    ENOENT: spawn git ENOENT

C:\Users\Bext\Documents\NetBeansProjects\exercise\CalculatorWSAppMavenWebApp>heroku login
Enter your Heroku credentials:
Email: jalbertomarrod@gmail.com
Password: *********
Logged in as jalbertomarrod@gmail.com

C:\Users\Bext\Documents\NetBeansProjects\exercise\CalculatorWSAppMavenWebApp>heroku create
Creating app... done, immense-forest-31534
https://immense-forest-31534.herokuapp.com/ | https://git.heroku.com/immense-forest-31534.git

C:\Users\Bext\Documents\NetBeansProjects\exercise\CalculatorWSAppMavenWebApp>git push heroku master
Counting objects: 18, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (18/18), 3.41 KiB | 0 bytes/s, done.
Total 18 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Java app detected
remote: -----> Installing OpenJDK 1.8... done
remote: -----> Installing Maven 3.3.9... done
remote: -----> Executing: mvn -DskipTests clean dependency:list install
remote:        [INFO] Scanning for projects...
remote:        [INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.pom
remote:        [INFO] Downloaded: https://repo.maven.apache.org/maven2/org/apache/
heroku login
git clone https://github.com/heroku/java-getting-started.git
cd java-getting-started

heroku create
Creating warm-eyrie-9006... done, stack is cedar-14
http://warm-eyrie-9006.herokuapp.com/ | https://git.heroku.com/warm-eyrie-9006.git
Git remote heroku added

heroku create
Creating warm-eyrie-9006... done, stack is cedar-14
http://warm-eyrie-9006.herokuapp.com/ | https://git.heroku.com/warm-eyrie-9006.git
Git remote heroku added

heroku ps:scale web=1

heroku open

heroku logs --tail
2017-04-20T15:06:14.198559+00:00 heroku[web.1]: Starting process with command `java $JAVA_OPTS -Dserver.port=43161 -jar target/java-getting-started-1.0.jar`
2017-04-20T15:06:16.478043+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2017-04-20T15:06:16.484066+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx350m -Xss512k -Dfile.encoding=UTF-8
2017-04-20T15:06:19.396477+00:00 app[web.1]:   _    _                _
2017-04-20T15:06:19.396487+00:00 app[web.1]:  | |  | |              | |
2017-04-20T15:06:19.396488+00:00 app[web.1]:  

The Procfile in the example app you deployed looks like this:
web: java -jar target/java-getting-started-1.0.jar

heroku ps
=== web (Free): web: java -jar target/java-getting-started-1.0.jar (1)
web.1: up 2016/07/07 09:06:41 +0100 (~ 4m ago)

heroku ps:scale web=0

heroku ps:scale web=1

heroku run bash
Running `bash` attached to terminal... up, run.8963
~ $ ls

heroku logs
2013-02-11T15:19:10+00:00 heroku[router]: at=info method=GET path=/articles/custom-domains host=mydemoapp.heroku.com fwd=74.58.173.188 dyno=web.1 queue=0 wait=0ms connect=0ms service=1452ms status=200 bytes=5783
2013-02-11T15:19:10+00:00 app[web.2]: Started GET "/" for 1.169.38.175 at 2013-02-11 15:19:10 +0000
2013-02-11T15:19:10+00:00 app[web.1]: St

heroku logs -n 200

heroku logs --tail

heroku logs --dyno router
2012-02-07T09:43:06.123456+00:00 heroku[router]: at=info method=GET path="/stylesheets/dev-center/library.css" host=devcenter.heroku.com fwd="204.204.204.204" dyno=web.5 connect=1ms service=18ms status=200 bytes=13
2012-02-07T09:43:06.123456+00:00 heroku[router]: at=info method=GET path="/articles/bundler" host=devcenter.heroku.com fwd="204.204.204.204" dyno=web.6 connect=1ms service=18ms status=200 bytes=20375
 
heroku logs --source app
2012-02-07T09:45:47.123456+00:00 app[web.1]: Rendered shared/_search.html.erb (1.0ms)
2012-02-07T09:45:47.123456+00:00 app[web.1]: Completed 200 OK in 83ms (Views: 48.7ms | ActiveRecord: 32.2ms)
2012-02-07T09:45:47.123456+00:00 app[worker.1]: [Worker(host:465cf64e-61c8-46d3-b480-362bfd4ecff9 pid:1)] 1 jobs processed at 23.0330 j/s, 0 failed ...
2012-02-07T09:46:01.123456+00:00 app[web.6]: Started GET "/articles/buildpacks" for 4.1.81.209 at 2012-02-07 09:46:01 +0000
 
heroku logs --source app --dyno worker
2012-02-07T09:47:59.123456+00:00 app[worker.1]: [Worker(host:260cf64e-61c8-46d3-b480-362bfd4ecff9 pid:1)] Article#record_view_without_delay completed after 0.0221
2012-02-07T09:47:59.123456+00:00 app[worker.1]: [Worker(host:260cf64e-61c8-4

Deploy to Heroku

Commit your changes to Git:
git init
git add .
git commit -m "Ready to deploy"
Create the app:
heroku create
Creating empty-fire-9222... done, stack is cedar-14
http://empty-fire-9222.herokuapp.com/ | git@heroku.com:empty-fire-9222.git
Git remote heroku added
Deploy your code:
git push heroku master
Counting objects: 66, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (31/31), done.
Writing objects: 100% (66/66), 15.74 KiB, done.
Total 66 (delta 10), reused 30 (delta 9)
 
-----> Heroku receiving push
-----> Java app detected
-----> Installing Maven 3.0.3..... done
-----> executing /app/tmp/repo.git/.cache/.Maven/bin/mvn -B -Duser.home=/tmp/build_14lc6nws0m7oc -Dmaven.repo.local=/app/tmp/repo.git/.cache/.m2/repository -DskipTests=true clean install
[INFO] Scanning for projects...

CREATING A HEROKU REMOTE
heroku create
Creating falling-wind-1624... done, stack is cedar-14
http://falling-wind-1624.herokuapp.com/ | https://git.heroku.com/falling-wind-1624.git
Git remote heroku added
 
git remote -v
heroku  https://git.heroku.com/falling-wind-1624.git (fetch)
heroku  https://git.heroku.com/falling-wind-1624.git (push)

heroku git:remote -a falling-wind-1624
Git remote heroku added.


No hay comentarios:

Publicar un comentario