Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Node.js General Availability in Red Hat OpenShift Application Runtimes

DZone's Guide to

Node.js General Availability in Red Hat OpenShift Application Runtimes

In this article, we look at why these two open source solutions were brought together, and the benefit this combination brings to developers.

· Web Dev Zone ·
Free Resource

Download Microservices for Java Developers: A hands-on introduction to frameworks and containers. Brought to you in partnership with Red Hat.

Summary

Red Hat is making Node.js generally available to Red Hat customers through a subscription to Red Hat OpenShift Application Runtimes (RHOAR). RHOAR provides application developers with a variety of application runtimes running on the OpenShift Container Platform.

Node.js is based on the V8 JavaScript engine and allows you to write server-side JavaScript applications. Node.js joins the existing set of supported runtimes and offers developers an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

What's in the Box?

This release features the Node.js core runtime version 8.9.4, npm 5.6.0, and the associated missions and boosters to support developers getting started with Node.js and launching projects.

Note that the RHOAR Node.js base image allows you to develop a Node.js application for OpenShift using any of the community Node.js modules available through npm. Community npm modules are not supported by Red Hat.

Launch Into OpenShift

Using developers.redhat.com/launch you can immediately create and deploy a Node.js application directly to OpenShift Online or to your own local OpenShift cluster. It provides a hassle-free way of creating example applications, called boosters, as well as an easy way to build and deploy those boosters to OpenShift.

Boosters are available to showcase how developers can use Node.js to build fundamental building blocks of cloud-native applications and services, such as creating RESTful APIs, implementing health checks, externalizing configuration, or resiliency features like circuit breakers.

Accessing Node.js Images From the Red Hat Container Catalog

The Node.js runtime is offered through the Red Hat Container Catalog, in the form of a containerized OpenShift S2I builder image containing Node.js 8.9.4. It can either be pulled from the command line (using the oc command) or from the OpenShift Dashboard GUI interface. The following is one command you could use to pull the image to your local system for use with OpenShift:

oc import-image nodejs:8 --from=registry.access.redhat.com/rhoar-nodejs/nodejs-8 --confirm

Then, the following commands could be used to build and deploy an example Node.js application to Red Hat OpenShift:

oc new-app --name nodejs-example nodejs:8~https://github.com/openshift/nodejs-ex
oc expose svc/nodejs-example

Red Hat Customers using these distributions will be able to keep current with the latest updates, security advisories, knowing when and why containers are updated, and remaining up-to-date on the latest available tagged image.

Documentation

The RHOAR team has been continuously adding and improving on the official documentation for Node.js. This includes updates in the Release Notes, Getting Started Guide, and the new Node.js Runtime Guide.

Developer Interactive Learning Scenarios

These self-paced scenarios provide you with a pre-configured OpenShift instance, accessible from your browser without any downloads or configuration. Use it to experiment with Node.js, or learn about other technologies within RHOAR and see how it helps solve real-world problems.

What's Next?

The RHOAR team is continually taking feedback from customers and the wider community of open source developers, as well as tracking the upstream Node.js releases. They are working to make updates to the RHOAR runtimes based on that feedback, as well as considering support for additional modules from Red Hat and the very large Node.js ecosystem.

Kudos!

This release was produced by Red Hat's RHOAR engineering team and involved many hours of development, testing, writing documentation, testing some more, and working with the wider Red Hat community of customers, partners, and Node.js developers to incorporate contributions, both big and small. We are glad you have chosen to use it, and hope that it meets or exceeds your expectations!

More Resources

Download Building Reactive Microservices in Java: Asynchronous and Event-Based Application Design. Brought to you in partnership with Red Hat

Topics:
web dev ,node.js ,openshift ,open source

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}