Rocket Chat on kubernets

Poonam Garg
Rocket Chat Img

Introduction

Deployment-Works-with-Kubernetes-and-Docker

Want to know how you can build slacks such as online chat with rocket chat for deployment over containers via Kubernetes and Docker? Simply read through and know everything about it.

Before getting started, you should know a bit about the premise. The blog is assuming a situation where rocket chat app is used on the OpenStack for on-premise deployment. Therefore, the existing on-premise cloud framework is migrated to the containers based on Kubernetes and docker.

Docker can be summed as an open platform for sysadmins and developers for building, shipping, and running distributed apps on data center VMs, cloud, or laptops.

Similarly, Kubernetes is deemed to be the container infrastructure layer on the top of the container engine/runtime for deploying and managing containers efficiently.

What Do You Need for Deploying Rocket Chat on Kubernetes?

The deployment process requires:

  • Kubectl
  • Kubernetes
  • Shared Storage like Ceph FS, GlusterFS, AzureDisk AWS EBS, etc.
  • Dockerfile
  • Rocket Chat App
  • Container-Registry

You can use Kubernetes to deploy, scale, and manage the arrangement of the containerized apps. Kubernetes cluster can be used for testing while minikube can also be used.

In case of shared storage, the blog uses GlusterFS, an efficient network data system.

You can call Rocket.Chat a web-focused chat serve, written in the JavaScript with the stack framework of Meteor.

Also, Dockerfile can be summed up as a text file containing every command/information needed for the app configuration within the container.

Registry is deemed to be a digital storage for the container images that also allows the distribution of the images.

Kubectl is one of the best command line tools used for remotely managing Kubernetes cluster.

In vase you utilize MongoDB and Rocket Chat, then steps 1-6 can be skipped.

Easy Steps to Deploy Rocket Chat on the Kubernetes

1. Creating a custom image for the Rocket Chat’s container

First, you need to make a file named Dockerfile as the image for Rocket Chat container.

Rocket-Chats-containerOur app would be based on the NodeJS, therefore, we are using NodeJS docker’s image from the docker hub as the base image. Afterwards, we use codes for the container and install every dependency of app to the container.

2. Building image for rocket chat docker

rocket-chat-docker

3. Creating image for MongoDB Container

Prepare a new folder by the name of MongoDB.

Creating-image-for-MongoDB-Container

Our image contains Ubuntu as base image for using the official MongoDB’s docker image. Due to compatibility purposes, the dockerfile is created for the 3.0 version of MongoDB.

Now, we mount the volume named /data/db for the container’s persistent storage.

After that, the 27017 port is exposed for the incoming MongoDB server requests.

Now, the server is started in the dforeground mode for seeing the logs within the container stdout.

4. Creating image for MongoDB Docker

Creating image for MongoDB Docker

5. Add a container registry to the docker daemon

In case the users are not utilizing docker hub for storing images, then you must add a container registry with local Kubernetes nodes and docker daemon.

Numerous ways can be availed for doing so like:

Add-a-container-registry-to-the-docker-daemon

For verifying the container registry’s addition to the local docker, you have to use the given steps:

$ docker info

Now you will get registries like:

Insecure Registries:

<your container registry name>

127.0.0.0/8

6. Shifting PostgreSQL image to the container registry

Now you have to upload the image to any container registry such as:

  • Google Container Registry
  • AWS ECR
  • Private Docker Hub
  • Docker Store

In case the authentication is enable, you have to first login and only then download or upload images from the registry.

For logging in, follow the given command:

$ docker login <name of your container registry>

Username : xxxx

Password: xxxxx

If there is AWS EXR, then you’ll receive username, password, and registry url from the respective cloud provider launched at the registry.

Here’s the shell script to add the aws credentials:

script-to-add-the-aws-credentials

Now tag the images and move them to anywhere on the posted registry.

For tagging the images:

For tagging the images

For pushing the images:

For pushing the images

7. Creating Stroage Volume with GluterFS

First you have to make volume within the GluterFS. Add DNS or IP address in place of node2 and node1 as mentioned in the GluterFS installation guide.

Creating-Stroage-Volume-with-GluterFS

8. Deploying MongoDB over Kubernetes

You need:

Docker Image created in the 4th step where it was moved to docker registry or docker hub.

Persistent Shared Volume created in the 6th step of GluterFS.

