DEV Community

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

Posted on

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

Top comments (0)