<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Malchiel Ed Urias</title>
    <description>The latest articles on Forem by Malchiel Ed Urias (@malchielurias).</description>
    <link>https://forem.com/malchielurias</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F997694%2F8d300205-b1ee-4421-bd4f-882bfb49b018.jpeg</url>
      <title>Forem: Malchiel Ed Urias</title>
      <link>https://forem.com/malchielurias</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/malchielurias"/>
    <language>en</language>
    <item>
      <title>Easy Provisioning of Cloud Infrastructure on Azure</title>
      <dc:creator>Malchiel Ed Urias</dc:creator>
      <pubDate>Sun, 12 Mar 2023 20:13:59 +0000</pubDate>
      <link>https://forem.com/malchielurias/easy-provisioning-of-cloud-infrastructure-on-azure-25dm</link>
      <guid>https://forem.com/malchielurias/easy-provisioning-of-cloud-infrastructure-on-azure-25dm</guid>
      <description>&lt;p&gt;As businesses grow and expand and new requirements are realized to meet customers' needs, a quick and reliable means to provision and maintain cloud resources has become crucial. Various cloud providers have developed tools and resources to facilitate infrastructure as code (IAC) to meet this need.&lt;/p&gt;

&lt;p&gt;On AWS, the tool for building cloud infrastructure environments using code and templates is AWS Cloudformation. It is an effective IAC tool however, just as the name implies, it is exclusively compatible with AWS. To perform the same actions on other cloud providers, an engineer would need to pick up the tools made for those providers. Azure Resource Manager (ARM) for Azure and Cloud Deployment Manager (CDM) to name a few. These tools are known as cloud-specific IAC tools.&lt;/p&gt;

&lt;p&gt;In a case where an organization, as a means to get the best parts of all worlds, runs its services and resources across different cloud platforms, these cloud-specific tools become equivalent to bringing a knife to a gunfight. Effective but in the wrong context. &lt;/p&gt;

&lt;p&gt;Cloud-agnostic IAC tools however are built and developed to be effective in whichever cloud provider they are employed. Some of these tools include:&lt;br&gt;
Chef&lt;br&gt;
Pulumi&lt;br&gt;
Ansible, and &lt;br&gt;
Terraform &lt;/p&gt;

&lt;p&gt;In this article, we would look at how we can easily provision Azure cloud resources on one of my favorite IAC tools: &lt;a href="https://www.terraform.io/"&gt;Terraform&lt;/a&gt;. &lt;/p&gt;
&lt;h2&gt;
  
  
  Terraform
&lt;/h2&gt;

&lt;p&gt;Terraform is a cloud-agnostic tool that facilitates infrastructure automation for the provisioning and management of cloud resources and cloud services. &lt;br&gt;
To use Terraform to deploy Azure cloud resources, you have to install the provider for Azure.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;terraform {
  required_providers {
    azurerm = {
      source = "hashicorp/azurerm"
      version = "3.45.0"
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This would install the terraform provider for azure when you run the &lt;code&gt;terraform init&lt;/code&gt; command within your source code directory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connect to your Azure Account
&lt;/h2&gt;

&lt;p&gt;The next step would be to define where you want these resources to be deployed. You have to declare the credentials of your azure account to enable Terraform to connect seamlessly with azure.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;provider "azurerm" {
  # Configuration options
  subscription_id = var.subscription_id
  client_id = var.client_id
  client_secret = var.client_secret
  tenant_id = var.tenant_id
  features {}
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this code, however, another terraform file was created to hold the variables which would then be referenced within the main configuration file (main.tf). It’s best practice in writing terraform configuration files to keep the variables in a separate file to enable a more readable and secure code. &lt;/p&gt;

&lt;h2&gt;
  
  
  Creating Resources
&lt;/h2&gt;

&lt;p&gt;After you have installed the appropriate provider and declared the Azure account where resources should be deployed, the next step would be to begin creating the cloud resources for your infrastructure. &lt;/p&gt;

&lt;p&gt;Using the Terraform resource block, you can create any resource using azurerm (ARM) for Azure cloud.&lt;/p&gt;

&lt;p&gt;When working with Azure, one of the first resources you should create is a Resource Group wherein all other resources for a particular project would be created in. In our code, we would create a resource group called; application_grp, and all other resources would be created within this resource group.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Declaring local variables to be used within main.tf
locals {
  resource_group = "application_grp"
  location = "North Europe"
}


# Create Resource Group
resource "azurerm_resource_group" "application_grp" {
  name     = local.resource_group
  location = local.location
}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, &lt;/p&gt;

&lt;p&gt;We would create a Virtual Network and a Subnet to enable connectivity among the other resources that would be created.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Create a Virtual Network
resource "azurerm_virtual_network" "app_network" {
  name                = "app_network"
  location            = local.location
  resource_group_name = azurerm_resource_group.application_grp.name
  address_space       = ["10.0.0.0/16"]
}


# Creating Subnet
resource "azurerm_subnet" "subnetA" {
  name                 = "subnetA"
  resource_group_name  = local.resource_group
  virtual_network_name = azurerm_virtual_network.app_network.name
  address_prefixes     = ["10.0.1.0/24"]
  depends_on = [
    azurerm_virtual_network.app_network
  ]
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Launch Resources
&lt;/h2&gt;

&lt;p&gt;Now we have completely configured the resources in our terraform script. We must now deploy these resources on our Azure account using this script. &lt;/p&gt;

&lt;p&gt;The first step would be to install the provider using terraform init command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; $ terraform init


Initializing the backend...


Initializing provider plugins...
- Finding hashicorp/azurerm versions matching "3.45.0"...
- Installing hashicorp/azurerm v3.45.0...
- Installed hashicorp/azurerm v3.45.0 (signed by HashiCorp)


Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.


Terraform has been successfully initialized!


You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.


If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After which, we run the &lt;code&gt;$ terraform plan&lt;/code&gt; command which would show us all the resources and changes that would be provisioned on our Azure account. &lt;/p&gt;

&lt;p&gt;And finally, we run &lt;code&gt;$ terraform apply&lt;/code&gt; to deploy to Azure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources on Azure Account
&lt;/h2&gt;

&lt;p&gt;We have now completely provisioned our resources on Azure. And we can see them deployed into the resource group we created.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Infrastructure as Code is a practice that has greatly enabled quick, secure, and reliable resource provisioning in the field of DevOps and Cloud Engineering. The use of cloud-agnostic tools for IAC has created a means for having effective and centralized cloud engineering teams. &lt;br&gt;
In this project, we have used Terraform, an IAC tool, to set up a cloud environment consisting of various resources with a single script. &lt;/p&gt;

&lt;p&gt;The full project can be accessed through this &lt;a href="https://github.com/MalchielUrias/Azure-Windows-Infra"&gt;link&lt;/a&gt;. Feel free to fork the repository and add more resources to build your infrastructure. &lt;/p&gt;

</description>
      <category>iac</category>
      <category>terraform</category>
      <category>azure</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Serverless Computing: The Way to Take Products to Market Quicker</title>
      <dc:creator>Malchiel Ed Urias</dc:creator>
      <pubDate>Sun, 12 Mar 2023 10:34:41 +0000</pubDate>
      <link>https://forem.com/malchielurias/serverless-computing-the-way-to-take-products-to-market-quicker-4aae</link>
      <guid>https://forem.com/malchielurias/serverless-computing-the-way-to-take-products-to-market-quicker-4aae</guid>
      <description>&lt;p&gt;In software engineering, carrying out a personal project could be a relatively straightforward task. You engage your programming skills and your mathematical expertise in building the best product you could come up with to solve the problem at hand. However, when it comes to building a product intended to meet the needs and requirements of customers, a lot more things have to be taken into consideration.&lt;/p&gt;

&lt;p&gt;The infrastructure on which your product is delivered to the customers and how that infrastructure is configured and managed to best suit customer needs becomes very important. Infrastructure here refers to all the software and hardware components needed for the product to run and function properly.&lt;/p&gt;

&lt;p&gt;Now, there are various ways to configure and manage these infrastructures whether manually or automatically using IaC. But most developers want to focus on development and would not want to dabble too much in operations. Serverless Computing is an innovation that was conceptualized to meet this need and various more.&lt;/p&gt;

&lt;p&gt;What exactly is Serverless Computing?&lt;/p&gt;

&lt;p&gt;Serverless computing involves the provision of backend services and the management of these services for users on a pay-per-use basis to allow these users to focus on writing and deploying codes. These backend services include provision and management of servers, database and storage, autoscaling, load-balancing, and many more provided by serverless vendors to customers.&lt;/p&gt;

&lt;p&gt;The thing to note here is that although the work management of infrastructure is taken off the back of the developers, these infrastructures are still very much in use. They are all managed by the vendor.&lt;/p&gt;

&lt;p&gt;What Advantages Does Serverless Computing Offer?&lt;/p&gt;

&lt;p&gt;Serverless computing is a concept that brings a whole new perspective to cloud computing. Traditionally, to build applications, physical servers were a must-have. Then came the era of cloud computing where virtual servers were used, however, these servers were rented and you paid for them as long as they were running whether they were actually in use or not. But with serverless, you pay for only what you use and the job of infrastructure management is done by a vendor you trust.&lt;/p&gt;

&lt;p&gt;A few other advantages of serverless computing include:&lt;/p&gt;

&lt;p&gt;Lower Cost: Serverless computing is known to be very cost-efficient given the fact that you only pay for resources used.&lt;br&gt;
Easily Scalable: There is often no need to put policies in place to scale in or scale out infrastructure to cater to an increase or a decrease in traffic. These are all handled by the vendor.&lt;br&gt;
Simplified Structure of Code: An essential concept associated with serverless computing is Function as a Service and microservice architecture. Serverless computing allows developers to write codes as separate simple functions that usually perform a single job and communicate with each other to form the entire system.&lt;br&gt;
Increases Adaptability: Taking out the operations work gives developers the freedom and flexibility to respond quickly to changing requirements and take ideas to market quicker.&lt;br&gt;
Serverless Computing in AWS&lt;/p&gt;

&lt;p&gt;In cloud computing, there are several providers delivering services to their various clients. Some of the popular cloud providers today include; Google Cloud, Microsoft Azure, Huawei Cloud, and many more.&lt;/p&gt;

&lt;p&gt;Amazon Web Services (AWS) happens to be the most popular cloud provider with over 15 years in the market and more than 200 services, including some very powerful serverless options that AWS often advocates for.&lt;/p&gt;

&lt;p&gt;AWS offers various technologies and services that help users run code, manage and store data, integrate applications, and lots more without configuring and controlling servers.&lt;/p&gt;

&lt;p&gt;In AWS, serverless computing begins with Lambda. Lambda, a Function as a Code technology from AWS.&lt;/p&gt;

&lt;p&gt;Function as a Service is a category of cloud computing technology and service that enables users to run and manage applications as microservice architectures. With FaaS, you execute code in an event-driven fashion. Lambda, AWS’s FaaS technology lets you run code for any application backend without having to provision and maintain servers. It is the foundation of serverless computing on AWS.&lt;/p&gt;

&lt;p&gt;Some other important AWS Serverless Services are:&lt;/p&gt;

&lt;p&gt;AWS Fargate&lt;br&gt;
AWS EventBridge&lt;br&gt;
AWS Step Function&lt;br&gt;
AWS SQS&lt;br&gt;
AWS SNS&lt;br&gt;
AWS API Gateway&lt;br&gt;
AWS AppSync&lt;br&gt;
Amazon S3&lt;br&gt;
Amazon DynamoDB&lt;br&gt;
Amazon RDS Proxy&lt;br&gt;
Amazon Aurora Serverless&lt;/p&gt;

&lt;p&gt;Other Serverless Computing Vendors&lt;/p&gt;

&lt;p&gt;Although serverless computing began with the introduction of AWS Lambda into the market in 2014, serverless computing has grown so much and many other vendors and stepped up with their various offerings. Some other giants in the serverless computing world include Microsoft, which introduced Azure Functions in 2016, and Google Cloud Functions which was introduced in 2018.&lt;/p&gt;

&lt;p&gt;These different vendors each have their different areas of strength and drawbacks in the way they function and the things they can do. It is therefore good practice for a team to carry out its research to determine what vendor would be best for their product.&lt;/p&gt;

&lt;p&gt;Infrastructure as Code and Serverless Computing&lt;/p&gt;

&lt;p&gt;In building serverless applications, the use of IaC can help to increase the speed and ease of development, testing, and deployment of the application. Depending on the cloud provider used, different tools are made available for this purpose. Some of the common IaC tools for serverless computing include:&lt;/p&gt;

&lt;p&gt;Serverless Application Model: The Serverless Application Model or SAM, as it is often called, is an offering from AWS which helps to simplify serverless deployments. It is an abstraction from AWS Cloudformation (Another AWS service that allows for the creation, provisioning, and management of related AWS and third-party resources) which is specifically for serverless resources.&lt;br&gt;
Serverless Framework: In a case where you use a different cloud provider from AWS or you work with multiple cloud providers, Serverless Framework is the tool for you. It serves as an open-source version of SAM that can be used across any cloud provider including AWS.&lt;br&gt;
AWS Cloud Development Kit (CDK): This innovation from AWS is a Software Development Kit that enables developers to define their cloud application resources using familiar programming languages. In other words, instead of learning an entirely new syntax, developers can use programming languages they are familiar with such as Python, Typescript, Java, etc. to define their cloud infrastructure. It works for both serverless applications and otherwise.&lt;br&gt;
Serverless Stack: SST is an open-source framework that makes it easy to build serverless applications and deploy them in your AWS environment. It is an extension of AWS CDK.&lt;br&gt;
Conclusion&lt;/p&gt;

&lt;p&gt;Ideas are the seeds for innovation and solutions. Getting an idea, in form of a product, in front of those who have the problem that the product is meant to solve should not be a process with a lot of hindrances. And it goes to show how much this is understood when solutions are put forth to encourage the development of products quickly and easily to solve customers’ problems.&lt;/p&gt;

&lt;p&gt;Serverless computing, cloud computing, and DevOps practices are helping developers to get their products in front of customers quicker and quicker. The quick adoption of these processes would affect the entire progress of businesses in the long run as customers would always get behind the product that meets their needs faster and better.&lt;/p&gt;

</description>
      <category>severlesscomputing</category>
      <category>cloud</category>
      <category>aws</category>
    </item>
    <item>
      <title>The Beauty of Infrastructure as Code (IaC) and Why You Should Be Using it</title>
      <dc:creator>Malchiel Ed Urias</dc:creator>
      <pubDate>Sun, 12 Mar 2023 10:05:47 +0000</pubDate>
      <link>https://forem.com/malchielurias/the-beauty-of-infrastructure-as-code-iac-and-why-you-should-be-using-it-3dhm</link>
      <guid>https://forem.com/malchielurias/the-beauty-of-infrastructure-as-code-iac-and-why-you-should-be-using-it-3dhm</guid>
      <description>&lt;p&gt;If you are a new entrant into the world of Cloud computing and DevOps and you are looking to know more about technologies to make your life and work a lot easier while still being efficient, then you just might have stumbled upon a very useful article.&lt;/p&gt;

&lt;p&gt;I come from a CyberSecurity background and my exploration into the world of DevOps and cloud computing is a relatively new one so that would explain why Infrastructure as Code is a concept that I got excited about. Before my discovery I was quite comfortable manually spinning up instances and configuring VPCs manually, it was what I knew.&lt;/p&gt;

&lt;p&gt;I have learned through this as well as many other experiences, that when developing yourself in tech, as much as it might be important to pick up various skills, one thing you shouldn’t forget to consider is how these skills would be applied in organizations that run large-scale projects and products. Usually, we pick up skills that could only be applied in smaller products, it is for this reason that I probably didn’t have a lot of extensive knowledge on Infrastructure as Code before now.&lt;/p&gt;

&lt;p&gt;Now, what exactly is Infrastructure as Code?&lt;/p&gt;

&lt;p&gt;Imagine, you would like to provision the IT infrastructure (servers, networks, etc.) for a product, you could simply just open up your AWS console (or that of your preferred cloud provider) and spin up a few EC2 instances (or virtual machines as the case may be) and begin from there, right? Right. Now imagine if this was a larger product with many more servers and possibly in separate environments and you would need to configure and set up these various services in different environments. Now a task that seemed straightforward at first now suddenly has many more complexities. Going ahead to provision manually would most definitely lead you into a lot of issues that may arise either immediately or later down the line.&lt;/p&gt;

&lt;p&gt;These issues led to the introduction of Infrastructure as Code. IaC is the process of provisioning and managing IT infrastructure through the use of codes in the form of configuration specification files rather than manually configuring the infrastructure. It is simply the automation of manual configuration of Infrastructure. IaC provides a means to provision exactly the same configuration each time, thereby, reducing the risks of environmental drift and human errors.&lt;/p&gt;

&lt;p&gt;How Does IaC Work&lt;/p&gt;

&lt;p&gt;Now, some would think that IaC would simply be about putting a bunch of configuration code together and stuffing it away in some repository and the job is done but having a good knowledge of how IaC works and how different IaC tools function can come in very handy to your work. There are different styles in the way different IaC tools work and knowing the difference between declarative and imperative infrastructure as code can actually mean the difference between a happy DevOps engineer and a miserable one.&lt;/p&gt;

&lt;p&gt;Going from our knowledge of different programming language paradigms, we can easily deduce what each of these IaC styles mean:&lt;/p&gt;

&lt;p&gt;Declarative Infrastructure as Code: Declarative infrastructure as code involves declaring the desired outcome or result of a job instead of explicitly stating the steps to arrive at that result.&lt;/p&gt;

&lt;p&gt;Imperative Infrastructure as Code: This on the other hand would involve specifying the steps and instructions to follow to arrive at the final result. This is very much the same when it comes to infrastructure as code.&lt;/p&gt;

&lt;p&gt;The issue with imperative IaC however, is that if an issue that was not specified in the code occurs, it would lead to a crash because the program would have no idea what to do next.&lt;/p&gt;

&lt;p&gt;The tools for IaC are of course categorized into two sections:&lt;/p&gt;

&lt;p&gt;● Imperative Tools&lt;/p&gt;

&lt;p&gt;● Declarative Tools&lt;/p&gt;

&lt;p&gt;Imperative IaC Tools&lt;/p&gt;

&lt;p&gt;These tools define the sequence of steps to set up infrastructure and enable it to reach the required state. System engineers have to write scripts to provision the infrastructure sequentially.&lt;/p&gt;

&lt;p&gt;Compared to Declarative IaC tools, these tools are more tedious to use and less resistant to failures and errors. More effort would be required to keep these scripts up to date and reuse is usually more difficult.&lt;/p&gt;

&lt;p&gt;Declarative IaC Tools&lt;/p&gt;

&lt;p&gt;Declarative IaC tools, following the declarative approach, describe the desired outcome of the infrastructure without listing the sequential steps of arriving at that state. The IaC tools take in the requirements and automatically configure the necessary infrastructure.&lt;/p&gt;

&lt;p&gt;Which to Use&lt;/p&gt;

&lt;p&gt;Like many other things in the world of tech, there is no exact right or wrong one to use. It would usually depend on the situation. In a case where you would just need to configure a relatively small infrastructure that may not necessarily need any future updates, a simple imperative script is the way to go. However, if you need to build a more sophisticated infrastructure, you should use a declarative programming tool.&lt;/p&gt;

&lt;p&gt;Some Popular IaC Tools&lt;/p&gt;

&lt;p&gt;● Terraform&lt;/p&gt;

&lt;p&gt;● Pulumi&lt;/p&gt;

&lt;p&gt;● Puppet&lt;/p&gt;

&lt;p&gt;● Ansible&lt;/p&gt;

&lt;p&gt;● Chef&lt;/p&gt;

&lt;p&gt;● SaltStack, and of course&lt;/p&gt;

&lt;p&gt;● AWS Cloud Development Kit (CDK) which works with AWS Cloudformation&lt;/p&gt;

&lt;p&gt;Benefits of IaC&lt;/p&gt;

&lt;p&gt;Knowing the many problems that are related to manual infrastructure management, it is very obvious how much of a relief IaC can be but let’s explicitly look at some notable benefits of using IaC.&lt;/p&gt;

&lt;p&gt;Some of these notable benefits of using IaC in setting up and maintaining your infrastructure would include:&lt;/p&gt;

&lt;p&gt;● Speed: This is a major benefit that IaC provides. Engineers are now able to set up and manage complete infrastructures within minutes whereas it would have taken hours or even days to do had they used a manual approach&lt;/p&gt;

&lt;p&gt;● Lower Cost: The use of IaC and Cloud Computing has benefitted numerous companies financially as the need to set up physical data centers, hire many engineers for operations, and purchase hardware is now unnecessary. Using services from your cloud providers and hiring a few engineers to run these reduce the cost of operations drastically.&lt;/p&gt;

&lt;p&gt;● Efficiency: The use of codes instead of manual setups reduce the risk of human errors in infrastructure management. The same environment can be created exactly the same way through code but if done manually by a human, mistakes would almost be inevitable.&lt;/p&gt;

&lt;p&gt;● Consistency: Manual processes are a recipe for mistakes. This is why the DevOps methodology advocates for automating everything. IaC eradicated the need for manual configuration almost completely. It guarantees that the same configuration is implemented in every case exactly the same way.&lt;/p&gt;

&lt;p&gt;Conclusion&lt;/p&gt;

&lt;p&gt;IaC has indeed revolutionized the way we think of infrastructure management, particularly cloud infrastructure. It has made tasks a lot easier and although it seems like just another non-mandatory trend, it is far from optional. IaC is fast becoming a necessity in businesses. The speed it provides to infrastructure management is a major fact in change management and organizations that embrace this would harness the ability to quickly adapt to changing business needs and requirements and those who don’t, well, they would eventually have to.&lt;/p&gt;

&lt;p&gt;Remember, you snooze, you lose. Stay competitive.&lt;/p&gt;

</description>
      <category>iac</category>
      <category>aws</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
