Build a data center at home with Proxmox
In this article we will see why it is valuable to set up a physical server at home, we will also have a look at some fundamentals of computer architecture such as hard disk distribution methods along with file reading protocols.
Note : we won’t see how to install proxmox on your computer I will add a link to some more detailed tutorials on how to do it. For my case I followed a tutorial to install Proxmox on an old and low potential computer and connected to it through an ssh protocol.
What is a data center ?
A data center is basically a room, where are stored loads of servers, organised by racks, each of these servers have many virtual machines that receive and answer to request daily.
Nodes :
Each rack in the data center contains a physical computer without a screen called a server. Each node has its own hard disk. Not all nodes are connected to the internet, the ones that are connected are called the head nodes (there are usually 1 or 2 in each cluster)
Within a node we have the following layers :
- Hard disk : is not shared with the other nodes and can be splitted into a maximum of 4 parts
- Virtualization environment : to supervise the virtual machines, in case of containers (docker) it can have the linux kernel.
- Virtual machines : you can see them as abstract computer with their own OS within another computer.
Clusters :
Here is the organisation of a cluster :
It has 3 important parts :
- Storage unity : even though nodes have their own hard disk the storage unity is shared between all the nodes and contains all the files. Since all the storage is shared it doesn’t mather in which node the calculations are done, they all access the same ressources.
- Nodes unity : with a head node connected to the internet and the other nodes connected to it.
- Scheduler : If many calculations are done on the same node it may crash, they need to be scheduled to avoid an overload or a complete discharge of a server. That’s the function of a Dynamic Resource Manager.
What is Proxmox :
proxmox is a virtualization environment, it is like the super computer that controls all the computers in the data center, it manages all the nodes and some parameters surrounding them.
The aim for a company to have its own data center is to have the complete control over its servers, instead of letting them in the hands of providers such as OVH. Here are some of the interesting parameters to set :
- Firewall : it’s the armor of your company’s server, it has specifications about who can access the ports and who can’t. For example you can only allow people coming from a specific geographical area to access your server
- Proxy : The proxy delivers messages (errors/ recommendations) to a client sending a request to the server, while the firewall only accepts or rejects it. The proxy can also save some data in the cache to speed up request management.
- Storage : The storage can either be local within hard disks in the data center or through a network. File treatment protocols are here to help us achieving that, here are some of them (ZFS : for local storage, NFS: for network storage )
Ways to setup proxmox :
- You can either set up proxmox from a bootable usb key in a computer that you dont usually use, you can find a video explaining the procedure here.
- Or use a virtal machine to install proxmox in, this method may include some errors while using windows, you can find a tutorial for that here.
Apply proxmox in a physical machine :
Here the set up for my tiny datacenter :
1- The router : it provides internet connexion to the head node through the white LAN cable.
Note : it is possible to use a switch to have multiple head nodes
2- The black computer : it is basically an old computer that I no longer use. I installed proxmox in it with a bootable USB key and it became a server. Since I only have one physical computer I only have one node and it is a head node (connected to the router). In the screen we can see the following lines :
We can see on the top the following address : 192.168.100.11 it is the address to access the server (current computer) through an https protocol from another computer using the same wifi.
If we had many other nodes /physical server/ old not used computers, they would have had the following addresses : 192.168.100.12 and 192.168.100.13 ..
3- White computer : It is here to connect to the black computer using an SSH or an https protocol. When we visit the address of the server (first line in the Black computer) we have the following page :
On the top at right we have Data center that contains one node called pve (we set the name while installing proxmox with a USB key). We then can access many parameters of the data center such as :
- permissions : which user can do what action
- firewall
- storage : local or network shared, we can personalize it
- Snapshots : When working on upgrades we usually save an image of the work as it is, which is called snapshot, in case we do something wrong. Its like a save point in video games.
We can then go on and creat a Virtual machine within our node :
we can have a CentOs :
Or an old but gold Windows XP :
We can also create a container, like the one that we see in docker. we Start by downloading an image and we can create as many containers as we want. All of them are using the same proxmox linux Kernel.
Here is a container from a CentOs image, we can only access the terminal.
Conclusion :
As a conclusion I would like to say that Proxmox is a tool that needs to be studied in order to understand the need for companies to have their own data centers or to have labs at home to simulate a company’s data center.