Skip to main content

Posts

Showing posts from 2021

Getting started with AWS

 We will learn how to setup AWS account, how to access AWS resources using AWS CLI, how to leverage VS Code to view AWS resources.  AWS documentation links for getting started guides : https://aws.amazon.com/getting-started/?e=gs2020&p=console/#Get_to_Know_the_AWS_Cloud https://aws.amazon.com/getting-started/guides/setup-cdk/ https://aws.amazon.com/getting-started/?e=gs2020&p=console/#Launch_Your_First_Application Setting up AWS account : 1. Create Amazon Free Tier account :  https://portal.aws.amazon.com/billing/signup?refid=ps_a131l0000085ejvqam&trkcampaign=acq_paid_search_brand&redirect_url=https%3A%2F%2Faws.amazon.com%2Fregistration-confirmation#/start - Provide your details (email, username, billing information, and make sure you select basicsupport-free option). - Upon successful signup, we will be seeing a confirmation like this: 2. Signin as root user : provide your login information (email, password) and we will be able to see our aws dashboard....

Must use VS Code Extensions for anyone working on Cloud

Here are the list of VS Code extensions that anyone working on cloud technologies can use to speed up their development.  To download any extension, refer to the extension tab on your VS code window: As we will manage all our cloud resources using Terraform, we will start with Terraform Autocomplete Extension.  1. Terraform Extensions Terraform: to manage terraform resources directly from VS Code.  Terraform Autocomplete : useful when we are creating terraform resources. 2. Docker : To build, manage and deploy docker containers from VS Code. 3. Python : extension that provides python interpreter 4. Prettier-Code formatter : 5. Markdown Preview :  6. Git :   Git History : Git Graph : Now we can select the below extensions, and click on install.  AWS VSCode Extensions: 1. AWS Toolkit : To interact with AWS resources directly from VS Code. Helpful in taking a look of AWS resources without having to login into console, provides us with a very cool UI to g...

Terraform lifecycle

 If we are using terraform, terraform state file is the heart of all the infrastructure that we spin up using terraform templates.  There are several ways to deploy the infrastructure using terraform: 1. Using CLI (setup terraform and then run terraform commands) 2. Automated Build (terraform scripts integrated as part of your jenkins pipeline) No matter of the way we chose, we must make sure that we are using the same terraform state file, so that we are having a sync and proper checklists of the resources that we used.  I would like to share the terraform commands that we do on a daily basis: terraform init = the basic/starting command which initializes the terraform (make sure the proper provider is provided. In my case, I use AWS).  terraform workspace select <workspace name > (creates a new workspace, useful in scenarios where we have different terraform modules - database, servers, logs, storage) terraform state list = shows the list of terraform resour...

Enterprise Patterns in Terraform

What are Modules?  - self contained pieces of IAC that abstract the infrastructure deployments  - use clear organization and DRY (Dont Repeat Yourself)  - helps in writing composable, shareable and reusable infrastructures   Scope the requirements into appropriate modules : - When building a module, consider 3 areas:   1. Encapsulation - Group infrastructure that is always deployed together   2. Privileges - Restrict modules to privilege boundaries   3. Voltatility - Separate long lived infrastructure from short-lived (Ex: Database-static vs Application Servers-dynamic)  Create the module MVP : * Always aim to deliver a module that works for 80% of usecases  * Never code for edge cases. A module should be a reusable block of code.  * Avoid conditional expressions in MVP  * Module should only expose the most commonly modified arguments as variables.   Scoping Example - A team wants to provision thei...