Introduction
The trend of the world economy transitioning to the vast web 3.0 space is gaining momentum every day. Metaverses, NFT tokens, virtual reality headsets, neural interfaces, etc. will allow us to create new, previously unprecedented ways of interaction between people and to provide new business services. In Web 3.0, there is now and is constantly growing a huge variety of projects, many of which are based on blockchain technology. It is quite difficult to understand such a variety of project, since, first of all, you need to know what role a particular project plays. For example, when planning to interact with blockchain networks, each specific user must clearly understand the goals of his participation in the blockchain, as well as what proposals the infrastructure of various blockchains forms in the field of Web 3.0. Analyzing the differences between the Internet infrastructure of previous generations and web3 infrastructure, we can safely say that the latter is significantly different from its predecessors. It forms a new level called “decentralization”, this level was starting from centralized asset management tools and now continues its movement forward.
Definition of IaC
In order to understand what web 3.0 infrastructure is, let’s imagine an IT company that develops and supports its product. As part of creating a product, developers write code, and after launching that code, the user gets a working application. The product runs on a platform provided by some provider, and this platform can be either a data center or a cloud. Thus, two levels of the system are formed: the upper level is the running application and the lower level is the platform. However, the system requires additional tools that need to be launched, deployed or configured for the application to fully work. All these additional tools together constitute the infrastructure.
In the context of Web 3.0 technology, when infrastructure for applications is mentioned, we are increasingly talking not just about infrastructure itself, but about infrastructure as code (IaC). The formation of an IaC is very similar to the formation of web applications and involves writing a certain scenario, when it launched, the user receives the infrastructure he needs. Knowing that the platform on which the application runs is a virtual machine rented from a provider, it is logical to assume that part of the responsibility for the operation of the infrastructure lies with the provider. On the other hand, there are different tools that can be deployed directly in a company. In such cases, part of the IaC is transferred to these tools. For example, when using Docker, the logic for setting up application folders can be described in Docker files, and part of the environment deployment logic can be described in the CICD pseudo-language.
IAC methodology and tools
We can note that the DevOps philosophy correlates very well with the IaC theme. DevOps approaches today are not something completely new, since for several years now more and more companies have been working on this topic, combining the activities of system administrators, developers and partly testers. In this regard, IaC is one of the areas of activity of DevOps teams. It was said above that when creating an IaC, it becomes possible to work with code deployment in the same way as DevOps do it when working with applications. This approach provides enormous savings of time and resources, making it possible to bring the entire network, including distributed ones, to some unified standard.
The IaC technique can be divided into two approaches – push and pull. In the first option (push), there is a master who “pushes” his code to his subordinate nodes. In the second option (pull), there are nodes that, according to a certain schedule, “pull” the code from the master. The choice of technique depends on the task at hand, but practice shows that push is most often used. When using this option, it is assumed that there is good communication between the master and his subordinate nodes, and the nodes themselves are always online. The pull option is most suitable for a distributed environment and it is not known for sure whether the desired node will be connected at any particular point in time. In addition, using pull it is convenient to put servers in order in accordance with a schedule convenient for them.
There are several tools that make it possible to manage IAC, the most used are PUPPET (for pull), ANSIBLE (for push), CHEF (for pull), SALTSTACK (for push). As they develop, PUPPET and ANSIBLE, offer management of both the first and second IaC techniques, but this approach still requires significant improvements. The most popular and convenient tool is PUPPET, but it is quite difficult to create it, even with its detailed documentation. The reason is that PUPPET has a large number of components that need to be installed and connected correctly. Additionally, PUPPET has a large client side that weighs 40 megabytes, and PUPPET synchronization uses a significant amount of traffic. However, for the pull option, PUPPET is the optimal tool, as it is very convenient and highly customizable. Unlike PUPPET, ANSIBLE is written in Python and is much easier to configure. ANSIBLE has its own management features, since it should only be run in prepared environments. CHEF and SALTSTACK are similar to PUPPET and ANSIBLE.