Giter Site home page Giter Site logo

what-is-infrastructure's Introduction

What is Infrastructure

IT infrastructure is a set of componenents that together serve to deliver services and computing resources. Among these components are included software, hardware, network, data storage and others.

Nowadays, exists many types of infra. Tha main ones are the traditional and those that use cloud computing.

  • Traditional: All components are managed by the company itself in datacenters that are located in their facilities.
  • Cloud: Cloud computing is provide the resources across the internet, managed by softwares that delivers machines, storage, network and so on. Has been more common the use of public Cloud as AWS, Azure, GCP and many others, but you can also build your own cloud environment with Open-source project as OpenStack

Understanding infrastructure and virtualization

Motivations

In the past, is easy to see physical servers with individual tasks, individual purposes, individual operating systems. In a first moment, that seems good, because we separate equally what which server will run, but this wastes a lot of computing resources that will end up being unused. That way, rises a technology to virtualize that resources which we call virtualization.

How does it work?

The softwares called Hypervisors are the responsibles for create and execute Virtual Machines. It virtualize the resources as CPU and RAM and manage them between host machine (physical machine) and guest machine (VM).

Exists two main types of hypervisors, type 1 and type 2.
  • The type 1 is commonly called as Baremetal, its runs directly on host hardware to manage the guests OS. It plays the role of an operational system. Some examples of this hypervisor is KVM (Kernel-based Virtual Machine) and VMWare V-Sphere.
  • The type 2 is called as Hosted. It works as an application above the conventional OS and its the most commom hypervisor for those who want to run and test other operational system on top of existing ones.

Virtual Machine x Container

Some text here (again)

Infrastructure as Code

Terraform

What is it?

Basically, HashiCorp Terraform is a IaC tool that allows you to define cloud and on-prem resources in human-readable configuration files (.yaml / .hcl), this type of format facilitates versioning, encapsulation and also manage low-level components like compute, storage and networking resources, as well as high-level components like DNS entries and SaaS features.

How does Terraform work?

So, HC Terraform manage cloud plataforms and the other services through their API, it needs the API to be accessible and there to be a provider for the VPC (virtual private cloud). Currently (January 22, 2024), there are 3870 providers that can be found in the terraform registry, some examples are AWS, OpenStack, Hetzner...

Terraform has a core workflow which consists of three stages:

Write, Plan and Apply

  • Write (Refresh) At the beginning you define the desired infrastructure provider in a configuration file main.tf, In this file you also define resources, such as instances, networks or databases.

  • Plan and Init Review the changes and make sure it will work well when booting.

  • Apply Terraform provisions the infrastructure and updates the state file.

  • Destroy :)

Setup environment (Ubuntu/Debian)

wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install terraform

Getting your hands dirty

Some practice here with terraform, ansible and docker

terraform init

Referencies

what-is-infrastructure's People

Contributors

alcantarajulio avatar winiciusallan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

alcantarajulio

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.