Pycharm does not find GAE installation - google-app-engine

When I create a new Google App Engine project with PyCharm, the App Engine SDK Directory field is automatically filled with the correct value.
The path name is the same used to run the app and the app runs without problems, but the Create button is grayed out and the message Please select App Engine SDK directory does not go away.
The folder is C:\Users\user\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin.
How do I fix it?

In case you haven't already used the Cloud SDK to deploy or run the local development server, install the App Engine Python component of the SDK manually:
gcloud components install app-engine-python
Change your App Engine SDK path in PyCharm to:
C:\Users\<user-name>\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\app_engine\

When installing google Cloud SDK, the appengine is not being installed automatically. So you have to install it before first use of google Cloud SDK.
If you install google cloud SDK for current user google_appengine path is
C:\Users\<username>\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\
If you install google cloud SDK for all users the google_appengine path is
C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform

Related

Stuck on "Get Started" page of Google App Engine. "gcloud app deploy" fails

I am stuck on the first page of instructions for Google App Engine
https://console.cloud.google.com/appengine/start/reception
I downloaded and installed the cloud SDK.
"gcloud init" worked.
I am stuck at "Deploy to App Engine".
When I type "gcloud app deploy" in Terminal, I get two errors.
"ERROR: An app.yaml (or appengine-web.xml) file is required to deploy this directory as an App Engine application. Create an app.yaml file using the directions at https://cloud.google.com/appengine/docs/flexible/python/configuring-your-app-with-app-yaml"
The page it says to go to does not give directions for creating the file. What is the command? Also, why is this error happening at all? If I follow the instructions on the Get Started page, I should not get an error. Some instructions must be missing or something not working when I install the SDK.
The second error I get is "ERROR: (gcloud.app.deploy) [/Users/chucky] could not be identified as a valid source directory or file."
Again, there must be instructions missing because I am following them.
Screen Shot
gcloud app deploy is for deploying a project. This means you need to have a folder with a sample project. The project will need to have an app.yaml file. Essentially, the steps are
Download and install the Google Cloud SDK
Run gcloud init to initialize the SDK (this makes you to login to Google and grant access to gcloud to your account; also sets up your default project)
Create your project (or copy an existing one) where project is your App i.e. the application you are working on. This project should have an app.yaml file.
Then deploy your project to production by running gcloud app deploy. You first have to change directory to your project folder. If you don't want to do this, you have to specify the full path to your app.yaml file.
An alternative for steps 3 - 4 is to use a Graphical User Interface (GUI) like one from us - https://nocommandline.com . You just click a button to create a new project and it will create a shell project ('hello world') with all the necessary files. To deploy your project, you also click another button 'Deploy' and it will take care of deploying your project.
From the link:
https://console.cloud.google.com/appengine/start/reception
First, you need to download the resources. You can use the Cloud SDK, Cloud Shell, directly download from github or other terminal to download the resources files. For example, you want to deploy a Python app using Cloud SDK in Windows OS:
Install and open Cloud SDK.
Copy the resources file from github:
From Cloud SDK run:
git clone https://github.com/GoogleCloudPlatform/python-docs-samples
Go to directory of your application files:
cd python-docs-samples/appengine/standard_python3/hello_world
Deploy and browse your application
Deploy using the command:
gcloud app deploy --project PROJECTID
Browse using the command:
gcloud app browse --project PROJECTID
If you see the Hello World! you've successfully deployed your application.

How to run GoogleAppEngineLauncher in terminal window(Google cloud SDK shell)?

Google no longer support the GoogleAppEngineLauncher program.
When I installed GoogleAppEngine I just got Google Cloud SDK shell. I want to add a project to GoogleAppEngine to run and deploy.
I got these links and cant understand
Local Development Server
Deploying the Application
How to do it both locally and online ?
"Quickstart for Windows" is a good starting point for new users of Cloud SDK.
In order to deploy and run a GAE application with the Cloud SDK you have to use shell/command prompt, as opposed to GoogleAppEngineLauncher where you had a GUI. The steps are:
Open the shell
In the shell change the current directory to where your project's app.yaml. is. For example: CD C:\Users\AQueue\Projects\MyGAEApplication and check that app.yaml file is there using dir command.
run gcloud app deploy
This should be it.
gcloud is one of the most important tools in the SDK that allows to interact with many products and services from Google Cloud Platform. If you want to read more about gcloud you can start with this overview.

How can I create a development server for an app on Google App Engine (Flexible environment)?

I am trying to set up a development server on a Google Compute Engine VM that is as close as possible to the App Engine Flexible environment deployment of the Wordpress installation built through this tutorial.
This guides you through on how to:
Get the source
1. https://github.com/GoogleCloudPlatform/php-docs-samples.git
2. /php-docs-samples/wordpress
Install the dependencies
3. composer install
Setup the App
4. php wordpress-helper.php setup
Deploy the App
5. gcloud app deploy
Is it possible to find the Dockerfile equivalent of the App Engine deployment,
or generate an image of the app's instance that can be deployed to a VM instance?
You can pull the docker image for the deployed app with the following command (replace VERSION and SERVICE).
gcloud docker -- pull $(gcloud --format='value(deployment.container.image)' app versions describe VERSION --service SERVICE)
It's a little dusty, but you can try the App Engine Flex emulator I put together :)
https://github.com/JustinBeckwith/flem

Google App Engine Launcher (Python)

I am trying to run the Google App Engine Launcher. it pops up an error message saying that it cannot find the Python binary file. But I have downloaded and installed Python 2.7.8. The error message suggests me to modify the Python path in Edit-> Preference. But the Launcher is not responding, it just hangs on there for ever. What should I do?
You need to add python to the PATH Variable.
Refer to How to add to the pythonpath in windows 7?
Install Latest App Engine
https://cloud.google.com/sdk/?hl=en_US dowloand Google Cloud SDK install it then launch Google App Engine launcher --> Edit-->Preferences-->Python path--> new python should be installed probably under the drive C: then select Python27x86 -->pythonw.exe.

Deploy Google App Engine backend from Android Studio

Is it possible to deploy a Google App Engine backend module in Android Studio as a Google App Engine project (on Google's servers)? In eclipse this was possible with the plugin, but now I don't see how to do this or found someone else doing this.
If you want to see what's under the hood of gradle:
gradlew tasks
If you want only the .war file
gradlew war
Will do the job:
gradlew appengineUpdate
You can do this from UI itself. Go to
Build -> Deploy Module to App Engine
If you are deploying this for the 1st time then you will have to sign in to your google account by using add account button.

Resources