Unable to deploy Eclipse WTP EAR multi-module project to remote instance - google-app-engine

I am creating a GAE application, and I am following the proposed structure of modularized GAE applications in Eclipse with WTP, as documented here (see section "Enterprise Application EAR").
I have created and linked a local server instance of GAE, and the deployment of the EAR with its modules to the GAE development instance at localhost works fine.
However, when I try to "Deploy to App Engine" (via the Google button) in order to release my app to the Google remote server, I am stuck with the error "...(EAR project name) is not an App Engine project". I have also tried to define a new server with a remote address, but this fails with the error "The currently selected server type does not support remote hosts". The host name's field is restricted to "localhost" as a valid server address.
My Eclipse project structure looks as follows:
<<Enterprise Application Project>> ear-app
|
-- <<Dynamic Web Project>> app-module-1
-- <<Dynamic Web Project>> app-module-2
-- <<Dynamic Web Project>> app-module-3
-- <<Dynamic Web Project>> app-module-4
Please note that this is not a single "Google / Web Application Project", which works as expected (but does not support modularization with multiple Eclipse projects).
Please also note that I am not using Maven and the proposed mvn commands, as documented here.
I am using the GAE SDK 1.9.3 and GPE 3.5.1 in Eclipse Kepler 4.3.1.
So how do I deploy the Eclipse WTP project structure to Google remote servers? If this is not possible, do you suggest that I switch to Maven, and if so, does this support a multi-module project to be managed from within Eclipse?

Rather by chance, I stumbled across the solution:
In the Servers view, and upon right-click of the local development server, there is another context menu entry "Google App Engine WTP / Deploy to Remote Server". This will deploy the EAR and all modules to the Google infrastructure. There is also a "Google App Engine WTP" button in the Servers view's menu, offering the same options.
Frankly, I find this a highly inconsistent UI implementation: If we create a project of type Google Web Application, then the Google button in the main menu is effective, and the context menus can be found as "Google...". These become invalid (but are still present) when we create a multi-module EAR structure in the WTP style. This will create a different set of buttons and context menu entries, all in different places, and the context menu of the LOCAL server would then support deployment to the REMOTE server.
UPDATE:
After using the GAE tools for a couple of weeks, I finally switched to the command line options (appcfg) for remote deployments. I had additional errors in GPE for deployment rollbacks (which fail in Eclipse but work with appcfg). I recommend appcfg as administration tool for the Google infrastructure, it provides more control and it is more mature than the Eclipse plugin.

Related

Do I need to enable App Engine Admin API for deployment?

On GCP, I run Cloud Build from one project and deploy code to App Engine in another project. It looks like the project where build runs from needs to have App Engine Admin API enabled. Is it a real request or I missed the real configurations?
App Engine Admin API is required as it is used for any App Engine-related management operations
Also, based on the link above:
The Admin API provides you with:
An integration point for your development and build tools.
Tighter control around deploying new versions, including the ability to automate traffic
migration between two versions or traffic splitting across one or more versions.
The ability to programmatically manage applications across multiple Google Cloud projects.
So yes, if you plan on deploying code to App Engine using Cloud Build, you need GAE Admin API enabled.

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.

How to deploy a pure Angular application from Visual Studio Team System to Azure websites

Does anyone know how to deploy a pure Angular application to Azure websites?
I have a Angular 2 application (like the Angular 2 Quick Start) in VSTS Git source control. How can I deploy the application to Azure websites from setting up the VSTS build?
I saw document for deploying node.js (with angular) to Azure: https://msdn.microsoft.com/en-us/library/vs/alm/build/azure/nodejs. I did successfully deploy many of my angular applications to Azure websites following the instructions in the document. But I don't use anything with node.js in my Angular application. I hope that I can just deploy my pure Angular application to azure websites.
Previously, I used Visual Studio to create empty project to contain my Angular application. These kind of projects can be easily deployed to Azure websites. Now I am using VS code and I don't want to create any Visual Studio Solution. I don't know how to setup a continuous deployment in VSTS with just the pure Angular code.
I know I probably need to use IIS anyway and I need some settings/configs. But I just don't want to do them in Visual Studio project.
Using node.js to create a deploy package and then deploying the package by "Azure Web App Deployment" task is a convenient way to deploy to Azure Site.
However, if you don't like this, you can create a batch/power-shell script to copy your deployment files in Azure Web App via FTP method. Refer to this link for details: Deploy by copying files to Azure manually
And you can also try to deploy it from Source Control directly: Deploy from a cloud-based source control service

