Skip to content

Commit

Permalink
Simplified platform start-up. Running non-Java apps in the same process.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmihajlovski committed Oct 16, 2017
1 parent 40ad9b5 commit 42b3098
Show file tree
Hide file tree
Showing 61 changed files with 1,039 additions and 1,137 deletions.
1 change: 1 addition & 0 deletions docker-tests/app-jar.sh
Expand Up @@ -27,6 +27,7 @@ sudo docker run \
-v $(pwd)/app3:/app \ -v $(pwd)/app3:/app \
--link mysql:mysql \ --link mysql:mysql \
rapidoid/rapidoid:$TAG \ rapidoid/rapidoid:$TAG \
platform \
app.services=welcome \ app.services=welcome \
admin.services=center \ admin.services=center \
app.path=com.example \ app.path=com.example \
Expand Down
28 changes: 28 additions & 0 deletions docker-tests/env-config-dev.sh
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'

./cleanup.sh

printf "\n - Testing ENV-CONFIG (tag=$TAG)\n\n"

docker run \
--net host \
-v $(pwd)/app2:/app \
-e "UNIFORM_OUTPUT=true" \
-e "ROOT=/app/the-root" \
-e "CONFIG=my-config" \
-e "ON_PORT=5555" \
-e "RAPIDOID_PORT=9999" \
-e "APP_SERVICES=status" \
-e "ADMIN_SERVICES=overview" \
rapidoid/rapidoid:$TAG \
dev \
abc=123 \
> output/env-config-dev.txt 2>&1 &

./wait-for.sh 9999

./http-get.sh env-config-dev-req 9999 /rapidoid/status

./cleanup.sh
35 changes: 15 additions & 20 deletions docker-tests/output/admin-service-application.txt
Expand Up @@ -5,23 +5,18 @@
|_| \_\__,_| .__/|_|\__,_|\___/|_|\__,_| |_| \_\__,_| .__/|_|\__,_|\___/|_|\__,_|
|_| |_|


[PLATFORM] INFO | Command-line arguments: INFO | Starting Rapidoid v<?>, built on <?> [Dockerized] [Uniform output]
[PLATFORM] INFO | admin.services=application INFO | System info | os = Linux | java = <?> | process = <?> | max memory = <?> | dir = /opt
[PLATFORM] INFO | INFO | Setting application root | root = /app | items = 0
[PLATFORM] INFO | Starting Rapidoid v<?>, built on <?> [Dockerized] [Uniform output] INFO | No production/dev/test mode was configured, inferring mode | mode = PRODUCTION
[PLATFORM] INFO | System info | os = Linux | java = <?> | process = <?> | max memory = <?> | dir = /opt INFO | Automatically activating mode-specific profile | profile = production
[PLATFORM] INFO | Setting application root | root = /app | content = [] INFO | Initialized environment | mode = PRODUCTION | profiles = [production, platform]
[PLATFORM] INFO | Automatically activating mode-specific profile | profile = production INFO | Setting application JAR | appJar = /app/app.jar | exists = false
[PLATFORM] INFO | Initialized environment | mode = PRODUCTION | profiles = [production, platform] INFO | Loaded configuration | namespace = rapidoid | files = [built-in-config.yml, built-in-config-platform.yml]
[PLATFORM] INFO | Setting application JAR | appJar = /app/app.jar | exists = false INFO | GET,POST /rapidoid/routes | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | Loaded configuration | namespace = rapidoid | files = [built-in-config.yml, built-in-config-platform.yml] INFO | Starting server | address = 0.0.0.0 | port = 8888 | I/O workers = 4 | sync = true | accept = non-blocking
[PLATFORM] INFO | Starting server | address = 0.0.0.0 | port = 8888 | I/O workers = 4 | sync = true | accept = non-blocking INFO | Server has started | setup = admin | home = http://localhost:8888
[PLATFORM] INFO | Server has started | setup = admin | home = http://localhost:8888 INFO | Static resources will be served from the following locations | setup = admin | locations = [static, default/static]
[PLATFORM] INFO | Static resources will be served from the following locations | setup = admin | locations = [static, default/static] INFO | GET,POST /rapidoid/beans | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/routes | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET,POST /rapidoid/config | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/beans | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET /rapidoid/classpath | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/config | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET /rapidoid/classpath | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | ---------------------------------------------------
[PLATFORM] INFO | ADMIN CREDENTIALS: username = admin, password = <?>
[PLATFORM] INFO | ---------------------------------------------------
31 changes: 13 additions & 18 deletions docker-tests/output/admin-service-auth.txt
Expand Up @@ -5,21 +5,16 @@
|_| \_\__,_| .__/|_|\__,_|\___/|_|\__,_| |_| \_\__,_| .__/|_|\__,_|\___/|_|\__,_|
|_| |_|


[PLATFORM] INFO | Command-line arguments: INFO | Starting Rapidoid v<?>, built on <?> [Dockerized] [Uniform output]
[PLATFORM] INFO | admin.services=auth INFO | System info | os = Linux | java = <?> | process = <?> | max memory = <?> | dir = /opt
[PLATFORM] INFO | INFO | Setting application root | root = /app | items = 0
[PLATFORM] INFO | Starting Rapidoid v<?>, built on <?> [Dockerized] [Uniform output] INFO | No production/dev/test mode was configured, inferring mode | mode = PRODUCTION
[PLATFORM] INFO | System info | os = Linux | java = <?> | process = <?> | max memory = <?> | dir = /opt INFO | Automatically activating mode-specific profile | profile = production
[PLATFORM] INFO | Setting application root | root = /app | content = [] INFO | Initialized environment | mode = PRODUCTION | profiles = [production, platform]
[PLATFORM] INFO | Automatically activating mode-specific profile | profile = production INFO | Setting application JAR | appJar = /app/app.jar | exists = false
[PLATFORM] INFO | Initialized environment | mode = PRODUCTION | profiles = [production, platform] INFO | Loaded configuration | namespace = rapidoid | files = [built-in-config.yml, built-in-config-platform.yml]
[PLATFORM] INFO | Setting application JAR | appJar = /app/app.jar | exists = false INFO | POST /rapidoid/login | setup = main | roles = [] | transaction = NONE | mvc = false | cacheTTL = 0
[PLATFORM] INFO | Loaded configuration | namespace = rapidoid | files = [built-in-config.yml, built-in-config-platform.yml] INFO | Starting server | address = 0.0.0.0 | port = 8888 | I/O workers = 4 | sync = true | accept = non-blocking
[PLATFORM] INFO | Starting server | address = 0.0.0.0 | port = 8888 | I/O workers = 4 | sync = true | accept = non-blocking INFO | Server has started | setup = admin | home = http://localhost:8888
[PLATFORM] INFO | Server has started | setup = admin | home = http://localhost:8888 INFO | Static resources will be served from the following locations | setup = admin | locations = [static, default/static]
[PLATFORM] INFO | Static resources will be served from the following locations | setup = admin | locations = [static, default/static] INFO | GET /rapidoid/logout | setup = main | roles = [logged_in] | transaction = NONE | mvc = false | cacheTTL = 0
[PLATFORM] INFO | POST /rapidoid/login | setup = main | roles = [] | transaction = NONE | mvc = false | cacheTTL = 0
[PLATFORM] INFO | GET /rapidoid/logout | setup = main | roles = [logged_in] | transaction = NONE | mvc = false | cacheTTL = 0
[PLATFORM] INFO | ---------------------------------------------------
[PLATFORM] INFO | ADMIN CREDENTIALS: username = admin, password = <?>
[PLATFORM] INFO | ---------------------------------------------------
89 changes: 42 additions & 47 deletions docker-tests/output/admin-service-center.txt
Expand Up @@ -5,50 +5,45 @@
|_| \_\__,_| .__/|_|\__,_|\___/|_|\__,_| |_| \_\__,_| .__/|_|\__,_|\___/|_|\__,_|
|_| |_|


