Mixing existing website with Google App Engine - google-app-engine

If I want to use Jinja templating with GAE, is there a way to do that from my hosted website? I don't want to run the entire website on appspot.com.
If my host has python installed, I should be able to install Jinja there as well? In that case, I'm guessing my templating code will still work but anything in the app.yaml and main.py will not since I'll basically not be using GAE.

You can definitely use Jinja on any python web framework -- here's just one example I found of a tutorial using Jinja without app engine. Jinja is just an HTML templating library that's host/web platform independent.

Related

Deploying a polymer project to app engine/java standard of flex environments

I'm looking for instructions similar to these (python) on how to deploy a polymer project to app engine that uses java standard or, preferably, flexible environment. I don't fully understand how a polymer project can be integrated with Jetty. Any help would be greatly appreciated.
It seems that the key here is to integrate static content into my application. There is even no need to add web.xml:
If you do not specify a web.xml, a default is used that maps
everything to the default servlet.
The article even talks about alternatives to serving directly from the application to reduce the costs.

Developing a web client without servlet

I m new to appengine development.I have a few basic question about web client for appengine.When we make a google cloud module in Android Studio, an android client, a back end and a WEB CLIENT is auto-generated.A few files are auto-generated for web interface. My questions are:
why do I need WEB-INF/web.xml for web client? I also found there's a servlet api dependency added in gradle, though I didnt find and servlet file, what is it used for ?
I want to make a web interface/client for my andorid app, but I dont
know servlet,jsp, can I make it with pure javascript or js lib?
Will the default template for web client work from any other web-hosting
than appengine?
How can I make a web client with pure javascript,css,html, will the
google cloud doc for javascript suffice for this purpose?
why do I need WEB-INF/web.xml for web client? I also found there's a
servlet api dependency added in gradle, though I didnt find and
servlet file, what is it used for ?
Both are base elements for Java web applications even though you are not using servlets most modern web frameworks are built on top of them.
I want to make a web interface/client for my andorid app, but I dont
know servlet,jsp, can I make it with pure javascript or js lib?
Yes, GAE are standard web applications so you can build and app using pure HTML + js.
Will the default template for web client work from any other
web-hosting than appengine?
short answer, no. The App engine SDK depends on several APIs available strictly on the GAE environment. Shouldn't be hard to get an empty webapp template working on a tomcat thought.
How can I make a web client with pure javascript,css,html, will the
google cloud doc for javascript suffice for this purpose?
I dont know exactly what you mean by "the Google cloud Doc" but mostly the answer is yes, all App Engine, Cloud Compute and Google Drive are capable of hosting HTML+JS.

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

App Engine Launcher and Django

I have running an APP on Google App Engine that I developed in Python and used Django template data display. I used Launcher to test and deploy. I did not use such Django verbs as {% url etc etc %}. It was all good and well.
I now need to do some work on an existing APP on Google App Engine that is Django based and uses the many more Django verbs.
It fails to run on Launcher.
I read that you use something like manage.py runserver and I think Launcher is not capable of supporting my development testing on this one. Is there a way so Launcher can?
I am not quite sure what environment for test I am going to use ??
I have found the answer you ad the line # coding: utf-8 to all the Python programs including helper.py. You must used latest or above 1.6 for Google Launcher.

migrating from google app engine with Groovy, Java and Gaelyk to another host

I currently have an application that is built on gaelyk, groovy and GAE.
I would like to move this application as is to another host like Amazon EC2 and run it against MYSQL. Is this possible?
I dont need the google USER services.
Take a look at AppScale.
It highly depends on how you use App Engine currently with Gaelyk.
Gaelyk is syntax sugar on top of the GAE SDK, and builds upon of the shoulders of the Groovy giant: the Groovlet servlet and Template servlet are part of Groovy itself, not of Gaelyk.
So if you don't rely on the various GAE services, you can run your app on any Java container, wherever hosted it may be.

Resources