How to select Google App Engine Location - google-app-engine

GAE recently got some updates including "organisations" which seems to have also resetted many other settings - e.g. super unclean migration.
Question: how can I select the deploy region/location for google-app-engine apps?
Unfortunately it is not anymore possible to do so as described here: How to choose Google App Engine servers' location
When I create a new project there is no "advanced" settings. If I still just "blindly" deploy (after ignoring the annoying new tutorial / quick start that is forced into ones throat) it will use europe-west as region.

In the Google Cloud Console -> Menu -> Compute -> App Engine
You should then see a box with title "Your first app", follow the steps and at some point it will prompt you to select the server location (cannot be changed later once selected). After selecting server location you don't need to continue with the Hello World app, just deploy your code as normal.
I believed something has been changed recently and there's no clear documentation yet.

Related

How to permanently delete Google managed VMs

I am unable to permanently delete Google App Engine managed VMs I've created. I've deleted them multiple times both from the developer's console and by using the gcloud command. In every case the command completes successfully and the VM is deleted, but then almost immediately Google creates a brand new VM to take its place.
Does anyone know how to permanently delete managed VMs? Thanks.
We are working on improving this experience. For now, though, one workaround is to deploy a non-Managed VM instance as the default version and delete any other versions that are Managed VM-based. Again, this issue is on our radar to be fixed.
[Chris Ramsdale, Product Manager for App Engine]
I wanted to update this post with some of my solutions to deploying (with versions) and deleting instances on Google Compute Engine's managed VMs. Here's a solution I found for deleting the default GCE managed VM:
Make sure you have the up-to-date GCE components. Run gcloud components update in the Google Cloud SDK Shell.
In your app.yaml, remove the vm:true, resources: section, and manual scaling: section.
Navigate to Compute -> App Engine -> Versions and record the <default-version-number>. Mine looks like 20150722t1245032 with the words (default) indicating the default version.
Deploy the application, set the default, and specify the default version. gcloud preview app deploy "...\app.yaml" --set-default --version=<default-version-number>.
Navigate to Compute -> Compute Engine -> VM instances. Select the default instance and delete.
I was also taught how to stop deploying additional instances:
The key is to specify the version number gcloud preview app deploy "...\app.yaml" --set-default --version=<version-number>. #ZacharyNewman was able to help me with this problem.
And finally, this is how to delete the additional versions of an instance:
Navigate to Compute -> App Engine -> Versions and delete the versions you don't want.
Navigate to Compute -> Compute Engine -> VM instances. Select the instances you don't want and delete.
Hope this helps!
There might be a simpler way to explain this -- "basically, you cannot delete a version that's receiving 100% of the traffic."
Therefore, you just need to create a non managed VM, like a simple helloworld application. Then, you can move all of the traffic to this helloworld application (see graphic, I named mine version 0), then, delete version 20160... or whatever the name of your vm is.
At some point in time, you're probably going to experiment or spin up your managed VM again. When you do that, it will automatically start getting 100% of the traffic.
Or, if you happen to know version number receiving 100% of the traffic, you can always deploy a simple, non managed VM, with this version.
In Google Cloud Console under App Engine -> Versions , select the default version of your managed VM application and use STOP button to turn it off.
I ran into the same problem this is how i was able to stop the managed VM permanently. Just go to appengine -> settings -> disable application. This will automatically stop and delete your VM. In future if you want to run managed vm just enable application this will redeploy your application to the last known version.

Can't deploy Google App Engine application on local server

I am trying to follow the instructions for running a simple new Google App Engine web application locally (without Google Web Toolkit, just the Web App) named "tunes".
I am following these instructions. Step one is to make a run configuration. I made one using all the defaults; I checked that under the Server tab the "Run built-in Server" box is checked. However, when I Run the app, I get the Console; right below the console tab it says
&ltterminated> tunes [Web Application] C:\Program Files (x86)\Java\jre7\bin\javaw.exe (Feb 26, 2014, 5:35:44 PM)
then below the line is what looks like a classic Unix "Usage" error message in the console, in red type, whose first line is
Usage: &ltdev-appserver> [options] &ltapp directory>
followed by a list of options, and then nothing else happens that I can see.
I tried pointing a browser at http://localhost:8888/tunes as suggested by the documentation, but Firefox could not find a server active at that port.
Under the Arguments tab in the Run Configuration is the following:
"-codeServerPort 9997 --port=8888 org.tunes.gaeproject.Tunes C:\Users\cdf\java\eclipse4.3.1workspace\tunes\war"
I can successfully deploy the web application to the Google App Engine site and run it there.
What do I have misconfigured?
Google AppEngine application is not meant to run on local server, and neither you could create its docker image etc to deploy it anywhere you wish.
Instead I suggest you to port your application to Google Compute Engine (GCE) first within your deployment setup, which might require minor code refactorings, and Kubernetes kinda auto-scaling deployment will functional equivalent to what you have now. But with approach you may port the application easily to local server setup, or a docker image to run from any virtualization environment

Google App Engine local instance started from Eclipse does not stop

I recently started building applications on Google App Engine. I use an Eclipse plugin to start and stop the server and deploy applications to run on Google App Engine.
I had created a new project and tried to stop and start it as suggested in the tutorials and in Stack Overflow. My old project is still running and hitting the data source successfully. I even removed the old projects from my Eclipse workspace and tried a fresh deploy of the new project with no luck.
How do I stop the server (the RED dot in my Eclipse has no effect)? Is uninstalling the App Engine the only solution?
When you launch the server, a new Java process is started. You can find and kill it independently of Eclipse.
I too ran into this problem and found the solution at Stop or restart a previously started Google App Engine local server in Eclipse
Just in case the link breaks, the key steps are:
In Eclipse, find the Eclipse Console view (looks like below).
Select the arrow next to the small computer and find the server's name
Select the red square to stop the server
Go to http://localhost:8888 to see if the page is still showing (it shouldn't be)
If you are visiting something like http://yourAppId.appspot.com and the server is still running, that's because it's still deployed on App Engine, not locally. In this case, go to Google Developer's Console and stop the service there
The server can be stopped by clicking red square icon in the console window. If this icon is missing or disabled, you may see wrong console window. You must select the javaw console using the drop-down button on the far right of the console window.
Go to Run/Debug Configurations -> Select your project configuration -> Common tab -> Uncheck "Launch in background"
Now, when you terminate the server on Server's console, it will stops the server.

Can't deploy to GAE - the application doesn't exist

Using Eclipse, I am experiencing an error when trying to deploy a rather basic web app with JAX-RS and JAXB. It runs okay locally, but when trying it on the remote servers I get the message shown below...
'Deploying to Google' has encountered a problem / This application does not exist
Below shows my appengine-web.xml
The XML file illustrates that I am using the same name in the xml as what's specified in the project properties...
The output window show...
------------ Deploying frontend ------------
Preparing to deploy:
Created staging directory at: '/var/folders/n8/6by626014jbfc0dwmxnb0ly00000gn/T/appcfg2754901216637807129.tmp'
Scanning for jsp files.
Scanning files on local disk.
Initiating update.
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=hillingarincident&version=0&
404 Not Found
This application does not exist (app_id=u'hillingarincident').
Debugging information may be found in /private/var/folders/n8/6by626014jbfc0dwmxnb0ly00000gn/T/appengine-deploy447984481661870877.log
The referenced debug logs show...
Unable to update:
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=hillingarincident&version=0&
404 Not Found
This application does not exist (app_id=u'hillingarincident').
at com.google.appengine.tools.admin.AbstractServerConnection.send1(AbstractServerConnection.java:293)
at com.google.appengine.tools.admin.AbstractServerConnection.send(AbstractServerConnection.java:253)
at com.google.appengine.tools.admin.AbstractServerConnection.post(AbstractServerConnection.java:232)
at com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:644)
at com.google.appengine.tools.admin.AppVersionUpload.beginTransaction(AppVersionUpload.java:449)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:124)
at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:371)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:53)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:433)
at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:148)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Any answers will be appreciated. At one point my browser was not logged in to the target google account, so I swapped to the correct one a little later, Google does render the application name as expected.
Okay, this was simple in the end! Eclipse performs an auto-login to the Google account, unfortunately I created the Eclipse project whilst being logged in to one Google account and then tried to specify the application name afterwards.
You'll see in the bottom-right (or bottom-left in some versions) a Google icon with the name of the user that you are logged in as. If that's not the account where your application is defined, then simply logout of that account, then login as the correct Google account.
Now there's no error :-)
I know this question is super old but I had this issue all day and finally I found a solution. Maybe it will help someone out in the future.
After you create a project in Google Cloud Platform, you must go to google cloud shell in your project and run the command
gcloud beta app create
After you run this command, you will get prompted to choose a region. Then go back to eclipse and try deploying it. It worked for me.
There are not just 1 way can cause this problem. For me, I have this problem when I create the project using Maven. But I don't have the same issue if I directly create the project from the Google plugin.
There might be another issue, when you register with Google App Engine, you receive email indicating your activation. If you have not received the email yet, this problem could occur too.
Another issue could be to use the gmail account for the Google App Engine to avoid any such errors.

