Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

How to deploy Meteor.js applications to OpenShift

February 1, 2024
Yashwanth Maheshwaram
Related topics:
Kubernetes
Related products:
Developer SandboxRed Hat OpenShift

Share:

     Red Hat OpenShift is a unified platform to build, modernize, and deploy applications at scale. OpenShift offers a great developer experience in shipping your applications to the cloud.

    JavaScript is the most popular programming language in the world and is used by millions of developers around the world. While it’s one programming language, there are many popular frameworks within JavaScript that need different approaches.

    In this series of articles, we are providing step-by-step guides to help you get up and running with JavaScript applications on OpenShift. For this tutorial, we expect you to have some familiarity with Meteor.js and Red Hat OpenShift. If you need a quick recap, check out these resources:

    • Video: Developer Sandbox for Red Hat OpenShift
    • Developer Sandbox for Red Hat OpenShift
    • The Meteor.js site
    • Containerfile

    Steps to deploy an Meteor.js app on Red Hat OpenShift

    The Developer Sandbox for Red Hat OpenShift is a free-to-use OpenShift instance for you to experiment with OpenShift for your use cases. The development of dynamic and responsive web applications has evolved into a fundamental requirement. Node.js and Meteor.js stand out as formidable technologies capable of crafting these applications with finesse. Our workflow involves the creation and deployment of applications directly from GitHub onto an OpenShift sandbox environment.

    Follow these steps to start your sandbox instance and deploy your Meteor.js app:

    1. Create a Developer Sandbox account at https://developers.redhat.com/developer-sandbox.
    2. Once you have the account and are signed in, on the left side menu, click on +Add.
    3. Select Import from Git.
    4. Specify your Git repo URL. For the sake of this tutorial, we will use https://github.com/redhat-developer-demos/meteor.js-openshift-example.git. But you can choose any Meteor.js repo.
    5. Add a Containerfile to your repo. The Containerfile helps developers to specify the environment needed for running your applications. In case, you do not have a Containerfile on your project, you can add add one to your repo by referring to https://github.com/redhat-developer-demos/meteor.js-openshift-example/blob/main/Containerfile.
    6. OpenShift will detect the Containerfile from the Git repository. In case the Containerfile is in a subdirectory, you need to provide the path of Containerfile. 
     

    Info alert: Note

    If the Containerfile/Dockerfile is not detected, click Import Edit Strategy. Select as Dockerfile, define the path as Containerfile.

    1. Choose a Resource Type field. Choose either Deployment or Serverless Deployment (default option) depending on your preference.
    2. Select Target Port under Advanced options to define the port 3000 that will receive the container's traffic.
    3. As this is a resource-consuming container/pod, we should define the resource limit for this. Select the Build configuration, then click on Resource limit and set the CPU to 4 cores and memory 5Gi.
    4. Click on Create.
    5. You will now be directed to the Topology view, and the application will commence deployment. Please allow some time for the build & deployment process to complete. While it is in progress, you will have the opportunity to monitor the logs.
    6. Once it’s done deploying, you can click on the OpenURL arrow icon to see the webpage of your Meteor.js application running on OpenShift.

    Add continuous deployment

    Continuous deployment is a strategy in software development where code changes to an application are released automatically into the production environment. It speeds up time to market by eliminating the lag between coding and customer value. OpenShift enables developers to configure this using a few simple UI-based steps.

    Now, let’s begin adding continuous deployment to the application we just created:

    1. From the Topology view, select the application.
    2. Click on the Actions drop-down.
    3. Select Edit <application name>.
    4. Check the Add pipeline checkbox. You can see the pipeline visualization if you’d like to understand the steps.
    5. Click Save.

    Trigger the CD pipeline

    A pipeline of applications is triggered when an application in the Git repository is updated. 

    1. Create your application and add on the remote Git repository or copy the above repository.
    2. The source files should be modified, committed, and pushed.
    3. Log in to the Developer Sandbox.
    4. Access your application in the Topology View.
    5. Select Pipeline option from the left menu.
    6. Check out live build and deploy process.
    7. You can see your changes being deployed automatically.

    Conclusion

    In this tutorial, you learned how to deploy a Meteor.js application on Red Hat OpenShift. Red Hat OpenShift has powerful features that make it easy to manage and scale your Meteor.js application in production.

    Check out the other articles in this series:

    • How to deploy Vue.js applications to OpenShift
    • How to deploy Next.js applications to OpenShift

    Related Posts

    • Getting started with JavaScript application development

    • Build lean Node.js container images with UBI and Podman

    • Optimize Node.js images with the UBI 8 Node.js minimal image

    • Load balancing, threading, and scaling in Node.js

    • Modernizing applications with Apache Camel, JavaScript, and Red Hat OpenShift

    • Building rootless containers for JavaScript front ends

    Recent Posts

    • More Essential AI tutorials for Node.js Developers

    • How to run a fraud detection AI model on RHEL CVMs

    • How we use software provenance at Red Hat

    • Alternatives to creating bootc images from scratch

    • How to update OpenStack Services on OpenShift

    What’s up next?

    Learn how to deploy a full-stack JavaScript application in an OpenShift cluster with this hands-on lab. Starting from source code, you'll take an application that runs locally and deploy it in the Developer Sandbox for Red Hat OpenShift.

    Start the activity
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue