From 7ec4f60ee8da5d206a32f56309de71a0640bb5f2 Mon Sep 17 00:00:00 2001 From: Shun Fan Date: Wed, 27 Jan 2016 11:52:58 -0800 Subject: [PATCH 1/2] Update to java8 Update to using app.yaml Update to gcloud-java 0.1.3 Remove websockets for now --- managed_vms/analytics/pom.xml | 25 +++--- .../analytics/src/main/appengine/app.yaml | 11 +++ .../analytics/AnalyticsServlet.java | 2 +- .../src/main/webapp/WEB-INF/appengine-web.xml | 12 --- managed_vms/cloudsql/pom.xml | 25 +++--- .../cloudsql/src/main/appengine/app.yaml | 10 +++ .../managedvms/cloudsql/CloudSqlServlet.java | 2 +- .../src/main/webapp/WEB-INF/appengine-web.xml | 12 --- managed_vms/cloudstorage/pom.xml | 27 +++--- .../cloudstorage/src/main/appengine/app.yaml | 10 +++ .../cloudstorage/UploadServlet.java | 19 ++-- .../src/main/webapp/WEB-INF/appengine-web.xml | 12 --- managed_vms/datastore/pom.xml | 27 +++--- .../datastore/src/main/appengine/app.yaml | 6 ++ .../datastore/DatastoreServlet.java | 8 +- .../src/main/webapp/WEB-INF/appengine-web.xml | 12 --- managed_vms/disk/pom.xml | 19 ++-- managed_vms/disk/src/main/appengine/app.yaml | 6 ++ .../example/managedvms/disk/DiskServlet.java | 2 +- .../src/main/webapp/WEB-INF/appengine-web.xml | 9 -- managed_vms/extending-runtime/pom.xml | 36 +++----- .../src/main/appengine/Dockerfile | 4 + .../src/main/appengine/app.yaml | 6 ++ .../extendingruntime/FortuneServlet.java | 2 +- .../src/main/webapp/Dockerfile | 4 - .../src/main/webapp/WEB-INF/appengine-web.xml | 9 -- managed_vms/helloworld/pom.xml | 19 ++-- .../helloworld/src/main/appengine/app.yaml | 6 ++ .../appengine/helloworld/HelloServlet.java | 36 -------- .../managedvms/helloworld/HelloServlet.java | 2 +- .../src/main/webapp/WEB-INF/appengine-web.xml | 9 -- .../src/main/webapp/WEB-INF/web.xml | 14 --- managed_vms/mailgun/pom.xml | 19 ++-- .../mailgun/src/main/appengine/app.yaml | 12 +++ .../src/main/webapp/WEB-INF/appengine-web.xml | 13 --- managed_vms/memcache/pom.xml | 19 ++-- .../memcache/src/main/appengine/app.yaml | 11 +++ .../managedvms/memcache/MemcacheServlet.java | 2 +- .../src/main/webapp/WEB-INF/appengine-web.xml | 10 --- managed_vms/sendgrid/pom.xml | 19 ++-- .../sendgrid/src/main/appengine/app.yaml | 12 +++ .../managedvms/sendgrid/SendEmailServlet.java | 2 +- .../src/main/webapp/WEB-INF/appengine-web.xml | 13 --- managed_vms/static-files/pom.xml | 19 ++-- .../static-files/src/main/appengine/app.yaml | 6 ++ .../src/main/webapp/WEB-INF/appengine-web.xml | 9 -- managed_vms/twilio/pom.xml | 22 +++-- .../twilio/src/main/appengine/app.yaml | 13 +++ .../src/main/webapp/WEB-INF/appengine-web.xml | 14 --- managed_vms/websockets/README.md | 8 -- managed_vms/websockets/pom.xml | 90 ------------------- .../managedvms/websockets/EchoEndpoint.java | 32 ------- .../websockets/WebsocketServlet.java | 77 ---------------- .../src/main/webapp/WEB-INF/appengine-web.xml | 14 --- .../src/main/webapp/WEB-INF/web.xml | 10 --- .../websockets/src/main/webapp/index.jsp | 65 -------------- pom.xml | 1 - 57 files changed, 291 insertions(+), 624 deletions(-) create mode 100644 managed_vms/analytics/src/main/appengine/app.yaml delete mode 100644 managed_vms/analytics/src/main/webapp/WEB-INF/appengine-web.xml create mode 100644 managed_vms/cloudsql/src/main/appengine/app.yaml delete mode 100644 managed_vms/cloudsql/src/main/webapp/WEB-INF/appengine-web.xml create mode 100644 managed_vms/cloudstorage/src/main/appengine/app.yaml delete mode 100644 managed_vms/cloudstorage/src/main/webapp/WEB-INF/appengine-web.xml create mode 100644 managed_vms/datastore/src/main/appengine/app.yaml delete mode 100644 managed_vms/datastore/src/main/webapp/WEB-INF/appengine-web.xml create mode 100644 managed_vms/disk/src/main/appengine/app.yaml delete mode 100644 managed_vms/disk/src/main/webapp/WEB-INF/appengine-web.xml create mode 100644 managed_vms/extending-runtime/src/main/appengine/Dockerfile create mode 100644 managed_vms/extending-runtime/src/main/appengine/app.yaml delete mode 100644 managed_vms/extending-runtime/src/main/webapp/Dockerfile delete mode 100644 managed_vms/extending-runtime/src/main/webapp/WEB-INF/appengine-web.xml create mode 100644 managed_vms/helloworld/src/main/appengine/app.yaml delete mode 100644 managed_vms/helloworld/src/main/java/com/example/appengine/helloworld/HelloServlet.java delete mode 100644 managed_vms/helloworld/src/main/webapp/WEB-INF/appengine-web.xml delete mode 100644 managed_vms/helloworld/src/main/webapp/WEB-INF/web.xml create mode 100644 managed_vms/mailgun/src/main/appengine/app.yaml delete mode 100644 managed_vms/mailgun/src/main/webapp/WEB-INF/appengine-web.xml create mode 100644 managed_vms/memcache/src/main/appengine/app.yaml delete mode 100644 managed_vms/memcache/src/main/webapp/WEB-INF/appengine-web.xml create mode 100644 managed_vms/sendgrid/src/main/appengine/app.yaml delete mode 100644 managed_vms/sendgrid/src/main/webapp/WEB-INF/appengine-web.xml create mode 100644 managed_vms/static-files/src/main/appengine/app.yaml delete mode 100644 managed_vms/static-files/src/main/webapp/WEB-INF/appengine-web.xml create mode 100644 managed_vms/twilio/src/main/appengine/app.yaml delete mode 100644 managed_vms/twilio/src/main/webapp/WEB-INF/appengine-web.xml delete mode 100644 managed_vms/websockets/README.md delete mode 100644 managed_vms/websockets/pom.xml delete mode 100644 managed_vms/websockets/src/main/java/com/example/managedvms/websockets/EchoEndpoint.java delete mode 100644 managed_vms/websockets/src/main/java/com/example/managedvms/websockets/WebsocketServlet.java delete mode 100644 managed_vms/websockets/src/main/webapp/WEB-INF/appengine-web.xml delete mode 100644 managed_vms/websockets/src/main/webapp/WEB-INF/web.xml delete mode 100644 managed_vms/websockets/src/main/webapp/index.jsp diff --git a/managed_vms/analytics/pom.xml b/managed_vms/analytics/pom.xml index 168757d6ba7..c31a230164e 100644 --- a/managed_vms/analytics/pom.xml +++ b/managed_vms/analytics/pom.xml @@ -24,6 +24,14 @@ ${project.build.directory}/${project.build.finalName}/WEB-INF/classes + + com.google.appengine + gcloud-maven-plugin + 2.0.9.92.v20160118 + + true + + org.apache.maven.plugins maven-war-plugin @@ -37,16 +45,8 @@ 3.3 maven-compiler-plugin - 1.7 - 1.7 - - - - com.google.appengine - gcloud-maven-plugin - 2.0.9.90.v20151210 - - true + 1.8 + 1.8 @@ -63,6 +63,11 @@ check + + org.eclipse.jetty + jetty-maven-plugin + 9.3.7.v20160115 + diff --git a/managed_vms/analytics/src/main/appengine/app.yaml b/managed_vms/analytics/src/main/appengine/app.yaml new file mode 100644 index 00000000000..e85f8b15d3a --- /dev/null +++ b/managed_vms/analytics/src/main/appengine/app.yaml @@ -0,0 +1,11 @@ +runtime: java +vm: true +runtime_config: + jdk: openjdk8 + server: jetty9 + +# [START env_variables] +env_variables: + GA_TRACKING_ID: YOUR-GA-TRACKING-ID + +# [END env_variables] diff --git a/managed_vms/analytics/src/main/java/com/example/managedvms/analytics/AnalyticsServlet.java b/managed_vms/analytics/src/main/java/com/example/managedvms/analytics/AnalyticsServlet.java index 40e19e06590..d7c5ed5e620 100644 --- a/managed_vms/analytics/src/main/java/com/example/managedvms/analytics/AnalyticsServlet.java +++ b/managed_vms/analytics/src/main/java/com/example/managedvms/analytics/AnalyticsServlet.java @@ -33,7 +33,7 @@ // [START example] @SuppressWarnings("serial") -@WebServlet(name = "analytics", value = "/*") +@WebServlet(name = "analytics", value = "") public class AnalyticsServlet extends HttpServlet { @Override diff --git a/managed_vms/analytics/src/main/webapp/WEB-INF/appengine-web.xml b/managed_vms/analytics/src/main/webapp/WEB-INF/appengine-web.xml deleted file mode 100644 index 97f782ee54c..00000000000 --- a/managed_vms/analytics/src/main/webapp/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - true - true - - - - - - - - diff --git a/managed_vms/cloudsql/pom.xml b/managed_vms/cloudsql/pom.xml index 3d7202f7f10..4579dde28c2 100644 --- a/managed_vms/cloudsql/pom.xml +++ b/managed_vms/cloudsql/pom.xml @@ -26,6 +26,14 @@ ${project.build.directory}/${project.build.finalName}/WEB-INF/classes + + com.google.appengine + gcloud-maven-plugin + 2.0.9.92.v20160118 + + true + + org.apache.maven.plugins maven-war-plugin @@ -39,16 +47,8 @@ maven-compiler-plugin 3.3 - 1.7 - 1.7 - - - - com.google.appengine - gcloud-maven-plugin - 2.0.9.90.v20151210 - - true + 1.8 + 1.8 @@ -65,6 +65,11 @@ check + + org.eclipse.jetty + jetty-maven-plugin + 9.3.7.v20160115 + diff --git a/managed_vms/cloudsql/src/main/appengine/app.yaml b/managed_vms/cloudsql/src/main/appengine/app.yaml new file mode 100644 index 00000000000..49f7887eb9c --- /dev/null +++ b/managed_vms/cloudsql/src/main/appengine/app.yaml @@ -0,0 +1,10 @@ +runtime: java +vm: true +runtime_config: + jdk: openjdk8 + server: jetty9 + +# [START env_variables] +env_variables: + SQL_DATABASE_URL: jdbc:mysql://HOST-IP:3306/YOUR-DB-NAME?user=USERNAME&password=PASSWORD +# [END env_variables] diff --git a/managed_vms/cloudsql/src/main/java/com/example/managedvms/cloudsql/CloudSqlServlet.java b/managed_vms/cloudsql/src/main/java/com/example/managedvms/cloudsql/CloudSqlServlet.java index 08971343dd7..c4bdd569f4d 100644 --- a/managed_vms/cloudsql/src/main/java/com/example/managedvms/cloudsql/CloudSqlServlet.java +++ b/managed_vms/cloudsql/src/main/java/com/example/managedvms/cloudsql/CloudSqlServlet.java @@ -34,7 +34,7 @@ // [START example] @SuppressWarnings("serial") -@WebServlet(name = "cloudsql", value = "/*") +@WebServlet(name = "cloudsql", value = "") public class CloudSqlServlet extends HttpServlet { @Override diff --git a/managed_vms/cloudsql/src/main/webapp/WEB-INF/appengine-web.xml b/managed_vms/cloudsql/src/main/webapp/WEB-INF/appengine-web.xml deleted file mode 100644 index fe4ae8c5ea1..00000000000 --- a/managed_vms/cloudsql/src/main/webapp/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - true - true - - - - - - - - diff --git a/managed_vms/cloudstorage/pom.xml b/managed_vms/cloudstorage/pom.xml index fae565f6bc9..34860a9405b 100644 --- a/managed_vms/cloudstorage/pom.xml +++ b/managed_vms/cloudstorage/pom.xml @@ -17,13 +17,21 @@ com.google.gcloud gcloud-java-storage - 0.1.1 + 0.1.3 ${project.build.directory}/${project.build.finalName}/WEB-INF/classes + + com.google.appengine + gcloud-maven-plugin + 2.0.9.92.v20160118 + + true + + org.apache.maven.plugins maven-war-plugin @@ -37,16 +45,8 @@ maven-compiler-plugin 3.3 - 1.7 - 1.7 - - - - com.google.appengine - gcloud-maven-plugin - 2.0.9.90.v20151210 - - true + 1.8 + 1.8 @@ -63,6 +63,11 @@ check + + org.eclipse.jetty + jetty-maven-plugin + 9.3.7.v20160115 + diff --git a/managed_vms/cloudstorage/src/main/appengine/app.yaml b/managed_vms/cloudstorage/src/main/appengine/app.yaml new file mode 100644 index 00000000000..d8dc25405bc --- /dev/null +++ b/managed_vms/cloudstorage/src/main/appengine/app.yaml @@ -0,0 +1,10 @@ +runtime: java +vm: true +runtime_config: + jdk: openjdk8 + server: jetty9 + +# [START env_variables] +env_variables: + BUCKET_NAME: YOUR-BUCKET-NAME +# [END env_variables] diff --git a/managed_vms/cloudstorage/src/main/java/com/example/managedvms/cloudstorage/UploadServlet.java b/managed_vms/cloudstorage/src/main/java/com/example/managedvms/cloudstorage/UploadServlet.java index 6150f2e78dc..e1f522e9ec4 100644 --- a/managed_vms/cloudstorage/src/main/java/com/example/managedvms/cloudstorage/UploadServlet.java +++ b/managed_vms/cloudstorage/src/main/java/com/example/managedvms/cloudstorage/UploadServlet.java @@ -16,15 +16,14 @@ package com.example.managedvms.cloudstorage; -import com.google.common.io.ByteStreams; +import com.google.gcloud.storage.Acl; import com.google.gcloud.storage.BlobInfo; -import com.google.gcloud.storage.BlobWriteChannel; import com.google.gcloud.storage.Storage; import com.google.gcloud.storage.StorageOptions; import java.io.IOException; -import java.io.InputStream; -import java.nio.channels.Channels; +import java.util.ArrayList; +import java.util.List; import javax.servlet.ServletException; import javax.servlet.annotation.MultipartConfig; @@ -53,11 +52,13 @@ public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOEx ServletException { final Part filePart = req.getPart("file"); final String fileName = filePart.getSubmittedFileName(); - BlobInfo blobInfo = BlobInfo.builder(BUCKET_NAME, fileName).build(); - InputStream filecontent = filePart.getInputStream(); - BlobWriteChannel blobWriter = storage.writer(blobInfo); - ByteStreams.copy(filecontent, Channels.newOutputStream(blobWriter)); - blobWriter.close(); + List acls = new ArrayList<>(); + acls.add(Acl.of(Acl.User.ofAllUsers(), Acl.Role.READER)); + // the inputstream is closed by default, so we don't need to close it here + BlobInfo blobInfo = + storage.create( + BlobInfo.builder(BUCKET_NAME, fileName).acl(acls).build(), + filePart.getInputStream()); blobInfo = storage.get(BUCKET_NAME, fileName); resp.getWriter().print(blobInfo.mediaLink()); } diff --git a/managed_vms/cloudstorage/src/main/webapp/WEB-INF/appengine-web.xml b/managed_vms/cloudstorage/src/main/webapp/WEB-INF/appengine-web.xml deleted file mode 100644 index e1ca376557f..00000000000 --- a/managed_vms/cloudstorage/src/main/webapp/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - true - true - - - - - - - - diff --git a/managed_vms/datastore/pom.xml b/managed_vms/datastore/pom.xml index 80357f8179c..e61205dd7d4 100644 --- a/managed_vms/datastore/pom.xml +++ b/managed_vms/datastore/pom.xml @@ -17,13 +17,21 @@ com.google.gcloud gcloud-java-datastore - 0.1.1 + 0.1.3 ${project.build.directory}/${project.build.finalName}/WEB-INF/classes + + com.google.appengine + gcloud-maven-plugin + 2.0.9.92.v20160118 + + true + + org.apache.maven.plugins maven-war-plugin @@ -37,16 +45,8 @@ maven-compiler-plugin 3.3 - 1.7 - 1.7 - - - - com.google.appengine - gcloud-maven-plugin - 2.0.9.90.v20151210 - - true + 1.8 + 1.8 @@ -63,6 +63,11 @@ check + + org.eclipse.jetty + jetty-maven-plugin + 9.3.7.v20160115 + diff --git a/managed_vms/datastore/src/main/appengine/app.yaml b/managed_vms/datastore/src/main/appengine/app.yaml new file mode 100644 index 00000000000..06f95b81e35 --- /dev/null +++ b/managed_vms/datastore/src/main/appengine/app.yaml @@ -0,0 +1,6 @@ +runtime: java +vm: true +runtime_config: + jdk: openjdk8 + server: jetty9 + diff --git a/managed_vms/datastore/src/main/java/com/example/managedvms/datastore/DatastoreServlet.java b/managed_vms/datastore/src/main/java/com/example/managedvms/datastore/DatastoreServlet.java index c5043d95ac1..bc1955395ce 100644 --- a/managed_vms/datastore/src/main/java/com/example/managedvms/datastore/DatastoreServlet.java +++ b/managed_vms/datastore/src/main/java/com/example/managedvms/datastore/DatastoreServlet.java @@ -38,17 +38,13 @@ // [START example] @SuppressWarnings("serial") -@WebServlet(name = "datastore", value = "/*") +@WebServlet(name = "datastore", value = "") public class DatastoreServlet extends HttpServlet { @Override public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { - Datastore datastore = DatastoreOptions - .builder() - .projectId(System.getenv("PROJECT_ID")) - .build() - .service(); + Datastore datastore = DatastoreOptions.defaultInstance().service(); KeyFactory keyFactory = datastore.newKeyFactory().kind("visit"); IncompleteKey key = keyFactory.kind("visit").newKey(); // Record a visit to the datastore, storing the IP and timestamp. diff --git a/managed_vms/datastore/src/main/webapp/WEB-INF/appengine-web.xml b/managed_vms/datastore/src/main/webapp/WEB-INF/appengine-web.xml deleted file mode 100644 index 181a7408d5b..00000000000 --- a/managed_vms/datastore/src/main/webapp/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - true - true - - - - - - - - diff --git a/managed_vms/disk/pom.xml b/managed_vms/disk/pom.xml index 503180f6aff..4a62d9d6489 100644 --- a/managed_vms/disk/pom.xml +++ b/managed_vms/disk/pom.xml @@ -19,6 +19,11 @@ ${project.build.directory}/${project.build.finalName}/WEB-INF/classes + + com.google.appengine + gcloud-maven-plugin + 2.0.9.92.v20160118 + org.apache.maven.plugins maven-war-plugin @@ -32,15 +37,10 @@ 3.3 maven-compiler-plugin - 1.7 - 1.7 + 1.8 + 1.8 - - com.google.appengine - gcloud-maven-plugin - 2.0.9.90.v20151210 - org.apache.maven.plugins maven-checkstyle-plugin @@ -55,6 +55,11 @@ check + + org.eclipse.jetty + jetty-maven-plugin + 9.3.7.v20160115 + diff --git a/managed_vms/disk/src/main/appengine/app.yaml b/managed_vms/disk/src/main/appengine/app.yaml new file mode 100644 index 00000000000..06f95b81e35 --- /dev/null +++ b/managed_vms/disk/src/main/appengine/app.yaml @@ -0,0 +1,6 @@ +runtime: java +vm: true +runtime_config: + jdk: openjdk8 + server: jetty9 + diff --git a/managed_vms/disk/src/main/java/com/example/managedvms/disk/DiskServlet.java b/managed_vms/disk/src/main/java/com/example/managedvms/disk/DiskServlet.java index cdca638c98a..dccbf36aa95 100644 --- a/managed_vms/disk/src/main/java/com/example/managedvms/disk/DiskServlet.java +++ b/managed_vms/disk/src/main/java/com/example/managedvms/disk/DiskServlet.java @@ -32,7 +32,7 @@ // [START example] @SuppressWarnings("serial") -@WebServlet(name = "disk", value = "/*") +@WebServlet(name = "disk", value = "") public class DiskServlet extends HttpServlet { @Override diff --git a/managed_vms/disk/src/main/webapp/WEB-INF/appengine-web.xml b/managed_vms/disk/src/main/webapp/WEB-INF/appengine-web.xml deleted file mode 100644 index dba606c1666..00000000000 --- a/managed_vms/disk/src/main/webapp/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - true - true - - - - - diff --git a/managed_vms/extending-runtime/pom.xml b/managed_vms/extending-runtime/pom.xml index 2bf737f6bb0..dbfbb6dff77 100644 --- a/managed_vms/extending-runtime/pom.xml +++ b/managed_vms/extending-runtime/pom.xml @@ -6,10 +6,6 @@ 1.0-SNAPSHOT com.example.managedvms appengine-extendingruntime - - - - javax.servlet @@ -23,6 +19,11 @@ ${project.build.directory}/${project.build.finalName}/WEB-INF/classes + + com.google.appengine + gcloud-maven-plugin + 2.0.9.92.v20160118 + org.apache.maven.plugins maven-war-plugin @@ -36,26 +37,8 @@ 3.3 maven-compiler-plugin - 1.7 - 1.7 - - - - com.google.appengine - gcloud-maven-plugin - 2.0.9.90.v20151210 - - - java - -Dgcloud.java.application=${project.build.directory}/${project.build.finalName} - -Dcom.google.apphosting.vmruntime.VmRuntimeFileLogHandler.pattern=${writeable.directory}/log.%g - -Djetty.home=${gcloud.sdk.directory}/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/lib/java-managed-vm/appengine-java-vmruntime - -Djetty.base=${gcloud.sdk.directory}/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/lib/jetty-base-sdk - -jar - ${gcloud.sdk.directory}/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/lib/java-managed-vm/appengine-java-vmruntime/start.jar - -module=http - jetty.port={port} - + 1.8 + 1.8 @@ -72,6 +55,11 @@ check + + org.eclipse.jetty + jetty-maven-plugin + 9.3.7.v20160115 + diff --git a/managed_vms/extending-runtime/src/main/appengine/Dockerfile b/managed_vms/extending-runtime/src/main/appengine/Dockerfile new file mode 100644 index 00000000000..bffb4be2115 --- /dev/null +++ b/managed_vms/extending-runtime/src/main/appengine/Dockerfile @@ -0,0 +1,4 @@ +FROM gcr.io/google_appengine/jetty9 + +RUN apt-get update && apt-get install -y fortunes +ADD appengine-extendingruntime-1.0-SNAPSHOT.war $JETTY_BASE/webapps/root.war diff --git a/managed_vms/extending-runtime/src/main/appengine/app.yaml b/managed_vms/extending-runtime/src/main/appengine/app.yaml new file mode 100644 index 00000000000..63421e0b657 --- /dev/null +++ b/managed_vms/extending-runtime/src/main/appengine/app.yaml @@ -0,0 +1,6 @@ +runtime: custom +vm: true +runtime_config: + jdk: openjdk8 + server: jetty9 + diff --git a/managed_vms/extending-runtime/src/main/java/com/example/managedvms/extendingruntime/FortuneServlet.java b/managed_vms/extending-runtime/src/main/java/com/example/managedvms/extendingruntime/FortuneServlet.java index 7c6a5115b21..8176049ec2f 100644 --- a/managed_vms/extending-runtime/src/main/java/com/example/managedvms/extendingruntime/FortuneServlet.java +++ b/managed_vms/extending-runtime/src/main/java/com/example/managedvms/extendingruntime/FortuneServlet.java @@ -29,7 +29,7 @@ // [START example] @SuppressWarnings("serial") -@WebServlet(name = "fortune", value = "/*") +@WebServlet(name = "fortune", value = "") public class FortuneServlet extends HttpServlet { @Override diff --git a/managed_vms/extending-runtime/src/main/webapp/Dockerfile b/managed_vms/extending-runtime/src/main/webapp/Dockerfile deleted file mode 100644 index 3ac0a7eb2c3..00000000000 --- a/managed_vms/extending-runtime/src/main/webapp/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM gcr.io/google_appengine/jetty9-compat -RUN apt-get update && apt-get install -y fortunes - -ADD . /app diff --git a/managed_vms/extending-runtime/src/main/webapp/WEB-INF/appengine-web.xml b/managed_vms/extending-runtime/src/main/webapp/WEB-INF/appengine-web.xml deleted file mode 100644 index dba606c1666..00000000000 --- a/managed_vms/extending-runtime/src/main/webapp/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - true - true - - - - - diff --git a/managed_vms/helloworld/pom.xml b/managed_vms/helloworld/pom.xml index 40d601d137d..559bc1b5b29 100644 --- a/managed_vms/helloworld/pom.xml +++ b/managed_vms/helloworld/pom.xml @@ -19,6 +19,11 @@ ${project.build.directory}/${project.build.finalName}/WEB-INF/classes + + com.google.appengine + gcloud-maven-plugin + 2.0.9.92.v20160118 + org.apache.maven.plugins maven-war-plugin @@ -32,15 +37,10 @@ 3.3 maven-compiler-plugin - 1.7 - 1.7 + 1.8 + 1.8 - - com.google.appengine - gcloud-maven-plugin - 2.0.9.90.v20151210 - org.apache.maven.plugins maven-checkstyle-plugin @@ -55,6 +55,11 @@ check + + org.eclipse.jetty + jetty-maven-plugin + 9.3.7.v20160115 + diff --git a/managed_vms/helloworld/src/main/appengine/app.yaml b/managed_vms/helloworld/src/main/appengine/app.yaml new file mode 100644 index 00000000000..06f95b81e35 --- /dev/null +++ b/managed_vms/helloworld/src/main/appengine/app.yaml @@ -0,0 +1,6 @@ +runtime: java +vm: true +runtime_config: + jdk: openjdk8 + server: jetty9 + diff --git a/managed_vms/helloworld/src/main/java/com/example/appengine/helloworld/HelloServlet.java b/managed_vms/helloworld/src/main/java/com/example/appengine/helloworld/HelloServlet.java deleted file mode 100644 index d9135a0ce63..00000000000 --- a/managed_vms/helloworld/src/main/java/com/example/appengine/helloworld/HelloServlet.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright 2015 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.appengine.helloworld; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -// [START example] -@SuppressWarnings("serial") -public class HelloServlet extends HttpServlet { - - @Override - public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { - PrintWriter out = resp.getWriter(); - out.println("Hello, world"); - } -} -// [END example] diff --git a/managed_vms/helloworld/src/main/java/com/example/managedvms/helloworld/HelloServlet.java b/managed_vms/helloworld/src/main/java/com/example/managedvms/helloworld/HelloServlet.java index 78b2dc9b91d..7f08b47e2b0 100644 --- a/managed_vms/helloworld/src/main/java/com/example/managedvms/helloworld/HelloServlet.java +++ b/managed_vms/helloworld/src/main/java/com/example/managedvms/helloworld/HelloServlet.java @@ -25,8 +25,8 @@ import javax.servlet.http.HttpServletResponse; // [START example] +@WebServlet(name = "helloworld", value = "") @SuppressWarnings("serial") -@WebServlet(name = "helloworld", value = "/*") public class HelloServlet extends HttpServlet { @Override diff --git a/managed_vms/helloworld/src/main/webapp/WEB-INF/appengine-web.xml b/managed_vms/helloworld/src/main/webapp/WEB-INF/appengine-web.xml deleted file mode 100644 index dba606c1666..00000000000 --- a/managed_vms/helloworld/src/main/webapp/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - true - true - - - - - diff --git a/managed_vms/helloworld/src/main/webapp/WEB-INF/web.xml b/managed_vms/helloworld/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 1a1704104a2..00000000000 --- a/managed_vms/helloworld/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - hello - com.example.appengine.helloworld.HelloServlet - - - hello - / - - diff --git a/managed_vms/mailgun/pom.xml b/managed_vms/mailgun/pom.xml index 9f5b98a1098..dcef1fafbd1 100644 --- a/managed_vms/mailgun/pom.xml +++ b/managed_vms/mailgun/pom.xml @@ -36,6 +36,11 @@ ${project.build.directory}/${project.build.finalName}/WEB-INF/classes + + com.google.appengine + gcloud-maven-plugin + 2.0.9.92.v20160118 + org.apache.maven.plugins maven-war-plugin @@ -49,15 +54,10 @@ 3.3 maven-compiler-plugin - 1.7 - 1.7 + 1.8 + 1.8 - - com.google.appengine - gcloud-maven-plugin - 2.0.9.90.v20151210 - org.apache.maven.plugins maven-checkstyle-plugin @@ -72,6 +72,11 @@ check + + org.eclipse.jetty + jetty-maven-plugin + 9.3.7.v20160115 + diff --git a/managed_vms/mailgun/src/main/appengine/app.yaml b/managed_vms/mailgun/src/main/appengine/app.yaml new file mode 100644 index 00000000000..e52a6ff03ce --- /dev/null +++ b/managed_vms/mailgun/src/main/appengine/app.yaml @@ -0,0 +1,12 @@ +runtime: java +vm: true +runtime_config: + jdk: openjdk8 + server: jetty9 + +# [START env_variables] +env_variables: + MAILGUN_DOMAIN_NAME: YOUR-MAILGUN-DOMAIN-NAME + MAILGUN_API_KEY: YOUR-MAILGUN-API-KEY +# [END env_variables] + diff --git a/managed_vms/mailgun/src/main/webapp/WEB-INF/appengine-web.xml b/managed_vms/mailgun/src/main/webapp/WEB-INF/appengine-web.xml deleted file mode 100644 index f05d489f646..00000000000 --- a/managed_vms/mailgun/src/main/webapp/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - true - true - - - - - - - - - diff --git a/managed_vms/memcache/pom.xml b/managed_vms/memcache/pom.xml index 34d0fb4cfcf..aff2d079d70 100644 --- a/managed_vms/memcache/pom.xml +++ b/managed_vms/memcache/pom.xml @@ -24,6 +24,11 @@ ${project.build.directory}/${project.build.finalName}/WEB-INF/classes + + com.google.appengine + gcloud-maven-plugin + 2.0.9.92.v20160118 + org.apache.maven.plugins maven-war-plugin @@ -37,15 +42,10 @@ maven-compiler-plugin 3.3 - 1.7 - 1.7 + 1.8 + 1.8 - - com.google.appengine - gcloud-maven-plugin - 2.0.9.90.v20151210 - org.apache.maven.plugins maven-checkstyle-plugin @@ -60,6 +60,11 @@ check + + org.eclipse.jetty + jetty-maven-plugin + 9.3.7.v20160115 + diff --git a/managed_vms/memcache/src/main/appengine/app.yaml b/managed_vms/memcache/src/main/appengine/app.yaml new file mode 100644 index 00000000000..01e81d55f85 --- /dev/null +++ b/managed_vms/memcache/src/main/appengine/app.yaml @@ -0,0 +1,11 @@ +runtime: java +vm: true +runtime_config: + jdk: openjdk8 + server: jetty9 + +# [START config] +beta_settings: + use_memcache_proxy: true +# [END config] + diff --git a/managed_vms/memcache/src/main/java/com/example/managedvms/memcache/MemcacheServlet.java b/managed_vms/memcache/src/main/java/com/example/managedvms/memcache/MemcacheServlet.java index c2f7444f9a8..966051f14a8 100644 --- a/managed_vms/memcache/src/main/java/com/example/managedvms/memcache/MemcacheServlet.java +++ b/managed_vms/memcache/src/main/java/com/example/managedvms/memcache/MemcacheServlet.java @@ -33,7 +33,7 @@ // [START example] @SuppressWarnings("serial") -@WebServlet(name = "memcache", value = "/*") +@WebServlet(name = "memcache", value = "") public class MemcacheServlet extends HttpServlet { @Override diff --git a/managed_vms/memcache/src/main/webapp/WEB-INF/appengine-web.xml b/managed_vms/memcache/src/main/webapp/WEB-INF/appengine-web.xml deleted file mode 100644 index 110b55c8db3..00000000000 --- a/managed_vms/memcache/src/main/webapp/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - true - true - - - - - - diff --git a/managed_vms/sendgrid/pom.xml b/managed_vms/sendgrid/pom.xml index a0410dfdb65..adc732d2493 100644 --- a/managed_vms/sendgrid/pom.xml +++ b/managed_vms/sendgrid/pom.xml @@ -26,6 +26,11 @@ ${project.build.directory}/${project.build.finalName}/WEB-INF/classes + + com.google.appengine + gcloud-maven-plugin + 2.0.9.92.v20160118 + org.apache.maven.plugins maven-war-plugin @@ -39,15 +44,10 @@ 3.3 maven-compiler-plugin - 1.7 - 1.7 + 1.8 + 1.8 - - com.google.appengine - gcloud-maven-plugin - 2.0.9.90.v20151210 - + + org.eclipse.jetty + jetty-maven-plugin + 9.3.7.v20160115 + diff --git a/managed_vms/sendgrid/src/main/appengine/app.yaml b/managed_vms/sendgrid/src/main/appengine/app.yaml new file mode 100644 index 00000000000..76828a71215 --- /dev/null +++ b/managed_vms/sendgrid/src/main/appengine/app.yaml @@ -0,0 +1,12 @@ +runtime: java +vm: true +runtime_config: + jdk: openjdk8 + server: jetty9 + +# [START env_variables] +env_variables: + SENDGRID_API_KEY: YOUR-SENDGRID-API-KEY + SENDGRID_SENDER: YOUR-SENDGRID-SENDER +# [END env_variables] + diff --git a/managed_vms/sendgrid/src/main/java/com/example/managedvms/sendgrid/SendEmailServlet.java b/managed_vms/sendgrid/src/main/java/com/example/managedvms/sendgrid/SendEmailServlet.java index 31b71bfdec0..d8efbd75edf 100644 --- a/managed_vms/sendgrid/src/main/java/com/example/managedvms/sendgrid/SendEmailServlet.java +++ b/managed_vms/sendgrid/src/main/java/com/example/managedvms/sendgrid/SendEmailServlet.java @@ -37,7 +37,7 @@ public void service(HttpServletRequest req, HttpServletResponse resp) throws IOE ServletException { final String SENDGRID_API_KEY = System.getenv("SENDGRID_API_KEY"); final String SENDGRID_SENDER = System.getenv("SENDGRID_SENDER"); - final String TO_EMAIL = (String) req.getParameter("to"); + final String TO_EMAIL = req.getParameter("to"); if (TO_EMAIL == null) { resp.getWriter().print("Please provide an email address in the \"to\" query string" + " parameter."); diff --git a/managed_vms/sendgrid/src/main/webapp/WEB-INF/appengine-web.xml b/managed_vms/sendgrid/src/main/webapp/WEB-INF/appengine-web.xml deleted file mode 100644 index 00c515b1b87..00000000000 --- a/managed_vms/sendgrid/src/main/webapp/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - true - true - - - - - - - - - diff --git a/managed_vms/static-files/pom.xml b/managed_vms/static-files/pom.xml index 1e48928c20d..821775128b2 100644 --- a/managed_vms/static-files/pom.xml +++ b/managed_vms/static-files/pom.xml @@ -19,6 +19,11 @@ ${project.build.directory}/${project.build.finalName}/WEB-INF/classes + + com.google.appengine + gcloud-maven-plugin + 2.0.9.92.v20160118 + org.apache.maven.plugins maven-war-plugin @@ -32,15 +37,10 @@ 3.3 maven-compiler-plugin - 1.7 - 1.7 + 1.8 + 1.8 - - com.google.appengine - gcloud-maven-plugin - 2.0.9.90.v20151210 - org.apache.maven.plugins maven-checkstyle-plugin @@ -55,6 +55,11 @@ check + + org.eclipse.jetty + jetty-maven-plugin + 9.3.7.v20160115 + diff --git a/managed_vms/static-files/src/main/appengine/app.yaml b/managed_vms/static-files/src/main/appengine/app.yaml new file mode 100644 index 00000000000..06f95b81e35 --- /dev/null +++ b/managed_vms/static-files/src/main/appengine/app.yaml @@ -0,0 +1,6 @@ +runtime: java +vm: true +runtime_config: + jdk: openjdk8 + server: jetty9 + diff --git a/managed_vms/static-files/src/main/webapp/WEB-INF/appengine-web.xml b/managed_vms/static-files/src/main/webapp/WEB-INF/appengine-web.xml deleted file mode 100644 index dba606c1666..00000000000 --- a/managed_vms/static-files/src/main/webapp/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - true - true - - - - - diff --git a/managed_vms/twilio/pom.xml b/managed_vms/twilio/pom.xml index f2d44aabd34..14482908730 100644 --- a/managed_vms/twilio/pom.xml +++ b/managed_vms/twilio/pom.xml @@ -11,8 +11,7 @@ com.twilio.sdk twilio-java-sdk - 5.8.0 - compile + 6.3.0 @@ -27,6 +26,11 @@ ${project.build.directory}/${project.build.finalName}/WEB-INF/classes + + com.google.appengine + gcloud-maven-plugin + 2.0.9.92.v20160118 + org.apache.maven.plugins maven-war-plugin @@ -40,15 +44,10 @@ 3.3 maven-compiler-plugin - 1.7 - 1.7 + 1.8 + 1.8 - - com.google.appengine - gcloud-maven-plugin - 2.0.9.90.v20151210 - + + org.eclipse.jetty + jetty-maven-plugin + 9.3.7.v20160115 + diff --git a/managed_vms/twilio/src/main/appengine/app.yaml b/managed_vms/twilio/src/main/appengine/app.yaml new file mode 100644 index 00000000000..347dfe1d0f6 --- /dev/null +++ b/managed_vms/twilio/src/main/appengine/app.yaml @@ -0,0 +1,13 @@ +runtime: java +vm: true +runtime_config: + jdk: openjdk8 + server: jetty9 + +# [START env_variables] +env_variables: + TWILIO_ACCOUNT_SID: YOUR-TWILIO-ACCOUNT-SID + TWILIO_AUTH_TOKEN: YOUR-TWILIO-AUTH-TOKEN + TWILIO_NUMBER: YOUR-TWILIO-NUMBER +# [END env_variables] + diff --git a/managed_vms/twilio/src/main/webapp/WEB-INF/appengine-web.xml b/managed_vms/twilio/src/main/webapp/WEB-INF/appengine-web.xml deleted file mode 100644 index b3eae3585d5..00000000000 --- a/managed_vms/twilio/src/main/webapp/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - true - true - - - - - - - - - - diff --git a/managed_vms/websockets/README.md b/managed_vms/websockets/README.md deleted file mode 100644 index 79e308727b9..00000000000 --- a/managed_vms/websockets/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Java websockets sample for Google Managed VMs -This sample demonstrates how to use websockets on Google Managed VMs -## Setup -Before you can run or deploy the sample, you will need to create a new firewall rule to allow traffic on port 65080. This port will be used for websocket connections. You can do this with the [Google Cloud SDK](https://cloud.google.com/sdk) with the following command: - $ gcloud compute firewall-rules create default-allow-websockets \ - --allow tcp:65080 \ - --target-tags websocket \ - --description "Allow websocket traffic on port 65080" diff --git a/managed_vms/websockets/pom.xml b/managed_vms/websockets/pom.xml deleted file mode 100644 index eccc3d64c11..00000000000 --- a/managed_vms/websockets/pom.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - 4.0.0 - war - 1.0-SNAPSHOT - com.example.managedvms - appengine-websockets - - - javax.servlet - javax.servlet-api - 3.1.0 - jar - provided - - - javax.websocket - javax.websocket-api - 1.1 - - - org.glassfish.tyrus - tyrus-server - 1.12 - - - org.glassfish.tyrus - tyrus-container-grizzly-server - 1.12 - - - jstl - jstl - 1.2 - - - taglibs - standard - 1.1.2 - - - com.google.guava - guava - 18.0 - - - - - ${project.build.directory}/${project.build.finalName}/WEB-INF/classes - - - org.apache.maven.plugins - maven-war-plugin - 2.6 - - false - - - - org.apache.maven.plugins - 3.3 - maven-compiler-plugin - - 1.7 - 1.7 - - - - com.google.appengine - gcloud-maven-plugin - 2.0.9.90.v20151210 - - - org.apache.maven.plugins - maven-checkstyle-plugin - 2.17 - - ../../google-checks.xml - true - true - true - - - check - - - - - diff --git a/managed_vms/websockets/src/main/java/com/example/managedvms/websockets/EchoEndpoint.java b/managed_vms/websockets/src/main/java/com/example/managedvms/websockets/EchoEndpoint.java deleted file mode 100644 index 44744e0e3f7..00000000000 --- a/managed_vms/websockets/src/main/java/com/example/managedvms/websockets/EchoEndpoint.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright 2015 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.managedvms.websockets; - -import javax.websocket.OnMessage; -import javax.websocket.Session; -import javax.websocket.server.ServerEndpoint; - -// [START example] -@ServerEndpoint(value = "/echo") -public class EchoEndpoint { - - @OnMessage - public String echo(String text, Session session) { - return text; - } -} -// [END example] diff --git a/managed_vms/websockets/src/main/java/com/example/managedvms/websockets/WebsocketServlet.java b/managed_vms/websockets/src/main/java/com/example/managedvms/websockets/WebsocketServlet.java deleted file mode 100644 index d9487b731a2..00000000000 --- a/managed_vms/websockets/src/main/java/com/example/managedvms/websockets/WebsocketServlet.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright 2015 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.managedvms.websockets; - -import com.google.common.io.CharStreams; - -import org.glassfish.tyrus.server.Server; - -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.websocket.DeploymentException; - -// [START example] -@SuppressWarnings("serial") -public class WebsocketServlet extends HttpServlet { - - private static String METADATA_NETWORK_INTERFACE_URL = - "http://metadata/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip"; - private static String EXTERNAL_IP = "localhost"; - - @Override - public void init() throws ServletException { - EXTERNAL_IP = getExternalIp(); - Server server = new Server(EXTERNAL_IP, 65080, "/", null, EchoEndpoint.class); - try { - server.start(); - } catch (DeploymentException e) { - throw new ServletException("Deployment error", e); - } - } - - @Override - public void service(HttpServletRequest req, HttpServletResponse resp) throws IOException, - ServletException { - req.getSession().getServletContext().setAttribute("external_ip", EXTERNAL_IP); - req.getRequestDispatcher("/index.jsp").forward(req, resp); - } - - /** - * Returns the static IP address of the compute node this servlet is running on. - */ - public static String getExternalIp() { - try { - URL url = new URL(METADATA_NETWORK_INTERFACE_URL); - HttpURLConnection con = (HttpURLConnection) url.openConnection(); - con.setRequestMethod("GET"); - con.setRequestProperty("Metadata-Flavor", "Google"); - try (InputStreamReader in = new InputStreamReader(con.getInputStream(), "UTF-8")) { - return CharStreams.toString(in); - } - } catch (IOException e) { - return "localhost"; - } - } -} -// [END example] diff --git a/managed_vms/websockets/src/main/webapp/WEB-INF/appengine-web.xml b/managed_vms/websockets/src/main/webapp/WEB-INF/appengine-web.xml deleted file mode 100644 index 27ed6b4e59c..00000000000 --- a/managed_vms/websockets/src/main/webapp/WEB-INF/appengine-web.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - true - true - true - - - - - - 65080 - websocket - - diff --git a/managed_vms/websockets/src/main/webapp/WEB-INF/web.xml b/managed_vms/websockets/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index b8a448b7e1b..00000000000 --- a/managed_vms/websockets/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - websockets - com.example.managedvms.websockets.WebsocketServlet - - - websockets - / - - diff --git a/managed_vms/websockets/src/main/webapp/index.jsp b/managed_vms/websockets/src/main/webapp/index.jsp deleted file mode 100644 index 52962632660..00000000000 --- a/managed_vms/websockets/src/main/webapp/index.jsp +++ /dev/null @@ -1,65 +0,0 @@ -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> - - - - Google Managed VMs - Java Websockets Echo - - - - -

Echo demo

-
- - -
-
-

Response:

-

-  
-
-

Status:

-

-  
- - - - - diff --git a/pom.xml b/pom.xml index 3324ade6b37..d951bccee4b 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,6 @@ managed_vms/sendgrid managed_vms/static-files managed_vms/twilio - managed_vms/websockets managedvms/sparkjava bigquery logging From 43fa8a5b0226eef6912ee7a542253fd248fd8e29 Mon Sep 17 00:00:00 2001 From: Shun Fan Date: Thu, 28 Jan 2016 14:26:36 -0800 Subject: [PATCH 2/2] Remove runtime config from app.yamls --- managed_vms/analytics/src/main/appengine/app.yaml | 4 ---- managed_vms/cloudsql/src/main/appengine/app.yaml | 3 --- managed_vms/cloudstorage/src/main/appengine/app.yaml | 3 --- managed_vms/datastore/src/main/appengine/app.yaml | 3 --- managed_vms/disk/src/main/appengine/app.yaml | 3 --- managed_vms/extending-runtime/src/main/appengine/app.yaml | 3 --- managed_vms/helloworld/src/main/appengine/app.yaml | 3 --- managed_vms/mailgun/src/main/appengine/app.yaml | 3 --- managed_vms/memcache/src/main/appengine/app.yaml | 3 --- managed_vms/sendgrid/src/main/appengine/app.yaml | 3 --- managed_vms/static-files/src/main/appengine/app.yaml | 3 --- managed_vms/twilio/src/main/appengine/app.yaml | 3 --- 12 files changed, 37 deletions(-) diff --git a/managed_vms/analytics/src/main/appengine/app.yaml b/managed_vms/analytics/src/main/appengine/app.yaml index e85f8b15d3a..ee76377f0d6 100644 --- a/managed_vms/analytics/src/main/appengine/app.yaml +++ b/managed_vms/analytics/src/main/appengine/app.yaml @@ -1,11 +1,7 @@ runtime: java vm: true -runtime_config: - jdk: openjdk8 - server: jetty9 # [START env_variables] env_variables: GA_TRACKING_ID: YOUR-GA-TRACKING-ID - # [END env_variables] diff --git a/managed_vms/cloudsql/src/main/appengine/app.yaml b/managed_vms/cloudsql/src/main/appengine/app.yaml index 49f7887eb9c..d2df8a031f5 100644 --- a/managed_vms/cloudsql/src/main/appengine/app.yaml +++ b/managed_vms/cloudsql/src/main/appengine/app.yaml @@ -1,8 +1,5 @@ runtime: java vm: true -runtime_config: - jdk: openjdk8 - server: jetty9 # [START env_variables] env_variables: diff --git a/managed_vms/cloudstorage/src/main/appengine/app.yaml b/managed_vms/cloudstorage/src/main/appengine/app.yaml index d8dc25405bc..9ad19faac35 100644 --- a/managed_vms/cloudstorage/src/main/appengine/app.yaml +++ b/managed_vms/cloudstorage/src/main/appengine/app.yaml @@ -1,8 +1,5 @@ runtime: java vm: true -runtime_config: - jdk: openjdk8 - server: jetty9 # [START env_variables] env_variables: diff --git a/managed_vms/datastore/src/main/appengine/app.yaml b/managed_vms/datastore/src/main/appengine/app.yaml index 06f95b81e35..f64db2903de 100644 --- a/managed_vms/datastore/src/main/appengine/app.yaml +++ b/managed_vms/datastore/src/main/appengine/app.yaml @@ -1,6 +1,3 @@ runtime: java vm: true -runtime_config: - jdk: openjdk8 - server: jetty9 diff --git a/managed_vms/disk/src/main/appengine/app.yaml b/managed_vms/disk/src/main/appengine/app.yaml index 06f95b81e35..f64db2903de 100644 --- a/managed_vms/disk/src/main/appengine/app.yaml +++ b/managed_vms/disk/src/main/appengine/app.yaml @@ -1,6 +1,3 @@ runtime: java vm: true -runtime_config: - jdk: openjdk8 - server: jetty9 diff --git a/managed_vms/extending-runtime/src/main/appengine/app.yaml b/managed_vms/extending-runtime/src/main/appengine/app.yaml index 63421e0b657..958d215c4ba 100644 --- a/managed_vms/extending-runtime/src/main/appengine/app.yaml +++ b/managed_vms/extending-runtime/src/main/appengine/app.yaml @@ -1,6 +1,3 @@ runtime: custom vm: true -runtime_config: - jdk: openjdk8 - server: jetty9 diff --git a/managed_vms/helloworld/src/main/appengine/app.yaml b/managed_vms/helloworld/src/main/appengine/app.yaml index 06f95b81e35..f64db2903de 100644 --- a/managed_vms/helloworld/src/main/appengine/app.yaml +++ b/managed_vms/helloworld/src/main/appengine/app.yaml @@ -1,6 +1,3 @@ runtime: java vm: true -runtime_config: - jdk: openjdk8 - server: jetty9 diff --git a/managed_vms/mailgun/src/main/appengine/app.yaml b/managed_vms/mailgun/src/main/appengine/app.yaml index e52a6ff03ce..ed9923f1832 100644 --- a/managed_vms/mailgun/src/main/appengine/app.yaml +++ b/managed_vms/mailgun/src/main/appengine/app.yaml @@ -1,8 +1,5 @@ runtime: java vm: true -runtime_config: - jdk: openjdk8 - server: jetty9 # [START env_variables] env_variables: diff --git a/managed_vms/memcache/src/main/appengine/app.yaml b/managed_vms/memcache/src/main/appengine/app.yaml index 01e81d55f85..c26744baf00 100644 --- a/managed_vms/memcache/src/main/appengine/app.yaml +++ b/managed_vms/memcache/src/main/appengine/app.yaml @@ -1,8 +1,5 @@ runtime: java vm: true -runtime_config: - jdk: openjdk8 - server: jetty9 # [START config] beta_settings: diff --git a/managed_vms/sendgrid/src/main/appengine/app.yaml b/managed_vms/sendgrid/src/main/appengine/app.yaml index 76828a71215..a6fa7aef523 100644 --- a/managed_vms/sendgrid/src/main/appengine/app.yaml +++ b/managed_vms/sendgrid/src/main/appengine/app.yaml @@ -1,8 +1,5 @@ runtime: java vm: true -runtime_config: - jdk: openjdk8 - server: jetty9 # [START env_variables] env_variables: diff --git a/managed_vms/static-files/src/main/appengine/app.yaml b/managed_vms/static-files/src/main/appengine/app.yaml index 06f95b81e35..f64db2903de 100644 --- a/managed_vms/static-files/src/main/appengine/app.yaml +++ b/managed_vms/static-files/src/main/appengine/app.yaml @@ -1,6 +1,3 @@ runtime: java vm: true -runtime_config: - jdk: openjdk8 - server: jetty9 diff --git a/managed_vms/twilio/src/main/appengine/app.yaml b/managed_vms/twilio/src/main/appengine/app.yaml index 347dfe1d0f6..8776574b395 100644 --- a/managed_vms/twilio/src/main/appengine/app.yaml +++ b/managed_vms/twilio/src/main/appengine/app.yaml @@ -1,8 +1,5 @@ runtime: java vm: true -runtime_config: - jdk: openjdk8 - server: jetty9 # [START env_variables] env_variables: