- Launch application using:
./mvnw quarkus:dev
- Test by issuing
curl
commands:URL=http://localhost:8080 curl -X GET $URL/hello curl -d '"Funqy"' -X POST $URL/greet
- AZ CLI
- Azure Functions Core Tools (optional to run function locally)
-
Export the following variables:
export GUID='guid' export CLIENT_ID='client-id' export PASSWORD='value' export TENANT='tenant-value' export SUBSCRIPTION='subscription-value' export RESOURCEGROUP='resource-group'
-
Login to Azure
az login --service-principal -u $CLIENT_ID -p $PASSWORD --tenant $TENANT
-
Build Azure Function and deploy it to Azure
./mvnw clean package -f pom-azure.xml -DskipTests -DtenantId=$TENANT \ -DfunctionResourceGroup=$RESOURCEGROUP azure-functions:deploy
-
Test by issuing
curl
commands with the URL from the deploy output:URL=<URL from deploy output without ending slash> curl -w '\nTime: %{time_total}s\n' -X GET $URL/hello curl -w '\nTime: %{time_total}s\n' -d '"Azure"' -X POST $URL/greet
-
Login to AWS
aws configure
-
Build Lambda function
./mvnw clean package -f pom-aws.xml -DskipTests
-
Deploy Lambda to AWS
sam deploy -t target/sam.jvm.yaml --guided --capabilities CAPABILITY_NAMED_IAM
- Alternatively you can use Native build and deploy to AWS
./mvnw clean package -f pom-aws.xml -DskipTests -Pnative -Dquarkus.native.container-build=true sam deploy -t target/sam.native.yaml --guided --capabilities CAPABILITY_NAMED_IAM
- Alternatively you can use Native build and deploy to AWS
-
Test by issuing
curl
commands with the URL from the deploy output:URL=<URL from deploy output without ending slash> curl -w '\nTime: %{time_total}s\n' -X GET $URL/hello curl -w '\nTime: %{time_total}s\n' -d '"AWS"' -X POST $URL/greet
-
Login to gcloud
gcloud init
-
Build Google Cloud Function
./mvnw clean package -f pom-gcp.xml -DskipTests
-
Deploy Function to GCP
gcloud functions deploy quarkus-funqy-http \ --entry-point=io.quarkus.gcp.functions.http.QuarkusHttpFunction \ --runtime=java11 --trigger-http --allow-unauthenticated --source=target/deployment
-
Test by issuing
curl
commands with the URL from the deploy output:URL=<URL from deploy output> curl -w '\nTime: %{time_total}s\n' -X GET $URL/hello curl -w '\nTime: %{time_total}s\n' -d '"GCP"' -X POST $URL/greet
- oc (OpenShift) CLI
- kn CLI
- Install OpenShift Serverless Operator
- Log into OpenShift Console with a cluster admin user
- Navigate to Operators/OperatorHub
- Search for Serverless and click on "Red Hat OpenShift Serverless"
- Click on Install
- Accept default values and click Install
- Once Operator is installed, create Knative Serving instance by running this command:
oc apply -f knative/serving.yaml
-
Build KNative Function and deploy it to OpenShift (requires podman desktop/docker running to deploy):
oc login --token=<token> --server=<api-url> oc new-project funqy-knative kn func deploy
- Alternatively you can deploy function using previously published public image:
kn func deploy --build=false --push=false --registry quay.io --image quay.io/jbaldera/funqy-knative:1.0
-
Test by issuing
curl
commands with the URL from the deploy output:URL=<URL from deploy output> curl -w '\nTime: %{time_total}s\n' -X GET $URL/hello curl -w '\nTime: %{time_total}s\n' -d '"KNative"' -X POST $URL/greet