OpenShift EGIT Eclipse - java

Has anyone out there actually gotten an existing Eclipse Dynamic Web Project working under OpenShift? Does anyone know a tutorial that ties all three title elements together?
I have the OpenShift plug-in and the EGIT plug-in added to Eclipse Kepler.
I've tried creating a new OpenShift Project in Eclipse. It does well until the final step when it errors for wanting the location an ssh "pub" file. Nothing prior had mentioned this and even if I knew where it was or what they were talking about, there's no place in any of the dialogs to enter it.
I've started any number of GIT and OpenShift tutorials or guidelines. Most think that everyone is using Red Hat Linux. I'm using Windows 8.
It doesn't appear that OpenShift will let you select an existing Eclipse Dynamic Web Project that doesn't already somehow magically exist in OpenShift.
I've read the solutions to other user's problems as supplied by Red Hat and they're all very fragmentary and tend to stipulate a degree of knowledge that the questioner simply doesn't have.
It's all been very confusing. I want to host my Dynamic Web Project on OpenShift because they support Tomcat 7, JDK 7 and MySQL 5.5, but somehow I've not found the magic bullet.

I recommend to use newer version of JBT (or OpenShift tools) - there are more and more changes over time (new features, fixes...). Newer JBT cannot allow you to start create a new application without having your public key on your OpenShift account.
According to your issue. You have to have uploaded your public ssh key on the OpenShift to successfully deploy your existing application. It's required, bcs. there is at first created OpenShift application with specific cartridge (in your case Tomcat 7) and then it is overwritten by local application (forced push) - and there is required ssh key for secured connection. That is a reason why you cannot deploy your existing application.
To upload SSH key to your OpenShift account open OpenShift explorer and choose your connection, open its context menu and choose Manage SSH Keys... (older version could have different label for this, but it would not be much more different). If you don't have any ssh key, wizard allow you to create your own key pair. Make sure, that SSH key is also added into Eclipse SSH2 preferences (I am not sure, which version of OpenShift tools do you use, if there is not link to eclipse preferences, go through Preferences -> General -> Network Connection -> SSH2).

Related

How do I update glassfish 4.1.1 inside netbeans 8.2

I am working on a tutorial using glassfish inside netbeans https://netbeans.org/kb/docs/javaee/ecommerce/setup.html . I reached this point in the tutorial (Don't mind the Pool name, I changed it to fit my own)
But when I click next I get this error
I read on the internet that some people say this error occurs cause there is a bug in glassfish version 4.1.1 but when I try to update glassfish from inside Netbeans
And I click yes then I get this error
It doesn't help either if I go into the glassfish admin area and click on Update tool
Cause no Items show up even though there have been updates since and glassfish is now on version 5.0. I by the way checked if I was behind a proxy here http://amibehindaproxy.com/ and I wasn't and my internet speed showed this
So is there anybody who can tell me what I do wrong??? There are some other post about the subject but non of the solutions helped me.
The Update Center in GlassFish no longer works because the server it tries to connect to does not exist any more after Oracle ended commercial support. To update GlassFish you will need to:
Download GlassFish separately
Unzip it to a location of your choice
Add it to netbeans manually by right-clicking "servers" and choosing "Add Server"
If you are concerned about bugs in GlassFish, you may want to try Payara Server, which is derived from GlassFish but has many more bug fixes. (Payara Server has the same free, open source license as GlassFish)

How to deploy Play! framework app to Openshift v3

