Skip to content

Commit

Permalink
Documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Magnus de Pourbaix committed Feb 23, 2016
1 parent 7af74dd commit 2a5d7e0
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 33 deletions.
32 changes: 1 addition & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,34 +48,4 @@ image with `mvn docker:push`.

### Docker Compose
* A simple docker-compose setup exists in the project root. While standing in root, calling `docker-compose up` will start
all modules, using the `Dockerfile` files as settings.





# OLD STUFF BELOW

* Run Java verticles simply by using `Run 'xxx'` in IntelliJ
* Running Ruby verticles in Intellij requires installation and setup in project of JRuby

## Easiest running of examples
* Run: `mvn package`
* Run the *-fat.jar for each respective module, for example:
`java -jar target/news-server-rb-1.0-SNAPSHOT-fat.jar -cp target/classes -cluster`



### Docker Maven
* `mvn clean package` in project root or any module, or `mvn docker:build` in any module (still needs `mvn package` to have been run).
* For each module you want to deploy in Docker run: `mvn docker:start`, or just run it in the root to start everything at once.
* To stop, simply do `mvn docker:stop` in the same module or the root.
* Alternatively you can use the Docker command line and start with:
* `docker run -t -i -p 8080:8080 vertxdemo/frontend-js:1.0-SNAPSHOT`
* `docker run -t -i vertxdemo/news-server-java:1.0-SNAPSHOT`
* Check your Docker container for it's ip and access frontend at that address i.e. <http://xxx.xxx.xxx.xxx:8080>.





all modules, using the `Dockerfile` files as settings.
2 changes: 1 addition & 1 deletion frontend-js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The [Dockerfile](/Dockerfile) in the module mirrors Docker settings in `pom.xml
* `docker run -t -i -p 8080:8080 vertxdemo/frontend-js:1.0-SNAPSHOT`

### Using IntelliJ

* Requires a Java 8 version higher than _42.
* Run JS verticles in IntelliJ by creating a Run task:
- Run -> Edit Configurations...
- Add a new Application configuration
Expand Down
27 changes: 27 additions & 0 deletions news-server-groovy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# News Server microservice in Groovy
This module demonstrates creating a simple microservice in Vert.x, using Groovy, which sends regular messages on the
Vert.x event bus.

## Build Instructions

* `mvn clean package`
* `mvn docker:build`
* If you need to push your Docker image, use `mvn docker:push`.

## Run Instructions

* `db-service-java` needs to be running.
* `mvn docker:start` to boot up a Docker container and `mvn docker:stop` to tear it down.

### Using Dockerfile
The [Dockerfile](/Dockerfile) in the module mirrors Docker settings in `pom.xml` to illustrate different usage scenarios.

* `docker run -t -i vertxdemo/news-server-groovy:1.0-SNAPSHOT`

### Using IntelliJ

* Simply create a `Run 'xxx'` in IntelliJ

### Using java -jar

* `java -jar target/news-server-groovy-1.0-SNAPSHOT-fat.jar -cp target/classes -ha`
2 changes: 1 addition & 1 deletion news-server-js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The [Dockerfile](/Dockerfile) in the module mirrors Docker settings in `pom.xml
- Run -> Edit Configurations...
- Add a new Application configuration
- Main Class: `io.vertx.core.Launcher`
- Program arguments (using the server.js as an example): `run ./news-server-js/src/main/app/news_server.js -cluster`
- Program arguments (using the server.js as an example): `run ./news-server-js/src/main/app/news_server.js -ha`

### Using java -jar

Expand Down
32 changes: 32 additions & 0 deletions news-server-rb/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# News Server microservice in Ruby

This module demonstrates creating a simple microservice in Vert.x, using Ruby, which sends regular messages on the
Vert.x event bus.

## Build Instructions

* `mvn clean package`
* `mvn docker:build`
* If you need to push your Docker image, use `mvn docker:push`.

## Run Instructions

* `mvn docker:start` to boot up a Docker container and `mvn docker:stop` to tear it down.

### Using Dockerfile
The [Dockerfile](/Dockerfile) in the module mirrors Docker settings in `pom.xml` to illustrate different usage scenarios.

* `docker run -t -i vertxdemo/news-server-rb:1.0-SNAPSHOT`

### Using IntelliJ

* Running Ruby verticles in Intellij requires installation and setup in project of JRuby
* Run Ruby verticles in IntelliJ by creating a Run task:
- Run -> Edit Configurations...
- Add a new Application configuration
- Main Class: `io.vertx.core.Launcher`
- Program arguments: `run ./news-server-rb/src/main/rb/app/news_server.rb -ha`

### Using java -jar

* `java -jar target/news-server-rb-1.0-SNAPSHOT-fat.jar -cp target/classes -ha`

0 comments on commit 2a5d7e0

Please sign in to comment.