Since App Engine reached the end of life last August on the 30th, it's not possible anymore to deploy updates to the same application using the appengine (appcfg) command line.
I was using the appengine maven plugin which in turn was using appcfg to deploy my application.
I'm looking on how to migrate my application to Google Cloud SDK now but between the limitations I saw that Google Cloud SDK does not support EAR applications to be deployed.
Surprize surprize my applications does have an EAR structure.
Is there a workaround for this or should I completely change the structure of my application?
You don't have to change your application structure at all. It's only the deployment that it slightly altered.
Before, you used to create war artifacts and package them into a deployable ear.
Now you keep creating the same war artifacts but you must not package them into an ear. Instead, you deploy them all together using the gcloud command:
gcloud app deploy ./path_module1/WEB-INF/appengine-web.xml ./path_module2/WEB-INF/appengine-web.xml
path_moduleX are paths to the exploded artifacts (not path to your source code, of course)
as explained here https://cloud.google.com/appengine/docs/standard/java/configuration-files
Related
I've got a dozen ear files, which load the same set of jars for each component deployed as an enterprise application in weblogic... I want to move these dependencies to a "shared library" (optional package) jar file. I've done the leg work of moving these artifacts to a jar file and added MANIFEST.MF with Extension-Name as specified in
http://docs.oracle.com/cd/E12840_01/wls/docs103/programming/libraries.html
Now I need to deploy this "shared library" optional package to weblogic 11g, before deploying the enterprise application components, which reference them. Currently deployment is done using a bunch of wlst jython scripts in offline mode, which does a full install of the domain on the filesystem. How do I deploy shared libraries in offline mode?
I couldn't figure out how to deploy shared libs in offline mode, only online, so I re-wrote the deployment scripts using wlst tool. I deploy datasources, jms, non-library-dependent apps in offline mode, then bring up the admin node and deploy libraries in online mode using standard deploy function in weblogic. You can google oracle docs on this, they describe the function and arguments that can be passed quite well. The once the libs are deployed, you deploy the apps (ears or whatever) in online mode, using hte same deploy mechanism from wlst minus the library argument, because applications are not libraries.
Some helpful resources:
https://docs.oracle.com/cd/E13222_01/wls/docs90/deployment/understanding.html#1052661
https://docs.oracle.com/cd/E13222_01/wls/docs90/deployment/deploy.html#1020594
I've been using IntelliJ successfully for quite a while to develop App Engine projects that contain a single service (formerly 'module'), but am having difficulty setting up a project up that contains more than one service (a default front-end service plus one or more backend services).
I understand the multi-module EAR deployment folder structure, which is different from the single WAR structure, but I have not been able to figure out how to successfully launch the development server with this configuration to debug before I deploy.
Any help would be greatly appreciated.
My application is structured as a multi module Gradle project. I have a top level Gradle Build file and
three subprojects. One project contains the EAR project, and two projects are Goolge App Engine War projects.
I would propose that you start with trying to setup such a project. You will find a good example with a corresponding
project structure at Googles Github
https://github.com/GoogleCloudPlatform/appengine-modules-sample-java
You will deploy the ear to your locale dev server by running the ear gradle task appengineRun
You need to add the following entry to your ear gradle build file (keep the other entries)
appengine {
jvmFlags = ['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000']
}
Next step is to configure a Remote Debug configuration similar to this
https://stackoverflow.com/a/18692212/2062634
After you started your application you have to start your remote debug configuration which will attach the debugger.
I'm using GIT and the feature-branch workflow for my local development. I'm also using the AWS SDK / Eclipse plugin for my application deployments to my ElasticBeanstalk Tomcat server. Recently I encountered a problem where new Java classes I had added to my codebase were not being deployed to ElasticBeanstalk (i.e., the compiled class files were not being uploaded into the remote Tomcat deployment directory).
After some investigation, I found that the plugin seems to be using this jar as part of the deployment process:
/eclpise installation path/plugins/com.amazonaws.eclipse.elasticbeanstalk_1.0.0.v201310211406/lib/jgit/jgit-1.3.0-aws-git-push.jar
But I couldn't find any settings in Eclipse that specify which GIT branch should be chosen for the deployment.
Eventually I solved my problem by deleting local and remote staging directories and unchecking the "incremental deployment" checkbox in my ElasticBeanstalk environment configuration within Eclipse, but I would like to understand better how the plugin chooses which files to be deployed so I can avoid this mess in the future.
the Eclipse tools use a Git repository to deploy incremental changes to AWS Elastic Beanstalk, but they don't use the same Git repo as the one that you're using to manage your source code. Because the Eclipse toolkit needs to deploy the compiled artifacts to AWS Elastic Beanstalk, it manages a separate locate Git repo just for those compiled artifacts. The repo has the structure of an exploded WAR file. You can find this repo under Eclipse's .metadata directory if you really want to see it.
So, the short answer is... Eclipse should be deploying whatever code you have in your workspace. If you've switched to a specific branch in your source code Git repo, then it should be deploying that code. You might also check out the Deployment Assembly properties for your project. These describes how to convert your web project into a WAR file, and it's exactly what the Eclipse toolkit is using to compile your project before it pushes it to AWS Elastic Beanstalk. Let us know if that still doesn't line up with the behavior you're seeing, and we can try to debug any other problems you're having.
I have a repository on GitHub. It consists of 3 projects. Main web application and libraries. Main application is jar with embedded Tomcat. I would like to deploy main application on Heroku. Can I deploy just prepared jar? If so how?
While it is not recommended to check in binary files (e.g. JARs) into a Git repo, you can try using the third-party Null Buildpack to have Heroku just deploy your repo as-is without compilation. You'll still need to have a Procfile to tell Heroku how to launch your application.
Besides the problems with checking in JARs, this method will also not be running your application on the latest patch JDK. If you want the best of both worlds, you'd need to make your own custom buildpack that downloads the JDK, similar to what the Java Buildpack does.
I have Jenkins CI configured with a SVN repo of our Java EE based application.
I am able to build the application but I am facing problems while deploying the war. Actually I don't have any idea how to get a war file out of the build and deploy it to a remote Tomcat 7 server.
I need to deploy this code to Tomcat 7 in the form of a war deployment. Please guide me through any tutorial or docs.
If your build is Maven based, you could use the Maven Tomcat plugin. This will do more or less the same actions as the Jenkins Deploy plugin, but it will add a dependency on your build tool and not on your continuous integration tool.
There's a plugin for that: https://wiki.jenkins-ci.org/display/JENKINS/Deploy+Plugin
Basically, the deploy plugin will use tomcat's built in REST API/manager application to deploy the war file.
I use this in anger, and it's pretty simple. The plugin does everything you'll need for a simple situation.
If your needs are more complicated than this, you can script access to the management REST API directly, but I advise you to start with the plugin.