add Function compiling webapp and update scripts
This commit is contained in:
3
scripts/function-registry.sh
Executable file
3
scripts/function-registry.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
java -jar ../spring-cloud-function-compiler/target/spring-cloud-function-compiler-1.0.0.BUILD-SNAPSHOT.jar
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user