Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
Anthony Amanse edited this page Oct 22, 2020 · 1 revision

Short title

Securing MongoDB Enterprise on OpenShift

Long title

Using MongoDB Enterprise Operator with OpenShift and adding TLS using cert-manager

Author

URLs

Github repo

Other URLs

Summary

This code pattern demonstrates the use MongoDB Enterprise operator from the Red Hat Marketplace. This will guide you how to deploy and secure your MongoDB deployments. Using the operator can make the configuration and deployment easier and standardize them accross your multiple OpenShift environments.

Technologies

  • Databases
  • Containers

Description

Deploying a MongoDB cluster can be a challenge as there are a lot of pieces and configuration involved like setting up the instances, providing backups, networking, etc. With the MongoDB Enterprise Kubernetes Operator, it minimizes and standardizes these steps in your Kubernetes and/or Openshift environments. This makes deploying a MongoDB in your own environment easier.

With the use of the operator, you can deploy MongoDB resources using the Kubernetes API and manage them natively. In this code pattern, you will learn how to install and use the operator and deploy a replica set. You will also secure the MongoDB deployment with authentication and manage users natively in Kubernetes/OpenShift. You will also secure it by adding TLS with the help of cert-manager. Cert-manager is another operator that allows you to manage certificates natively in the same environment.

Flow

architecture

  1. User registers OpenShift cluster with Red Hat Marketplace
  2. User can now install MongoDB Enterprise Operator in OpenShift
  3. Deploy an Ops Manager platform using with the provided APIs from the operator.
  4. Deploy the MongoDB replica set deployment which is also managed by the Ops Manager
  5. Install cert-manager operator which helps manage TLS certificates natively in OpenShift.
  6. Create certificates for each replica of the MongoDB deployment.
  7. Install the created certificates and enable TLS and Authentication on the MongoDB deployment.
  8. Add a MongoDB user for the MongoDB deployment with the operator.
  9. Deploy and connect an example Node.js application to the secured MongoDB database.

Instructions

Find the detailed steps for this pattern in the readme file. The steps will show you how to:

  1. Clone the repo
  2. Install MongoDB Enterprise Advanced Operator
  3. Install MonogDB Resources
  4. Install cert-manager
  5. Generate Certificates and enable TLS
  6. Deploy sample application

Components and services

  • Red Hat OpenShift on IBM Cloud
  • MongoDB and MongoDB Kubernetes Operator

Runtimes

  • javascript/node

Related IBM Developer content

Related links