Getting started with OpenShift Java S2I

Introduction

The OpenShift Java S2I image, which allows you to automatically build and deploy your Java microservices, has just been released and is now publicly available. This article describes how to get started with the Java S2I container image, but first let’s discuss why having a Java S2I image is so important.

Continue reading “Getting started with OpenShift Java S2I”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 


For more information about Red Hat OpenShift and other related topics, visit: OpenShift, OpenShift Online.

Installing Red Hat Developer Studio 10.2.0.GA through RPM

With the release of Red Hat JBoss Developer Studio 10.2, it is now possible to install Red Hat JBoss Developer Studio as an RPM. It is available as a tech preview. The purpose of this article is to describe the steps you should follow in order to install Red Hat JBoss Developer Studio.

Red Hat Software Collections

JBoss Developer Studio RPM relies on Red Hat Software Collections. You don’t need to install Red Hat Software Collections but you need to enable the Red Hat Software Collections repositories before you start the installation of the Red Hat JBoss Developer Studio.

Enabling the Red Hat Software Collections base repository

The identifier for the repository is rhel-server-rhscl-7-rpms on Red Hat Enterprise Linux Server and rhel-workstation-rhscl-7-rpms on Red Hat Enterprise Linux Workstation.

The command to enable the repository on Red Hat Enterprise Linux Server is:

sudo subscription-manager repos --enable rhel-server-rhscl-7-rpms

The command to enable the repository on Red Hat Enterprise Linux Workstation is:

sudo subscription-manager repos --enable rhel-workstation-rhscl-7-rpms

For more information, please refer to the Red Hat Software Collections documentation.

JBoss Developer Studio repository

As this is a tech preview, you need to manually configure the JBoss Developer Studio repository.

Create a file /etc/yum.repos.d/rh-eclipse46-devstudio.repo with the following content:

[rh-eclipse46-devstudio-stable-10.x]
name=rh-eclipse46-devstudio-stable-10.x
baseurl=https://devstudio.redhat.com/static/10.0/stable/rpms/x86_64/
enabled=1
gpgcheck=1
upgrade_requirements_on_install=1
metadata_expire=24h

Red Hat developer signing key

As this is a tech preview, you need to accept the Red Hat developer signing key that has been used for producing the JBoss Developer Studio RPM.

Execute the following command:

sudo rpm --import "https://www.redhat.com/security/a5787476.txt"

Install Red Hat JBoss Developer Studio

You’re now ready to install Red Hat JBoss Developer Studio through RPM.

Enter the following command:

sudo yum install rh-eclipse46-devstudio

Answer ‘y’ when asked and after all required dependencies have been downloaded and installed, Red Hat JBoss Developer Studio is available on your system through the standard update channel !!!

You should see messages like the following:

rh eclipse46 devstudio.log

Launch Red Hat JBoss Developer Studio

From the system menu, mouse over the Programming menu, and the Red Hat Eclipse menu item will appear.

programming menu

Select this menu item and Red Hat JBoss Developer Studio user interface will appear then:

devstudio

Enjoy!

Jeff Maury 


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

Take advantage of your Red Hat Developers membership and download RHEL today at no cost.

New vscode-java 0.0.8 release

Version 0.0.8 of the Java extension for Visual Studio Code (a.k.a. vscode-java) has been unleashed onto the world. It’s available in the Visual Studio Code Marketplace and can be found and installed directly from within Code.

Highlights of this release can be seen in this screencast:

Gradle Support

vscode-java finally provides basic Gradle support for Java projects. Basically, you just need to open a folder containing a build.gradle file in its root and wait for the Java support to kick in. Code completion, Navigation, References and all the other existing features of the Java support will work as long as the Gradle project can be successfully imported.

However, please be aware that Gradle-based Android projects are not supported, because of a limitation in BuildShip, the upstream project in which this Gradle support is based on.

Update project configuration

Whenever a build configuration file is modified and saved, a project re-configuration (eg. Java compilation level update) or classpath change (dependencies or source paths) might be required, so the VS Code internal model stays in sync with the build descriptor.

So, a warning will pop up whenever a Maven pom.xml or Gradle (*.gradle) file is saved:

Choosing Never will discard the message so it won’t show up on subsequent build file changes. Clicking  Now will trigger a project update command, but the message will show up again on the next change. Selecting  Always will trigger configuration updates every time the build file is saved.

Please be aware a project update can be a long-running, CPU-intensive operation. For large projects, it might be preferable to keep the option turned off and instead call the  Update project configuration command manually (via Ctrl+Alt+U or Cmd+Alt+U on MacOS) when the editor is focused on a Maven pom.xml or a Gradle file.

Whenever you need to change the behavior, you can open the workspace settings and look for the java.configuration.updateBuildConfiguration key. It specifies how modifications on build files update the Java classpath/configuration. Supported values are:

  • disabled : never updates automatically on save, doesn’t show a warning.
  • interactive : asks about updating on every build file save.
  • automatic : updating is automatically triggered on build file save.

Mute “Incomplete classpath” warnings

Whenever a java file is opened, that does not belong to a project (what we call a standalone Java file), vscode-java is unable to compute a proper classpath. It makes it useless to report compilation errors, as the UI would be filled with distracting red errors all over the file. But vscode-java is still able to provide content-assist for base JDK classes, and report syntax errors, so the following warning is displayed:

It’s now possible to discard the message permanently, by clicking the Don’t show again option.

Should you change your mind, it’s possible to modify that choice in VS Code’s user settings: The java.errors.incompleteClasspath.severity  key specifies the severity of the message when the classpath is incomplete for a Java file. Supported values are ignore, info, warning and error.

Conclusion

This release represents an important milestone for this small project as it finally provides basic Gradle support for Java projects, by far, the most requested feature by the community along with some important usability features.

A complete changelog for this version is available there.

This Java extension is powered by two components, a front-end part, the VS Code client, and a back-end part, the headless Java Language Server, based on Eclipse JDT, The M2E project (for Maven support) and now BuildShip (for Gradle support). Both components are developed under the open source Eclipse Public License. All contributions are welcome, whether it’s code, feedback, bug reports. Please do so under any of these Github repositories:

 


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

Deliver support for new languages in Eclipse IDE faster with Generic Editor and Language Servers

If you’re a regular on this blog, you’re probably well aware of Red Hat’s efforts in improving the Eclipse IDE and of the rise of Language Servers Protocol to develop common developer tools. Red Hat fully jumped on this opportunity to better factorize and share language-specific logic which is very likely to benefit to multiple editors, IDEs and languages at once. It also better separates the concerns of what an editor or IDE is supposed to do (text edition, integration with SCM, debug and deployment workflows…) with the target language itself. With this approach, a single language server can enable language features to multiple development tools at once, and a single development tool can be made more generic to support new languages for free, just by binding to the language server through the protocol.

Continue reading “Deliver support for new languages in Eclipse IDE faster with Generic Editor and Language Servers”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

How To Setup Integration & SOA Tooling For JBoss Developer Studio 10

 The release of the latest JBoss Developer Studio (JBDS) brings with it the questions around how to get started with the various JBoss Integration and BPM product tool sets that are not installed out of the box.

In this series of articles we will outline for you how to install each set of tools and explain which products they are supporting. This should help you in making an informed decision about what tooling you might want to install before embarking on your next JBoss integration project.

There are four different software packs that offer tooling for various JBoss integration products:

  1. JBoss Integration and SOA Development
  2. JBoss Data Virtualization Development
  3. JBoss Business Process and Rules Development

    Tooling is available under software updates with early access enabled.
  4. JBoss Fuse Development

This article will outline how to get started with the JBoss integration and SOA development tooling and any of the JBDS 10 series of releases.

Continue reading “How To Setup Integration & SOA Tooling For JBoss Developer Studio 10”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

Eclipse for JNI development and debugging on Linux (Java and C)

selection_166Cross language development in one project

In this tutorial style article I’ll discuss how to configure Eclipse for Java Native Interface (JNI) development based on a sample project that you can copy and modify. I.e, you can have a single project that can be both Java and C at the same time, and support a full code navigation and debugging of both languages.

This article is focused on the configuration of Eclipse rather than explaining JNI itself, however there are links to JNI literature at the end.

Continue reading “Eclipse for JNI development and debugging on Linux (Java and C)”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

How Red Hat re-designed its Single Sign On (SSO) architecture, and why.

Red Hat, Inc. recently released the Red Hat SSO product, which is an enterprise application designed to provide federated authentication for web and mobile applications.

