DEV Community

Cover image for Cloud Without VM | Is it possible?
ANISH ARAZ
ANISH ARAZ

Posted on • Edited on

2 1 1 1 1

Cloud Without VM | Is it possible?

What is cloud & cloud computing?

Cloud is a platform where we rent and use infrastructure. Eg. google cloud, aws cloud and more. Infrastructure can be compute, storage, clusters, and much more.
Cloud computing is a practice of making the resources available all the time, with flexibility, redundancy, and pay-per-use.

What are VMs?

VMs are the technology that allows us to divide one physical machine into smaller, isolated virtual machines on the same physical machine and use them independently.It is used because setting up a whole computer is very costly compared to creating a VM. And it gives us the flexibility on dividing the resources for the VMs, e.g., RAM & storage.

If not VMs, then what else to use?

Ans: Use Containers

containers

Containers are another technology that allows us to isolate an application and resources required by it at the kernel level. It is the feature of Linux. It uses CGROUP & NAMESPACES of Linux to create an isolated environment for the application.

Why containers?

  • Faster
  • Resource efficient

What is the problem then?

Containers run a single process inside it. That single process can spin up its child process. The control of processes inside the container is handled by the application that is used in the container.For example, the MySQL container has the main process of MySQL, and it manages all the child processes that it creates.
Unlike Linux systems, where init is the main process that creates all other processes, there is nothing as such in containers. And that is perfect because containers are made for single applications and their isolation. But we need something like initd for containers that can manage the process inside them; then it can start to behave like a VM.

supervisor

It is a process control system similar to initd in Linux. I tried using it as the main process in the container, which would further allow us to run and manage other child processes.

I tried using this to build a container image that can behave like a VM.
here is the Dockerfile

FROM ubuntu:25.04
RUN apt update && apt install -y supervisor
ENTRYPOINT [ "/usr/bin/supervisord", "-n" ]
Enter fullscreen mode Exit fullscreen mode

It is written in Python and sometimes gets unstable at handling its job.

This is where I started to build a cloud that actually uses container technology as the main compute infrastructure in the cloud, replacing the VM technology.

overview

It is not live yet, but it is open source. You may come along to build it or just give a star to the repo at best.This project is built with an aim to replace VMs with containers in a cloud environment. Instead of provisioning a compute instance using VMs, this proof of concept uses container technology for compute instances. Additionally, the project focuses on delivering a user-friendly and intuitive experience for its users.

Architecture of the system

Untitled-2024-06-23-1246

Architecture of SSH proxy

ssh_proxy

Github Repo

Warning

Full Documentation of this project is under development.

CaaS (Container As A Service)

This project is build with an aim to replace VMs with containers in a cloud environment. Instead of provisioning a compute instance using VMs, this proof-of-concept uses container technology for compute instance. Additionally, the project focuses on delivering a user-friendly and intuitive experience for its users.

Technologies Used

  • Python
  • Ansible
  • FastAPI
  • Nextjs
  • Shad-cn UI & Tailwind CSS
  • Websockets
  • Nginx
  • Docker
  • SSH Tunnels

Architecture of the system

Untitled-2024-06-23-1246

Architecture of SSH proxy

ssh_proxy






X Profile Github Profile

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (1)

Collapse
 
piyushxcoder profile image
Piyush Raj

Will be trying this evening

The best way to debug slow web pages cover image

The best way to debug slow web pages

Tools like Page Speed Insights and Google Lighthouse are great for providing advice for front end performance issues. But what these tools can’t do, is evaluate performance across your entire stack of distributed services and applications.

Watch video

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay