2
votes

I am new to Google Compute Engine.

I want to use Google Compute Engine VM instance to develop Google App Engine SDK for PHP.

Steps I used to install GAE SDK for PHP in GCE VM instance.

Using SSH connection I opened the terminal.

user@lamp-bafs:~$  mkdir gaedev

user@lamp-bafs:~$ cd gaedev

user@lamp-bafs:~$ wget -O gae.zip https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.38.zip

user@lamp-bafs:~$ unzip gae.zip

user@lamp-bafs:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/php

user@lamp-bafs:~$ export PATH="$PATH:/home/gaedev/google_appengine/"

user@lamp-bafs:~$ echo $PATH

user@lamp-bafs:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/bin/php:/home/gaedev/google_appengine

user@lamp-bafs:~$ cp -r google_appengine/new_project_template testapp

user@lamp-bafs:~$python google_appengine/dev_appserver.py testapp
INFO 2016-06-22 05:00:00,836 sdk_update_checker.py:229] Checking for updates to the SDK.WARNING 2016-06-22 05:00:02,159 simple_search_stub.py:1146] Could not read search indexes from /tmp/appengine.new-project-template.user/search_indexesINFO 2016-06-22 05:00:02,170 api_server.py:205] Starting API server at: http://localhost:37210INFO 2016-06-22 05:00:02,177 dispatcher.py:197] Starting module "default" running at: http://localhost:8080INFO 2016-06-22 05:00:02,179 admin_server.py:116] Starting admin server at: http://localhost:8000

After this nothing happened. I don't know how to run appengine php project using SSH.

Please anyone help me. Is it possible can use Google appengine SDK for PHP in GCE VM instance?

Reply to All:

Thanks to all members who replied sincerely. Basically, What we want to achieve is:

  1. We are a team of 10 developers and want to develop PHP on GAE using the same SDK version from a remote server.

  2. So, we want to install the GAE PHP SDK on the remote GCE instance once.

  3. Subsequently, all developers will use that remote PHP SDK installed in that GCE instance.

This is to avoid installing or working in different versions of GAE SDK in our individual local machines. We don't want to install in each of our local machines, whenever there is a new Release of GAE SDK. We just want to update once in GCE instances, with the new GAE SDK in one centralized place, to ensure all developers develop the code using the same version of GAE SDK. We also don't want to waste time to install SDK in each machine to ensure consistency in development environments.

In this context, can you please enlighten us to centralize our GAE SDK in GCE development server?

Thanks very much in advance,

1
When you say "after this nothing happened" - it does not really make sense. You have started the development web server on that Compute Engine VM (which is a little unusual). You should be able to then connect to it on port 8080 (after making the required firewall changed). IN GENERAL, I WOULD RECOMMEND DOING THIS ON YOUR LOCAL MACHINETom
If I understand this correctly, you want to install the App Engine SDK for PHP on a Compute Engine instance to develop your application through SSH. From the dev_appserver.py command you've used, the terminal will then be locked in a loop listening for requests to http://localhost:8080/. You won't be able to test your local dev from this SSH login. You would need to SSH through a second login and curl http://localhost:8080/ or as @Tom states, connect to it externally making the necessary firewall rule change. This seems like a confusion of development environment and production...Nicholas
Running dev_appserver.py on a GCE instance is probably not the best way to solve whatever you're trying to accomplish. Why not use GAE instead? If you're looking for backwards compatibility, you'd be better off using App Engine Flexible, or trying to get appengine-php-sdk to run directly on the server (w/o running dev_appserver.py).Brent Shaffer
thanks to Tom,Nicholas and Brent Shaffer for your reply. I replied in my post detailed. Plz help meSattanathan

1 Answers

0
votes

I'd advise using git for collaborative development, while managing using the latest SDK is relatively simple. I'd say this open-endeed question would have been better posted to the Google App Engine Group, which is meant for more general questions about development, the platform and services, etc. Stack Overflow requires concrete technical question-answer format, and the rules advise closing questions which are about general development advice.