y12studio / bkbc-tools

bkbc-tools java application
http://BlacKBananaCoin.org
Apache License 2.0
1 stars 1 forks source link

Bowery Java Jetty Test #26

Closed y12studio closed 10 years ago

y12studio commented 10 years ago

run jetty application on Bowery

Bowery/example

$ curl -O download.bowery.io/downloads/bowery_2.1.1_linux_amd64.zip
$ sudo unzip bowery_2.1.1_linux_amd64.zip -d /usr/local/bin
$ bowery version
2.1.1
$ git clone https://github.com/Bowery/example.git && cd example
$ cat bowery.json
{
  "api": {
    "image": "node",
    "path": ".",
    "start": "node app.js",
    "build": "npm install"
  },
  "database": {
    "image": "mongodb"
  }
}
$ bowery connect
Service database is available at http://database.535221cbbc9476670c00000f.boweryapps.com.
Uploading file changes to api.
Service api is available at http://api.535221cbbc9476670c00000f.boweryapps.com.
Service api upload complete. Syncing file changes.

$ bowery ssh api
Welcome to Bowery Services.
---------------------------------------------
Name: api
Application: 535221cbbc9476670c00000f
Time: 2014-04-19 15:20:49.222619063 +0800 CST
---------------------------------------------
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.8.0-35-generic x86_64)
root@1613fff6fefb:~# node -v
v0.10.22

image search

$ bowery search
All images:
  - shotgun
  - phantomjs
  - cassandra1.2
  - node
  - mongodb
  - ruby
  - mongo
  - python
  - jekyll
  - php
  - couchdb
  - scala
  - postgresql
  - redis
  - mysql
  - java7
  - mulesoft - Mulesoft 3.5-M4
  - test - testing
  - php-composer - PHP image with CURL and Composer installed
  - vim - Running node and vim.
  - bowery-example-api
  - Redis-Haskell - Redis with Haskell
  - haskell - Base with haskell and cabal
  - test1
  - my-new-image
  - riak
  - tsing-api - tsing-api
  - neo4j-2.0.2 - Neo4j 2.0.2 Community Edition
  - mono - Mono C# compiler
  - erlang - Base with Erlang 17.0
  - elixir - Elixir with Erlang 17.0
  - play - Scala 2.10.3 and Play 2.2.2
y12studio commented 10 years ago

jetty test

$ git clone https://github.com/y12studio/bkbc-tools/
$ cd bkbc-tools/projects/jetty-workshop/
$ mvn package
$ java -jar target/latest/bkbc-tool-jetty-workshop-latest.jar
...
2014-04-19 16:27:19.378:INFO:oejs.ServerConnector:main: 
  Started ServerConnector@237dc815{HTTP/1.1}{0.0.0.0:8080}
...
$ bowery connect
Hey there XXX Connecting you to Bowery now...
Uploading file changes to y12jetty.
Service y12jetty is available at http://y12jetty.535240b5bc9476670c000012.boweryapps.com.
Service y12jetty upload complete. Syncing file changes.
$ curl http://y12jetty.535240b5bc9476670c000012.boweryapps.com
curl: (7) Failed to connect to y12jettyxxxxx port 80: Connection refused

$ bowery ssh y12jetty
...
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.8.0-35-generic x86_64)
...
# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  51216 13180 ?        Ss+  09:39   0:00 /usr/bin/python
root         6  0.0  0.0  49952  2864 ?        S    09:39   0:00 /usr/sbin/sshd
root         7  0.0  0.0 252172  4416 ?        Sl   09:39   0:00 /satellite/sate
root        49  0.2  0.0  73356  3636 ?        Rs   09:45   0:00 sshd: root@pts/
root        61  0.0  0.0  18072  1916 pts/0    Ss   09:45   0:00 -bash
root        74  0.0  0.0  15276  1132 pts/0    R+   09:46   0:00 ps aux
# ls /application/
bkbc-tool-jetty-workshop-latest.jar  bowery.json
# cd /application/
# java -jar bkbc-tool-jetty-workshop-latest.jar &
...
2014-04-19 09:48:24.339:INFO:oejs.ServerConnector:main: 
  Started ServerConnector@197e6dc{HTTP/1.1}{0.0.0.0:80}

java -jar start command in bower.json not support ?