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
Related
The IDE complains about no Deployment selected, but from the picture I can't pick one.
I have upgraded IntelliJ to the latest. I am planning to reinstall everything.
Suggestions?
There should be an artifact displayed:
Make sure you have a war artifact defined in the Project Structure | Artifacts.
If the issue persists, please report a bug and attach a sample project to reproduce.
Artifact options available out of the box in IntelliJ IDEA Ultimate:
If you don't see the Web Application options, you need to make sure that all the plug-ins are enabled. You can also just delete disabled_plugins.txt file from the IDE CONFIG directory and restart the IDE.
In case you are still running into issues:
It actually looks like you are using the Cloud Tools for IntelliJ plugin (https://github.com/GoogleCloudPlatform/google-cloud-intellij) and not the App Engine plugin bundled in IDEA Ultimate as in the accepted answer.
You can refer to the following documentation for deployment to the App Engine standard environment:
https://cloud.google.com/tools/intellij/docs/deploy-std
Also a couple things to check:
You should have an app engine standard facet
You should have an exploded-war artifact:
Try the following action:
Tools > Google Cloud Tools > Add App Engine support > Google App Engine Standard and see if this resolves the problem.
If none of this helps, perhaps you can post some screenshots of your artifact / module structure under project settings.
So OK, at the end I was using IntelliJ Community which doesn't support deploying to Google App Engine anymore (although it's bizarre the plugin is available). Apparently one of the latest updates disable whatever minimal support was there, as I was able to deploy to GAE just a few weeks ago.
Back in Android Studio 2.0 you could just add a Cloud Endpoints 1.0 backend module and it would generate for you a sample project that used Objectify. It was very convenient.
However, Android Studio 3.0 no longer has this feature and Cloud Endpoints 2.0 requires you use IntelliJ Ultimate edition to generate a App Engine Standard Environment project. However... IntelliJ Ultimate edition costs $500 and it doesn't appear a sample project with Objectify is created... Sigh...
So my question is, what is the best way to create a sample Cloud Endpoints project that uses Objectify? Because as of right now there appears to be no clear way from reading the documentation unless you want to shell out $500 for IntelliJ Ultimate edition.
Am I missing something??
I would suggest using the sample app as a start. You can import it as a Gradle project to Android Studio. Adding Objectify manually shouldn't be too difficult from there.
In addition to what is commented in the previous answer, if there are any doubts regarding how to use Objectify with App Engine, you can check out this code for integrating Objectify on a Java application.
You can run it using Maven as this:
mvn clean package
mvn appengine:run
After running it locally, you can deploy the app and check it works correctly:
mvn appengine:deploy
Once you check it works and understand the code, you can integrate it with the sample app indicated in the previous answer and combine them to create your Endpoints project with Objectify.
I'm trying to know if there's any way to deploy a Google App Engine application, using Spinnaker with a repository that's on GitLab. I've already done the deploy from the repo on github, and it works like a charm, but my official repo is on GitLab (on premise gitlab installation). Is there any way to configure Spinnaker to connect to GitLab?
So far, I've read that a workaround could be used by Jenkins, but I would like to avoid it (would only do this for a very extreme case).
I've also came with the idea of putting a proxy, just set the webhook on gitlab, parse the json paylod to the github format, and sendit to Spinnaker, but also, that woulb be in case that's no way for Spinnaker to do it naturally
Regards!
Spinnaker does not support webhooks from GitLab.
Adding support should not take much work. You're welcome to make a feature request or implement support yourself - take a look at the Echo microservice.
Sorry if this is off topic. If it is, please let me know where to post. I don't see a GAE site on SE. I can't update my Google App Engine Launcher. All the new install documentation I have found omits anything about it. I have version 1.9.37.
There is no .dmg file or .app file in the current GAE SDK downloads. I can't find a separate download either. I have not been able to find a statement by Google in any release notes or bug reports, etc. So again the question is:
Has the Google App Engine Launcher for MAC OSX been deprecated?
Thanks!
For anyone looking: you can still download it here !!
This is a godsend. Honestly dev_appserver.py is easy to work with (just run dev_appserver.py . in your app top level directory then browse to localhost:8080)
To deploy it was a mess: you need appcfg.py, which I couldn't find anywhere. I tried to install from the gcloud things but their install script didn't work for me. And then I found the old app. Working great!
As #Thomas mentioned in his reply, for a time, there was still the ability to download the App (from an old link) and use it. Starting from November (or December 2020), deploying via the old GAE Launcher is no longer supported because Google has shifted to using Cloud Build for deployment and the appcfg.py update app.yaml command did not use that.
We have created a replacement for GAE Launcher. You can find it on https://nocommandline.com. Simply put, it is a GUI for GAE and offers same functionality (with some improvements) as the old GAE Launcher
Tried
Subscribed trial for GoogleAppEngine.
1. INSTALLED GOOGLE APP ENGINE SDK
2. Downloaded the sample Java started code and deployed it. Working fine.
3. Used $appcfg.sh -A <appname> update target/appengine-try-java-1.0 to deploy
4. In this case, its a folder with all the webapp related stuffs
Question
In my case, I have a spring boot application which generates a jar file. It runs with a embedded container and I believe Google may have an alternate to deploy using Docker or some other way. But how?
There is no pointer or any details on how to run this in Google managed platform as far as I searched.
Any help or reference to documentation!! Alternates??
You can now use Google App Engine Java Flexible Environment - Java 8 Runtime:
https://cloud.google.com/appengine/docs/flexible/java/dev-java-only
It is Docker based
UPDATE:
You can now use Java 8 in App Engine Standard Environment:
Tutorial:
https://codelabs.developers.google.com/codelabs/cloud-app-engine-springboot/index.html
Example:
https://github.com/GoogleCloudPlatform/getting-started-java/tree/master/appengine-standard-java8/springboot-appengine-standard
Blog post:
https://cloudplatform.googleblog.com/2017/09/Java-8-on-App-Engine-Standard-environment-is-now-generally-available.html
Google App Engine still uses Servlet 2.5 that is below the requirements of Spring Boot (i.e. Servlet 3.0).
There is a way to workaround that, check the documentation for more details
Spring Boot requires Servlet 3.0 which GAE does not have. WorkAround is to have a "spring-boot-legacy" dependency. You can check further how to implement: https://github.com/scratches/spring-boot-sample-gae