[PLATFORM] INFO | Command-line arguments: INFO | Starting Rapidoid v<?>, built on <?> [Dockerized] [Uniform output]
[PLATFORM] INFO | admin.services=center INFO | System info | os = Linux | java = <?> | process = <?> | max memory = <?> | dir = /opt
[PLATFORM] INFO | INFO | Setting application root | root = /app | items = 0
[PLATFORM] INFO | Starting Rapidoid v<?>, built on <?> [Dockerized] [Uniform output] INFO | No production/dev/test mode was configured, inferring mode | mode = PRODUCTION
[PLATFORM] INFO | System info | os = Linux | java = <?> | process = <?> | max memory = <?> | dir = /opt INFO | Automatically activating mode-specific profile | profile = production
[PLATFORM] INFO | Setting application root | root = /app | content = [] INFO | Initialized environment | mode = PRODUCTION | profiles = [production, platform]
[PLATFORM] INFO | Automatically activating mode-specific profile | profile = production INFO | Setting application JAR | appJar = /app/app.jar | exists = false
[PLATFORM] INFO | Initialized environment | mode = PRODUCTION | profiles = [production, platform] INFO | Loaded configuration | namespace = rapidoid | files = [built-in-config.yml, built-in-config-platform.yml]
[PLATFORM] INFO | Setting application JAR | appJar = /app/app.jar | exists = false INFO | -------------------------
[PLATFORM] INFO | Loaded configuration | namespace = rapidoid | files = [built-in-config.yml, built-in-config-platform.yml] INFO | Registering Admin Center:
[PLATFORM] INFO | ------------------------- INFO | -------------------------
[PLATFORM] INFO | Registering Admin Center: INFO | Bootstraping metrics
[PLATFORM] INFO | ------------------------- INFO | GET,POST /rapidoid | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | Bootstraping metrics INFO | Starting server | address = 0.0.0.0 | port = 8888 | I/O workers = 4 | sync = true | accept = non-blocking
[PLATFORM] INFO | Starting server | address = 0.0.0.0 | port = 8888 | I/O workers = 4 | sync = true | accept = non-blocking INFO | Server has started | setup = admin | home = http://localhost:8888
[PLATFORM] INFO | Server has started | setup = admin | home = http://localhost:8888 INFO | Static resources will be served from the following locations | setup = admin | locations = [static, default/static]
[PLATFORM] INFO | Static resources will be served from the following locations | setup = admin | locations = [static, default/static] INFO | GET,POST /rapidoid/entities | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET,POST /rapidoid/routes | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/entities | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET,POST /rapidoid/beans | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/routes | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET,POST /rapidoid/config | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/beans | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET /rapidoid/classpath | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/config | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET,POST /rapidoid/terminate | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET /rapidoid/classpath | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET,POST /rapidoid/processes | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/terminate | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET,POST /rapidoid/processes/{id} | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/processes | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET,POST /rapidoid/manageables | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/processes/{id} | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET,POST /rapidoid/manageables/{type}/{id}/* | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/manageables | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET,POST /rapidoid/jmx/memory | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/manageables/{type}/{id}/* | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET,POST /rapidoid/jmx/mempool | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/jmx/memory | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET,POST /rapidoid/jmx/classes | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/jmx/mempool | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET,POST /rapidoid/jmx/os | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/jmx/classes | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET,POST /rapidoid/jmx/threads | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/jmx/os | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET,POST /rapidoid/jmx/compilation | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/jmx/threads | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET,POST /rapidoid/jmx/runtime | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/jmx/compilation | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET,POST /rapidoid/jmx/gc | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/jmx/runtime | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET,POST /rapidoid/metrics | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/jmx/gc | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | GET /rapidoid/graphs/{id:.*} | setup = main | roles = [administrator] | transaction = NONE | mvc = false | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/metrics | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | POST /rapidoid/login | setup = main | roles = [] | transaction = NONE | mvc = false | cacheTTL = 0
[PLATFORM] INFO | GET /rapidoid/graphs/{id:.*} | setup = main | roles = [administrator] | transaction = NONE | mvc = false | cacheTTL = 0 INFO | GET /rapidoid/logout | setup = main | roles = [logged_in] | transaction = NONE | mvc = false | cacheTTL = 0
[PLATFORM] INFO | POST /rapidoid/login | setup = main | roles = [] | transaction = NONE | mvc = false | cacheTTL = 0 INFO | GET /rapidoid/status | setup = main | roles = [administrator] | transaction = NONE | mvc = false | cacheTTL = 0
[PLATFORM] INFO | GET /rapidoid/logout | setup = main | roles = [logged_in] | transaction = NONE | mvc = false | cacheTTL = 0 INFO | GET,POST /rapidoid/deployment | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0
[PLATFORM] INFO | GET /rapidoid/status | setup = main | roles = [administrator] | transaction = NONE | mvc = false | cacheTTL = 0 INFO | POST /rapidoid/stage | setup = main | roles = [administrator] | transaction = NONE | mvc = false | cacheTTL = 0
[PLATFORM] INFO | GET,POST /rapidoid/deployment | setup = main | roles = [administrator] | transaction = NONE | mvc = true | cacheTTL = 0 INFO | POST /rapidoid/deploy | setup = main | roles = [administrator] | transaction = NONE | mvc = false | cacheTTL = 0
[PLATFORM] INFO | POST /rapidoid/stage | setup = main | roles = [administrator] | transaction = NONE | mvc = false | cacheTTL = 0
[PLATFORM] INFO | POST /rapidoid/deploy | setup = main | roles = [administrator] | transaction = NONE | mvc = false | cacheTTL = 0
[PLATFORM] INFO | ---------------------------------------------------
[PLATFORM] INFO | ADMIN CREDENTIALS: username = admin, password = <?>
[PLATFORM] INFO | ---------------------------------------------------

0 comments on commit 42b3098

Please sign in to comment.