Skip to content

Instantly share code, notes, and snippets.

@ludoch
Last active November 5, 2019 12:37
Show Gist options
  • Save ludoch/a306eb9f3ee327399247a2948caab4bc to your computer and use it in GitHub Desktop.
Save ludoch/a306eb9f3ee327399247a2948caab4bc to your computer and use it in GitHub Desktop.
Quarkus Native Target deployment on Google App Engine Java11 runtime
#!/bin/sh
# Generate a simple Quarkus app:
mvn io.quarkus:quarkus-maven-plugin:0.28.1:create \
-DprojectGroupId=hi -DprojectArtifactId=hi -DclassName=Hi -DprojectVersion=1 -Dpath="/hi"
export GRAALVM_HOME=~/graalvm-ce-19.2.1
cd hi
# On Linux, compile to a native application:
mvn package -Pnative
#prepare AppEngine Deployment with the generated binary and simple app.yaml with entrypoint:
mkdir stage
mv target/hi-1-runner stage
echo -e "runtime: java11\nentrypoint: ./hi-1-runner -Djava.io.tmpdir=/tmp" >stage/app.yaml
gcloud app deploy --quiet --no-promote --version native --project quarkus-io stage
curl https://native-dot-quarkus-io.appspot.com/hi
# Should see this output: hello
#Log console should contains:
#A 2019-11-05T12:19:01.421776Z INFO [io.quarkus] (main) hi 1 (running on Quarkus 0.28.1) started in 0.491s. Listening on: http://0.0.0.0:8080
#A 2019-11-05T12:19:01.428965Z INFO [io.quarkus] (main) Profile prod activated.
#A 2019-11-05T12:19:01.429013Z INFO [io.quarkus] (main) Installed features: [cdi, resteasy]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment