Simple to Scale - Autoscale Easy to develop - Free to start - Build and test locally - Focus on App Code Google App Engine Trivial to manage - Fully managed - No patches/updates - 24x7 operation by Google SREs
build and deploy vm images • Curated runtimes • Rich services • Auto-everything • … just add code ● Managed collections ● Declarative + Dynamic Reimagining Compute Compute as a Continuum Platform Cluster • Basic atom • Run anything VM Manage less, get more Fewer constraints build and deploy containers build and deploy apps
Hello World Check and decompress the devkit from the USB key: $ cp /usb_mount_point/appengine-offline-devkit-v3.zip* ˜ # Check with the "mount" command where it is mounted # The copy will take a while $ cd $ shasum -c appengine-offline-devkit-v4.zip.sha1 $ unzip appengine-offline-devkit-v4.zip [Win] Copy the file into your home directory and unzip it in place. $ cd appengine-offline-devkit Follow the README there and specific steps for your platform. $ boot2docker up
Hello World Clone the codelab repo in a working directory with: $ git clone https://github.com/GoogleCloudPlatform/appengine-java-vm-sudoku-sample.git $ cd appengine-java-vm-sudoku-sample Ask to be added to one of the devoxx2014-[1-25].appspot.com projects. login using gcloud with: gcloud auth login Set your application ID with: $ gcloud config set project devoxx2014-XX
Hello World Checkout the helloworld branch with: $ git checkout helloworld Check README.md to copy paste the commands. 1. Run the app locally Dig out the logs with: $ boot2docker ssh $ cd /var/log/app_engine/sd-solver-java/default/1/0/ $ ls -la 2. Deploy the app
Sudoku V1 $ git checkout textbased Your mission: 1. Pass the content of the file to the solver and return it directly as a flat string representation of 81 chrs : “000002034…” with 0 = empty spots to solve. 2. Store the solution in the Datastore and return it from the Datastore if it already exists. 3. Use Objectify to cache the result before trying the Datastore and otherwise solve it if it is the first time we have seen this puzzle.
Introduction to Docker > docker images > docker run -i -t busybox /bin/sh # touch tmp/hello ← within the container > $(boot2docker shellinit) ← from another terminal > docker ps # exit ← this exits the container
Introduction to Docker $ docker ps -a | head $ docker logs e80719744b02 $ docker commit e80719744b02 busybox/touched $ docker images | grep busybox/touched Those steps can be "programmed" in a kind of Makefile : Dockerfile $ git checkout docker $ cat opencv_build/Dockerfile
Sudoku V2 with a Custom Runtime $ docker inspect google/appengine-java [...] "Entrypoint": [ "/home/vmagent/jetty_run.sh" ], ← what we run [...] "ExposedPorts": { "8080/tcp": {} }, ← what we expose $ git checkout docker $ cat src/main/webapp/Dockerfile Your mission : - Fix the Dockerfile to make the native version run. - Run locally, Deploy to the Cloud. - Try your app from your mobile phone.
Advanced Cloud Debugging Push your project to a github repo In the Admin Console https://console.developers.google.com - See the Source Code/ Browse Menu - Register your git repo - Navigate to a Java Class. Click the “eye”-like button - Set a Watch Point - Make your application hit this code path More info at https://cloud.google.com/tools/cloud-debugger