add Function compiling webapp and update scripts

This commit is contained in:
markfisher
2017-01-19 11:33:48 -05:00
parent cc3bb8f645
commit 94a78bdc7f
28 changed files with 1029 additions and 70 deletions

3
scripts/function-registry.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
java -jar ../spring-cloud-function-compiler/target/spring-cloud-function-compiler-1.0.0.BUILD-SNAPSHOT.jar

View File

@@ -11,6 +11,4 @@ while getopts ":n:f:" opt; do
esac
done
java -jar ../spring-cloud-function-core/target/spring-cloud-function-core-1.0.0.BUILD-SNAPSHOT-registrar.jar consumer\
$NAME\
$FUNC
curl -X POST -H "Content-Type: text/plain" -d $FUNC :8080/consumer/$NAME

View File

@@ -11,6 +11,4 @@ while getopts ":n:f:" opt; do
esac
done
java -jar ../spring-cloud-function-core/target/spring-cloud-function-core-1.0.0.BUILD-SNAPSHOT-registrar.jar function\
$NAME\
$FUNC
curl -X POST -H "Content-Type: text/plain" -d $FUNC :8080/function/$NAME

View File

@@ -11,6 +11,4 @@ while getopts ":n:f:" opt; do
esac
done
java -jar ../spring-cloud-function-core/target/spring-cloud-function-core-1.0.0.BUILD-SNAPSHOT-registrar.jar supplier\
$NAME\
$FUNC
curl -X POST -H "Content-Type: text/plain" -d $FUNC :8080/supplier/$NAME

View File

@@ -7,6 +7,7 @@ while getopts ":i:f:o:" opt; do
;;
f)
FUNC=$OPTARG
TYPE=function
;;
o)
OUT=$OPTARG
@@ -14,7 +15,11 @@ while getopts ":i:f:o:" opt; do
esac
done
java -noverify -XX:TieredStopAtLevel=1 -Xss256K -Xms16M -Xmx256M -XX:MaxMetaspaceSize=128M -jar ../spring-cloud-function-stream/target/spring-cloud-function-stream-1.0.0.BUILD-SNAPSHOT.jar\
java -jar ../spring-cloud-function-samples/spring-cloud-function-sample-bytecode/target/function-sample-bytecode-1.0.0.BUILD-SNAPSHOT.jar\
--management.security.enabled=false\
--server.port=9999\
--spring.cloud.stream.bindings.input.destination=$IN\
--spring.cloud.stream.bindings.output.destination=$OUT\
--function.name=$FUNC
--function.name=$TYPE\
--function.type=$TYPE\
--function.resource=file:///tmp/function-registry/$TYPE's'/$FUNC.fun

View File

@@ -1,4 +1,26 @@
#!/bin/bash
java -jar ../spring-cloud-function-web/target/spring-cloud-function-web-1.0.0.BUILD-SNAPSHOT.jar ${@}
while getopts ":s:f:c:p:" opt; do
case $opt in
s)
FUNC=$OPTARG
TYPE=supplier
;;
f)
FUNC=$OPTARG
TYPE=function
;;
c)
FUNC=$OPTARG
TYPE=consumer
;;
p)
PORT=$OPTARG
;;
esac
done
java -jar ../spring-cloud-function-samples/spring-cloud-function-sample-bytecode/target/function-sample-bytecode-1.0.0.BUILD-SNAPSHOT.jar \
--function.type=$TYPE \
--function.resource=file:///tmp/function-registry/$TYPE's'/$FUNC.fun \
--server.port=$PORT