最近在Github上发现了一款神器,由Daniel Flower开发并开源的一款产品 App Runner,其Github的地址如下:https://github.com/danielflower/app-runner
我们可以把其看成是一个可以快速部署自己应用小的Web应用程序的私有云的PAAS平台,其支持Java, Clojure, NodeJS, Python, golang, Scala 和.NET 。 一旦这个平台跑起来了之后,只要告诉其Git地址,就能自动把部署的应用程序拉起来,如果部署在Git服务器上的应用程序有自动更新,其还会自动部署,功能强大到爆。
下面看看其运行以后的界面的样子吧。
那么如何把这个平台启动起来呢? 其实很简单,通过下面几步就可以了。
# The port that users will use to access the apps
appserver.port=8000
# A directory where all the repos, log files, temp data etc will be stored
appserver.data.dir=data
# Specifies an app to download and run if there are no apps already. The default app is a console
# that lets you view and add apps.
appserver.initial.app.url=https://github.com/danielflower/app-runner-home.git
# You can redirect "/" to an app - e.g. one that lists all the available apps
appserver.default.app.name=app-runner-home
# To support https, you need to specify an https port, and you need to have a keystore
#appserver.https.port=8443
#apprunner.keystore.type=JKS
#apprunner.keystore.path=test.keystore
#apprunner.keystore.password=password
#apprunner.keymanager.password=password
# Timeouts in millis for the proxied requests to the apps - if an app exceeds these when responding a 504 is returned
apprunner.proxy.total.timeout=60000
apprunner.proxy.idle.timeout=30000
需要注意的是,其默认配置文件https是打开的,如果在测试环境不想AppRunner的PAAS平台不允许在HTTPS的环境下,可以把下面的参数注释掉。
#appserver.https.port=8443
#apprunner.keystore.type=JKS
#apprunner.keystore.path=test.keystore
#apprunner.keystore.password=password
#apprunner.keymanager.password=password
mvn clean package
注意当前的最新代码,其start.bat或者start.sh会默认使用下面的命令启动
@echo off
java -Dlogback.configurationFile=logback.xml -agentlib:jdwp=transport=dt_socket,server=y,
suspend=n,address=1044 -jar ..\target\app-runner-1.0-SNAPSHOT.jar config.properties
但是源代码生成的名称是app-runner-2.0-SNAPSHOT.jar
为了保持一致,请把默认的start.bat里面的jar包的名字改成app-runner-2.0-SNAPSHOT.jar 。
大家如果感兴趣的话,可以快速试一下。Enjoy it~~~~~~