<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Letrelle Johnson on Medium]]></title>
        <description><![CDATA[Stories by Letrelle Johnson on Medium]]></description>
        <link>https://medium.com/@letrellejohnson15?source=rss-d94fb680687a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*UbOHGWrZUwke00Xb</url>
            <title>Stories by Letrelle Johnson on Medium</title>
            <link>https://medium.com/@letrellejohnson15?source=rss-d94fb680687a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 09:27:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@letrellejohnson15/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Deploying A Highly Available 2-Tier Architecture With Terraform]]></title>
            <link>https://medium.com/@letrellejohnson15/deploying-a-highly-available-2-tier-architecture-with-terraform-7b9eb6a0050f?source=rss-d94fb680687a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b9eb6a0050f</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[terraform-cloud]]></category>
            <category><![CDATA[2-tier-architecture]]></category>
            <category><![CDATA[apache]]></category>
            <dc:creator><![CDATA[Letrelle Johnson]]></dc:creator>
            <pubDate>Mon, 17 Feb 2025 05:37:58 GMT</pubDate>
            <atom:updated>2025-02-18T05:59:52.882Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uCDIHogVq0otXFsk.png" /></figure><h3><strong>Intro</strong></h3><p>In this project, I will be demonstrating how to design and deploy a highly available two-tier architecture on AWS using Terraform(IaC). The two-tier architecture will be configured using a Web Server Tier and Database Tier. The Web Server will be running/deployed across two public subnets. This deals with the HTTP traffic serving as the front-end for the application. The Database Tier will take on the two private subnets for storing and processing data. Combining these two key tiers aids in ensuring low fault tolerance, high scalability and availability.</p><h3><strong>Objective</strong></h3><p>The objective of this project is to establish a custom Virtual Private Cloud (VPC). The VPC will need to contain networking components with two private and public subnets, route tables and security groups.</p><h3><strong>Pre reqs</strong></h3><ul><li>AWS Account</li><li>Terraform Cloud Account</li><li>Terraform Modules</li><li>Basic Knowledge VPC &amp; Networking</li><li>Basic knowledge of CI/CD Pipeline</li></ul><h3><strong>Main.tf</strong></h3><p>The main.tf file serves as the primary configuration file where you define the infrastructure you want to manage and provision. It contains the Terraform resources, providers, and other configuration elements that dictate how Terraform interacts with cloud providers, infrastructure services, and other resources. This file is typically the core of your Terraform configuration.</p><pre>terraform {<br>  cloud {<br><br>    organization = &quot;Terraform-Two-Tier-Architecture&quot;<br><br>    workspaces {<br>      name = &quot;my-two-tier-architecture-lj&quot;<br>    }<br>  }<br>}<br><br><br># Creates VPC <br>resource &quot;aws_vpc&quot; &quot;tfcloud_vpc&quot; {<br>  cidr_block           = var.vpc_cidr<br>  enable_dns_support   = true<br>  enable_dns_hostnames = true<br><br>  tags = {<br>    Name = &quot;tfcloud_vpc&quot;<br>  }<br>}<br><br><br># Fetches the available availability zones in the current region<br>data &quot;aws_availability_zones&quot; &quot;available&quot; {<br>  state = &quot;available&quot;<br>}<br><br># Creates Public Subnets for Web Server Tier<br>resource &quot;aws_subnet&quot; &quot;tfcloud_public_subnets&quot; {<br>  for_each                = var.tfcloud_public_subnets<br>  vpc_id                  = aws_vpc.tfcloud_vpc.id<br>  cidr_block              = cidrsubnet(var.vpc_cidr, 8, each.value + 100)<br>  availability_zone       = tolist(data.aws_availability_zones.available.names)[each.value]<br>  map_public_ip_on_launch = true<br><br>  tags = {<br>    Name = each.key<br>  }<br>}<br><br><br># Creates NAT Gateway<br>resource &quot;aws_nat_gateway&quot; &quot;tfcloud_nat_gateway&quot; {<br>  depends_on = [aws_subnet.tfcloud_public_subnets]<br><br>  subnet_id     = aws_subnet.tfcloud_public_subnets[&quot;public_subnet_1&quot;].id # Example: Accessing a specific subnet<br>  allocation_id = aws_eip.tfcloud_nat_gateway_eip.id                      # Assuming you have an Elastic IP allocated for the NAT Gateway<br><br>  tags = {<br>    Name = &quot;tfcloud_nat_gateway&quot;<br>  }<br>}<br><br># Launches the EC2 instance and installs apache<br>resource &quot;aws_instance&quot; &quot;tfcloud_ec2_instance&quot; {<br>  ami                    = var.image_id<br>  instance_type          = var.instance_type<br>  for_each               = aws_subnet.tfcloud_public_subnets<br>  subnet_id              = each.value.id<br>  vpc_security_group_ids = [aws_security_group.tfcloud_ec2_sg.id]<br>  key_name               = var.key_name<br>  user_data              = file(&quot;install_apache.sh&quot;)<br><br>  tags = {<br>    Name = &quot;tfcloud_web_server&quot;<br>  }<br>}<br><br><br># Creates an RDS Database Instance<br>resource &quot;aws_db_instance&quot; &quot;myinstance&quot; {<br>  allocated_storage      = 20<br>  engine                 = &quot;mysql&quot;<br>  engine_version         = &quot;8.0&quot;<br>  identifier             = &quot;myrdsinstance&quot;<br>  instance_class         = &quot;db.t3.micro&quot;<br>  username               = &quot;myrdsuser&quot;<br>  password               = &quot;myrdspassword&quot;<br>  parameter_group_name   = &quot;default.mysql8.0&quot;<br>  vpc_security_group_ids = [aws_security_group.tfcloud_rds_sg.id, aws_security_group.tfcloud_ec2_sg.id]<br>  db_subnet_group_name   = aws_db_subnet_group.tfcloud_db_subnet_group.name<br>  skip_final_snapshot    = true<br>  publicly_accessible    = false<br>}<br><br>resource &quot;aws_db_subnet_group&quot; &quot;tfcloud_db_subnet_group&quot; {<br>  name       = &quot;tfcloud_db_subnet_group&quot;<br>  subnet_ids = [for subnet in aws_subnet.tfcloud_private_subnets : subnet.id]<br><br>  tags = {<br>    Name = &quot;tfcloud-db-subnet-group&quot;<br>  }<br>}<br><br><br># Creates Private Subnets for RDS Tier<br>resource &quot;aws_subnet&quot; &quot;tfcloud_private_subnets&quot; {<br>  for_each                = var.tfcloud_private_subnets<br>  vpc_id                  = aws_vpc.tfcloud_vpc.id<br>  cidr_block              = cidrsubnet(var.vpc_cidr, 8, each.value)<br>  availability_zone       = tolist(data.aws_availability_zones.available.names)[each.value]<br>  map_public_ip_on_launch = true<br><br>  tags = {<br>    Name = each.key<br>  }<br>}</pre><p>From this moment on, I will breakdown the configuration of the resources as a whole. But first, we must create a VPC.</p><h3><strong>Phase 1: Creating Custom VPC</strong></h3><p>Creating a custom VPC is extremely valuable because this will contain your subnets and other resources. This will give you full control over the networking infrastructure.</p><ul><li>Create 2 Public Subnets for the Web Server Tier:</li></ul><pre># Creates Public Subnets for Web Server Tier<br>resource &quot;aws_subnet&quot; &quot;tfcloud_public_subnets&quot; {<br>  for_each                = var.tfcloud_public_subnets<br>  vpc_id                  = aws_vpc.tfcloud_vpc.id<br>  cidr_block              = cidrsubnet(var.vpc_cidr, 8, each.value + 100)<br>  availability_zone       = tolist(data.aws_availability_zones.available.names)[each.value]<br>  map_public_ip_on_launch = true<br><br>  tags = {<br>    Name = each.key<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kYBrFc3A0Ek7-5JRWIsTVg.jpeg" /></figure><ul><li>Create 2 Private Subnets for the RDS Tier</li></ul><pre># Creates NAT Gateway<br>resource &quot;aws_nat_gateway&quot; &quot;tfcloud_nat_gateway&quot; {<br>  depends_on = [aws_subnet.tfcloud_public_subnets]<br><br>  subnet_id     = aws_subnet.tfcloud_public_subnets[&quot;public_subnet_1&quot;].id # Example: Accessing a specific subnet<br>  allocation_id = aws_eip.tfcloud_nat_gateway_eip.id                      # Assuming you have an Elastic IP allocated for the NAT Gateway<br><br>  tags = {<br>    Name = &quot;tfcloud_nat_gateway&quot;<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KDpSYPX5Ln-V2gUNA5UA0Q.jpeg" /></figure><ul><li>Create Route Tables</li></ul><p>Creating the route tables helps define how the overall network traffic will be directed amongst the public and private subnets. It also defines the traffic to and from the internet. The route tables will ensure the traffic is being proceeded as intended within the VPC.</p><pre># Creates route tables for public and private subnets<br>resource &quot;aws_route_table&quot; &quot;tfcloud_public_route_table&quot; {<br>  vpc_id = aws_vpc.tfcloud_vpc.id<br><br>  route {<br>    cidr_block = &quot;0.0.0.0/0&quot;<br>    gateway_id = aws_internet_gateway.tfcloud_internet_gateway.id<br>    #nat_gateway_id = aws_nat_gateway.tfcloud_internet_gateway_vpcsubnet.id<br>  }<br>  tags = {<br>    Name = &quot;tfcloud_public_rt&quot;<br>  }<br>}<br><br>resource &quot;aws_route_table&quot; &quot;tfcloud_private_route_table&quot; {<br>  vpc_id = aws_vpc.tfcloud_vpc.id<br><br>  route {<br>    cidr_block     = &quot;0.0.0.0/0&quot;<br>    nat_gateway_id = aws_nat_gateway.tfcloud_nat_gateway.id<br>    #gateway_id     = aws_internet_gateway.tfcloud_internet_gateway.id<br>  }<br>  tags = {<br>    Name = &quot;tfcloud_private_rt&quot;<br>  }<br>}<br><br>#Creates route table associations<br>resource &quot;aws_route_table_association&quot; &quot;tfcloud_public_rt_association&quot; {<br>  depends_on     = [aws_subnet.tfcloud_public_subnets]<br>  route_table_id = aws_route_table.tfcloud_public_route_table.id<br>  for_each       = aws_subnet.tfcloud_public_subnets<br>  subnet_id      = each.value.id<br>}<br><br>resource &quot;aws_route_table_association&quot; &quot;tfcloud_private_rt_association&quot; {<br>  depends_on     = [aws_subnet.tfcloud_private_subnets]<br>  route_table_id = aws_route_table.tfcloud_private_route_table.id<br>  for_each       = aws_subnet.tfcloud_private_subnets<br>  subnet_id      = each.value.id<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*mt9pbn1-DivFmxCcLjuQ4A.jpeg" /></figure><h3><strong>Phase 2: Launching EC2 Instance with Web-server (Apache)</strong></h3><p>The EC2 Instances in the public subnets are the web servers for the application. Their job is to handle the traffic of HTTP requests from the customer side and provide the content.</p><pre># Launches the EC2 instance and installs apache<br>resource &quot;aws_instance&quot; &quot;tfcloud_ec2_instance&quot; {<br>  ami                    = var.image_id<br>  instance_type          = var.instance_type<br>  for_each               = aws_subnet.tfcloud_public_subnets<br>  subnet_id              = each.value.id<br>  vpc_security_group_ids = [aws_security_group.tfcloud_ec2_sg.id]<br>  key_name               = var.key_name<br>  user_data              = file(&quot;install_apache.sh&quot;)<br><br>  tags = {<br>    Name = &quot;tfcloud_web_server&quot;<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*E-ttUJ55D5p4f3dNgXwZBg.jpeg" /></figure><h3><strong>Phase 3: Launching RDS MySQL Instance in Private Subnets</strong></h3><p>The RDS MySQL Instance acts as the application database residing in the private subnets. The reason the database resides in the private subnets is to ensure isolation from the public internet. Thus, it provides an extra layer of security and protection.</p><pre># Creates an RDS Database Instance<br>resource &quot;aws_db_instance&quot; &quot;myinstance&quot; {<br>  allocated_storage      = 20<br>  engine                 = &quot;mysql&quot;<br>  engine_version         = &quot;8.0&quot;<br>  identifier             = &quot;myrdsinstance&quot;<br>  instance_class         = &quot;db.t3.micro&quot;<br>  username               = &quot;myrdsuser&quot;<br>  password               = &quot;myrdspassword&quot;<br>  parameter_group_name   = &quot;default.mysql8.0&quot;<br>  vpc_security_group_ids = [aws_security_group.tfcloud_rds_sg.id, aws_security_group.tfcloud_ec2_sg.id]<br>  db_subnet_group_name   = aws_db_subnet_group.tfcloud_db_subnet_group.name<br>  skip_final_snapshot    = true<br>  publicly_accessible    = false<br>}<br><br>resource &quot;aws_db_subnet_group&quot; &quot;tfcloud_db_subnet_group&quot; {<br>  name       = &quot;tfcloud_db_subnet_group&quot;<br>  subnet_ids = [for subnet in aws_subnet.tfcloud_private_subnets : subnet.id]<br><br>  tags = {<br>    Name = &quot;tfcloud-db-subnet-group&quot;<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*-zA6aT2xg3K6_HFgWSfflA.jpeg" /></figure><h3><strong>Phase 4: Configuring Security Group for Resources</strong></h3><p>There are two security groups created, the Web-Server and RDS. The Web-Server security group manages the network traffic to and from the EC2 Instance within the public subnets. The RDS security group is designed to protect the control access of the RDS MySQL Instance in the private subnets. This allows protection from unwanted access from outside the network and will only allow MySQL (port 3306) traffic from the EC2 web servers.</p><pre># Creates security group for the EC2 instance<br>resource &quot;aws_security_group&quot; &quot;tfcloud_ec2_sg&quot; {<br>  name        = &quot;tfcloud_ec2_sg&quot;<br>  description = &quot;Allows access on ports 80 &amp; 22&quot;<br>  vpc_id      = aws_vpc.tfcloud_vpc.id<br><br>  # Allows access on port 80<br>  ingress {<br>    description = &quot;http&quot;<br>    from_port   = 80<br>    to_port     = 80<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br><br>  # Allows access on port 22<br>  ingress {<br>    description = &quot;ssh access&quot;<br>    from_port   = 22<br>    to_port     = 22<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br><br>  egress {<br>    from_port   = 0<br>    to_port     = 0<br>    protocol    = &quot;-1&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>  # Allows access for EC2 instance &amp; RDS instance to communicate <br>  egress {<br>    from_port   = 3306<br>    to_port     = 3306<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br><br>  tags = {<br>    Name = &quot;terraform EC2 security group&quot;<br>  }<br>}<br><br><br># Creates security group for RDS<br>resource &quot;aws_security_group&quot; &quot;tfcloud_rds_sg&quot; {<br>  name        = &quot;tfcloud_rds_sg&quot;<br>  description = &quot;Allows access on ports 80, 22, &amp; 3306&quot;<br>  vpc_id      = aws_vpc.tfcloud_vpc.id<br><br>  # Allows access on port 80<br>  ingress {<br>    description = &quot;http&quot;<br>    from_port   = 80<br>    to_port     = 80<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br><br>  # Allow access on port 22<br>  ingress {<br>    description     = &quot;ssh access&quot;<br>    from_port       = 22<br>    to_port         = 22<br>    protocol        = &quot;tcp&quot;<br>    security_groups = [aws_security_group.tfcloud_ec2_sg.id]<br>  }<br><br>  # Allows EC2 access to RDS database<br>  ingress {<br>    description     = &quot;mysql/rds&quot;<br>    from_port       = 3306<br>    to_port         = 3306<br>    protocol        = &quot;tcp&quot;<br>    security_groups = [aws_security_group.tfcloud_ec2_sg.id]<br>  }<br><br>  egress {<br>    from_port   = 0<br>    to_port     = 0<br>    protocol    = &quot;-1&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br><br>  tags = {<br>    Name = &quot;terraform RDS security group&quot;<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FZCTndBOYDsDhs0QnMcuEg.jpeg" /></figure><p>Alright, let’s go into the AWS console and create the AWS access key ID and AWS Secret access key. We need to include these in the environment variable in Terraform Cloud for Terraform to obtain access.</p><h3><strong>Phase 5: Deploy using Terraform Cloud (as CI/CD tool)</strong></h3><p>Using Terraform Cloud provides certainty that the infrastructure is deployed in a secured, automated and controlled way. This makes the infrastructure managing a lot easier and simple increasing the efficiency and scalability.</p><ul><li>Login into the Terraform Cloud account</li><li>Create a new Organization</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lnofrQCcW0zhLY7OOnqNPA.jpeg" /></figure><ul><li>Select “CLI-Driven Workflow”</li><li>Name and create the workspace</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*amitwSt9oRGDuyVUevnzPw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*NloCPsd8btMFNO3yL5zp0w.jpeg" /></figure><ul><li>Navigate back to the CLI command and do the following:</li><li>Type “Terraform login”</li><li>Type “yes” and hit enter</li></ul><p>A new browser window will open with the token, you will then copy and paste in into the CLI command. Please be aware you will not visibly see the token but once pasted click enter. If done properly you should see this…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ahfy0ZY6859o4DJIJcpSug.jpeg" /></figure><p>Next thing to do is to add the AWS credentials in the variables section of Terraform Cloud. Navigate to the organization created and select <strong>“variables”</strong> on the left hand side. If you don’t remember the AWS credentials you can generate new new information in the AWS console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*98p-Oe3O30zs0QccPSpw7g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uxcuOJbCrd3_jdIj2pkMjg.jpeg" /></figure><p>After inserting the AWS credentials into the CLI command let’s re-run the following commands to create the resources:</p><pre>terraform init #initalizes working directory and sets up the necessary environment for Terraform to run.<br><br>terraform fmt #formats the files properly <br><br>terraform validate #validates no syntax errors were made<br><br>terraform plan #display what resources will be created <br><br>terraform apply #deploys the resources <br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YOcRUFWaP_aepXuI1Mr7QA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dkXxoxegEX3Iqs5wLOwM4Q.jpeg" /></figure><p>Notice the yellow text, the yellow text indicates the resources are actively being created in Terraform Cloud as well.</p><p>At this point all of the resources should have been created in AWS let’s confirm they were…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*byCVWEjGLs70McE7o6oPTw.jpeg" /><figcaption>EC2 Instances</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3AZ69A5eceG0dTD1JRiwyA.jpeg" /><figcaption>RDS Instance</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MQX694nWC19sy6Cad0rP0A.jpeg" /><figcaption>DB subnet group</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LrGNUtNt9JaNB5rNW4C6ng.jpeg" /><figcaption>EIP address</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cTiQe-0jA1Or4HgyePz8lg.jpeg" /><figcaption>RDS &amp; EC2 Security groups</figcaption></figure><p>Let’s now confirm they were also deployed in Terraform Cloud…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*96fR9pvyC2PcWbwGVSHE_g.jpeg" /><figcaption>Resources deployed in Terraform Cloud</figcaption></figure><h3><strong>Phase 6: Deploy to GitHub</strong></h3><p>Last but not least, let’s finally go ahead and deploy the modules into GitHub. Easiest way to do this is to navigate to GitHub Desktop and commit and push the changes. If done correctly, you should see it in your GitHub repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PB9qxkmpOqA1ZFPWtcksOw.jpeg" /><figcaption>Pushed to GitHub</figcaption></figure><p>Alright we did everything we needed to do… we can now destroy all of the resources created using this command…</p><pre>terraform destroy</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8osgKpkibbtkrwOAIz5zJQ.jpeg" /><figcaption>Destroyed all resources</figcaption></figure><h3><strong>TroubleShooting Tips</strong></h3><ul><li><strong><em>Confirm your AWS credentials —</em></strong> If you run into an error double check you provided the correct credentials for AWS and Terraform to connect.</li><li><strong><em>Module setup —</em></strong> The slightest typo in when building the infrastructure will cause it not to work. Constantly validate, plan and format your code.</li></ul><h3><strong>Resources</strong></h3><ul><li><a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/internet_gateway">Terraform Registry</a></li><li><a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet">Terraform Registry</a></li><li><a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table">Terraform Registry</a></li></ul><h3><strong>Summary</strong></h3><p>In summary, completion of this project provided the following execution:</p><ul><li>Created a custom VPC with 2 public subnets (for EC2 Instances) and 2 private subnets (for RDS MySQL Instance)</li><li>Launched EC2 Instances from public subnets with a running web server (Apache)</li><li>Created a security group allowing HTTP (port 80) and SSH (port 22) access for the EC2 Web-Servers.</li><li>Created a security group for restricting RDS Instance access and only allowing the Web-Servers access through MySQL (port 3306)</li><li>Used Terraform Cloud for Infrastructure as Code (IaC) making it easy for managing and provisioning the resources.</li><li>Pushed the Terraform code to GitHub for versioning control.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*L-PvcIjKGlKDIgia-CaTxA.jpeg" /></figure><p><strong>Let’s Connect! —</strong><a href="http://www.linkedin.com/in/letrelle-johnson"> Linked In</a></p><p><strong>GitHub —</strong> <a href="https://github.com/Letrelle-Johnson/my-terraform-projects-lj.git">Repository</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b9eb6a0050f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Utilizing Terraform for Deploying an AWS AutoScaling Group]]></title>
            <link>https://medium.com/@letrellejohnson15/utilizing-terraform-for-deploying-an-aws-autoscaling-group-26cc81ef2854?source=rss-d94fb680687a------2</link>
            <guid isPermaLink="false">https://medium.com/p/26cc81ef2854</guid>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[autoscaling-group]]></category>
            <category><![CDATA[s3-bucket]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Letrelle Johnson]]></dc:creator>
            <pubDate>Sun, 09 Feb 2025 21:45:04 GMT</pubDate>
            <atom:updated>2025-02-09T21:45:04.099Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NkjFReJKfRAyoLjd" /></figure><h3><strong>Business Scenario</strong></h3><p>An e-commerce company needs to handle a surge in traffic during the holiday season. The company wants to ensure that their website remains available and responsive to customers even during high traffic periods. A security group is created to allow internet traffic to the Auto Scaling instances, and a script is used to launch an Apache web server for the website. The Auto Scaling group is set with 2 to 5 instances to handle traffic spikes while saving costs when traffic is low. Public IPs are checked, one instance is terminated to test the scaling, and an S3 bucket is used for managing infrastructure with Terraform for easy rollback.</p><h3><strong>Business Goals</strong></h3><ul><li>Launch an Auto Scaling group that spans 2 subnets in your default VPC.</li><li>Create a security group that allows traffic from the internet and associate it with the Auto Scaling group instances.</li><li>Include a script in your user data to launch an apache web-server. The Auto Scaling group should have a min of 2 and max of 5.</li><li>Verify everything is working check the public ip addresses of the two instances. Manually terminate one of the instances to verify that another one spins up to meet the minimum requirement of 2 instances.</li><li>Create an S3 bucket and set it as your remote backend.</li></ul><h3><strong>Pre-reqs</strong></h3><ul><li>AWS CLI knowledge</li><li>Terraform knowledge</li><li>Create a project directory on local machine</li><li>AWS Account</li><li>Configuration of AWS in terminal</li></ul><h3><strong>Phase 1: Establishing project directory on local machine</strong></h3><p>The first course of action taken was to create the following Terraform files using VS Code:</p><ul><li><strong><em>main.tf —</em></strong> contains the main set of configuration for the module</li><li><strong><em>variables.tf —</em></strong> contains the input variables</li><li><strong><em>providers.tf —</em></strong> contains the specification of the AWS provider</li><li><strong><em>backend.tf — </em></strong>contains the configuration of the remote backend utilizing an S3 bucket</li><li><strong><em>my_terraform_asg_sg.tf—</em></strong> contains the configurations for the auto-scaling group</li><li><strong><em>apache_installment.sh — </em></strong>contains script for installation of Apache server</li></ul><p><strong>Main.tf</strong></p><p>This file is a crucial piece to the development of the Terraform Infrastructure. This file contains the main configurations for the infrastructure. Below is the contents of the file:</p><pre>#main.tf<br><br>resource &quot;aws_default_vpc&quot; &quot;default_vpc&quot; {<br>  tags = {<br>    Name = &quot;Default VPC&quot;<br>  }<br>}<br><br># Creating subnets for the default VPC<br>resource &quot;aws_default_subnet&quot; &quot;default_az1&quot; {<br>  availability_zone = &quot;us-east-1a&quot;<br><br>  tags = {<br>    Name = &quot;Default subnet for us-east-1a&quot;<br>  }<br>}<br><br>resource &quot;aws_default_subnet&quot; &quot;default_az2&quot; {<br>  availability_zone = &quot;us-east-1b&quot;<br><br>  tags = {<br>    Name = &quot;Default subnet for us-east-1b&quot;<br>  }<br>}<br><br># Creating an Autoscaling Group<br>resource &quot;aws_autoscaling_group&quot; &quot;terraform_asg&quot; {<br>  name               = &quot;myterraform-asg23-lj&quot;<br>  min_size           = var.min_size<br>  max_size           = var.max_size<br>  desired_capacity   = var.desired_capacity<br>  availability_zones = var.availability_zones<br><br>  launch_template {<br>    id      = aws_launch_template.launch-asg23-lj.id<br>    version = &quot;$Latest&quot;<br>  }<br><br>  # Tagging the ASG<br>  tag {<br>    key                 = &quot;Name&quot;<br>    value               = &quot;terraform-asg-instance&quot;<br>    propagate_at_launch = true<br>  }<br>}<br><br># Creating a launch template for the ASG<br>resource &quot;aws_launch_template&quot; &quot;launch-asg23-lj&quot; {<br>  name          = &quot;mylaunch-asg23-lj&quot;<br>  image_id      = var.ami_id<br>  instance_type = var.instance_type<br>  key_name      = var.key_name<br>  user_data     = base64encode(file(&quot;apache_installment.sh&quot;))<br><br>  network_interfaces {<br>    associate_public_ip_address = true<br>    security_groups             = [aws_security_group.the_terraform_asg_sg.id]<br>  }<br><br>  tag_specifications {<br>    resource_type = &quot;instance&quot;<br>    tags = {<br>      Name = &quot;MyLaunchASGInstance&quot;<br>    }<br>  }<br>}</pre><p><strong>Variables.tf</strong></p><p>Let’s configure the variables.tf file first to define the variables. This file is extremely useful because it allows us the variables to reusable again and again. Below you will see the the defined variables:</p><pre>variable &quot;aws_region&quot; {<br>  type    = string<br>  default = &quot;us-east-1&quot; # You can set a default region or leave it without default to require it at runtime<br>}<br><br>variable &quot;instance_type&quot; {<br>  default = &quot;t2.micro&quot; # Specifies the EC2 instance type. Adjust this based on your requirements.<br>  type    = string<br>}<br><br>variable &quot;ami&quot; {<br>  default = &quot;ami-04681163a08179f28&quot; # The AMI ID for the EC2 instance. Ensure it corresponds to the desired Amazon Linux 2 AMI version.<br>  type    = string<br>}<br><br>variable &quot;key_name&quot; {<br>  default = &quot;myjenkinskp&quot; # The name of the SSH key pair used to access the EC2 instance. Ensure this key exists in your AWS account.<br>  type    = string<br>}<br><br>variable &quot;default_vpc&quot; {<br>  default = &quot;vpc-0f1db6f27b08f0096&quot; #The defaul VPC used for deploying the resources <br>  type    = string<br>}<br><br>variable &quot;desired_capacity&quot; {<br>  default = 2 #Desired number of instances for Auto-Scaling Group <br>  type    = number<br>}<br><br>variable &quot;min_size&quot; {<br>  default = 2 #Minimum number of instances for Auto-Scaling Group <br>  type    = number<br>}<br><br>variable &quot;max_size&quot; {<br>  default = 5 #Maximum number of instances for Auto-Scaling Group <br>  type    = number<br>}<br><br>variable &quot;availability_zones&quot; {<br>  default = [&quot;us-east-1a&quot;, &quot;us-east-1b&quot;] #Specifies the availability zones for the resources to be deployed to in the region of your choosing <br>  type    = list(string)<br>}</pre><p><strong>Key Variables</strong></p><p><strong><em>Region — </em></strong>Where the resources will be launched</p><p><strong><em>Default_VPC — </em></strong>Where the Auto-Scaling Group will be deployed</p><p><strong><em>Availability_zones — </em></strong>The availability zones where the EC2 Instances will be launched</p><p><strong><em>Desired_capacity , min_size, max_size— </em></strong>Parameters for the Auto-Scaling Group</p><p><strong><em>Ami_ID —</em></strong> The AMI being used when launching EC2 Instances</p><p><strong><em>Instance_type — </em></strong>Type of EC2 Instances within the Auto-Scaling Group</p><p><strong>Providers.tf</strong></p><p>In this file, we will be defining the specific region where all of the resources will be deployed. Terraform will be able to communicate to AWS. Below is the information used to configured the file:</p><pre>terraform {<br>  required_providers {<br>    aws = {<br>      source  = &quot;hashicorp/aws&quot;<br>      version = &quot;~&gt; 4.0&quot;<br>    }<br>  }<br>}<br><br># Configure the AWS Provider<br>provider &quot;aws&quot; {<br>  region = var.aws_region<br>}</pre><p><strong>Backend.tf</strong></p><p>In order to manage the state remotely we must created an AWS S3 bucket. The AWS S3 bucket will be used for storing the Terraform State. Please note that you must create the bucket in the AWS console first prior for it to be referenced by Terraform.</p><pre>#remote s3 backend.tf<br><br>terraform {<br>  backend &quot;s3&quot; {<br>    bucket         = &quot;myterraform-state-bucket2025-lj&quot; # Your S3 bucket name<br>    key            = &quot;myterraformdbkey.tfstate&quot;        # Your state file path<br>    region         = &quot;us-east-1&quot;                       # AWS region<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cRfTvGMP-JNMVeuneg7TsA.jpeg" /><figcaption>S3 Bucket</figcaption></figure><h3><strong>Phase 2: Configuring Security Group for Auto-Scaling Group</strong></h3><p><strong>My_terraform_asg_sg.tf</strong></p><p>The purpose of this file is for allowing traffic to the EC2 Instances. The security group will allow HTTPS traffic and SSH capability. Below is the configuration for the file:</p><pre>#myterraform-asg-sg.tf<br><br>resource &quot;aws_security_group&quot; &quot;the_terraform_asg_sg&quot; {<br>  name        = &quot;my_terraform_asg_sg-lj&quot;<br>  description = &quot;Allow traffic for the Auto Scaling Group instances&quot;<br><br>  # Ingress rules<br>  ingress {<br>    from_port   = 80<br>    to_port     = 80<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;] # Allow HTTP traffic from anywhere<br>  }<br><br>  ingress {<br>    from_port   = 22<br>    to_port     = 22<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;] # Allow SSH traffic from anywhere<br>  }<br><br>  # Egress rule<br>  egress {<br>    from_port   = 0<br>    to_port     = 0<br>    protocol    = &quot;-1&quot; # Allow all outgoing traffic for any protocol<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>}</pre><p><strong>Apache_installment.sh</strong></p><p>This is a bash script strictly for the bootstrapping the EC2 Instances. The EC2 Instances will be equipped with the apache server attached to them. Below is the bash script:</p><pre>#!/bin/bash<br># Update package repository and install Apache<br>yum update -y<br>yum install -y httpd<br><br># Start Apache service and enable it to start on boot<br>systemctl start httpd<br>systemctl enable httpd<br><br># Create a simple HTML page<br>echo &quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;Welcome to my custom Apache Page!&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;&quot; &gt; /var/www/html/index.html<br><br># Ensure Apache is running<br>systemctl status httpd</pre><h3><strong>Phase 3: Configuring Subnets</strong></h3><p>This file purpose is to create subnets and specify the availability zones within the default VPC. Below shows the two subnets created in two different availability zones:</p><pre># Subnet for us-east-1a<br>resource &quot;aws_default_subnet&quot; &quot;default_az1&quot; {<br>  availability_zone = &quot;us-east-1a&quot;<br><br>  tags = {<br>    Name = &quot;Default subnet for us-east-1a&quot;<br>  }<br>}<br><br># Subnet for us-east-1b<br>resource &quot;aws_default_subnet&quot; &quot;default_az2&quot; {<br>  availability_zone = &quot;us-east-1b&quot;<br><br>  tags = {<br>    Name = &quot;Default subnet for us-east-1b&quot;<br>  }<br>}<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Ati2ZpGE7Axqq3ZuY_nAw.jpeg" /><figcaption>Newly created subnets</figcaption></figure><h3><strong>Phase 4: Configuring Auto-Scaling Group &amp; Launch template</strong></h3><p>This portion of the tf file configures the Auto Scaling of the EC2 Instances. It will auto-scale based on the desired min &amp; max value scaling policy. The launching of the EC2 Instance will come from the launching template</p><pre># Creating an Autoscaling Group<br>resource &quot;aws_autoscaling_group&quot; &quot;terraform_asg&quot; {<br>  name               = &quot;myterraform-asg23-lj&quot;<br>  min_size           = var.min_size<br>  max_size           = var.max_size<br>  desired_capacity   = var.desired_capacity<br>  availability_zones = var.availability_zones<br><br>  launch_template {<br>    id      = aws_launch_template.launch-asg23-lj.id<br>    version = &quot;$Latest&quot;<br>  }<br><br>  # Tagging the ASG<br>  tag {<br>    key                 = &quot;Name&quot;<br>    value               = &quot;terraform-asg-instance&quot;<br>    propagate_at_launch = true<br>  }<br>}</pre><p><strong>Launch Template</strong></p><p>This resource outlines the configuration of the launching of EC2 Instances. Essentially, the Auto-Scaling of the instances will use the specific information provided by the launch template. The launch template specifies the AMI, SSH key, and instance type.</p><pre># Creating a launch template for the ASG<br>resource &quot;aws_launch_template&quot; &quot;launch-asg23-lj&quot; {<br>  name          = &quot;mylaunch-asg23-lj&quot;<br>  image_id      = var.ami_id<br>  instance_type = var.instance_type<br>  key_name      = var.key<br>  user_data     = base64encode(file(&quot;apache_installment.sh&quot;))<br><br>  network_interfaces {<br>    associate_public_ip_address = true<br>    security_groups             = [aws_security_group.the_terraform_asg_sg.id]<br>  }<br><br>  tag_specifications {<br>    resource_type = &quot;instance&quot;<br>    tags = {<br>      Name = &quot;MyLaunchASGInstance&quot;<br>    }<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VbkiE_cfy43JkVuU6DYeyA.jpeg" /><figcaption>Launching of EC2 Instances</figcaption></figure><h3><strong>Phase 5: Launching the Terraform Infrastructure</strong></h3><p>Alright, we have created all of the necessary files for deploying the Terraform Infrastructure. Before we deploy, use the following commands below to format and validate the code:</p><pre>terraform fmt<br><br>terraform validate<br></pre><p>If everything came back fine the next step would be to <strong>deploy </strong>and <strong>apply</strong> the infrastructure. Use the following commands below:</p><pre>terraform plan <br><br>terraform apply</pre><h3><strong>Phase 6: Verifying Apache Web-server</strong></h3><p>After deploying the infrastructure go ahead and SSH into the EC2 Instance we created. Once you’re in the EC2 Instance verify if the html file was created and resides within the instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*nfxXaz03gQeT9rhMDHi0Yw.jpeg" /><figcaption>Index file created</figcaption></figure><p>Another thing to verify is if the apache web-server is running, use the following command below for verification:</p><pre>sudo systemctl status httpd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*vKgo_L7gQ-mYVgROcDOx1Q.jpeg" /><figcaption>Apache Server is running</figcaption></figure><p>The last confirmation we would need to do is verify the accessibility of the web-server. Navigate to the AWS console, copy and paste the public IP address of the EC2 Instance into a new browser window. If successful, you should see something like this…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*avg8X6K_3awSGswAzJHZ2A.jpeg" /></figure><h3><strong>TroubleShooting Tips</strong></h3><ul><li>Be cautious with formatting — ensure the code format is correct by consistently running terraform fmt</li><li>Verify IAM role permissions allow access to the S3 bucket</li><li>Check your variables file — ensure the necessary variables are listed</li><li>Create the S3 bucket prior referencing in the remote backend file</li></ul><h3><strong>Resources</strong></h3><ul><li><a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group">Terraform Registry</a></li><li><a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration?source=post_page-----059d0f1ba0e7--------------------------------">Terraform Registry</a></li><li><a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/default_subnet?source=post_page-----059d0f1ba0e7--------------------------------">Terraform Registry</a></li></ul><h3><strong>Summary</strong></h3><p>Congratulations! If you made it to this point then you just completed the following throughout this project:</p><ul><li>Configured the necessary tf files in VS Code for the Terraform Infrastructure.</li><li>Created an Auto Scaling group spanning 2 subnets in the default VPC, with a minimum of 2 and a maximum of 5 instances</li><li>Associated a security group allowing internet traffic.</li><li>Used a user data script to launch an Apache web server on the instances.</li><li>Verified the setup by checking the public IPs, terminating an instance to ensure auto-scaling, and</li><li>Created an S3 bucket for the remote backend.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*L-PvcIjKGlKDIgia-CaTxA.jpeg" /></figure><p><strong>Let’s Connect — </strong><a href="http://www.linkedin.com/in/letrelle-johnson">Linked In</a></p><p><strong>GitHub —</strong> <a href="https://github.com/Letrelle-Johnson/my-terraform-projects-lj.git">Repository</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26cc81ef2854" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deployment of a Jenkins Server With Terraform]]></title>
            <link>https://medium.com/@letrellejohnson15/deployment-of-a-jenkins-server-with-terraform-6d2a3caaa878?source=rss-d94fb680687a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d2a3caaa878</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[iac]]></category>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[aws-cli]]></category>
            <dc:creator><![CDATA[Letrelle Johnson]]></dc:creator>
            <pubDate>Sat, 01 Feb 2025 22:52:10 GMT</pubDate>
            <atom:updated>2025-02-09T21:52:30.256Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*wf-4ADtbX41bxc1Y.jpg" /></figure><h3><strong>Business Use Case</strong></h3><p>Your team would like to start using Jenkins as their CI/CD tool to create pipelines for DevOps projects. They need you to create the Jenkins server using Terraform so that it can be used in other environments and so that changes to the environment are better tracked. For the Foundational project you are allowed to have all your code in a single<a href="http://main.tf/"> main.tf</a> file (known as a monolith) with hardcoded data. Push all your code to GitHub and include the link to your repo in your documentation.</p><h3><strong>Steps Implemented</strong></h3><ul><li>Deploy 1 EC2 Instances in your Default VPC.</li><li>Bootstrap the EC2 instance with a script that will install and start Jenkins. Review the official Jenkins.</li><li>Create and assign a Security Group to the Jenkins Security Group that allows traffic on port 22 from your ip and allows traffic from port 8080.</li><li>Create a S3 bucket for your Jenkins Artifacts that is not open to the public.</li><li>Verify that you can reach your Jenkins install via port 8080 in your browser.</li></ul><h3><strong>Pre-reqs</strong></h3><ul><li>Active AWS Account (Create new user credentials for using Terraform)</li><li>Basic CLI knowledge</li><li>Installation of VS Code &amp; Terraform (I installed homebrew prior)</li><li>Basic Github knowledge</li></ul><p>Okay first thing first…</p><h3><strong>Phase 1: Establish GitHub Repository &amp; Clone to GitHub Desktop</strong></h3><ul><li>Access your GitHub account and select <strong>“Create a new Repository”</strong></li><li>Include a “README”</li><li>Include a “Add.gitignore” template and select “Terraform”</li><li>Select “Create repository”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*zoa3fTfDkI6gSnt-B_nyDA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*zT-Qys6EMprJ4MrjE3VaWQ.jpeg" /><figcaption>Newly created repository</figcaption></figure><ul><li>Using the drop down from the code button. Select <strong>“Open with GitHub Desktop”</strong></li><li>Confirm path and select <strong>“Clone”</strong></li><li>Select <strong>“Open in VS Code”</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*YxI0hiAgG-vav0YS9AgxZw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*RyJISFj3gujzyOUMNWmVww.jpeg" /></figure><p>Alright we can now create Terraform file in VS Code. Once we feel like everything is good, we can then push the code to GitHub with ease.</p><h3><strong>Phase 2: Configuring .tf files</strong></h3><h3><strong>Proivider.tf file</strong></h3><p>A .tf file is a plain text file that contains Terraform Code. The purpose of .tf files is for defining resources that will be provisioned using the HashiCorp Configuration Language (HCL).</p><p>Below is a configuration of a <strong>provider.tf</strong> file listing the region being used for deployment:</p><pre>terraform {<br>  required_providers {<br>    aws = {<br>      source  = &quot;hashicorp/aws&quot;<br>      version = &quot;~&gt; 4.0&quot;<br>    }<br>  }<br>}<br><br># Configure the AWS Provider<br>provider &quot;aws&quot; {<br>  region = var.region<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*LNR7Hcxxql5yDbHFnhMZxQ.jpeg" /></figure><p>FYI, setting the region as <strong>“var.region”</strong> is perfectly fine because I will later create a <strong>variables.tf</strong> file. In the file I included the region value which is <strong>us-east-1. </strong>I will provide more detail upon that file later on. In the meantime, let’s go ahead and create the next file</p><h3><strong>Main.tf file</strong></h3><p>The <strong>main.tf</strong> file will be configured with security group, AWS Instances, and AWS S3 bucket resources.</p><pre>resource &quot;aws_instance&quot; &quot;jenkins_server&quot; {<br>  ami                         = var.ami<br>  instance_type               = var.instance_type<br>  key_name                    = var.key_name<br>  security_groups             = [aws_security_group.my_jenkins_sg.name]<br>  associate_public_ip_address = true<br>  user_data                   = file(&quot;jenkins-script.sh&quot;)<br>  tags = {<br>    Name = &quot;my_jenkins_server&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*CYRuVFNDVYWp_WVce8qpvA.jpeg" /></figure><p>Be mindful when creating the EC2 Instance to replace the ami ID with the appropriate one from AWS console</p><h3><strong>Create a Security group</strong></h3><p>Next, we will assign and create a security group to the Jenkins security group with the ability to allow traffic from port 22 &amp; port 8080 from the IP address.</p><pre>resource &quot;aws_security_group&quot; &quot;my_jenkins_sg&quot; {<br>  name        = &quot;var.security-group-name&quot;.      #Can Replace with a more unique name <br>  description = &quot;Allow traffic on ports 22 and 8080&quot;<br><br>  ingress {<br>    description = &quot;Allow SSH Traffic&quot;<br>    from_port   = 22<br>    to_port     = 22<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;] #This will be replaced by you EC2 public IP after you deploy this infrastruction<br>  }<br><br>  ingress {<br>    description = &quot;Allow HTTPS Traffic&quot;<br>    from_port   = 443<br>    to_port     = 443<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br><br>  ingress {<br>    description = &quot;Allow 8080 Traffic&quot;<br>    from_port   = 8080<br>    to_port     = 8080<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br><br>#Rule for outgoing traffic<br>  egress {<br>    from_port   = 0<br>    to_port     = 0<br>    protocol    = &quot;-1&quot; <br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/927/1*mTuSRf5geCAn0u0mbLzd_w.jpeg" /></figure><h3><strong>Create an S3 Bucket</strong></h3><p>Below is the creation of a s3 bucket:</p><pre>resource &quot;aws_s3_bucket&quot; &quot;the-jenkins-bucket2026-lj&quot; {<br>  bucket = var.aws_s3_bucket<br><br>  tags = {<br>    Name = &quot;the-jenkins-bucket2026-lj&quot;<br>  }<br>}<br>resource &quot;aws_s3_bucket_ownership_controls&quot; &quot;s3_bucket_acl_ownership&quot; {<br>  bucket = aws_s3_bucket.the-jenkins-bucket2026-lj.id<br>  rule {<br>    object_ownership = &quot;ObjectWriter&quot;<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*ZZFmJ4VYqFR8dmSxJ3f7rQ.jpeg" /></figure><h3><strong>Create a Jenkins Shell Script file</strong></h3><p>Creating a Jenkins shell script file will allow us to bootstrap to automatically install and start Jenkins.</p><pre>!#/bin/bash<br>sudo yum update –y<br>sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo<br>sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key<br>sudo yum upgrade<br>sudo dnf install java-17-amazon-corretto -y<br>sudo yum install jenkins -y<br>sudo systemctl enable jenkins<br>sudo systemctl start jenkins<br>sudo systemctl status jenkins</pre><h3><strong>Create a Variables file</strong></h3><p>When using Terraform a <strong>variables.tf</strong> file is an amazing file where you can provide defined recyclable resources. A great way to think about this file is as a recipe card. It lists all of the ingredients which would be the “variables” needed to complete the build.</p><pre>variable &quot;aws_region&quot; {<br>  type    = string<br>  default = &quot;us-east-1&quot; # You can set a default region or leave it without default to require it at runtime<br>}<br><br>variable &quot;instance_type&quot; {<br>  default = &quot;t2.micro&quot; # Specifies the EC2 instance type. Adjust this based on your requirements.<br>  type    = string<br>}<br><br>variable &quot;ami&quot; {<br>  default = &quot;ami-0c614dee691cbbf37&quot; # The AMI ID for the EC2 instance. Ensure it corresponds to the desired Amazon Linux 2 AMI version.<br>  type    = string<br>}<br><br>variable &quot;key_name&quot; {<br>  default = &quot;myjenkinskp&quot; # The name of the SSH key pair used to access the EC2 instance. Ensure this key exists in your AWS account.<br>  type    = string<br>}<br><br>variable &quot;aws_s3_bucket&quot; {<br>  default = &quot;the-jenkins-bucket2026-lj&quot; # The name of the S3 bucket to store Jenkins artifacts. Make sure the name is unique globally.<br>  type    = string<br>}<br><br>variable &quot;security_group_name&quot; {<br>  default = &quot;my_jenkins_sg&quot;<br>  type    = string<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0xdBut8KaS4dj4P_T3X45Q.jpeg" /></figure><h3><strong>Phase 3: Confirming the Terraform Workflow</strong></h3><p>We may now begin the process of confirming the workflow of Terraform. Use the following commands in the order you see below:</p><pre>terraform init<br><br>terraform fmt <br><br>terraform validate</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*xVDYyxQs5osNbNbsjzv_Fw.jpeg" /><figcaption>Success confirmation after running terraform init command</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*1Nt69x85bwAiZ6yAWxS3ng.jpeg" /><figcaption>Success confirmation after running terraform validate</figcaption></figure><p>The next thing to do is generate an execution plan and see the changes Terraform will make before based off the configuration files. Use the following command below:</p><pre>terraform plan </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*XGfP5P1BXWiBBSEAVmcetA.jpeg" /><figcaption>Success confirmation of terraform plan command</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*O6SxG8HikEM7MkfzqeKpgw.jpeg" /></figure><p>The final step will be automatically approving and applying the changes that Terraform would like to do by using the following command below:</p><pre>terraform apply --auto-approve</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*nmzvgdv_TNMXGI_mPRuejA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*LtGDciFsHG2U4FL3VWNagw.jpeg" /><figcaption>Success confirmation of running terraform apply — auto-approve command</figcaption></figure><h3><strong>Phase 4: Confirming creation of all resources</strong></h3><p>Okay we may now go ahead and confirm all of the resources were successfully created in the AWS console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vC_vj6JMWN52e5K-LueNcw.jpeg" /><figcaption>Successfully created EC2 Instance</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v4N3VgSz8_3J4FkYN283QQ.jpeg" /><figcaption>Successfully created security group</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XIGYrb0qzWdR1t8VHxKhfQ.jpeg" /><figcaption>Successfully created s3 bucket</figcaption></figure><h3><strong>Phase 5: Confirmation of Jenkins</strong></h3><p>In order to confirm Jenkins has been installed and is running on the EC2 Instance, first ssh into the instance and then run the following command:</p><pre>sudo systemctl status jenkins</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*Htq-PNYuqegiEm1XYuXf5Q.jpeg" /><figcaption>Jenkins is currently active and running</figcaption></figure><p>In AWS, navigate back to the EC2 Instance to copy and paste the IPV4 address with <strong>:8080</strong> in a new browser window. If successful, you should see this as a result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*NNRPyR8-lNkit-TGyihliQ.jpeg" /></figure><p>For the Administrator password, navigate back to your EC2 Instance terminal and input the following command:</p><pre>sudo cat /var/lib/jenkins/secrets/initialAdminPassword</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*7cQNpUlfHDFtsIBHRTfDIQ.jpeg" /><figcaption>Jenkins password</figcaption></figure><p>After inputing the Jenkins password you can proceed to fill out the following information for setting up your Jenkins profile account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*MlG8oI5PJ8PsFq5HPzBh7Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*4SxGOY4EbwRRJ4VDSvPRRQ.jpeg" /><figcaption>First select “Install suggested plugins”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qyr7sOsLnBWzLboOPqWfxA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*EcpAj4QCLyBN0EDucPAZAg.jpeg" /><figcaption>Input all of the required User information</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kv36TvMlFy_6caPlcak48A.jpeg" /><figcaption>Successfully created Jenkins Account</figcaption></figure><h3><strong>Phase 6: Removing all Terraform resources</strong></h3><p>Since we have successfully accomplished this project, it is best to deleted all the resources we created. Run the following command below to ensure all of the resources are deleted at once:</p><pre>terraform destroy</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*u89b4T866QRfOuVgft_KBQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*L7zg4Qtmcy9OXJG0IyEKoA.jpeg" /><figcaption>Successfully destroy all resources</figcaption></figure><h3><strong>Resources</strong></h3><ul><li><a href="https://www.jenkins.io/doc/book/installing/linux/?source=post_page-----d16dc95ff309--------------------------------">Linux</a></li><li><a href="https://registry.terraform.io/providers/hashicorp/aws/latest">Terraform Registry</a></li><li><a href="https://developer.hashicorp.com/terraform">Terraform | HashiCorp Developer</a></li></ul><h3><strong>Summary</strong></h3><p>If you successfully made it to the end of this project that means you have done the following:</p><ul><li>Used Terraform to create an EC2 Instance from AWS</li><li>Installed and ran Jenkins</li><li>Configured .tf files with all the resources (security groups, s3 Bucket, keypair etc.)</li><li>Created Jenkins profile</li><li>Removed all resource used with Terraform</li></ul><p>This project was great to do because it shows how powerful and useful Terraform (IaC) can be!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*L-PvcIjKGlKDIgia-CaTxA.jpeg" /></figure><p><strong>Let’s Connect</strong> — <a href="http://www.linkedin.com/in/letrelle-johnson">Linked In</a></p><p><strong>GitHub</strong> — <a href="https://github.com/Letrelle-Johnson/my-terraform-projects-lj.git">Repository</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d2a3caaa878" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker Swarm Cluster — Deploying Wordpress and MySQL]]></title>
            <link>https://medium.com/@letrellejohnson15/docker-swarm-cluster-deploying-wordpress-and-mysql-67c713be1695?source=rss-d94fb680687a------2</link>
            <guid isPermaLink="false">https://medium.com/p/67c713be1695</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[wordpress]]></category>
            <category><![CDATA[network]]></category>
            <category><![CDATA[docker-swarm]]></category>
            <category><![CDATA[mysql]]></category>
            <dc:creator><![CDATA[Letrelle Johnson]]></dc:creator>
            <pubDate>Sun, 26 Jan 2025 08:18:41 GMT</pubDate>
            <atom:updated>2025-01-26T08:18:41.942Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Docker Swarm Cluster — Deploying Wordpress and MySQL</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*800QnR6OOlHXr7Cz.png" /></figure><h3><strong>Business Scenario</strong></h3><p>Level Up Publications is an online publication that posts blogs about the hottest updates and trends in IT. Level Up Publications is in the process of transitioning its web infrastructure to a containerized environment using Docker Swarm due to the rapid growth of its reader base. In a business landscape that is increasingly digital, efficient and flexible web infrastructure is not just a competitive advantage, but a necessity. The need to quickly adapt to changing customer demands, scale up or down based on traffic, and ensure uninterrupted service availability means businesses need a solution that can manage these requirements effectively and affordably.</p><h3><strong>Business Solution</strong></h3><p>Applying Docker Swarm will significantly simplifies the process of managing and scaling applications. This allows the web application to meet peak times and scale down during off-peak times, ensuring efficient use of resources and cost savings. It also improves the resiliency of the system. If a container fails, Docker Swarm can automatically replace it, minimizing downtime. Additionally, Docker Swarm enhances application security by isolating them into separate containers, preventing vulnerabilities in one from impacting others. It also allows for secure management of sensitive data, such as passwords and API keys, through Docker secrets.</p><h3><strong>Pre-reqs</strong></h3><ul><li>EC2 Instances/VM’s</li><li>3 Nodes (2 working, 1 master)</li><li>Knowledge of Docker and Docker Swarm</li><li>CLI Knowledge</li><li>Network Configuration/ Security Group in AWS</li><li>Storage/Volume Basics</li></ul><h3><strong>Steps Implemented</strong></h3><p><strong>Deploy a 3 node Docker Swarm cluster</strong></p><p><strong>Create 2 networks. One for frontend and another for backend</strong></p><p><strong>Create MySQL service</strong></p><ul><li>associated with the backend network</li><li>Only 1 replica</li><li>Make the database service resilient and its data persistent across container restarts, use Docker Volumes.</li></ul><p><strong>Create the Wordpress service</strong></p><ul><li>Associated with the frontend network</li><li>Should use port 80</li><li>Accessible from the browser</li><li>3 replicas</li><li>Associated with the MySQL service</li></ul><h3><strong>Configure Docker Swarm Cluster</strong></h3><p>To avoid issues with Docker, I would highly advise to run the command below for each Instance/Node:</p><pre>sudo chmod 666 /var/run/docker.sock</pre><p>Start your Docker Swarm using your Node 1 (First EC2 Instance). Once you SSH in your Instance run the following command:</p><pre>docker swarm init --advertise-addr &lt;manager-node-ip&gt;</pre><p>Make sure to replace the &lt;manager-node-ip&gt; with your IP address from the manager EC2 Instance (Node 1). After using the command, the Docker Swarm will be started and provide a token for the other nodes to join.</p><p>Use the following command below to make the Node 1 EC2 Instance the manager node:</p><pre>docker swarm init --advertise-addr &lt;master node IP adress&gt;</pre><p>Here is an example of what the token should look like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*kGRKm-yYHDTo9dHH5Pk8tw.jpeg" /><figcaption>Node 1 is now a manager and has the token</figcaption></figure><p>Since you already have a terminal open for the master node (Node 1). Open 2 more windows, copy and paste the token into each. After paste the token in each Node (Node 2 &amp; 3), they should both now be part of the swarm as worker nodes.</p><p>For confirmation, navigate back to Node 1 and run the following command:</p><pre>docker node ls </pre><p>The results should look like this…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*OTeuv3ApgQikbZVQajcyHg.jpeg" /><figcaption>Node 2 &amp; 3 are now part of the swarm</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*YIEyh7j9uhl-Y2pPDQumxA.jpeg" /><figcaption>All Nodes are active and ready in the swarm</figcaption></figure><h3><strong>Configuring Frontend &amp; Backend Networks</strong></h3><p>Creating the custom frontend and backend networks allows separation between the different services being used. MySQL is utilizes the backend network for internal communication while Word Press uses the front end network for internet access.</p><p>So let’s go ahead and create these networks using these commands:</p><pre>docker network create -d overlay frontend_network<br><br>docker network create -d overlay backend_network </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*wUIMKFsLnxayaza-XvI4qA.jpeg" /><figcaption>Created frontend and backend networks</figcaption></figure><p>For confirming the networks were created use this command:</p><pre>docker network ls </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*vt3JKyDTB7XJqpdgWtbSwQ.jpeg" /><figcaption>Confirmation of networks being created</figcaption></figure><h3><strong>Establishing a Docker Secrets (ssshh it’s a secret)</strong></h3><p>Before deploying the stack, you must first create a Docker secrets for <strong><em>“db_root_pass”</em></strong> and <strong><em>“db_user_pass”</em></strong>. Use the command below:</p><pre>echo &quot;topsecretrootpassword&quot; | docker secret create db_root_pass -<br>echo &quot;topsecretpassword&quot; | docker secret create db_user_pass -</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*qoa2I1AEYgG0Mu7TnXWH-Q.jpeg" /></figure><p>Okay, we just created the secrets and it is now stored in the docker secrets.</p><h3><strong>Creating MySQL Service</strong></h3><p>Below is the docker service create command to configure MySQL service:</p><pre>docker service create \<br>  --name mysql_service \<br>  --replicas 1 \<br>  --network backend_network \<br>  --mount type=volume,source=mysql-data,target=/var/lib/mysql \<br>  --env MYSQL_ROOT_PASSWORD=topsecretrootpassword \<br>  mysql:latest</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*-uCQ3E2wFPaBUi8Crr_m0Q.jpeg" /><figcaption>Successfully created MySQL service</figcaption></figure><p><strong>Command Breakdown</strong></p><ul><li><strong>--name mysql-service</strong>: Names the service mysql_service.</li><li><strong>--replicas 1</strong>: Specifies that there will be only 1 replica of the MySQL service.</li><li><strong>--network backend_network</strong>: Connects the MySQL service to the previously created backend network.</li><li><strong>--mount type=volume,source=mysql-data,target=/var/lib/mysql</strong>: Mounts the mysql-data volume to the MySQL data directory (/var/lib/mysql) in the container. This ensures that the data is stored persistently.</li><li><strong>--env MYSQL_ROOT_PASSWORD=topsecretrootpassword</strong>: Sets the root password for MySQL. You should replace topsecretrootpassword with your own.</li><li><strong>mysql:latest</strong>: Uses the latest official MySQL image from Docker Hub.</li></ul><p><strong>Docker Volume for Persistent Data</strong></p><p>Use this command to confirm the creation of the docker volume:</p><pre>docker volume ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*U3edhSxYywR2AOkQTohwOQ.jpeg" /><figcaption>Docker Volume created</figcaption></figure><p>Use this command to confirm volume is connected to the MySQL data directory:</p><pre>docker volume inspect mysql-data</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*CfkGqhF8wdTsR23E9_3mqg.jpeg" /></figure><h3><strong>Creating WordPress Service</strong></h3><p>Now we will create the WordPress Service using the command below:</p><pre>docker service create \<br>  --name mywordpress_service \<br>  --replicas 3 \<br>  --network frontend_network \<br>  --publish 80:80 \<br>  --env WORDPRESS_DB_HOST=mysql_service:3306 \<br>  --env WORDPRESS_DB_NAME=wordpress \<br>  --env WORDPRESS_DB_USER=root \<br>  --env WORDPRESS_DB_PASSWORD=topsecretrootpassword \<br>  wordpress:latest</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*FOdZk1rK4J5ypnxF1Rz9BA.jpeg" /><figcaption>Successfully created WordPress Service</figcaption></figure><p><strong>Command Breakdown</strong></p><ul><li><strong>--name mywordpress-service</strong>: Names the service mywordpress-service.</li><li><strong>--replicas 3</strong>: Deploys 3 replicas of the WordPress service, meaning there will be 3 WordPress containers running.</li><li><strong>--network frontend_network</strong>: Connects the WordPress service to the frontend network (so it can communicate with MySQL).</li><li><strong>--publish 80:80</strong>: Exposes port 80 of the WordPress container to port 80 of the host machine, making it accessible from the browser</li><li><strong>--env WORDPRESS_DB_HOST=mysql-service:3306</strong>: Sets the WORDPRESS_DB_HOST environment variable to point to the MySQL service (mysql-service) on port 3306 (default MySQL port).</li><li><strong>--env WORDPRESS_DB_NAME=wordpress</strong>: Sets the database name to wordpress.</li><li><strong>--env WORDPRESS_DB_USER=root</strong>: Specifies the MySQL username (root).</li><li><strong>--env WORDPRESS_DB_PASSWORD=my-secret-pw</strong>: Specifies the MySQL password (topsecretrootpassword).</li><li><strong>wordpress:latest</strong>: Uses the official WordPress image from Docker Hub.</li></ul><p>If you would like to access your WordPress, input <strong>“http://&lt;your-server-ip-address&gt;:80&quot; </strong>in the web browser</p><h3><strong>Confirming your Services</strong></h3><p>First, confirm My SQL &amp; WordPress service is currently running. You can verify using the command below:</p><pre>docker service ps mysql_service<br><br>docker service ps mywordpress_service </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*an0El8dtpLrSp4njb26frw.jpeg" /><figcaption>Confirmation both services are running</figcaption></figure><p><strong>Locating the My SQL Container</strong></p><p>You will need to locate either the container ID or MySQL name in order to communicate with it. To list out all of the container in your stack, use the command below:</p><pre>docker ps</pre><p>The container running with the image <strong>“mysql:latest” </strong>image is where you would see the container ID and the name of the container</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*Kl6VXVLjAeNWH69ZIGTEVQ.jpeg" /></figure><p><strong>Acquiring MySQL from the Container</strong></p><p>Now that you have the container ID, you are now able to access My SQL straight from inside the container! Use the following command below:</p><pre>docker exec -it &lt;container_name&gt; mysql -u root -p</pre><p>Using this command initiates MySQL client within the My SQL container logging you in as the root user. Since you’re logging in as the root user you would be required to provide the root password. Earlier, we did set the password and stored it in the secrets which we should be in the container. The path should be <strong>“/run/secrets/db_root_pass”</strong></p><p>Congratulations! You successfully are now in the database!</p><h3><strong>Resources</strong></h3><ul><li><a href="https://docs.docker.com/engine/swarm/?source=post_page-----865bb531b17b--------------------------------">Swarm mode</a></li><li><a href="https://docs.docker.com/engine/swarm/swarm-tutorial/deploy-service/?source=post_page-----865bb531b17b--------------------------------">Deploy a service to the swarm</a></li></ul><h3>Summary</h3><p>In conclusion, we have successfully configured and deployed a 3 Node Docker Swarm using EC2 Instances. The Nodes used both frontend and backend networks controlling what they should and shouldn’t be exposed to. Creating the MySQL service with a Docker volume was an important piece for allowing it to be extremely resilient and data persistent across container restarts/reboot. Providing WordPress the ability to be ran on 3 replicas while being connected to My SQL database enhances the availability. Overall, Docker Swarm illustrates protection, scalability, and flexibility for applications in a containerized environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*L-PvcIjKGlKDIgia-CaTxA.jpeg" /></figure><p><strong>Let’s Connect! —</strong> <a href="http://www.linkedin.com/in/letrelle-johnson">Linked In</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67c713be1695" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker Swarm: Container Orchestrating]]></title>
            <link>https://medium.com/@letrellejohnson15/docker-swarm-container-orchestrating-5b5c8c294b93?source=rss-d94fb680687a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b5c8c294b93</guid>
            <category><![CDATA[container-orchestration]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[docker-swarm]]></category>
            <category><![CDATA[ssh]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Letrelle Johnson]]></dc:creator>
            <pubDate>Sun, 19 Jan 2025 16:53:22 GMT</pubDate>
            <atom:updated>2025-01-19T16:53:22.450Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*SnPd0tVRKDBaGtzK.PNG" /></figure><h3><strong>Business Scenario</strong></h3><p>Your company is new to using containers and has been having issues with containerized workloads failing for their global shipping application. The company is worried about additional potential data loss as they have no way to reschedule containers that are failing. The company has one week to update their infrastructure and leverage the use of Docker Swarm so that data can be restored for the containers that are no longer in a healthy state. Because they are not familiar with Docker Swarm, they will need a step-by-step guide on setting up a Swarm for their containerized workloads to assist with container orchestration.</p><p>The solution should include the use of a global service since the company’s global shipping application is having issues. Your Swarm should be able to launch the containers using a global service. Remember, a service is simply a group of containers of the same image that facilitates the scaling of applications. Your global shipping application will require the use of at least three networked hosts, which should be AWS EC2 Ubuntu 20.04 instances.</p><h3>Business Solution</h3><p>As the junior engineer, you are responsible for only configuring Docker Swarm and providing your team with a step-by-step guide of setting up the Swarm. You should assume that there are new team members that may not have Docker installed on their devices. Your swarm creation should include the following steps via your remote ssh terminal in VSCode:</p><h3><strong>Pre-reqs</strong></h3><ul><li>Docker knowledge</li><li>Network knowledge for Local setup or Cloud</li><li>SSH Access to remote nodes</li><li>SSH Host configured on chosen code (ex: VS Code)</li><li>VMs/Multiple machines accessibility</li></ul><h3><strong>Configuring 3 Node Docker Swarm on AWS</strong></h3><p><strong>Creating Node 1 (Current Working Environment)</strong></p><p>The current EC2 Instance will be used as your Node 1 for your swarm. When creating Node 2 &amp; 3 they must share the same OS, Key-pair, and Security group as Node 1. This was all setup prior in the AWS console when creating the EC2 Instances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*2Mzo7Yq9CYWRcG8G9bhEmw.jpeg" /><figcaption>3 Running Instances</figcaption></figure><p>Navigate to VS Code and open a terminal. We need to open a terminal to change the hostname for the EC2 Instance. This will make it easier to identify which is which. Use the following command below:</p><pre>sudo hostnamectl set-hostname node1 <br>reboot</pre><p>After running the command, close out of the terminal window and reopen a new one. Make sure to SSH into each node, when doing so you should see the update</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Aw8WNiU2ClIjw-zlOY47A.jpeg" /><figcaption>SSH of each node</figcaption></figure><p><strong>Modifying Node 1 Security Group</strong></p><p>In this section, we must modify the security group for the EC2 Instance (Node 1) to allow all traffic from the VPC CIDR. When doing this, we can use the private IPs to include the other nodes within the swarm. This prevents the need to use the public IP address when restarting.</p><p><strong>***FYI*** </strong>This update to the security group only pertains to the swarm. The public IP address of Node 1 would still be needed when first connecting to VS Code.</p><p>In AWS, you have the option to update the Name Tag to Node 1</p><p><strong>Launching 2 additional EC2 Instances (Node 2 &amp; 3)/ Instance Configurations</strong></p><p>Once your EC2 Instances are running make sure to update the name tags as Node 2 &amp; 3 (makes it easier to identify).</p><p>Below is how the two EC2 Instances were configured:</p><ul><li><strong>OS —</strong> Ubuntu Server 24.04 LTS</li><li><strong>Instance type —</strong> t2.micro</li><li>For keypair, use the same SSH keypair from Node 1</li><li><strong>Security Group —</strong> Utilize the same security group as Node 1</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*l5NBTeV9zr2_8eW94HJA1g.jpeg" /><figcaption>Updated Instances name to easily identify which belongs to which node</figcaption></figure><p><strong>Adding new rule to security group (inbound &amp; outbound)/ User data script</strong></p><ul><li><strong>Type — </strong>All TCP</li><li>Copy and the IPV4 CIDR from the VPC and that is attached to the security group (SG)</li><li>Paste the IPV4 CIDR in the “Source”</li><li>Click Save</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VJ8insoOdxjH1pIyl9FT2Q.jpeg" /><figcaption>Inbound rule edit</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rxG0faEl8pK6EzqaabPADQ.jpeg" /><figcaption>Outbound rule edit</figcaption></figure><p>In the user data script section, use the following command below to install docker for each instance</p><pre>curl -fsSL https://get.docker.com -o get-docker.sh<br>sh get-docker.sh</pre><h3><strong>Adding SSH capability to Node 1</strong></h3><p>Inside the Node 1 terminal, run the following command:</p><pre>cd/root/.ssh</pre><p>Next, use a text editor of your choice to copy and past the Node 1.pem file into the directory. Confirm the file name and the name of the key your using to SSH actually match.</p><h3><strong>Creating SSH config file for Node 1</strong></h3><p>At this point we should be in the ssh directory and will be able to create a SSH config file for Node 1. Create the file config file using the following info below with a text editor.</p><pre>Host node2<br>HostName PrivateIP<br>User ubuntu<br>IdentityFile /root/.ssh/yourkey.pem<br><br>Host node3<br>HostName PrivateIP<br>User ubuntu<br>IdentityFile /root/.ssh/yourkey.pem</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*7Sqr91juwxW3RVE8FbSLGw.jpeg" /></figure><p>Okay, you should now have the ability to connect and run the SSH Node 2 &amp; Node 3. If you successfully ssh into the two nodes that’s great! The next thing would be verifying docker is installed into each node. Since they haven’t been named yet it just shows the IP address for the host names.</p><h3><strong>Changing Hostnames for Node 2 &amp; 3</strong></h3><p>In VS Code, open two more window terminals and change the names for Node 2 &amp; 3. One by one, I will simply change them to “Node 2” and “Node 3”. Use the following command below:</p><pre>hostnamectl set-hostname node2<br>reboot<br><br>hostnamectl set-hostname node3<br>reboot</pre><p><strong>***FYI*** You might not see the change immediately when you run the command. If so, make sure to close out of the terminal and open a new one to SSH into the nodes again. The changes should now appear.</strong></p><h3><strong>Confirming SSH connection</strong></h3><p>Before we SSH into Node 2 &amp; 3 you should have three terminal windows open for each node. Go into the window and use the following command:</p><pre>ssh node2<br><br>ssh node3</pre><p>If everything went well, we should see have three terminals open for each Node 1, 2, &amp; 3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*68r84mN-GrRC6BVj3Qq0mg.jpeg" /><figcaption>Updated each instance name to node1, node2, and node3</figcaption></figure><p>After successfully SSH into the nodes, use this command to confirm Docker is installed:</p><pre>docker version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jgkCuau-9dMzOjLHZOA6Xw.jpeg" /><figcaption>Confirmation of Docker Installation</figcaption></figure><p>Despite already inputing the command in the user data of the instance for docker to be installed, if Docker doesn’t seem to be installed use the following command in the terminal for Node 2 &amp; 3:</p><pre>curl -fsSL https://get.docker.com -o get-docker.sh<br>sh get-docker.sh</pre><p><strong>Activation of Docker Swarm for Manager &amp; Worker Nodes</strong></p><p>In Node 1, use the following command to give it the manager Node.</p><pre>docker swarm init --advertise-addr &lt;master node IP adress&gt;</pre><p>After running the command you will get a join token for the worker nodes</p><p><strong>Example:</strong></p><pre>Swarm initialized: current node is now a manager.<br><br>To add a worker to this swarm, run the following command:<br><br>    docker swarm join --token &lt;SWMTKN&gt; 35.173.178.234:2377<br><br>To add a manager to this swarm, run &#39;docker swarm join-token manager&#39; and follow the instructions.</pre><p>You would need to copy and paste the token <strong>docker swarm join — token &lt;SWARM-TOKEN&gt; 35.173.178.234:2377 for both Node 2 &amp; 3. Run the token. This is just an example. DON’T USE THE SAME IP address you see here. Your specific IP address will be listed at the end of the token command line.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S5cOOj0L-vEWsHfVvFlAZQ.jpeg" /><figcaption>Node2 &amp; 3 are now workers, it says “This node joined a swarm as a worker”</figcaption></figure><p>At this point both Node 2 &amp; 3 should be connected and part of the swarm as worker nodes. Run the following command in Node 1 to verify:</p><pre>docker node ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*cBX1uFOtdOiWinXjrN-vMA.jpeg" /><figcaption>Confirmation of all nodes are part of the swarm. They are ready and active.</figcaption></figure><p><strong>***FYI*** The token you copy and paste is unique to your swarm ONLY. Please keep the token secure. If you ever need to reproduce the token to access the swarm use the following command below:</strong></p><pre>docker swarm join-token --rotate worker</pre><h3><strong>Conclusion</strong></h3><p>In conclusion, I have successfully established 3 Docker Swarm nodes using EC2 Instances on AWS. Creating the nodes allows scalability and distribution of the containerized environment. Establishing the hostname, security group, and SSH access provides flawless communication amongst all nodes. Installing Docker on each of the nodes gives a strong and obtainable swarm. This assignment has given myself the knowledge of managing, deploying, scaling, and enhancing of Docker swarm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*L-PvcIjKGlKDIgia-CaTxA.jpeg" /></figure><p><strong>Let’s Connect! —</strong><a href="http://www.linkedin.com/in/letrelle-johnson"><strong> </strong>Linked In</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b5c8c294b93" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Continuous Development and Deployment utilizing Docker & Jenkins]]></title>
            <link>https://medium.com/@letrellejohnson15/continuous-development-and-deployment-utilizing-docker-jenkins-fa890fe24f5c?source=rss-d94fb680687a------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa890fe24f5c</guid>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[persistent-volume]]></category>
            <category><![CDATA[cicd]]></category>
            <dc:creator><![CDATA[Letrelle Johnson]]></dc:creator>
            <pubDate>Sat, 11 Jan 2025 21:29:38 GMT</pubDate>
            <atom:updated>2025-01-12T15:36:41.964Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7GXM5g1_nOUYNGXy.png" /></figure><h3><strong>Business Scenario</strong></h3><p>Level Up Solutions, a leading provider of technology solutions, is constantly exploring ways to optimize its software development and deployment procedures. The company is keen to adopt tools and methodologies that can streamline their operations, improve productivity, and enhance the quality of their applications. To address these needs, the proposed solution involves leveraging Docker and Jenkins.</p><h3><strong>What is Jenkins??</strong></h3><p>Jenkins is a Java-based open source automation server. It aids developers with the automating process of building, deploying, and testing software applications. In addition, with continuous integration (CI) and continuous development (CD) developers can configure changes to projects with ease.</p><h3><strong>Business Objective</strong></h3><p>The main objective of this project at Level Up Solutions is to use Docker for creating and managing Jenkins containers, emphasizing the implementation of persistent volumes. This strategy aims to build a robust, scalable Continuous Integration and Continuous Deployment (CI/CD) pipeline, facilitating frequent and reliable deployment of software updates.</p><h3><strong>Pre reqs</strong></h3><ul><li>Basic Docker and Jenkins knowledge</li><li>Running EC2 Instance with installation of Docker</li><li>EC2 Security group with port 8080 accessibility</li><li>SSH into EC2 Docker Instance using VS Code</li></ul><h3><strong>Pull the Jenkins LTS image from Docker Hub</strong></h3><p>Before we pull the Jenkins LTS image from Docker Hub, to avoid any permission issues/restrictions open a new terminal and input the following:</p><pre>sudo chmod 666 /var/run/docker.sock</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*79cY4MekjHcZfNg0T20Q4Q.jpeg" /></figure><p>Okay now we need to pull the latest version of Jenkins LTS image. Use the command below:</p><pre>docker pull jenkins/jenkins:lts-jdk17</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*1os6kDlGWeDAe7DkMqxIjg.jpeg" /></figure><p>Let’s very the image has been pulled…</p><pre>docker image ls </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*naOvyUAQLEoK2K2Ut29sUw.jpeg" /></figure><h3><strong>Create a Docker volume for Jenkins to persist its data</strong></h3><p>Why use a volume? Creating the Docker volume is an important component. It allows the ability for selective data of your choice to be stored. The data could be build logs, user data, configuration files, persistent data from Jenkins etc.</p><p>Input the following command to create a docker volume:</p><pre>docker volume create &lt;name of volume&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*dr0-34L5GBn1DV1i3ac5lw.jpeg" /></figure><h3><strong>Run the container with the volume and correct port mapped to the container</strong></h3><p>In this section, we will run the Jenkins container with the newly created volume attached with the appropriate ports. Use the following command below:</p><pre>docker run -d --name jenkins -p 8080:8080 -v jenkins_volume_data:/var/jenkins_home jenkins/jenkins:lts-jdk17</pre><p><strong>Here’s the breakdown of the command:</strong></p><ul><li><strong>docker run — </strong>configures a new docker container</li><li><strong>d — </strong>this means “detach mode” this allows docker container to run in the background. The terminal will be clear of any other commands</li><li><strong>name jenkins — </strong>this assigns the name for the container which I gave the name “jenkins” just to keep it simple</li><li><strong>p 8080:8080 — </strong>this maps port 8080 on your local machine as well as the port 8080 in the container</li><li><strong>v jenkins_volume_data:/var/jenkins_home — </strong>this mounts the Docker volume to <strong>/var/jenkins_home </strong>the home directory within the container ensuring the Jenkins data is saved even if the container is stopped.</li><li><strong>jenkins/jenkins:lts-jdk17 —</strong> this is the Jenkins imaged pulled and being used</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8vwMwhyMKRFphP-i9Am_DQ.jpeg" /></figure><p>Let’s confirm the container is there….</p><pre>docker container ls </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dagx7kYANCisWDCNtOrISA.jpeg" /></figure><p>Cool it’s there!</p><p>Use this command to ensure the volume is mounted correctly:</p><pre>docker inspect da0f0bc79427</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*RD8xWbwAfU6j_HjZIhjIHQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*DnUoQOV2DOMHK2OJh2wDnQ.jpeg" /></figure><p><strong>Retrieve the Admin password</strong></p><p>Since we are accessing Jenkins for the first time we need the initial password. We will first bash into the container using the following command:</p><pre>docker exec -it jenkins /bin/bash</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*KsHrUk4YShG_hzhuluZE_A.jpeg" /><figcaption>Successfully bash into container</figcaption></figure><p>To retrieve the Jenkins admin password we will use the following command:</p><pre>cat /var/jenkins_home/secrets/initialAdminPassword</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*b6RN7wD7Dfp76No23qG92g.jpeg" /><figcaption>Admin password</figcaption></figure><p>Now that we retrieved the admin password we can proceed onto the next step.</p><h3><strong>Login and create a new user</strong></h3><p>Navigate to the Jenkins page using the EC2 Instance IPV address. Open a new window and make sure to add port <strong>:8080 </strong>at the end of the IPV address.</p><p><strong>****Attention**** If the default page doesn’t appear, ensure your EC2 Instance security group has port 8080 included in the inbound rules.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*1Q76cu6QbqnfcZrL7MFgcg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hP5mxIXcSgYLtYf62MKBTg.jpeg" /></figure><p>Now that we’re on the default page. Let’s go ahead and input the admin password and select continue</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*84zvzXIXi_7ClaYU4OvecQ.jpeg" /></figure><p>Proceed to select <strong>“Install suggested plug-ins”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*1Yl4sjKGHYCmGjEd4OYrOw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*_ru2VbaJw_CHcMtIh7mPcg.jpeg" /><figcaption>Create a new user</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*SpcEK3SLWG30vllqG6n0Ow.jpeg" /><figcaption>URL for newly created User</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*ESu9V5k9A5vwOVkZTHUSGg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*prvqMnKJHJdoLCj0jhK0WQ.jpeg" /><figcaption>New User Dashboard</figcaption></figure><p>Perfect!! I successfully created my account to use for my CI/CD pipeline projects!!</p><h3><strong>Launching new Jenkins container using the same volume and verify that the data has persisted by logging in as the newly created user</strong></h3><p>Alright, to avoid any confusion I will stop and remove the old container using the following commands:</p><pre>docker stop jenkins<br><br>docker rm jenkins </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*jnS_xSFGYI33Pjmi9JgMdQ.jpeg" /></figure><p>Let’s confirm the container has been removed and not running</p><pre>docker ps </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*rIhI-V4ndSNKgot6UbgTCA.jpeg" /></figure><p>Now we can create a new container and attach it to the volume we created previously using this command:</p><pre>docker run -d --name jenkins_containerv2 -p 8080:8080 -v jenkins_volume_data:/var/jenkins_home jenkins/jenkins:lts-jdk17</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m5xz1LmfF549JlcuihcxYA.jpeg" /></figure><p>We can try to login to the Jenkins dashboard using the EC2 Instance. This time when doing it with the :8080 port, notice it shows the login page instead of the default set page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B6XHG8qSP0i-UKJs37cm9g.jpeg" /></figure><p>Input the username and password from before and see if it works….</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TjuasA62Qc0nmW4OxLoGVg.jpeg" /></figure><p>Awesome!!! We just successfully login into the Jenkins dashboard using the new Docker container</p><p>Just to confirm the new container is using the same volume use the following command:</p><pre>docker ps --filter volume=jenkins_volume_data</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TaVS-cQqyzsK4R-FwYgCUA.jpeg" /></figure><p><strong>Resources —</strong> <a href="https://www.jenkins.io/doc/">https://www.jenkins.io/doc/</a></p><h3><strong>Summary</strong></h3><p>The purpose of this project was integrating Docker and Jenkins for Level Up Solutions. In doing so, the company can establish a resilient, scalable, and efficient solution for its CI/CD requirements. Utilizing this method optimizes the company’s software development and deployment procedures but also provide significant advantages in terms of cost savings, consistency, and reliability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*L-PvcIjKGlKDIgia-CaTxA.jpeg" /></figure><p><strong>Let’s Connect</strong> — <a href="http://www.linkedin.com/in/letrelle-johnson">Linked In</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa890fe24f5c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Containerized and Deployment of Web Application using Docker]]></title>
            <link>https://medium.com/@letrellejohnson15/containerized-and-deployment-of-web-application-using-docker-b1584c328f32?source=rss-d94fb680687a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1584c328f32</guid>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[web-applications]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[aws-ec2-instance]]></category>
            <dc:creator><![CDATA[Letrelle Johnson]]></dc:creator>
            <pubDate>Sat, 04 Jan 2025 22:33:00 GMT</pubDate>
            <atom:updated>2025-01-04T22:33:00.496Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*h9hPVeks-b0LUnUe.png" /></figure><h3><strong>Now what exactly is Docker???</strong></h3><p>Docker is a platform as a service (PaaS) used to deploy, deliver and run applications within a container. The next question your probably wondering is what’s a container? A container is an isolated user-space package that contains all of the necessary elements to run a software.</p><h3><strong>Business Scenario</strong></h3><p>Level Up Solutions is a dynamic technology company that offers innovative web solutions to its clients. As part of their software development process, they have decided to adopt containerization using Docker to streamline their web application deployment. Docker provides Level Up Solutions with a flexible and efficient way to package, distribute, and run their applications in isolated containers, ensuring consistency and portability across different environments.</p><h3><strong>Pre-reqs</strong></h3><ul><li>VS Code downloaded or local terminal</li><li>Index.html file</li><li>AWS Account</li><li>AWS EC2 Ubuntu Instance (active and running)</li><li>Installation of Docker &amp; SSH host configuration</li></ul><h3><strong>Part 1: Connect to EC2 Instance</strong></h3><ul><li>Navigate and open VS Code</li><li>Select the blue box located on the left corner of the screen</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/316/1*qIJ3rwUMZhcO78GIFiC2gg.jpeg" /></figure><ul><li>Select <strong><em>“Connect to Host”</em></strong></li><li>Select <strong><em>“Configure SSH Hosts”</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*hVI-kOCs3rjiqvGCixPPmQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*u_DaYcVWl4m8-_3-iZ236w.jpeg" /></figure><p>You must then copy and paste the IP address of the running EC2 Instance in the config file in the line titled <strong><em>“HostName”</em></strong>. Once you do, make sure to copy and save it</p><ul><li><strong>**Disclaimer Alert*** You must copy and paste the IP address in the config file every time you choose to SSH into Docker</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*NcArBAYTtExBBce3SMGBmQ.jpeg" /></figure><p>Once again go back down to the left corner and select the blue box</p><ul><li>Select <strong><em>“Connect to Host”</em></strong></li><li>Select <strong><em>“Configure SSH Hosts”</em></strong></li><li>Select your host, (mine is called Docker)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*diU_578H838kpSxBcddSTg.jpeg" /></figure><p>If done correctly on the left bottom of the screen it should say this….</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/242/1*xVgq6Ox0GPTMwc1OguetYQ.jpeg" /></figure><p>Just to confirm your in Docker, you can also run this in the terminal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*uaFw7OGF-vKgRirX5X6f_g.jpeg" /></figure><p>Alright, at this moment we have successfully SSH into our EC2 Instance using VS Code. The next thing to do is create a Docker Container.</p><p><strong>***Important Message*** If you receive a message saying “permission denied” it stating the user doesn’t have permission to access the docker demon. The command below will resolve this issue and give permission.</strong></p><pre>sudo chmod 666 /var/run/docker.sock</pre><h3><strong>Part 2: Create Docker Container</strong></h3><ul><li>Open a VS Code terminal</li><li>In the terminal, use the following command below to create an Ubuntu container detached on port 80</li></ul><pre>sudo docker run -d --name trelle_docker_ubuntu -p 80:80 ubuntu</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*jJnJksiwxuIbGJMiMZDo-w.jpeg" /></figure><p>For verifying the container has been created use the following command below….</p><pre>sudo docker container ls -a</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*8rEsppR65Kg3m7ok383xIQ.jpeg" /></figure><p>Awesome!! We now have an active running container!</p><p>Next on the agenda is to update all of the packages within the container</p><h3><strong>Part 3: Using BASH shell update all packages within the container</strong></h3><ul><li>Use the following command to pull the latest Ubuntu image from Docker</li></ul><pre>docker pull ubuntu</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*EEoLNwbbGoXsa-xTzbuPAA.jpeg" /></figure><ul><li>In the terminal, use the following command to access the Bash shell within the container…</li></ul><pre>sudo docker exec -it container name bash </pre><ul><li><strong>**Important*** Make sure to replace the “container name” portion of the Bash script</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*_YJc_YtQLqnlkgyi5DOXsQ.jpeg" /></figure><p>Notice the <strong><em>root@57bf2ce9587</em></strong>, this confirms we are now in the bash shell</p><p>Update the packages by using this commands…</p><pre>apt update<br><br>apt upgrade -y</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*KXHckTmpRDJ-_yafrVtfTw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*LcTWvgjlpzUu6jpHPPAxkw.jpeg" /></figure><p>Cool…. now we successfully updated all the packages within the container. We can now move on to the next step which is installing Apache2.</p><h3><strong>Part 4: Using BASH install Apache2 on the Ubuntu container</strong></h3><p>In the terminal use the following command to install the Apache2 server…</p><pre>apt install apache2 -y</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aKBnJ_m9EwZtd_CkiQ_Tgw.jpeg" /></figure><p>Use the following commands below to start and verify the status of the Apache2…</p><pre>service apache2 start<br><br><br>service apache2 status </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aoUyyrbC3J1xIKT2hcgKSQ.jpeg" /><figcaption>Status shows the Apache2 is running</figcaption></figure><p>Since we confirm the Apache2 is running, let’s go ahead and try to access the webpage. Copy and paste the EC2 public IP address in a new browser window. If it works great!, if not, the security group needs to be updated to allow traffic for port 80.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gw-zXLJY-0AB3m1Pi86zUw.jpeg" /><figcaption>Error trying to access webpage</figcaption></figure><p>Unfortunately, it didn&#39;t work, so let’s adjust the security group settings and try this again…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1XpWH5Zd-qQApmJ80WOxzQ.jpeg" /><figcaption>Added HTTP &amp; HTTPS</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JkMpbssv1k3zkk3M-b1qvg.jpeg" /></figure><p>Nice! This time it works!</p><p>Let’s go ahead and actually replace this Ubuntu default page with a custom web page</p><h3><strong>Part 5: Insert a custom web page</strong></h3><p>First thing to do is to install a text editor such as nano or vim. In my case, I decided to go with vim. Which ever one you choose to download, use the following command below….</p><p><strong>***Replace the “vim” with “nano” if you choose to use it instead***</strong></p><pre>apt install vim</pre><p>Next, go into the html file by using this command…</p><pre>vim /var/www/index.html</pre><p>Here is the default Apache2 page. I will replace this with my custom webpage and refresh it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gO6DBpD_6CVqSffUxUxR8Q.jpeg" /></figure><p>Once I was in the index.html file, I used the following commands below to delete and insert the new HTML code for my custom webpage.</p><ul><li><strong>gg</strong> — this moves the curser to the first line of the html code</li><li><strong>dG</strong> — this deletes all lines</li><li>Copy and paste new HTML webpage code</li><li><strong>:wq!</strong> — this will save the new HTML webpage code</li></ul><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;meta name=&quot;description&quot; content=&quot;Lebron James&#39; Greatest Achievements in Basketball&quot;&gt;<br>    &lt;meta name=&quot;author&quot; content=&quot;Your Name&quot;&gt;<br>    &lt;title&gt;LeBron James: Greatest Achievements&lt;/title&gt;<br>    &lt;link rel=&quot;stylesheet&quot; href=&quot;styles.css&quot;&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;header&gt;<br>        &lt;h1&gt;LeBron James: Greatest Achievements&lt;/h1&gt;<br>        &lt;nav&gt;<br>            &lt;ul&gt;<br>                &lt;li&gt;&lt;a href=&quot;#intro&quot;&gt;Introduction&lt;/a&gt;&lt;/li&gt;<br>                &lt;li&gt;&lt;a href=&quot;#career&quot;&gt;Career Highlights&lt;/a&gt;&lt;/li&gt;<br>                &lt;li&gt;&lt;a href=&quot;#records&quot;&gt;Records &amp; Milestones&lt;/a&gt;&lt;/li&gt;<br>                &lt;li&gt;&lt;a href=&quot;#legacy&quot;&gt;Legacy&lt;/a&gt;&lt;/li&gt;<br>            &lt;/ul&gt;<br>        &lt;/nav&gt;<br>    &lt;/header&gt;<br><br>    &lt;section id=&quot;intro&quot;&gt;<br>        &lt;h2&gt;Introduction&lt;/h2&gt;<br>        &lt;p&gt;LeBron James is one of the greatest basketball players of all time, known for his athleticism, versatility, and leadership on the court. Over his illustrious career, LeBron has amassed numerous accolades, records, and championships that have solidified his legacy in the NBA.&lt;/p&gt;<br>    &lt;/section&gt;<br><br>    &lt;section id=&quot;career&quot;&gt;<br>        &lt;h2&gt;Career Highlights&lt;/h2&gt;<br>        &lt;ul&gt;<br>            &lt;li&gt;4× NBA Champion (2012, 2013, 2016, 2020)&lt;/li&gt;<br>            &lt;li&gt;4× NBA Most Valuable Player (MVP) (2009, 2010, 2012, 2013)&lt;/li&gt;<br>            &lt;li&gt;17× NBA All-Star (2005–2021)&lt;/li&gt;<br>            &lt;li&gt;2× Olympic Gold Medalist (2008, 2012)&lt;/li&gt;<br>            &lt;li&gt;NBA All-Star Game MVP (2006, 2008, 2018)&lt;/li&gt;<br>            &lt;li&gt;NBA Rookie of the Year (2004)&lt;/li&gt;<br>        &lt;/ul&gt;<br>    &lt;/section&gt;<br><br>    &lt;section id=&quot;records&quot;&gt;<br>        &lt;h2&gt;Records &amp; Milestones&lt;/h2&gt;<br>        &lt;ul&gt;<br>            &lt;li&gt;All-time NBA scoring leader (surpassing Kareem Abdul-Jabbar in 2023)&lt;/li&gt;<br>            &lt;li&gt;First player in NBA history to record over 35,000 points, 9,000 assists, and 9,000 rebounds&lt;/li&gt;<br>            &lt;li&gt;Most career playoff points in NBA history&lt;/li&gt;<br>            &lt;li&gt;Only player to lead three different franchises to an NBA title (Miami Heat, Cleveland Cavaliers, Los Angeles Lakers)&lt;/li&gt;<br>            &lt;li&gt;Longest consecutive streak of 25+ points in playoff games (13 games)&lt;/li&gt;<br>        &lt;/ul&gt;<br>    &lt;/section&gt;<br><br>    &lt;section id=&quot;legacy&quot;&gt;<br>        &lt;h2&gt;Legacy&lt;/h2&gt;<br>        &lt;p&gt;LeBron James&#39; impact extends beyond basketball. Off the court, he is a philanthropist, businessman, and activist. His LeBron James Family Foundation has contributed millions of dollars to various causes, including the &quot;I PROMISE School&quot; for at-risk children in Akron, Ohio. LeBron&#39;s ability to excel on the court while remaining socially conscious has made him a global icon and an inspiration to millions.&lt;/p&gt;<br>    &lt;/section&gt;<br><br>    &lt;footer&gt;<br>        &lt;p&gt;&amp;copy; 2025 All Rights Reserved. Created by [Your Name]&lt;/p&gt;<br>    &lt;/footer&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><h3><strong>Part 6: Verify accessibility of webpage</strong></h3><p>If I go back and refresh the browser it should show the new and improved custom web page.</p><p><strong>***Final Disclaimer Alert*** I created this custom webpage because I am a huge LeBron fan haha.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PrxBwsDksDcATxAVI-n15w.jpeg" /></figure><h3><strong>Part 7: Cleaning up resources and Stopping EC2 Instance</strong></h3><p>Alright, everything was done successfully so we can now go ahead and clean up. If certain things still need to be completed then I would not do this process just yet. These steps will cause data to be lost and stopping of services. The benefit of this process will prevent any additional charges for using the running EC2 Instance.</p><ul><li>Use this command to exit the Bash shell..</li></ul><pre>exit</pre><ul><li>Stop the container using this command</li></ul><pre>docker stop &lt;insert container name here&gt;</pre><ul><li>Remove the docker using this command</li></ul><pre>docker rm -f &lt;insert container name here&gt;</pre><ul><li>Remove any unused docker resources such as images, containers, networks to free up space using this command</li></ul><pre>docker system prune -a</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*PqUgw8vf9GuBs86hEcWQyg.jpeg" /></figure><ul><li>Navigate back to the EC2 Instance and stop the Instance to ensure no further charges will occur</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*LTkAKj5-clAwG_8xAT3fYg.jpeg" /><figcaption>Stopped EC2 Instance</figcaption></figure><h3><strong>Conclusion</strong></h3><p>Throughout the process of this project I was able to demonstrate the deployment of a web application using Docker and an AWS EC2 Instance. Utilizing Docker containerization for the application provides consistency, portability, and isolation from the user host system. Overall, using Docker gave the ability to install and update Apache2, insert a customizable HTML file, and reveal the webpage on port 80. After performing all these tasks, I ensured no further costs to be accumulated by the EC2 Instance by cleaning up the environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*vyQe7PPFIzo3fwdbQlHy1g.jpeg" /></figure><p><strong>Let’s Connect</strong> — <a href="http://www.linkedin.com/in/letrelle-johnson">Linked In</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1584c328f32" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure AI-Powered Image Recognition and Sentiment Analysis]]></title>
            <link>https://medium.com/@letrellejohnson15/azure-ai-powered-image-recognition-and-sentiment-analysis-eccb770592ed?source=rss-d94fb680687a------2</link>
            <guid isPermaLink="false">https://medium.com/p/eccb770592ed</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[sentiment-analysis]]></category>
            <category><![CDATA[image-recognition]]></category>
            <category><![CDATA[azure-ai-services]]></category>
            <dc:creator><![CDATA[Letrelle Johnson]]></dc:creator>
            <pubDate>Sat, 07 Dec 2024 06:20:55 GMT</pubDate>
            <atom:updated>2024-12-07T06:20:55.314Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*DvnKIz3Ng3pz0T5_.jpg" /></figure><p><strong>Scenario</strong></p><p>Level Up Llama Tech, a tech accessories company, faces challenges in managing customer feedback and product reviews efficiently. The company needs a solution to automatically analyze customer reviews, identify product images, and provide actionable insights to improve customer satisfaction and product quality.</p><p><strong>Solution</strong></p><p>Implement an AI-powered system that leverages Azure AI services to analyze customer reviews and identify product images. The system will use image recognition to classify product images and sentiment analysis to gauge customer satisfaction levels. By integrating these insights into the company’s customer relationship management (CRM) system, Level Up Llama Tech can quickly respond to customer needs and enhance product offerings.</p><p><strong>Benefits</strong></p><ul><li><strong><em>Improved Customer Satisfaction:</em></strong> Quickly identifying and addressing customer issues enhances the overall customer experience.</li><li><strong><em>Efficient Review Management:</em></strong> Automating the review analysis process saves time and resources.</li><li><strong><em>Enhanced Product Quality:</em></strong> Insights from sentiment analysis can guide product improvements and innovations.</li><li><strong><em>Competitive Advantage:</em></strong> Leveraging AI technologies positions Level Up Llama Tech as a forward-thinking and customer-centric company.</li></ul><p><strong>Required Executions</strong></p><ul><li>Set up Cognitive Services in Azure Portal</li><li>Store a Dataset of Customer Images and Reviews</li><li>Analyze Images with Computer Vision</li><li>Analyze Reviews with Text Analytics</li><li>Summarize the Findings</li></ul><p><strong>Phase 1: Set up Cognitive Services in Azure Portal</strong></p><p><strong>Create Resource Group</strong></p><p>Creating a resource group is essentially like creating your own personal folder. You are able to manage, control and sort all your resources in one location.</p><ul><li>Once logged into Azure account, navigate to<em> </em><strong><em>“Resource Groups”</em></strong> and select <strong>“Create”</strong></li><li>Next, you will need to fill in the following:</li><li><strong><em>Subscription:</em></strong> Azure Subscription (should be pre-filled already)</li><li><strong><em>Resource Group:</em></strong> Input a unique name for your resource group</li><li><strong><em>Region:</em></strong> Select a region best for your location</li><li>Select <strong><em>“Review and Create”</em></strong> once completed</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*3Amr3QJ7jaxu-Kx4fJjD_A.png" /></figure><p><strong>Create a Computer Vision Resource</strong></p><p>Creating this tool allows the ability to analyze and process an image</p><ul><li>Navigate to Azure home page and select <strong><em>“Create a resource”</em></strong></li><li>On the left hand side, select <strong><em>“AI + Machine Learning”</em></strong></li><li>Locate <strong><em>“Computer Vision”</em></strong>, then select <strong><em>“Create”</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*QEN3Ou8g3iy8NeHEcTmSAA.jpeg" /></figure><ul><li>Under the Computer Vision settings, complete the following:</li><li><strong><em>Subscription:</em></strong> Azure Subscription (should be pre-filled already)</li><li><strong><em>Resource Group: </em></strong>Select the newly created resource group</li><li><strong><em>Region:</em></strong> Select a region best for your location</li><li><strong><em>Name:</em></strong> Create a unique name for the Computer Vision Resource</li><li><strong><em>Pricing Tier:</em></strong> Select “Free FO” (Free Tier)</li><li>Select <strong><em>“Review and Create”</em></strong> once completed</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*jN8IlDZP2nSC0_t-nRtENA.png" /></figure><p><strong>Create a Text Analytics Resource</strong></p><p>Utilizing this tool allows the process of text to go through sentiment analysis, keyword phrase extraction, pre built question answering and more!</p><ul><li>Navigate to Azure home page and select <strong><em>“Create a resource”</em></strong></li><li>On the left hand side, select <strong><em>“AI + Machine Learning”</em></strong></li><li>Locate <strong><em>“Language Service”</em></strong>, then select <strong><em>“Create”</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*Bm2422YLGt8LiCV-iD26Zg.jpeg" /></figure><ul><li>Select <strong><em>“Continue to create your Resource”</em></strong></li><li>Under the Create Language settings, complete the following:</li><li><strong><em>Subscription:</em></strong> Azure Subscription (should be pre-filled already)</li><li><strong><em>Resource Group: </em></strong>Select the newly created resource group</li><li><strong><em>Region:</em></strong> Select a region best for your location</li><li><strong><em>Name:</em></strong> Create a unique name for the Language Service Resource</li><li><strong><em>Pricing Tier:</em></strong> Select “Free FO” (Free Tier)</li><li>Check off the box underneath <strong><em>“Responsible AI Notice”</em></strong> section</li><li>Select <strong><em>“Review and Create”</em></strong> once completed</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*srPJP25u4xrS5u2yp1Yy2w.png" /></figure><p><strong>Phase 2: Storing a Dataset of Customer Images and Reviews</strong></p><p>The purpose is to have all of your data store safely and securely within Azure.</p><p><strong>Create a Storage Account</strong></p><ul><li>On the homepage, locate and select<strong><em> “Storage Accounts”</em></strong></li><li>Select <strong>“Create”</strong></li><li>Under the Create a Storage account settings, complete the following:</li><li><strong><em>Subscription:</em></strong> Azure Subscription (should be pre-filled already)</li><li><strong><em>Resource Group: </em></strong>Select the newly created resource group</li><li><strong><em>Storage Account Name:</em></strong> Create a unique name for the Storage account Resource</li><li><strong><em>Region:</em></strong> Select a region best for your location</li><li><strong><em>Primary Service:</em></strong> Select <strong><em>“Azure Blob Storage”</em></strong></li><li><strong><em>Performance:</em></strong> Select <strong><em>“Standard”</em></strong></li><li><strong><em>Redundancy:</em></strong> Select <strong><em>“Locally-Redundant Storage” (LRS)</em></strong></li><li>Select <strong><em>“Review and Create”</em></strong> once completed</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*zJA-L5_oMuQpEcFhaXZEAw.png" /></figure><p><strong>Creating a Blob Container</strong></p><p>Think of a blob container as a folder for the storage account. Within this folder it will be holding the customers images and reviews.</p><ul><li>In the storage account, under <strong><em>“Data Storage”</em></strong> select <strong><em>“Containers”</em></strong></li><li>Select <strong><em>“+Containers”</em></strong></li><li>Create a unique name for the Container</li><li><strong><em>Anonymous Access Level:</em></strong> No need to change, leave it as the defaulted private setting</li><li>Complete and select <strong><em>“Create”</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nj947I95djWEkby_9R0tmw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wYKeuFIDLUxWR1iMtkxN2w.jpeg" /></figure><p><strong>Uploading Sample Images and Reviews</strong></p><p>As the title says above, at this point we will now upload some images and reviews to the blob container. The reason is for easy access to perform sentiment analysis.</p><ul><li>Select the newly created container</li><li>Select <strong><em>“Upload”</em></strong></li><li>Locate and select all of the files and upload them to the blob container</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sIdorUSzBDLR_EBx8RJRRQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f8mgICLk4PhJO-5MOuORnA.png" /><figcaption>Uploaded image files</figcaption></figure><p><strong>Phase 3: Analyzing Images with Computer Vision</strong></p><p>This portion includes analyzation of the uploaded images with the API in Azure Portal.</p><ul><li>Navigate and select the Computer Vision resource previously created</li><li>Select <strong><em>“Go to Vision Studio”</em></strong></li><li>Under <strong><em>“Detect common objects in images”</em></strong> select <strong><em>“Try it out”</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JPW8Y-mEBmw1n83T8QbPGQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/289/1*R3x8tkGvxe1XX2a4RUvGDQ.png" /></figure><ul><li>Next, select <strong>“Please select a resource”</strong> and proceed to select the appropriate subscription and resource</li><li>Confirm acknowledgement of the uploaded images by selecting the box</li><li>Select <strong><em>“browse for file”</em></strong> and select the uploaded images</li><li>As you can see below, the image is a laptop (73.90%) with a computer mouse (81.70%) with a JSON document format providing information</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1oq0ZNzv2RzCiMYoU2QLvA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*tmUrWb_4sEaFzD3upDXMdQ.png" /></figure><ul><li>Here is an image of a watch with JSON documentation</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GZ0QFY9tg-X3yZzFUJDS9Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*HV0ng824uls_HADzUpLkIg.png" /></figure><p><strong>Phase 4: Analyzing Reviews with Text Analytics</strong></p><p>In this section, we will be using the Sentiment Analysis API in the Azure Portal for the customers reviews. This allows us to understand their overall view on our products.</p><ul><li>Navigate and select the Text Analytics resource created prior and select <strong><em>“Language studio”</em></strong></li><li>Select <strong><em>“Classify Text”</em></strong></li><li>Under <strong><em>“Analyze Sentiment and mine options”</em></strong> select <strong><em>“Try it out”</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*hhhwExYzKE_2s2-xQdjHSQ.jpeg" /></figure><ul><li>Once you sign in, proceed by doing the following:</li><li><strong><em>Azure Directory:</em></strong> <strong><em>“Default Directory”</em></strong></li><li><strong><em>Azure Subscription:</em></strong> Select your subscription</li><li><strong><em>Resource Type:</em></strong> Select <strong><em>“Language”</em></strong></li><li><strong><em>Resource Name:</em></strong> Select the Text Analytics resource</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*NA2V6KRR8HqL2b1Z6Kmscg.png" /></figure><p>Alright, now that we have that portion all set, we can proceed to upload the customer reviews text file.</p><p>Once upload, simply select <strong><em>“Run”</em></strong> to look at the results of the customers reviews text file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*ru8cDWKLIxmjGWpd4umNhw.jpeg" /></figure><p><strong>Phase 5: Summarizing the Findings</strong></p><p>Provided below are the results of the constructive and unpleasant reviews. As you can see, overall, <strong>48% was positive, 48% was negative, and 4% was neutral.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/539/1*OWKAdw8ep3XDPEqhuw551w.png" /></figure><p>A good thing to notice here is the sentimental analysis for sentences 2 &amp; 3 was <strong>100%!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*wV4t9eocKjvnFjPW7VQToA.png" /></figure><p>Unfortunately, the sentiment analysis for sentence 8 was not so great at <strong>100% negative.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*C343yG3BXOtb2LayZhisWg.png" /></figure><p>Here is a screenshot of the JSON format for the sentimental analysis as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yKHqIiI5BuIgtyK2PyVi7g.png" /></figure><p><strong>Conclusion</strong></p><p>Utilizing the Azure AI services allowed the company to better understand the customers views upon the products. Creating a computer vision resource and using the Analyze Image API aided the ability of identifying the laptop and camera images. It wasn’t perfect, but it was able to analyze most of the images uploaded. As for the customer reviews, creating the text analytics resource and using the Sentimental Analytics API worked great! The company can be more cognizant of the good and bad things about their products. Overall, most of the feedback was positive but it doesn’t mean the critical comments are irrelevant. Providing the best products for the customers is what the company is striving for, and they will all thanks to these amazing Azure AI services!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*vyQe7PPFIzo3fwdbQlHy1g.jpeg" /></figure><p><strong>Let’s Connect!</strong> — <a href="http://www.linkedin.com/in/letrelle-johnson">Linked In</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eccb770592ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Secure Remote Administration of Azure Virtual Machines with Auto Scaling]]></title>
            <link>https://medium.com/@letrellejohnson15/secure-remote-administration-of-azure-virtual-machines-with-auto-scaling-2f89b4e1e514?source=rss-d94fb680687a------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f89b4e1e514</guid>
            <category><![CDATA[virtual-machine]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[autoscaling-group]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[ssh]]></category>
            <dc:creator><![CDATA[Letrelle Johnson]]></dc:creator>
            <pubDate>Sat, 30 Nov 2024 07:24:41 GMT</pubDate>
            <atom:updated>2024-12-02T01:38:59.492Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1HrvoMVT-u7OehbI.jpg" /></figure><p><strong>Business Scenario</strong></p><p>Level Up Corporation hosts its Linux and Windows applications on over 100 Azure Virtual Machines (VMs). The globally dispersed IT team needs efficient, secure, and reliable tools for remote administration and troubleshooting to minimize downtime and security risks. Additionally, the company needs to ensure high availability and scalability of its applications.</p><p><strong>Resolution</strong></p><p>To address these needs, the solution involves setting up Auto Scaling Groups to automatically adjust the number of VMs based on demand, ensuring scalability and high availability. A Load Balancer will be configured to distribute traffic evenly across the VMs, further enhancing availability and reliability. For secure remote administration, SSH will be implemented for Linux VMs, and RDP for Windows VMs, both providing encrypted channels for secure access.</p><p><strong>Benefits</strong></p><ul><li><strong>Improved Productivity and Efficiency</strong>: Prompt issue resolution through direct VM access.</li><li><strong>Enhanced Security</strong>: Encrypted communication channels prevent unauthorized access and data breaches.</li><li><strong>Cost Savings</strong>: Reduced downtime and increased IT efficiency lower operational costs.</li><li><strong>Easy Administration and Troubleshooting</strong>: Simplifies server management, configuration, and troubleshooting.</li><li><strong>Scalability</strong>: Supports the management of an increasing number of VMs as the company grows.</li><li><strong>High Availability</strong>: Ensures application uptime through load balancing and auto-scaling.</li></ul><p><strong>Pre-reqs</strong></p><ul><li>Basic knowledge of Azure</li><li>Active Azure account</li></ul><p><strong>Necessary steps to be Implemented</strong></p><ul><li><strong>Deploy a Linux Azure VM</strong> and configure it with a key pair.</li><li><strong>Create a Network Security Group (NSG)</strong> to allow SSH access.</li><li><strong>SSH into the deployed Linux Azure VM</strong> and run the “whoami” command to verify access.</li><li><strong>Set up an Auto Scaling Group</strong> for the VMs to automatically adjust the number of instances based on demand.</li></ul><p><strong>Phase 1: Configure and launch Linux Azure VM with key-pair</strong></p><ul><li>Login into Azure, navigate and select <strong><em>“Virtual Machines”</em></strong></li><li>In the top left of the screen, select <strong><em>“Create”</em></strong> drop down, then <strong><em>“Azure Virtual Machine”</em></strong></li><li>On the basics screen, you must first select your <strong><em>subscription</em></strong></li><li><strong><em>Resource Group:</em></strong> You can create a new resource or select and existing one. For this situation, I created a new resource group <strong>(Azure-LinuxVMRG)</strong></li><li><strong><em>Virtual Machine Name:</em></strong> Azure-LinuxVM</li><li><strong><em>Region:</em></strong> (US) East US</li><li><strong><em>Availability Options:</em></strong> No infrastructure redundancy</li><li><strong><em>Security Type:</em></strong> Standard</li><li><strong><em>Image:</em></strong> Ubuntu Server 24.04- x64 Gen2</li><li><strong><em>VM Architecture: </em></strong>x64</li><li><strong><em>Size:</em></strong> Standard_B1s — 1vcpu, 1 GiB memory</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hIMzV6jbGqqZeqE2Q639Kw.jpeg" /></figure><p><strong>For Administrator Account…</strong></p><ul><li><strong><em>Authentication type:</em></strong> SSH public key</li><li><strong><em>Username:</em></strong> azureuser24</li><li><strong><em>SSH Public key source:</em></strong> Generate new key-pair</li><li><strong><em>SSH Key type:</em></strong> RSA SSH format</li><li><strong><em>Key Pair name:</em></strong> Azure-LinuxVM-15-key</li></ul><p><strong>Inbound Port rules</strong></p><ul><li><strong><em>Public Inbound port:</em></strong> Allow selected ports</li><li><strong><em>Select Inbound ports:</em></strong> SSH (22)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*sBkJ5ZZ7IyxYBSd1mj5R7w.png" /></figure><p>After selecting the appropriate options, select <strong><em>“Review + create”. </em></strong>Once the VM is created, download the private key pair. (Remember which folder you download the key pair into)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*c0CKIbmmsWNKTMghEVui-A.png" /><figcaption>Download private key pair</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8sIg6Dc1sQVcE4DygQDMjQ.png" /><figcaption>Successfully created VM</figcaption></figure><p><strong>Phase 2: Creating Network Security Group (NSG) allowing SSH access</strong></p><ul><li>Navigate to the newly created VM</li><li>Under the <strong><em>“Networking”</em></strong> tab select <strong><em>“Networking Security Group”</em></strong></li><li>Select the Networking Security Group associated with the VM <strong><em>(Azure-LinuxVM-nsg)</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fSZyD1KooW8GmZ5JNMwBxw.png" /></figure><ul><li>Select the <strong><em>“SSH”</em></strong> highlight</li><li>In the SSH configure screen, confirm the following information: <strong><em>Port = 22, Protocol = TCP, Action = Allow</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p_0OMkkqfX3kz6UMx2foHg.png" /></figure><p><strong>SSH into deployed Linux Azure VM</strong></p><ul><li>Navigate back to the newly created Linux Azure VM</li><li><strong>Prior to SSH into the VM, you must confirm the following: Confirm the VM is running, Confirm the VM’s public IP address in the Network settings.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F7or2RK7KSgJMp_WgLW2Yw.png" /></figure><ul><li>After confirming, select <strong><em>“connect”</em></strong></li><li>Select <strong><em>“Native SSH”</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*ZGnled0kpB3sBosi1OnGHQ.png" /></figure><p>For Step 3 in the SSH Instructions, where it states to<strong><em> “provide a path to your SSH private key” </em></strong>replace<strong><em> </em></strong>the path of where you downloaded the private key from your local machine in the box. Once replaced, you may then copy the chmod and ssh command and paste in the terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*nj1ZIuasxU6EnlRMplaltA.jpeg" /></figure><p>To verify your in the Azure Linux VM, run the <strong><em>“whoami”</em></strong> command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/276/1*L9hXzIUcjhLqS3zuxzGRfw.jpeg" /></figure><p><strong>Phase 3: Setting up an Auto Scaling Group</strong></p><ul><li>Navigate to <strong><em>“Virtual Machine Scale Sets”</em></strong></li><li>Select <strong><em>“Create Virtual Machine Scale Sets”</em></strong></li></ul><p>To configure a scale set, the following information must be completed:</p><ul><li><strong><em>Resource Group:</em></strong> Create and name a new resource group for scale set</li><li><strong><em>Virtual Machine Scale Set Name:</em></strong> Create a name</li><li><strong><em>Region:</em></strong> (US) East US</li><li><strong><em>Availability Zone:</em></strong> None</li><li><strong><em>Orchestration Mode:</em></strong> Flexible</li><li><strong><em>Security Type:</em></strong> Standard</li><li><strong><em>Scaling Mode:</em></strong> AutoScaling</li><li><strong><em>Image:</em></strong> Ubuntu Server 24.04 LTS — x64 Gen2</li><li><strong><em>VM Architecture:</em></strong> x64</li><li><strong><em>Size: </em></strong>Standard_B1s — vcpu, 1 GiB memory</li><li><strong><em>Authentication Type:</em></strong> SSH public key</li><li><strong><em>Key Pair Name:</em></strong> Create a new key pair name for the VM scale set</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*G__uClILdaiHasXqVbK6Kg.jpeg" /></figure><p>Prior to selecting Review + Create, select the <strong><em>“Configure” </em></strong>link in the scaling configuration section</p><p>Select<strong><em>“Default Condition”, </em></strong>then proceed to make the following changes once the <strong><em>“Edit Condition”</em></strong> window occurs:</p><ul><li><strong><em>Default Instance Count: </em></strong>1<strong><em> </em></strong>(initial number of VM’s deployed in the scale set)</li><li><strong><em>Instance Limit:</em></strong> 1 (minimum number of instances wanted to level down to in the scale set)</li></ul><p>All other settings can be left in their defaulted option if chosen. You make then proceed to click <strong><em>“Save”</em></strong> once done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oZBt9xtKmyOeTEOx-vnGJg.jpeg" /></figure><p>Proceed and select <strong><em>“Review + Create”</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*D4VFmFK-075yumFgfq95TA.jpeg" /></figure><p><strong>Make sure to download and save the private key pair</strong></p><p>After the deployment has been completed, navigate to the resource and confirm the scaling is activated</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*2UEb1uQ1BYKj324Wl55Mpg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*wlpuYdupPha90wsRJDsKvw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*uG4B-VNLLmso9FDUXecUAQ.jpeg" /></figure><p><strong>Conclusion</strong></p><p>In summary, performing this project provides a clear understanding of configuring and deploying a secure Azure Linux Virtual Machine. In addition, equipping the virtual machine with autoscaling capabilities, allows the company to become highly accessible and scalable while also saving money and time. To make things even better, including SSH encrypted keys provides security reducing the labor of an IT team. Utilizing Azure and it’s resources made the project even more exciting to do! I hope you enjoyed it as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*L-PvcIjKGlKDIgia-CaTxA.jpeg" /></figure><p><strong>Let’s Connect</strong> — <a href="http://www.linkedin.com/in/letrelle-johnson">Linked In</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f89b4e1e514" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hosting an Azure Static Website]]></title>
            <link>https://medium.com/@letrellejohnson15/hosting-an-azure-static-website-e4f3595d514a?source=rss-d94fb680687a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4f3595d514a</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[azure-storage-account]]></category>
            <category><![CDATA[static-websites]]></category>
            <category><![CDATA[azure-blob]]></category>
            <dc:creator><![CDATA[Letrelle Johnson]]></dc:creator>
            <pubDate>Sat, 23 Nov 2024 06:07:04 GMT</pubDate>
            <atom:updated>2024-11-23T06:07:04.338Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*vvVvXL4bkQUfV3LA.png" /></figure><p><strong>Scenario</strong></p><p>Level Up Bank is a fictitious fintech startup that offers digital banking services to customers. The company’s website is a crucial tool for acquiring new customers and providing information about the services offered. Currently, the website is hosted on an on-premises server, leading to additional costs and complexity.</p><p><strong>Resolution</strong></p><p>The best solution is to move the website to a Azure Blob Storage.</p><p><strong>Benefits</strong></p><ul><li><strong><em>Cost Savings- </em></strong>Only paying for the storage and operations used saves the company an abundance of money</li><li><strong><em>Improved Scalability-</em></strong> Utilizing Azure Blob Storage allows automatic scaling according to demand. This allows the company website the capability of handling loads of traffic</li><li><strong><em>High Availability-</em></strong> Allows accessibility at all times across multiple regions</li><li><strong><em>Reduced Management Overhead-</em></strong> The storage is a fully managed service allowing other focus towards other important tasks</li></ul><p><strong>Pre- reqs</strong></p><ul><li>Azure Account</li><li>Index HTML file</li></ul><p><strong>Part 1: Establishing and Configuring Storage Account</strong></p><p>First, login to your azure account and navigate to <strong>“Storage Accounts”. </strong>It may be located in the <strong>“Azure Services”</strong> once logged in. If not, you can also use the search bar.</p><p><strong>Once in the storage accounts section:</strong></p><ul><li>Select “<strong><em>Create”</em></strong></li><li><strong><em>Subscription</em></strong>- Select the appropriate option</li><li><strong><em>Resource Group- </em></strong>You have the option of choosing an existing resource or creating a new one</li><li><strong><em>Storage Account Name-</em></strong> Create a name for the storage account</li><li><strong><em>Region-</em></strong> Select a region that is closest to your location</li><li><strong><em>Performance-</em> </strong>Select “<strong><em>Standard”</em></strong></li><li><strong><em>Redundancy-</em></strong> Select the option based on what you prefer. I selected Locally-Redundant Storage (LRS)</li></ul><p>After choosing the options proceed to select “Review + Create” to create the storage account</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*ITzFct4cAUvF8mBnfLFQTg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*D_YHcvKa0tdQMzUSW39BJA.jpeg" /></figure><p><strong>Part 2: Creating Blob Account</strong></p><p>Navigate to storage accounts and select the newly created storage account that was just created</p><p><strong>Creating the Blob Account requires the following:</strong></p><ul><li>In the Data Storage section, select <strong><em>“Containers”</em></strong></li><li>Select the <strong><em>“ + Containers”</em></strong> tab above the search bar, this means you intend on creating a new blob container</li><li>Give the container a name</li><li><strong><em>Public Access Level-</em></strong> Select the container to acquire <strong><em>“anonymous read for blobs only”,</em></strong> this allows the website to be available publicly (you may need to change in storage account, it automatically defaults to private)</li><li>Select <strong><em>“create”</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b1h5VKI5SMkv51owkY3nGQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vp6Aswgi2gsWsRM1VtcVkg.jpeg" /><figcaption>Newly created container</figcaption></figure><p>Since we successfully created a Blob container we can now put items in it. If you had to take a guess of what we will be placing in the container what would you say…..</p><p>If you guessed the index.html file then great job!</p><p><strong>Uploading HTML file into Blob Container</strong></p><p>Proceed to select and open the newly created Blob container</p><ul><li>Select <strong><em>“Upload”</em></strong> to insert HTML file</li><li>Select the <strong><em>“index.html file”</em></strong></li><li>Select <strong><em>“Upload”</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DzgcJ54ErIm_XiWhs-gEgA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*QfaHgNnNVeJPTopmn5jIiA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZERgRmKLKTzg7elxNrVtKQ.jpeg" /></figure><p>And now we have to allow the Blob container the ability to host the static website. To do so, we must enable static website hosting</p><ul><li>Navigate to <strong><em>“Storage Account”</em></strong></li><li>Scroll down to <strong><em>“Data Management”</em></strong> and select <strong><em>“Static website”</em></strong></li><li><strong><em>Index Document Name-</em></strong> Begin to type <strong><em>“index.html”,</em></strong> the file should appear. In my case, my file name was <strong><em>index (1).html</em></strong></li><li>The error document name can remain blank but if you would like to create an error page then you may ex: (404.html)</li><li>Proceed and select <strong><em>“Save”</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m62nP3pcpgg_DTBa-ZGEsA.jpeg" /></figure><p>At this point we did all of the necessary steps for the website, the only thing left to do is validate website access</p><p><strong>Part 3: Confirming Internet Access</strong></p><p>On the Static Configuration page, locate the box with the title “Primary Endpoint”. The URL in the box is where your static website is being hosted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gp3S3xCteVZpMlxnBJlv1A.jpeg" /></figure><p>Simply copy the URL and paste it in a new window and click enter</p><p>If all goes accordingly, you should see the website below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c755Wdj7o04e_IsFZ3ckzQ.jpeg" /></figure><p><strong>TroubleShooting</strong></p><p>Just to save you some time during this process. If you come across an error as shown below, double check these settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*oTvaejyrmeiRH5iSN7lC5g.jpeg" /></figure><ul><li>Ensure correct public access level is selected</li><li>Confirm index.html file was uploaded</li><li>Ensure connection to Wi-fi</li></ul><p><strong>Conclusion</strong></p><p>Well done! You used Azure Blob Storage and were victorious in the process of hosting a static website! Utilizing this tool allows less costs, less management, yet an increase in scalability and availability. This is truly the best solution for the LevelUp Bank in my opinion. Thanks for getting through this and I hope you continue to enjoy more articles to come.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*vyQe7PPFIzo3fwdbQlHy1g.jpeg" /></figure><p><strong>Let’s Connect! </strong>— <a href="http://www.linkedin.com/in/letrelle-johnson">Linked In</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4f3595d514a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>