Intellij Keeps Telling Me "App Engine SDK path is not correct.' - google-app-engine

Trying to deploy my first Google Cloud Java app using Intellij. I've followed and read so many threads and have gotten absolutely nowhere on what is seemingly one of the simplest steps of getting this set up. I have installed gcloud CLI and followed the instructions here. After installing, I run the commands 'gcloud components update' and 'gcloud components install app-engine-java'. I see the folder located in both 'C:\Users<username>\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine' and 'C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine'. I installed as multi user after hours of trying to get the single user install working, so now I have both. When in Intellij I am creating a new Google App Engine project under Java EE, it asks to specify a Google app engine SDK. There are no options so I choose to select the path. I have tried both above paths and it only tells me 'App Engine SDK path is not correct'. What am I doing wrong?? The steps seem ridiculously simple and it just doesn't work.

You stopped at the general google app engine folder
You need to specify the full path to the java-sdk folder, see the image in this question.

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.

GAE: No longer able to update my Gaelyk project due to appcfg losing support

Recently tried to update my Gaelyk project (yes, it's old, but it works well and I still use it), but Google App Engine will no longer accept the update. The error message returned is "Deployments using appcfg are no longer supported. See https://cloud.google.com/appengine/docs/deprecations". The thing is, I never used appcfg to deploy my application; I used Gaelyk and Gradle. But obviously Gaelyk must have used appcfg under the covers.
I did download the replacement Google Cloud SDK, but this new tool is not similar at all to how Gaelyk and Gradle worked. Is there anything I can do to get Gaelyk to work anymore? Or is Gaelyk just dead and I need to rewrite my application (like in Node.js or something instead of Groovy).
This will be hard, however I will try to help you as possible. I think you may try to migrate it somehow to app.yaml configuration of GAE.
I am not sure what plugins are used in the project. From Gaelyk temple project I can see that it's using appengine-geb which, according to the documentation, behind the scenes, is using gradle-appengine-plugin (there is wrong link on this doc, but proper is bellow).
On the github of gradle-appengine-plugin I have found following.
There is a note:
NOTE: All App Engine users are encouraged to transition to the new
gradle plugin for their projects.
And in FAQ part there is following information:
How do I deploy with gcloud?
If you're using gcloud to deploy your application, the newest version of app deploy > doesn't support war
directories, you will need to provide it with an app.yaml OR you can
use the appengineStage task to create a directory that is deployable
in /build/staged-app
$ ./gradlew appengineStage
$ gcloud app deploy build/staged-app/app.yaml --project [app id]
--version [some version]
NOTES:
You must explicitly define all config files your want to upload
(cron.yaml, etc)
This does not work with EAR formatted projects.
I think the best option will be to migrate to new appenine plugin or if not possible try to implement is with gcloud app deploy command crating the config files manually (at least app.yaml). And for this migration I can provide you this document.
I hope you will manage somehow...
I can confirm that Serge's answer on the Gaelyk Groups site works; the same procedure that he figured out also worked for me. To summarize:
Run gradlew appengineRun as run previously with Gaelyk.
Copy all jar files inside the build\exploded-app\WEB-INF\lib folder into a \src\main\webapp\web-inf\lib folder (for me the new lib folder did not exist previously).
To deploy, use the new required gcloud tool, and instead of running gradlew appengineUpdate (which fails now), instead run
gcloud app deploy appengine-web.xml where that XML file can be found in your webapp/WEB-INF directory. I navigated to that directory to run the gcloud command, but you can use a relative path there if your working directory is elsewhere. (There are a number of optional flags associated with the gcloud app deploy command, but I didn't need any of them.)
Serge needed to use these instructions to convert datastore-indexes.xml to index.yaml and run gcloud app deploy index.yaml, however, I didn't need to do this because I had no datastores.

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 to setup IntelliJ IDEA for Google App Engine Go development?

I want to use IntelliJ IDEA IDE for developing GAE Golang apps. I know I need to download the program and the Golang plugin, but beyond that I am lost. Is there a tutorial available on how to configure IDEA for GAE Go development?
I have my project set up in GOPATH/src/... folder, App Engine SDK is configured and I can run my project from command line using goapp. However, I would like to be able to setup an IDE for syntax checking and be able to run and debug the app from the IDE, rather than resort to using the console.
Right click your project in the left pane and select 'Open Module Settings'. From there:
go to Project Settings -> Project
New SDK -> select the path to the goroot directory of the appengine sdk
Apply and you should have completion for the standard go appengine stuff.
If you also want completion for packages that you download using goapp get XXX, go to 'Platform Settings -> SDKs' and add the appropriate path there. It should be somewhere under gopath.

Which version of Eclipse works with PHP Google App Engine?

I've search in vain for about a month now and I can't get my PHP application pushed to Google App Engine, for the PHP platform. I've got the Java version set up nicely on my computer. I followed the instructions for GAE PHP here: https://developers.google.com/appengine/docs/php/gettingstarted/introduction
..but it's really confusing because it essentially tells me to install Eclipse made for PHP which is Luna, but the only versions of Eclipse that GAE supports is Kepler, Juno and Indigo (https://developers.google.com/eclipse/docs/getting_started), so I'm super confused.
I don't think you can install two different GAE plugins on a standard version of Eclipse (which is what I use for the Java GAE plugin).
I also tried (in vain, but it was worth a shot) to upload my app using my Java plugin/setup and obviously this was a terrible idea because all it does is just print the php script/code to the browser.
Any thoughts, brothas/sistas?
I have figured out how to push php files to GAE. There are essentially 3 ways.
Use appcfg.py. Run following command:
--appcfg.py update helloworld/, where helloworld is replaced by the name of the folder containing your project files. Make sure the path is relative to appcfg.py directory or an absolute path.
--Enter your Google username and password at the prompts.
**2. Use the App Engine Launcher, probably found in C:\Program Files (x86)\Google\google_appengine\launcher. Executable is called GoogleAppEngineLauncher.exe. Simply select the project in Launcher and click Deploy.
**3. Use Git. Create a local repository on your machine. Add a repo to your Github account, and follow these instructions: https://developers.google.com/appengine/docs/push-to-deploy#creating_a_cloud_project
**4. Use PhPStorm. Download PHPStorm for free for 30 days, or buy a student version/whatever version you quality for here: . Then follow these instructions: http://confluence.jetbrains.com/display/PhpStorm/Getting+Started+with+PhpStorm+as+Google+App+Engine+PHP+IDE. The only thing I haven't figured out is #5 - where to find the php-cgi.exe file. I can't provide a path for a file I don't have.
** denotes super easy and I have used successfully.
The Google Plugin for Eclipse is only for Java applications. For PHP applications, you'll want to use the Python/PHP SDK and either the command-line tools or the Launcher UI app for running the development server. You can still use Eclipse for editing your PHP source files.
RE #5 - "I can't provide a path for a file I don't have".
That was also my problem.
They are fond of pointing out that the SDK directory should contain dev_appserver.py and ‘google’ and ‘php’ packages but you don't find those in a simple search cause they are invisible. You have to muck through the installation directory.

Resources