{"id":268696,"date":"2015-11-22T04:15:02","date_gmt":"2015-11-22T01:15:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=268696"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=268696","title":{"rendered":"Google Cloud Endpoints \u043d\u0430 Java: \u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e. \u0447. 3"},"content":{"rendered":"<p>       \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0447\u0430\u0441\u0442\u0438:<br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/268863\/\">Google Cloud Endpoints \u043d\u0430 Java: \u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e. \u0447. 1<\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/270459\/\">Google Cloud Endpoints \u043d\u0430 Java: \u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e. \u0447. 2 (Frontend)<\/a><\/p>\n<h4>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438<\/h4>\n<p>  Google App Engine \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u043e 10 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<br \/>  \u041e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0438\u0445 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2014 \u043f\u0435\u0440\u0432\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u0430\u044f) \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 (default) \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430(\u043e\u0432).<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 \u0432\u0438\u0434\u0430 {\u0432\u0435\u0440\u0441\u0438\u044f}-dot-{\u043f\u0440\u043e\u0435\u043a\u0442 ID}.appspot.com<br \/>  \u0412\u0435\u0440\u0441\u0438\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a \u0443\u0433\u043e\u0434\u043d\u043e, \u044d\u0442\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c 1-dot-{\u043f\u0440\u043e\u0435\u043a\u0442 ID}.appspot.com, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0430\u0434\u0440\u0435\u0441 \u0441\u044b\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0442\u0440\u0443\u0434\u043d\u043e\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0434\u043b\u044f \u0448\u0438\u0440\u043e\u043a\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438<br \/>  \u041d\u043e, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u043c\u044f \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0432\u0435\u0431-\u0430\u0434\u0440\u0435\u0441\u0430, \u0442\u043e \u0442\u0430\u043c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0442\u043e\u0447\u043a\u0438 \u0438\u043b\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0445 \u0432 \u0432\u0435\u0431-\u0430\u0434\u0440\u0435\u0441\u0430\u0445.<\/p>\n<p>  \u0414\u043b\u044f A\/B \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c traffic splitting \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044e \u043e\u0442\u043b\u0438\u0447\u043d\u0443\u044e \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p>  \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432 \u043c\u0435\u043d\u044e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430: Compute -&gt; App Engine -&gt; Versions:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/9b0\/1a9\/e3a\/9b01a9e3aee26aa7fbffa581aa216d93.png\" alt=\"image\"\/><\/p>\n<p>  \u0412 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u0435\u0440\u0441\u0438\u0438 \u0432 \u0434\u0432\u0443\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0432 \/src\/main\/webapp\/WEB-INF\/appengine-web.xml:  <\/p>\n<pre><code class=\"xml\">&lt;appengine-web-app xmlns=&quot;http:\/\/appengine.google.com\/ns\/1.0&quot;&gt;     &lt;application&gt;{\u043f\u0440\u043e\u0435\u043a\u0442 ID}&lt;\/application&gt;     &lt;version&gt;{\u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438}&lt;\/version&gt; <\/code><\/pre>\n<p>   \u2014 \u044d\u0442\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 GAE,<\/p>\n<p>  \u0438 \u0432 pom.xml:  <\/p>\n<pre><code class=\"xml\">    &lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt;     &lt;packaging&gt;war&lt;\/packaging&gt;     &lt;version&gt;{\u0432\u0435\u0440\u0441\u0438\u044f}&lt;\/version&gt; <\/code><\/pre>\n<p>   \u2014 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0447\u0430\u0441\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f .war-\u0444\u0430\u0439\u043b\u0430: target\/{\u043f\u0440\u043e\u0435\u043a\u0442 ID}-{\u0432\u0435\u0440\u0441\u0438\u044f}.war<\/p>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 \u0432 appengine-web.xml \u0438 pom.xml \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u043c\u0438, \u043d\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u043b\u0438.<\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 mvn appengine:update \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0432\u0435\u0440\u0441\u0438\u044e \u0441 \u0438\u043c\u0435\u043d\u0435\u043c &#8216;1&#8217; \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 .war \u0444\u0430\u0439\u043b\u0430 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0432 \/src\/main\/webapp\/WEB-INF\/appengine-web.xml<\/p>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f Google App Engine SDK. \u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f 1.9.28. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043d\u0430: <a href=\"https:\/\/cloud.google.com\/appengine\/downloads#Google_App_Engine_SDK_for_Java\">cloud.google.com\/appengine\/downloads#Google_App_Engine_SDK_for_Java<\/a> \u0438 \u0440\u0430\u0437\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u043e \u0432\u044b\u0431\u043e\u0440\u0443, \u0438, \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430, \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 PATH, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"bash\">mkdir ~\/GAE-SDK # any path you like cd $_ wget https:\/\/storage.googleapis.com\/appengine-sdks\/featured\/appengine-java-sdk-1.9.28.zip unzip appengine-java-sdk-1.9.28.zip cd appengine-java-sdk-1.9.28\/bin echo 'export PATH=$PATH:'$(pwd) &gt;&gt; ~\/.bashrc # adds current dir to PATH source ~\/.bashrc cd <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 <a href=\"https:\/\/cloud.google.com\/appengine\/docs\/java\/tools\/uploadinganapp#appcfg_command\">appcfg.sh<\/a>, \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:  <\/p>\n<pre><code class=\"bash\">appcfg.sh update .\/src\/main\/webapp\/ --noisy <\/code><\/pre>\n<p>  \u0423\u0442\u0438\u043b\u0438\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0447\u0435\u0440\u0435\u0437 \u0431\u0440\u0430y\u0437\u0435\u0440, \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0442\u043e\u043a\u0435\u043d\u044b \u0432 ~\/.appcfg_oauth2_tokens_java<br \/>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f WEB-INF, \u0433\u0434\u0435 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f appengine-web.xml, \u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u0432\u0435\u0440\u0441\u0438\u044e \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e \u0432 appengine-web.xml<\/p>\n<p>  \u041d\u0443 \u0438 \u043f\u0440\u0438 \u0441\u043c\u0435\u043d\u0435 \u0432\u0435\u0440\u0441\u0438\u0439 \u043d\u0430\u0434\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u0441\u043c\u0435\u043d\u0443 \u0432\u0435\u0440\u0441\u0438\u0439 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 git.<\/p>\n<h4>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h4>\n<p>  \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0432\u0438\u0434\u0430:<br \/>  appcfg.sh -A {\u043f\u0440\u043e\u0435\u043a\u0442 ID} -V {\u0438\u043c\u044f \u0432\u0435\u0440\u0441\u0438\u0438} download_app {\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0434\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f}<br \/>  \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"bash\">appcfg.sh -A hello-habrahabr-api -V '1' download_app temp_hello-habrahabr-api.1 <\/code><\/pre>\n<p>  \u0421\u043a\u0430\u0447\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/bb9\/b48\/0f1\/bb9b480f1ba7685eddcfd51b87534da8.png\" alt=\"image\"\/><\/p>\n<p>  \u0438\u043b\u0438 \u0442\u0430\u043a:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f83\/141\/3cc\/f831413cc4ccb820d9b7920b6a008af6.png\" alt=\"image\"\/><\/p>\n<p>  \u0422.\u0435. \u044d\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f .war \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043d\u043e \u043d\u0435 \u0441\u0430\u043c .war \u0438 \u043d\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434.<\/p>\n<h4>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u043b\u043e\u0433\u043e\u0432 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h4>\n<p>  \u041b\u043e\u0433\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043a\u0430\u0447\u0430\u043d\u044b \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u043e\u0439 \u0436\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0432\u0438\u0434\u0430:<\/p>\n<p>  appcfg.sh -A {\u043f\u0440\u043e\u0435\u043a\u0442 ID, \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u0437 appengine-web.xml} -V {\u0438\u043c\u044f \u0432\u0435\u0440\u0441\u0438\u0438} &#8212;num_days={\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043d\u0435\u0439, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: 1, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0434\u043e 90} &#8212;severity={\u0443\u0440\u043e\u0432\u0435\u043d\u044c 0 (DEBUG) \u0434o 4 (CRITICAL), \u0435\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d, \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u0433\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432} request_logs src\/main\/webapp\/ {\u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438)<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u043f\u0446\u0438\u0438:<br \/>  &#8212;append (\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 \u0444\u0430\u0439\u043b\u0443)<br \/>  &#8212;include_all (\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 log messages)<br \/>  &#8212;noisy (\u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b)<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"bash\">appcfg.sh -A 'hello-habrahabr-api' -V '1' --num_days=90 --noisy request_logs src\/main\/webapp\/ ..\/$(date '+%Y-%m-%d').LOGS.txt <\/code><\/pre>\n<h4>Google Cloud Shell<\/h4>\n<p>  \u0415\u0449\u0435 \u043e\u0434\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <a href=\"https:\/\/cloud.google.com\/cloud-shell\/docs\/\">Google Cloud Shell<\/a>.<\/p>\n<p>  \u041f\u043e \u043a\u043b\u0438\u043a\u0443 \u043d\u0430 \u043f\u0438\u043a\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0449\u0443\u044e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u0432 \u043d\u0438\u0436\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u044c, \u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 Debian-based Linux \u0441 \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 Google, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438: \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b Debian-based Linux, \u0432 \u0442.\u0447. apt-get, wget \u0438 \u0434\u0440.; Java 7; Maven 3.2; Git; Python 2.7 \u0438 pip; Node.js \u0438 npm; Google Cloud SDK; Google App Engine SDK; Vim, Nano, Emacs. <\/p>\n<p>  \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f 5GB \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435, \u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043c\u0430\u0448\u043d\u044f\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0422\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0444\u0430\u0439\u043b\u044b, \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043d\u043e\u0432\u043e\u043c \u0432\u0445\u043e\u0434\u0435. \u041c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u043e apt-get \u2014 \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043e\u0434\u0438\u043d \u0441\u0435\u0430\u043d\u0441.<br \/>  \u0414\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0442\u0430\u043a\u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f Web preview: \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 python -m SimpleHTTPServer) \u0441 \u043f\u043e\u0440\u0442\u043e\u043c \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 8080 \u0434\u043e 8084, \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0435\u0433\u043e \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u043d\u0435\/\u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u00abweb preview\u00bb (\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e)<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/87d\/b54\/7fa\/87db547fa50a3a0858b2a22fcf0d5f6e.png\" alt=\"image\"\/><br \/>  \u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 Cloud Shell. \u0421\u0442\u0440\u0435\u043b\u043a\u0430\u043c\u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u043a\u043d\u043e\u043f\u043a\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0438 Web preview.               <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/271385\/\"> http:\/\/habrahabr.ru\/post\/271385\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0447\u0430\u0441\u0442\u0438:<br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/268863\/\">Google Cloud Endpoints \u043d\u0430 Java: \u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e. \u0447. 1<\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/270459\/\">Google Cloud Endpoints \u043d\u0430 Java: \u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e. \u0447. 2 (Frontend)<\/a><\/p>\n<h4>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438<\/h4>\n<p>  Google App Engine \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u043e 10 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<br \/>  \u041e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0438\u0445 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2014 \u043f\u0435\u0440\u0432\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u0430\u044f) \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 (default) \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430(\u043e\u0432).  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-268696","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/268696","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=268696"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/268696\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=268696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=268696"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=268696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}