Skip to main content

Posts

Showing posts with the label devops

Building a Dev Enviroment in Terraform in AWS (From More than Certified)

Want to see a better formatted version of this post? Check my Notion !   Created development environment using AWS and Terraform including a route table, internet gateway, security group, public subnet, and EC2 instance, using templates, provisioners, and key generation for remote access. NEW Concepts Learned aws_ami  A data segment instead of resource that pulls an owner number, filters by name (with  Userdata Made it a template file, it bootstaps the instance as well as installing the docker engine. AMI searcher in EC2 Console Going to search the AMI in the Instance Launcher, then returning to EC2 console to search it for the owner number and other info. ssh-keygen I used PuTTy for previous keys. Terraform’s homemade File function For relative file paths for shorter access The .tpl extension Makes templates that map to certain sections of the main code. Usually using ${ } , but that’s also very module-esque, I feel. Call it with templatefile() Provisioners I think it’s u

Building AWS Infrastructure with Python (+ Learning the Code)

Follow along with more DevOps stuff! It's not only CloudFormation and YAML we can use to build infrastructure in AWS - The ever-popular Python is here. I like how the docs say it should take around 6 minutes, and I'm here on maybe...minute 34 waiting for packages to finish installing. I'm sure it doesn't account for setup, but for a while, I was concerned I had misconfigured something. No, there are just a ton of packages to download.   Node.js had to not only open Powershell, but update my chocolatey and some VS Code components. Importing Python packages happens in consoles/terminals . You have to import them each session.  So, I open a terminal in VS Code to install this Pipenv Virtual Environment Package in theory. The hardest part is always installing Python packages, as I never remember what command works in Windows Terminal.  It's never pip install or apt-get, but 'python -m pip install [package], when you are not in the Python prompt. Now, into the cmd

Working With Terraform Modules for AWS

9/20/2023: The open source version of Terraform is now  OpenTofu  Terraform (now OpenTofu) for AWS is somewhat clearer than Terraform for Azure - easier to grasp than YAML and it's finicky formatting. After pushing some DevOps Terraform (TF) configurations live to AWS, I wondered if I could push a static webpage. Situation - Why Would You Use This? To quickly spin up the front-end for a simple webpage that might take user input after attaching it to back end services that accept and hold the data.  What Other Options Are There? I've documented hosting static webpages through Azure before on here through various methods - The process is somewhat intensive and relies strongly on interconnected systems. GitHub to host the code Azure Webapps to take the code and display it Another option would be using Netlify,  but that works best for truly single-page apps like this . It looks like it has different pages to the untrained eye, but it's only one. Task - How Is It Done? Here, t

Get in CloudFormation; A Timeline learning IaC for AWS

  Want to share this page easily?  Here's a Notion Page .   A big shoutout to Pluralsight for their free weekend, and James Millar for a great introductory course . For the longest time, I couldn't see how people found this easy, but this helped. (Why did we make up so many programming languages that only work based upon the correct formatting of spaces and tabs? Readability is important, but when you're just beginning, how I learn, I'm interested in 'it works' first and 'it's pretty' second).   The (paid) project: Create an Instance that has basic security rules from a security group it's in. The most difficult part was learning the tool and the formatting. This was much easier in Terraform (Now OpenTofu) for AWS, but this time we wanted to use CloudFormation.   The Numbers: Resources Created: At least 11 VPC MacOSImageID* MacOSInstanceKeyName* InternetGateway PublicInternetRoute VPCGatewayAttachment PublicInternetRouteTable PublicSubnet01 P

Totally Terraform (Or, Introducing Terraform DevOps Cloud Engineer Proceedures to A Company) [Updated March 2022]

 Want to share this post easily? Here's a Notion page !   9/20: Terraform is now  OpenTofu   I got to teach myself Terraform, but that's what this entire blog is about; Teaching myself things and hoping for work sometimes to make money and being employed by multiple people. You can be the next one! Anyway, what do I like about Terraform? A lot. Including all the troubleshooting and digging into new things. The Numbers on What Was Made: Project : 1 Resources created : 7 Virtual Machine Network Interface Virtual Network Security Rule attached to Security Group Security Group (with outputs) Subnet Public IP address Many of these resources are attached to each other - The Network Interface is attached to the Virtual Machine, and they’re both in a Security Group which has Security Rules attached to it. The Virtual Network is attached to the Subnet, and the Public IP address is attached to the Network Security Group. This way, The Virtual Machine has internet access, but als