How to deploy GWT GAE applications on external server

I Have an GWT+GAE application with nosql database that runs fine in Google App Engine and in eclipse + gwt plugin with embedded jetty server on development environment.
Now in production environment, for many causes, i have to deploy this application on an external self managed server like Tomcat or JBoss.
I follow with no luck many tutorials and tips&tricks like:
https://developers.google.com/web-toolkit/doc/latest/DevGuideCompilingAndDebugging#How_do_I_use_my_own_server_in_development_mode_instead_of_GWT%27s
https://groups.google.com/forum/?fromgroups=#!topic/google-appengine-java/LYySmvqdbO8
or Link1 Link2 Link3 Link4 Link5
When I deploy my application on an external server (i.e. tomcat or jetty) it starts correctly but when I do a call that uses database connection it gives this error:
Caused by: java.lang.NullPointerException: No API environment is registered for this thread.
at com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId(DatastoreApiHelper.java:86)
at com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppIdNamespace(DatastoreApiHelper.java:96)
at com.google.appengine.api.datastore.Query.<init>(Query.java:171)
at com.google.appengine.api.datastore.Query.<init>(Query.java:102)
at com.googlecode.objectify.impl.QueryImpl.<init>(QueryImpl.java:69)
at com.googlecode.objectify.impl.AsyncObjectifyImpl.query(AsyncObjectifyImpl.java:354)
at com.googlecode.objectify.impl.ObjectifyImpl.query(ObjectifyImpl.java:207)
at com.beoui.geocell.ObjectifyGeocellQueryEngine.query(ObjectifyGeocellQueryEngine.java:52)
at com.beoui.geocell.GeocellManager.proximitySearch(GeocellManager.java:381)
How can I deploy to external servers like Tomcat, JBOSS or Jetty?
Or it isn't possible at all?
My opinion is: whether the application runs correctly on eclipse embedded jetty, in some way is possible to configure an external jetty distribution to run the application
GAE comes with a set of services which are basically big external systems hidden behind an API. Local dev server is just a Jetty with an embedded database and an API layer mimicking the production GAE. You can not use the dev server for production purposes - it was not made for this and has no concurrency and reliability features of production system.
If you want to run GAE code somewhere else then production GAE service, take a look at AppScale or CapeDwarf.
Also, most links that you provided deal with running GWT app on Tomcat/Jetty, but you have problems with AppEngine. GWT and AppEngine are two separate technologies (which can work together, but it's not required).

package of google app engine project

HI I m new to google app engine,and I want to know is there an option in app engine to create a installer package of a project which can be deployed in other google app domains.So basically project will not be hosted publically but only for particular google app domains
An analogy I m looking here is salesforce package,where a developer can create a package url,through which package can be installed in other orgs. The project is not hosted publically. http://appexchange.salesforce.com/
You can package your source easily. The only variable that needs to change is in app.yaml application: field in python and appengine-web.xml in java. This will allow you to deploy the app in other domains.
As far as the package url that isn't how App Engine works. You can set your application to allow only certain domains to access it and provide an API for integrating it into another application, but that is different than Sales Force package url.
When developing a Google App Engine application you don't have to specify the url of the project. So you can install and deploy your application to several organizations or even subprojects.
The only thing you need to set is the application name in the app.yaml (in case you are using python) or appengine-web.xml (for java)
So for developing an installer I would create a script that first asks the user for the name of the application they want to deploy to, modifying the configuration files accordingly, and then calls the normal appcfg.py installer.

Resources