Service and Deployment Files will be created now.

Deploying-MongoDB-over-Kubernetes

9. Deploying Rocket Chat

You need: 

Docker Image for the rocket chat created in the 2nd step.

Now we will male Service and Deployment files.

Make a file for deployment by the name of rocketchat.deployment.yml.

rocket-chat-docker

10. Testing the Database of MongoDB

Testing the Database of MongoDB

11.Testing the Rocket Chat App

Launch the Cluster IP with the 3000 port on your web browser for checking whether the app’s functioning or not.

12.Fixing Rocket Chat App Container

Overview the logs of MongoDB pods and rocket chat app.

Check service/pods/containers NameSpace of RocketChat and MongoDB.

Try connecting MongoDB from the local client of Mongo with the clustered IP address.

Overview the network connectivity from the rocket chat to the mongodo pods.

Frequently Asked Questions

Our testing processes place a high priority on data security. To ensure the security of sensitive information, we adhere to a number of protocols, including the anonymization, encryption, and control of access to data. During testing, we use secure environments and data that mimic real-world scenarios without exposing sensitive information. We adhere to best practices for data protection and comply with industry standards and regulations including GDPR and HIPAA. As part of our security testing process, we employ a variety of tools and methodologies to identify and rectify security vulnerabilities.

To ensure the quality and reliability of your software solutions, we employ a comprehensive range of testing methodologies and cutting-edge tools. Our testing approach includes:

  • Manual Testing: We use structured test cases to identify usability, functionality, and design issues.
  • Automated Testing: Automated testing streamlines processes, improves efficiency, and ensures consistency.
  • Unit Testing: JUnit, NUnit, and PyUnit are unit testing frameworks we use to validate the functionality of code units.
  • Integration Testing: We verify the seamless interaction of various system components using tools such as Selenium, Appium, and Postman.
  • Performance Testing: To assess system responsiveness and scalability, we employ tools like JMeter, LoadRunner, and Gatling.
  • Security Testing: Our security testing includes vulnerability assessments and penetration testing using tools like OWASP ZAP and Nessus.
  • User Acceptance Testing (UAT): We collaborate closely with your team to ensure that the software aligns with your end-users’ expectations.

You can count on us to improve the visibility of your website on search engines by using our SEO services. On-page and technical SEO best practices are implemented by our team, content is optimized, and search engine optimization strategies are provided to improve the search engine rankings of your website.

We adhere rigorously to project timelines and deadlines at our software development company. To ensure on-time delivery, we use meticulous project management, agile methodologies, and clear communication. Depending on the scope, complexity, and your specific requirements, we conduct a comprehensive analysis and planning phase. Our project managers then track progress continuously using agile frameworks. We maintain regular status updates and transparent communication channels. Whenever changes need to be made, we let you know promptly while keeping you updated.

We specialize in a wide range of technologies and programming languages, including but not limited to Blockchain, .Net, JavaScript, C#, Ruby, PHP, Wordpress. Our expertise covers web development frameworks like React, Angular, and Vue.js, as well as mobile app development for React Native, Flutter, iOS and Android. We also have experience with cloud platforms such as AWS, Azure, and Google Cloud, and are proficient in database systems like MySQL, PostgreSQL, MongoDB, and more. Additionally, we are well-versed in DevOps tools and practices to ensure seamless deployment and ongoing maintenance of the software we develop.

Our company offers a wide range of development services, including:

  • Web Development: We specialize in creating custom websites, web applications, e-commerce platforms, and content management systems.
  • Mobile App Development: We develop mobile apps for iOS and Android platforms, from concept to deployment.
  • Software Development: Our software development services cover desktop applications, business software, and cloud-based solutions.
  • Blockchain Development: We have expertise in blockchain technology, including smart contract development and decentralized application (DApp) creation.
  • IoT Development: Our Internet of Things (IoT) development services encompass connecting physical devices to the digital world.

Poonam Garg
Article written by

Poonam Garg

REVINFOTECH INC is a global services provider delivering Technology-driven business solutions company that meet the strategic objectives of our clients. improvise end-to-end business solutions that leverage technology. We provide solutions for a dyna... read more

Do you have an exciting mobile app idea in mind?

We can help you to build a mobile app on an affordable budget. Contact us!






    What is 2 + 4 ? math-captcha

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.