Deleting a Google App Engine application

Is it possible to delete an GAE application after it has been created?
I made a mistake while typing the name and now have a dummy application that I haven't been able to remove.
With the new Google Cloud console, you can still disable GAE applications as before (App Engine --> Settings --> Disable). They cannot currently be deleted. However you can delete the entire project by going to IAM --> Settings --> Shut Down. This button is in the header and a bit tricky to spot. It looks like this:
As of AppEngine SDK 1.2.6 it's possible to delete apps completely. But beware, the app-id won't be usable again.
As most of the answers are outdated or contradictive and this is an important question I decided to clarify current possible solutions when intending to delete an application in Google App Engine or having related issues.
Currently, there is no way to delete an existing app in GAE. Once created it cannot be removed, nor its initial settings can be changed (like the region where it was deployed). The only possible workaround is starting a new project and deploying a new application. There were feature requests in Google Issue Tracker regarding these issues: deleting an app and changing zone/region. You can still delete the whole project as described in Steve Armstrong's answer, but bear in mind that this will remove everything you created there (like GCE, GKE etc.), not only GAE.
However, it all depends on why you would like to delete your app. If you would simply like to stop it from serving requests or you don't want it to incur further costs, you can disable the app as described in the GCP docs here.
This feature is already logged, please star it:
http://code.google.com/p/googleappengine/issues/detail?id=335
To disable /delete your application:
In the Administration Console, click your application to make it the active application.
Click Application Settings on the left side under Administration.
Click Disable Application.
Click Disable Application Now.
If you want to delete your app:
If billing is enabled for your app, disable billing. You aren't allowed to delete before you do this.
Click Request Permanent Deletion. The application will be deleted in approximately 72 hours.
To re-enable your disabled application, click Re-Enable Application.
source
There currently isn't a way to delete a GAE application.
Beyond disabling the App Engine application you can:
Disable it's API permission under APIs & Services
Remove the App Engine related files from Storage
Delete App Engine permissions under IAM & Admin
Delete the App Engine Service account
This will freeze all App Engine related billing charges for the undeletable disabled App engine application. At least it worked for me :)
I was evaluating if we could use AppEngine and ran the standard tutorial which created a test app for me under my the default project. When I tried to delete the App I was shocked that it can't be done ! The only way is to delete the project which would delete all other GKE and any other services under that account.
After a bunch of research and calling product support of Google this what they suggested: To upgrade to Silver Support for 150$/month and send them an email to delete the app.
Here is the chat session with Google Support. If you were considering using Google AppEngine I would think again.
This issue has been fixed; see the docs here:
https://cloud.google.com/appengine/docs/standard/python/console/?csw=1#delete_app
Carlos, you're right that the issue has been fixed, and I up-voted you for that. However, your link is a little outdated and an updated link is listed below.
https://developers.google.com/appengine/docs/adminconsole/applicationsettings#Disable_or_Delete_Your_Application
open https://console.cloud.google.com/cloud-resource-manager?organizationId=0 ,select the project(or application) to be deleted,then click delete
I wanted to delete some legacy Google App Engine applications I made years ago, but when I tried to delete them from the new Google Cloud Platform (like this: https://support.google.com/cloud/answer/6251787#shut-down-a-project) I kept getting "You do not have permission" errors. The solution I found was to sign up for a free trial of Google Cloud Platform, then I was able to delete them.
I couldn't find to delete the default app-engine, however if you navigate to App Engine > Settings , there is a button to Disable it and it stop serving. when you click on the button type the project name in the prompt.

Resources