Skip to content

Instantly share code, notes, and snippets.

View ludoch's full-sized avatar

Ludovic Champenois ludoch

  • Google
  • United States
View GitHub Profile
@ludoch
ludoch / keybase.md
Created March 6, 2020 16:48
keybase.md

Keybase proof

I hereby claim:

  • I am ludoch on github.
  • I am ludoch (https://keybase.io/ludoch) on keybase.
  • I have a public key ASDnP7JZ_Nl8R6iVEu2w-0wkpnOiYTRP3ukX-NfefCs5tgo

To claim this, I am signing this object:

# Requirements: pack and Cloud SDK installed and configured for a given project
# Got to a Maven source directory containing a pom.xml
# We will create and public for this example the image tagged gcr.io/openjdk11/fromgae
pack build --publish gcr.io/openjdk11/fromgae --builder gcr.io/gae-runtimes/buildpacks/java11/builder:argo_current --run-image gcr.io/gae-runtimes/buildpacks/java11/run:java11_20200217_11_0_RC00
# Deploy a Cloud run from the new image gcr.io/openjdk11/fromgae which is now in gcr repo
gcloud run deploy my-backend --image=gcr.io/openjdk11/fromgae
#!/bin/sh
# Generate a linux binary (could be c,c++,rust, Graalvm native, whatever executable that is listening to port 8080
# or the $PORT env variable)
# Let say it is called ./my_executable
# Prepare AppEngine Deployment with the compiled binary and simple app.yaml with entrypoint. We pick a GAE Java11 runtime,
# but it will execute the entrypoint program given in the entrypoint which can be any linux executable:
mkdir stage
cp ./my_executable stage
echo -e "runtime: java11\nentrypoint: ./my_executable" >stage/app.yaml
@ludoch
ludoch / staticcontent.sh
Created November 8, 2019 13:29
Google App Engine Static Content Serving
#!/bin/sh
# Inspiration: https://nsirap.com/posts/006-google-app-engine-with-hugo/
# Create a directory of static content to deploy
mkdir -p gae/www
cd gae
#put static content web site under a www directory
#
cat > app.yaml
runtime: java11
@ludoch
ludoch / script.sh
Last active November 5, 2019 12:37
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: