Giter Club home page Giter Club logo

appengine-python-vm-hello's Introduction

status: inactive

This repository is deprecated and no longer maintained, the sample has been moved to GoogleCloudPlatform/python-docs-samples.

Copyright (C) 2014 Google Inc.

Sample 'hello world' application for use with the App Engine Python Managed VMs.

Build Status

A simple Python VM Runtime 'hello world' example, which accesses the 'Users' service, and shows how to get information about the current instance.

You can run this application only on the App Engine Managed VMs. Currently, Managed VMs are in Beta, and as such may be subject to backward-incompatible changes.

Project Setup

Before you begin working, be sure you've installed the Google Cloud SDK and a local Docker environment as described in Getting Started.

Deploying

First, set your project ID using the config command:

$ gcloud config set project <project_id>

Deploy Locally

You can deploy locally using the app run command:

$ gcloud preview app run app.yaml

app.yaml is your project's runtime configuration file.

The output of this command will present you the URL your app is now running on. Navigate to this URL in your browser and you'll be greeted with the "Hello!" dialog and a few more options.

Deploy to Production

Next, deploy to production using the app deploy command:

$ gcloud preview app deploy app.yaml

Congratulations! You've successfully deployed the Hello World app! Go to the URL specified in the output of your command and enjoy your hard work.

Licensing

  • See LICENSE

appengine-python-vm-hello's People

Contributors

amygdala avatar bshaffer avatar elibixby avatar marcgel avatar perttikellomaki avatar waprin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appengine-python-vm-hello's Issues

gcloud preview: "http: Hijack is incompatible with use of CloseNotifier"

Trying to run a Google App Engine app in a vm with the Python standard runtime. (link)

Everything is up-to-date, but gcloud cannot preview the app with the following error:

gcloud preview app run app.yaml

INFO     2015-05-28 21:37:51,456 devappserver2.py:745] Skipping SDK update check.
INFO     2015-05-28 21:37:51,541 api_server.py:190] Starting API server at: http://localhost:50191
INFO     2015-05-28 21:37:51,589 dispatcher.py:192] Starting module "default" running at: http://localhost:8080
INFO     2015-05-28 21:37:51,590 containers.py:259] Building docker image kanat-dev.default.20150528t213751 from .../hello-sample-appengine-vm-python/Dockerfile:
INFO     2015-05-28 21:37:51,590 containers.py:261] --------------------  DOCKER BUILD  --------------------
INFO     2015-05-28 21:37:51,593 admin_server.py:118] Starting admin server at: http://localhost:8000
INFO     2015-05-28 21:37:51,674 containers.py:280] Step 0 : FROM gcr.io/google_appengine/python-compat
INFO     2015-05-28 21:37:51,714 containers.py:280] ---> b3119c5e2d23
INFO     2015-05-28 21:37:51,715 containers.py:280] Step 1 : ADD . /app
INFO     2015-05-28 21:37:52,040 containers.py:280] ---> f3fda8e97e08
INFO     2015-05-28 21:37:52,047 containers.py:280] Removing intermediate container c31b3136e3ed
INFO     2015-05-28 21:37:52,047 containers.py:280] Successfully built f3fda8e97e08
INFO     2015-05-28 21:37:52,052 containers.py:292] --------------------------------------------------------
INFO     2015-05-28 21:37:52,053 containers.py:304] Image kanat-dev.default.20150528t213751 built, id = f3fda8e97e08
INFO     2015-05-28 21:37:52,053 containers.py:534] Creating container...
INFO     2015-05-28 21:37:52,151 containers.py:560] Container 8c4d875c46c2b2eb9ea7beda58b708f890bff05052d32c07730b904af4d095ac created.
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File ".../google-cloud-sdk/platform/google_appengine/google/appengine/tools/docker/containers.py", line 643, in _ListenToLogs
    for line in log_lines:
  File ".../google-cloud-sdk/./lib/docker/docker/client.py", line 229, in _multiplexed_response_stream_helper
    socket = self._get_raw_response_socket(response)
  File ".../google-cloud-sdk/./lib/docker/docker/client.py", line 171, in _get_raw_response_socket
    self._raise_for_status(response)
  File ".../google-cloud-sdk/./lib/docker/docker/client.py", line 122, in _raise_for_status
    raise errors.APIError(e, response, explanation=explanation)
APIError: 500 Server Error: Internal Server Error ("http: Hijack is incompatible with use of CloseNotifier")

INFO     2015-05-28 21:37:53,464 module.py:1745] New instance for module "default" serving on:
http://localhost:8080

INFO     2015-05-28 21:37:53,579 module.py:788] default: "GET /_ah/start HTTP/1.1" 404 52
$ docker images
REPOSITORY                              TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
...
gcr.io/google_appengine/python-compat   latest              b3119c5e2d23        5 weeks ago         281.1 MB

$ boot2docker version
Boot2Docker-cli version: v1.6.2
Git commit: cb2c3bc

$ docker version
Client version: 1.6.2
Client API version: 1.18
Go version (client): go1.4.2
Git commit (client): 7c8fca2
OS/Arch (client): darwin/amd64
Server version: 1.6.2
Server API version: 1.18
Go version (server): go1.4.2
Git commit (server): 7c8fca2
OS/Arch (server): linux/amd64

$ gcloud version
Google Cloud SDK 0.9.61

app 2015.05.19
app-engine-go-darwin-x86_64 1.9.20
app-engine-java 1.9.20
app-engine-python 1.9.20
bq 2.0.18
bq-nix 2.0.18
compute 2015.05.19
core 2015.05.19
core-nix 2014.10.20
dns 2015.05.19
gcloud 2015.05.19
gcutil 1.16.5
gcutil-nix 1.16.5
gsutil 4.12
gsutil-nix 4.6
kubectl 
kubectl-darwin-x86_64 0.17.0
preview 2015.05.19
sql 2015.05.06

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.