Perhaps I pop this question to early as Openshift v3 is still in preview, nevertheless there might be a solution to my problem that I don't see :).
I'm taking my first steps in building a java Play framework app and chose Openshift as my hosting platform. I just was able to get my app + mysql db working on Openshift v2 as they released v3 preview and got notice v2 will eventually disappear.
In the new images/templates there is still no Java Play version showing and no 'do it yourself cartridge' way.
Any hints or 'tutorial' links are much appreciated :).
Thanks and kind regards!
Erik
You have two options here.
SBT Native Packager
First option would be using the SBT Native Packager SBT builder to create your Docker images (either manually or using something like Jenkins). Out of the box you should be able to run sbt docker:publishLocal and get a local docker image which you can then push to a Docker repo. You can then launch it in openshift with oc new-app <docker repo>/<docker image>:<image version>.
Down side to this is that you aren't really taking advantage of OpenShift fully since your images are being built elsewhere. But it might fit well with your current development flow.
Upside is that your docker images will be quite small. SBT does a good job of packaging up all the dependencies.
Source to Image
Second option would be to create your own source to image builder that knows how to build sbt/play projects. This is the path my team has taken. You can take a look at our sbt builder for reference but its still beta quality at best.
Downside to this process is that all your source is included in the image so its a big larger. Also no one supports this builder so if you have bugs you are on your own.
Upside is that OpenShift will build your images and you will see your build status inside the OpenShift web console.
Notes
With OpenShift Origin 1.3.0 you will also get access to the Jenkins pipeline. This can make either of the two above scenarios easier. You end up with a cool web interface that looks like this:
Hopefully RedHat will support sbt natively at some point but for now one of these two flows should work for you.
For everyone looking for an answer to my own question, here is how I got a Play app running on Openshift (own installation).
First of all, a big thank you #PatrickTescher. His answer pointed me in the right direction.
I did not yet succeed in getting a docker build by activator to work in Openshift (guessing it has to do with running under root), but I have gotten to the point where I have a Source to Image build running on my own Openshift Cluster. This approach is not yet possible with the online developer preview of Openshift. By all the reading I have done so far, I agree with Patrick to say this is the best approach.
By diving into the following links, you should get up and running:
Installing docker on a Windows vm: https://docs.docker.com/toolbox/overview/
Installing your own Openshift Cluster: https://github.com/openshift/origin/blob/master/docs/cluster_up_down.md#windows-with-docker-toolbox (in addition: https://github.com/openshift/origin/issues/11277)
Get a s2i image up and running: https://github.com/redhat-cop/containers-quickstarts/tree/master/s2i-play
In the last link you can change registry.access.redhat.com/rhel7.2 by registry.centos.org/centos/centos:latest (rhel needs certification, centos is the free community equivalent)

How to deploy my play web App onto my server

I have created a Web Application with the latest version of the play framework and am ready to deploy it. Since this is the first time I will deploy a web application onto a server I am not 100% sure how to to that.
I need to run a lot of cronjobs on the databases, which is why I have ordered a Vserver which came with Debian 7.8 LAMP installed.
What I am asking now is what is the simplest way to deploy my App onto my server?
What I would try if I wouldn't ask this question now, is to install play on my debian server (well actually I probably would have to install the activator thing nowadays instead right?) than upload my app to the server, change the deployment port of the app to 80, put the application in production mode and than start the app on the server or use the stage task command.
Is this the right way to do it? I do not want to make mistakes.
There is no right way to do it.
You have 4 choices (more if you include Maven distributions, etc.) but for the case 'I want to run my app on my server' there you go:
use start but it needs human intervention (interaction) so you might not want to do this in an actual production settings.
use stage to prepare your app for deployment. stage prepares some scripts which you can then call from /etc/init
The above methods NEED Play to be present on the server machine. So if you do not want to have Play! on your server... here you go:
use dist to create a zip file with everything in it... then just unzip the file somewhere in the server and run the scripts in the bin directory
Create a native package that will install your app as a (in your case) a Debian package.
Check this out (official docs):
https://www.playframework.com/documentation/2.3.x/Production

Getting hot code replace working (Eclipse EE juno, Jboss AS 7.1)

I have referred to the question Here and have been unable to resolve my issue at all.
I'm making a dynamic web project that uses jsp / css as well as jquery. Right now I need to stop the server, clean, and republish.
I have build automatically checked, I have selected automatically publish on the server... I'm not really sure if I'm missing something but I'd love to get this working as frontend development without realtime editing is horrid.
I'm not using maven or any other form of source control (yet)(I can add in ivy, if need be?)
Thanks.!
Image of server setup
If your are using the JBoss Server Manager that came with the Jboss Tools Suite you have to mark the "Automatically publish when resources change" option of the "Publishing" section of your Jboss Server Configuration.
You can find the Jboss Tools for Juno here, or you can use the Jboss Developer Studio IDE, that is an Eclipse Indigo + Jboss Tools like explained here (I'm using it, and it runs way better than eclipse, don't know why, but that's just my experience)

Weblogic Workshop asks to upgrade projects everytime

I am using the Weblogic Workshop for Portlet development. It's built on Eclipse. I upgraded my Eclipse from 3.2 to Weblogic Workshop.
The problem is that everytime I start the Workshop it gives me an upgrade information that I need to upgrade my projects as they were created with older version of Eclipse.
This should have to be done only once, right? Not everytime. Is there a solution?
Text of message:
"Upgrade projects created with older release of Eclipse and/or related plugins."
Thanks,
Sid
Is your project in a source control system that may have made some files read-only? If so, use your source control client to "check out" all project files before opening the project in Eclipse. Then find files that have been changed by upgrade and check them back in.
If that doesn't apply to your situation, take a look at your Error Log view in Eclipse after upgrade. Are there any errors/exceptions in there? You may want to clear the log and repeat to get only the most recent problems. Use information that you gather to open a support ticket at Oracle. The problem that you are describing is likely a bug.

Categories

Resources