undeploy an java application from google app engine - google-app-engine

How can we un-deploy an application from GAE?I don't want to delete the Project, instead I am trying to undeploy the app and use the same project to deploy completely different code.

Just deploy a new code, as a new version, then remove previous version.
You need at least one version always deployed, but if you don't have any replacement at this moment you can deploy a simple one static page project.

Related

Implementing App Engine microservices with Android Studio

I want to create multiple services for the backend of my Android App, because some modules will be called by the users, but others have to start automatically each X hours with a cron.xml setting of Google App Engine.
However when I deploy each module from Android Studio to my Google Cloud Platform Project, only the last deployed is online. I know that I can use versions to make a differentiation between modules, but this is more like a hacky solution no?
I want to know if there is way to create a App Engine microservice architecture with Android Studio? Or the only solution is to deploy as different version?
Thanks for your help.
The answers is finally very easy. In the appengine-web.xml, a module name shall be added using:
<module>yourmodulename</module>
Then when deploying you will have a new service automatically. Your first android studio backend module shall be the default, the others you have to give then a name.

App Engine missing in Cloud Console

I have an old project (~1.5 years) that I want to start working on again. It shows up in the project list in the developers console. I am wanting to add an App Engine component to the project, but this item is missing from the categories on the left, i.e. under Compute I only have "Compute Engine, Container Engine, Click to Deploy".
Another project that I started more recently also lists "App Engine" before "Compute Engine".
I am thinking that this is an older project that hasn't been updated completely on the back-end. When I recently (this week) went into the project, a popup asked me to accept a Project ID(i.e. random-word-####). Previously the project didn't have a Project ID, just a Project Number.
I tried to follow a process that I saw for linking an App Engine to an existing Cloud Project, but creating a new App Engine project automatically creates a new Cloud Project.
Is there a way to be able to create a new App Engine program under an older Cloud Project?
Adding App Engine support to existing projects that were created outside of Developers Console is currently not possible. This is something we are working on, and I expect it to be added in the coming months.

Google APIs console and dashboard show different projects

I work from a laptop or a desktop, depending where I am. I recently created two app-engine projects, no issues on either machine. I created and deployed a third using a laptop, which shows-up on https://code.google.com/apis/console.
Switching back to the original desktop machine, with all the files copied across, this third project is unusable ("does not exist") from the App Engine Launcher. Looking at https://appengine.google.com/dashboard the third project is not there.
I created and deployed a fourth project which is fine and appears in both. All I did was to use the project 3 files, change the application name in app.yaml and Add Existing Application.
So https://code.google.com/apis/console dashboard shows all 4 projects, https://appengine.google.com/dashboard only shows 3 (1,2,4).
My guess is that the App Engine Launcher does not get refreshed from the web. I copied all files from laptop to desktop, but perhaps I missed some. Any ideas?
I am using Windows 7 on both machines, and not using Eclipse (just a text editor).
The App Engine Launcher does not do automatic synching of any sort. Yes, you can deploy your project to the App Engine servers, but it doesn't automatically pull projects down.
You just need to use Add Existing Project to add project 3 to your App Engine Launcher on your desktop.
Keep in mind that if you update the app from one machine, you will need to manually synch your codebase on the other machine.

Uploading mirror Java Quickstart to App Engine

Question about getting the Java starter project booted up on Google App Engine
https://developers.google.com/glass/quickstart/java
In that quickstart when configuring Eclipse it says
Uncheck the Use Google App Engine checkbox and save.
However if I follow the instructions on the above page - including Eclipse with the Google plugin - I get a project which can be run on localhost. If I try to upload the App Engine it says this is not a App Engine project and won't upload.
So then if I make it one (go under the Google->App Engine settings) the Eclipse project complains about the jars under
web/WEB-INF/lib
and still won't upload. If I delete them then I get a project that doesn't compile either. So what do I need to do specifically to get this to load to the cloud?
Related to this is that I'm confused about the relationship between Maven and Eclipse - the two seem to be a cross purposes as Maven populates the lib directory but I keep wrangling with Eclipse over it too. The App Engine plugin seems to want to use it's jars, while the app-engine code I downloaded per the instructions (to get the bin utils app-cfg) want to be used too by Maven AFAIK.
Deploy to App Engine from the command line using appcfg.sh.
Getting many IDEs and App Engine to all work in the same project has led to some compromises due to differing assumptions made by each of the tools involved. For example, the Eclipse App Engine plugin makes different assumptions about the structure of projects than other IDEs. The compromise was to fall back to the official command line tools since they seem the most tolerant of variation and are always available.
Maven is part of the project to handle dependency management.
If you'd like to use Eclipse for your deployment too, you'll probably want to create a new Eclipse App Engine project and copy the libraries and code into that project.

Deploy Dropwizard on Google AppEngine

I have been trying to find a way to deploy a Dropwizard app on Google AppEngine, but I haven't found anything so far.
Judging by this question (and answer) I think it might not be possible.
I would like to be sure about that, and If it does work, I'd like to learn how.
There is a dropwizard fork called warwizard which apparently lets you create war files from your dropwizard code, but it has not been touched for over 6 months, which would likely make it difficult to work with using the dropwizard docs.
Dropwizard is just Jersey+Jackson+Jetty bundled together nicely. Jetty and App Engine won't get along (that is, App Engine is already running Jetty, so it doesn't want the application to provide its own).
You're probably best off using Jersey and Jackson without Dropwizard tying them together: http://blog.iparissa.com/googles-app-engine-java/google-app-engine-jax-rs-jersey/ & http://www.cowtowncoder.com/blog/archives/2009/11/entry_338.html
You can however, run Dropwizard on Google Compute Engine. Which is basically just linux VMs provided by Google, with access to their APIs if needed.
I manged to get my Dropwizard instance working by doing the following on GCE:
Install Java
sudo apt-get install java7-runtime-headless
Open firewall ports:
gcutil addfirewall rest --description="http" --allowed="tcp:8080
gcutil addfirewall admin --description="admin" --allowed="tcp:8081"
Copy file to GCE
gcutil --project={project-id} push {instance-name} {local-file} {remote-target-path}
Run your app
java -jar your-app.jar server your-config.yml
EDIT: there is also another alternative called wiztowar https://github.com/twilio/wiztowar which supports DW 0.6.2 only.
I've been trying to solve this issue for the past two month. Here are my findings:
1- Yes, you can deploy Dropwizard as a WAR file. You need to use some hacks like Wizard in a box or WizToWar
2- No! You can't deploy that WAR file on AppEngine standard environment.
Why?
The main issue is that AppEngine is using servlet-api v2.5 (which is more than 10 years old!) and has no plan to upgrade to servlet-api v3 or higher. Dropwizard on the other hand require servlet-api v3 or higher.
BUT wait! there is another option
You can deploy Dropwizard on App Engine Flexible Environment
App Engine Flex is still in beta, but I've heard it will be available for public usage in Q1 2017. If you want to use it now, you have to ask for that to be enabled for you.
How do you deploy on App Engine Flex?
-> I've put all the steps on doing that in a blog post here:
Deploying Dropwizard on App Engine Flex

Resources