In the SAML world, RH SSO is known as an Identity Provider (IdP), meaning its role in life is to authenticate and authorize users for use in a federated identity management system. For example, it can be used to authenticate internal users against a corporate LDAP instance such that they can then access the corporate Google Docs domain.

Red Hat IT recently re-implemented our customer-facing authentication system, building the platform on Red Hat SSO. This system serves all Red Hat properties, including www.redhat.com and access.redhat.com — our previous IdP was a custom-built IdP using the JBoss EAP PicketLink framework.

While this worked for the original SAML use-case, our development teams were seeking an easier integration experience and support for OAuth and OpenID Connect protocols. Red Hat SSO comes out of the box with full SAML 2.0, OAuth 2.0 and OpenID Connect support.  Re-implementing the IdP from the ground-up gave us a chance to re-architect the solution, making the system much more performant and resilient.  While outages were never really acceptable in the past, our customers now expect 24/7 uptime.  This is especially true with Red Hat’s increased product suite, including hosted offerings such as OpenShift Online.

Continue reading “How Red Hat re-designed its Single Sign On (SSO) architecture, and why.”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

Java Language Support for Visual Studio Code has landed

Java language server is an implementation of the language server protocol for Java. If you recall, language server protocol provides a common way for editors and IDEs to integrate with language smartness providers. By design, all of the language tooling magic happens on the Java language server, and can provide same level of smartness to tools that support the protocol. In fact, we are working with communities such as Eclipse Che to make this server available for their tools.

As of Friday, September 16th, we have released our Java language support extension to Visual Studio Code marketplace. This initial release comes with a modest feature list that will make VS Code more fun to use for Java developers. Here is a list of features supported in this release. (Note, the Java language support extension makes use of the Java language server.)

  • Maven based project support
  • As you type compilation error reporting
  • Code completion
  • Javadoc hovers
  • Code outline
  • Code navigation
  • Code lens  for references
  • Highlights
  • Code formatting

You should expect to see more deployments with different tools in the near future, in the meanwhile enjoy Java support on VS Code.


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

Microservices CI/CD Pipelines in Openshift

One of the greatest advantages of using docker containers is the fact that you can move them between environments. A promotion from Development to a Production environment, shouldn’t take more than some few seconds. This is one aspect of “Continuous Delivery”

Because Microservices Architectures are “independently replaceable and upgradeable”, they are the best scenario to show a “Deployment Pipeline”.

 

Red Hat Developers has produced a sample and free application called “Red Hat Helloworlds MSA” that demonstrates different aspects of microservices (You can read more about this application in the following post: Have your own Microservices playground). This application shows how you can independently deploy the microservices using different technologies (JAX-RS and WildFly Swarm, Spring-boot, Vert.XNodeJS, etc) and how you can use different invocation patterns to integrate them. It also uses Netflix OSS, integrated via Kubeflix, and ZipKin for tracing.

Continue reading “Microservices CI/CD Pipelines in Openshift”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 

High Availability Servlets with EAP 7 and OpenShift

Prior to working at Red Hat, I worked for a software company, building financial software for large institutions. From my experiences I knew that some customers required, or demanded, a very aggressive Service Level Agreement (SLA).

If we consider an SLA of 99.999% (generally referred to as “five nines”) then this would allow for a six-second unavailability or downtime over a full week, anything more and penalties would have to be paid. To provide this level of uptime, it is essential to provide a strategy for high availability (HA). This got me thinking — how this could be achieved with OpenShift and JBoss Enterprise Application Platform (EAP) 7?

For an initial test, I thought I’d try to get a simple HA Servlet working with session sharing to see how EAP 7 works in a cluster of pods within OpenShift.

In subsequent articles I intend to increase the complexity of the solution to support most aspects of what I see as typical large scale applications today.

From what I could discover doing online research, the easiest way to get started would be to use a preloaded operating system via a virtual machine (VM). Because I use OSX, I wanted to have an easy to use VM and image management, which lead me to this article Installation Guide – Red Hat Customer Portal which explains how to install VirtualBox, Vagrant and how to download the Red Hat Container Development Kit (CDK).

Continue reading “High Availability Servlets with EAP 7 and OpenShift”


Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!

 


For more information about Red Hat OpenShift and other related topics, visit: OpenShift, OpenShift Online.