<?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"><channel><title><![CDATA[Sunil Joe]]></title><description><![CDATA[AWS Certified Security - Specialty, CISCO Certified Network Professional, VMware Administrator, Server Administrator, Nutanix administrator. Sharing here my tec]]></description><link>https://suniljoe.com</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1722497374731/f9587df0-7479-4ba4-a28b-2d61a2ae5d97.png</url><title>Sunil Joe</title><link>https://suniljoe.com</link></image><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Nov 2026 06:17:33 GMT</lastBuildDate><atom:link href="https://suniljoe.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Terraform Basics Commands]]></title><description><![CDATA[Terraform Basic commands Git Commands Create AWS Instance Terraform Import]]></description><link>https://suniljoe.com/terraform-basics-commands</link><guid isPermaLink="true">https://suniljoe.com/terraform-basics-commands</guid><dc:creator><![CDATA[Sunil Joe]]></dc:creator><pubDate>Sat, 01 Mar 2025 15:12:48 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1740842193664/38cba85e-0ae2-48c5-a5d7-3ff9875f3242.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Terraform Basic commands</p>
<pre><code class="lang-plaintext">terraform init
terraform init -migrate-state
terraform init -reconfigure
terraform plan
terraform plan -destroy
terraform plan -out=demopath
terraform apply demopath
terraform fmt
terraform apply -refresh-only -auto-approve            -&gt; Refresh fetch real remote objects &amp; only modify state file
terraform apply                                        -&gt; Terraform will match current state to desired state
terraform apply -auto-approve
terraform destroy                                    -&gt; Delete All Resources in One Folder
terraform destroy -target aws_instance.AmazonAMI    -&gt; resource type.local resource name
terraform apply -var-file="custom.tfvars"            -&gt; Explicitly Run Custom tfvars
terraform validate                                    -&gt; Validating syntax error in terrafom configuration files 
terraform apply -replace="aws_instance.myec2        -&gt; Recreating the resource
export TF_LOG_PATH=/tmp/crash.log
export TF_LOG=TRACE
terraform force-unlock [options] LOCK_ID
terraform workspace show
terraform workspace list
terraform workspace new dev
terraform workspace select dev
terraform state list
terraform state mv
terraform state pull
terraform state rm
terraform state show
terraform import aws_vpc.Terraform-VPC vpc-01b001b6d28e8fe52
terraform plan -generate-config-out=generated.tf
terraform plan -generate-config-out=mysg.tf -chdir D:\AWS Triad &amp; Terraform\import
</code></pre>
<p>Git Commands</p>
<pre><code class="lang-plaintext">terraformgit clone https://github.com/suniljoe15/terra.git
git clone https://x-token-auth:ATCTT3xFfGN0Grd7ydtJ7KWY12D_FlMcBlgwxTCXJeyezzpIMFj_2YqQCuMSawrOLViuTlImoC9r5mQqEOgCtqYmiGI25ynqGchpNx5UEylgXgCBWayZ3_zy8lEPLMDnlPmeDg3nqKjPs8w6lCbv2VsUN
FTs2Ple0UsFumKQ4-6_ttbzmXpF2MA=F8B06163@bitbucket.org/sunil/terraform-pipeline.git
git pull origin master
git status
git add .                            -&gt; stage all files
git add bitbucket-pipelines.yml        -&gt; stage mentioned file only
git commit -m"my commit"
git push origin master init
</code></pre>
<p><strong>Create AWS Instance</strong></p>
<pre><code class="lang-plaintext">provider "aws" {
  region     = "ap-south-1"
  access_key = "xxxxxxxxxxxxxxxxx"
  secret_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
resource "aws_instance" "AmazonAMI" {
  ami           = "ami-0cc9838aa7ab1dce7"
  instance_type = "t3.micro"
  tags = {
    Name = "AmazonAMIInstance"
  }
  depends_on = [aws_eip.lb]

}
</code></pre>
<p>Terraform Import</p>
<pre><code class="lang-plaintext">terraform import aws_security_group.Terraform-SG sg-004a3f5bdc675a2eb
terraform import aws_vpc.Terraform-VPC vpc-01b001b6d28e8fe52
terraform import aws_subnet.Terraform-Public-1-Subnet subnet-0e3e49bd9bc20ebbe
terraform import aws_subnet.Terraform-Public-2-Subnet subnet-0c4107e888ad42d95
terraform import aws_route_table.Terraform-RT rtb-06d4d3bc59e1d221d
terraform import aws_internet_gateway.Terraform-IGW igw-094ab3943bc9be6c7
terraform import aws_route_table_association.Terraform-RTA1 subnet-0e3e49bd9bc20ebbe/rtb-06d4d3bc59e1d221d
terraform import aws_route_table_association.Terraform-RTA2 subnet-0c4107e888ad42d95/rtb-06d4d3bc59e1d221d
terraform import aws_launch_template.Terraform-Template lt-0c9c6eea6ff1c986b
terraform import aws_key_pair.Terraform-KeyPair Terraform-KeyPair
terraform import aws_lb_target_group.Terraform-TG arn:aws:elasticloadbalancing:ap-south-1:590184002190:targetgroup/Terraform-TG/f44540fb4d7a0522
terraform import aws_lb.Terraform-ALB arn:aws:elasticloadbalancing:ap-south-1:590184002190:loadbalancer/app/Terraform-ALB/ff2779c964b1818f
terraform import aws_autoscaling_group.Terraform-ASG Terraform-ASG

Note : LoadBalancer Resource Import Not available - Need to add manually
</code></pre>
]]></content:encoded></item><item><title><![CDATA[IAC - IAM & YAML codes for Reference]]></title><description><![CDATA[To Create EC2 - appspec.yml To Create ECS - appspec.yml To Create Lambda - appsec.yml To create Webhook - appspec.yml ( Blue green Deployment ) IAM Policy…]]></description><link>https://suniljoe.com/iaas-iam-and-yaml-codes-for-reference</link><guid isPermaLink="true">https://suniljoe.com/iaas-iam-and-yaml-codes-for-reference</guid><dc:creator><![CDATA[Sunil Joe]]></dc:creator><pubDate>Sat, 01 Mar 2025 14:36:38 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1740842379451/9113bab9-2187-4d61-8db8-fd341fc49dc7.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>To Create EC2 - appspec.yml</p>
<pre><code class="lang-plaintext">Version: 0.0
os:linux
hooks:
    BeforeInstall:
    -location: script/UnzipResource.sh
    -location: script/UnzipData.sh
    AfterInstall:
    -location: script/RunResourceTest.sh
    timeout:3000
    Application Start
    -location: script/RunFunctionTest.sh
    timeout:3000
    ValidateService
    -location: script/MonitorService.sh
    timeout:3000
    runas:codedeployuser
</code></pre>
<p>To Create ECS - appspec.yml</p>
<pre><code class="lang-plaintext">Version: 0.0
os:linux
hooks:
    BeforeInstall:
    -location: script/UnzipResource.sh
    -location: script/UnzipData.sh
    AfterInstall:
    -location: script/RunResourceTest.sh
    timeout:3000
    Application Start
    -location: script/RunFunctionTest.sh
    timeout:3000
    ValidateService
    -location: script/MonitorService.sh
    timeout:3000
    runas:codedeployuser
</code></pre>
<p>To Create Lambda - appsec.yml</p>
<pre><code class="lang-plaintext">version0.0
Resources:
- myLambdaFunction:
    Type: AWS::lambda::Function
    Properties:
    Name:JoeLambdafunction
    Aliase:Joe
    CurrentVersion:1
    TargetVersion:2
</code></pre>
<p>To create Webhook - appspec.yml ( Blue green Deployment )</p>
<pre><code class="lang-plaintext">
Version: 0.0
Resources:
...
Hooks
-BeforeAllowTraffic:"ValidateBeforeAllowTraffic"
</code></pre>
<p>IAM Policy reference</p>
<pre><code class="lang-plaintext">{
    "version":"2025-10-17",
    "statement": [
    {
        "Action":[
            "S3:get*"
            "s3:list*"
            ]
            "effect":"Allow",
            "resource":"*"
        }
    ]
}
</code></pre>
<p>IAM role to provide access Secondary account</p>
<pre><code class="lang-plaintext">Artifcat access to secondary account in AWS
{
    "version":"2012-10-17",
    "statement": [
    {
        "Effect":"Allow"
        "Action":[
            "CodeAritifact:List*"
            "CodeAritifact:Get*"
            "CodeAritifact:readfromRepository"
            "CodeAritifact:Describe*"
            ],
            "Principal" {
            "AWS":[
            "arn-aws-iam:123456789/root"
            "arn-aws-iam:987654321/user/joe"
            ]
            },
            "Resource":"*"
        }
    ]
}
</code></pre>
]]></content:encoded></item><item><title><![CDATA[Multi-Node Kubernetes Cluster]]></title><description><![CDATA[Kubernetes (K8s) is celebrated for its robust features that ensure applications remain operational. Managed services like Amazon EKS and Azure AKS abstract…]]></description><link>https://suniljoe.com/multi-node-kubernetes-cluster</link><guid isPermaLink="true">https://suniljoe.com/multi-node-kubernetes-cluster</guid><category><![CDATA[Kubernetes]]></category><dc:creator><![CDATA[Sunil Joe]]></dc:creator><pubDate>Sun, 23 Feb 2025 05:16:34 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1740287777604/971cb365-09e6-4ad2-af79-28e0006cd3ed.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Kubernetes (K8s) is celebrated for its robust features that ensure applications remain operational. Managed services like Amazon EKS and Azure AKS abstract away the complexities of managing Kubernetes from scratch. In this guide, we'll explore how to set up a multi-node Kubernetes cluster on AWS.</p>
<h3 id="heading-key-components-of-kubernetes">Key Components of Kubernetes</h3>
<ul>
<li><p><strong>Kube Controller Manager</strong>: Monitors the health of nodes, ensuring they are up and running.</p>
</li>
<li><p><strong>Kubelet</strong>: A program that must run on every worker node, constantly reporting back to the controller manager to confirm the node's health.</p>
</li>
<li><p><strong>Kube API Server</strong>: Acts as the communication hub for user requests (like launching pods) and interacts with the controller manager to schedule resources.</p>
</li>
</ul>
<h2 id="heading-setting-up-a-multi-node-cluster-on-aws">Setting Up a Multi-Node Cluster on AWS</h2>
<h3 id="heading-1-launch-ec2-instances">1. Launch EC2 Instances</h3>
<p>Start by launching the necessary EC2 instances. You'll typically need one master node and multiple worker nodes.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730564321290/125f83a1-4855-431f-8ea6-c90f8ada00f0.png?auto=compress,format&amp;format=webp" alt /></p>
<h3 id="heading-2-choose-a-container-engine">2. Choose a Container Engine</h3>
<p>It's good practice to run each program in a different container. The master node can host the control plane components, while worker nodes will run applications (pods).</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730564361750/a62bbfe9-a81b-409d-9f67-4d57d5124eca.png?auto=compress,format&amp;format=webp" alt /></p>
<h3 id="heading-3-install-docker">3. Install Docker</h3>
<p>Install Docker on each node. To ensure Docker services start automatically:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730564418949/a96684be-fabc-40cc-a733-2e4c04b4fbcb.png?auto=compress,format&amp;format=webp" alt /></p>
<p><strong>Copy</strong></p>
<p><strong>Copy</strong></p>
<pre><code class="lang-bash">sudo systemctl <span class="hljs-built_in">enable</span> docker
sudo systemctl start docker
</code></pre>
<p>Verify Docker installation:</p>
<p><strong>Copy</strong></p>
<p><strong>Copy</strong></p>
<pre><code class="lang-bash">sudo systemctl status docker
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730564508366/92399c4f-b3d4-49bf-862c-b9bad90be494.png?auto=compress,format&amp;format=webp" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730564556747/a299f97b-cf5f-42f4-9d6a-fa92f9733431.png?auto=compress,format&amp;format=webp" alt /></p>
<h4 id="heading-4-install-kubeadm">4. Install kubeadm</h4>
<p>Kubeadm simplifies the setup of multi-node clusters. Since it might not be available by default, you'll need to configure <code>yum</code> to include Kubernetes packages.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730564649008/9c4964b8-638c-4fb5-9029-eaa49c13d0e0.png?auto=compress,format&amp;format=webp" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730564683458/f1d5c5f1-ab5d-4e77-8248-22f11ed06c66.png?auto=compress,format&amp;format=webp" alt /></p>
<p>Create a repository file:</p>
<p><strong>Copy</strong></p>
<p><strong>Copy</strong></p>
<pre><code class="lang-bash">sudo vi /etc/yum.repos.d/kubernetes.repo
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730564715366/6c679bd1-435a-41bc-af27-d7a2582862d7.png?auto=compress,format&amp;format=webp" alt /></p>
<p>Add the following content:</p>
<p><strong>Copy</strong></p>
<p><strong>Copy</strong></p>
<pre><code class="lang-bash">[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/doc/yum-key.gpg
enabled=1
gpgcheck=1
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730564779519/4c711f16-2152-42e9-87f7-164e34ab5ed6.png?auto=compress,format&amp;format=webp" alt /></p>
<p>Update the repository list and install kubeadm:</p>
<p><strong>Copy</strong></p>
<p><strong>Copy</strong></p>
<pre><code class="lang-bash">sudo yum install kubeadm --disableexcludes=kubernetes
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730564808121/b2613b57-128d-47f8-86d8-c43e77cb92bf.png?auto=compress,format&amp;format=webp" alt /></p>
<h3 id="heading-5-install-kubelet">5. Install Kubelet</h3>
<p>Kubelet needs to be installed on all nodes, including the master. It manages container lifecycles and communicates with the container runtime.</p>
<p><strong>Copy</strong></p>
<p><strong>Copy</strong></p>
<pre><code class="lang-bash">sudo yum install -y kubelet --disableexcludes=kubernetes
sudo systemctl <span class="hljs-built_in">enable</span> kubelet
sudo systemctl start kubelet
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730564856993/d8eaccc5-782d-4716-96ed-2269c9a959bc.png?auto=compress,format&amp;format=webp" alt /></p>
<h3 id="heading-6-pull-required-images">6. Pull Required Images</h3>
<p>Master node have various program and all need to run inside container. Use <code>kubeadm</code> to pull the necessary container images for the master node:</p>
<p><strong>Copy</strong></p>
<p><strong>Copy</strong></p>
<pre><code class="lang-bash">sudo kubeadm config images pull
</code></pre>
<p>It will pull all the images that are required for the master node.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730564920842/a026b108-b590-40df-9b1a-4f31e5c25bdd.png?auto=compress,format&amp;format=webp" alt /></p>
<h3 id="heading-7-initialize-the-cluster">7. Initialize the Cluster</h3>
<p>Now we’ve pulled all the required images for the master command. Now we need to run all the containers from all these images. We need this command to initialize the master node cluster.<br />Run the following command to initialize your master node:</p>
<p><strong>Copy</strong></p>
<p><strong>Copy</strong></p>
<pre><code class="lang-bash">sudo kubeadm init --pod-network-cidr=10.240.0.0/16 --ignore-preflight-errors=NumCPU --ignore-preflight-errors=Mem
</code></pre>
<p>7.1 Change the docker driver from <code>cgroupfs</code> to system</p>
<p><strong>Copy</strong></p>
<p><strong>Copy</strong></p>
<pre><code class="lang-bash">Vi /etc/docker/daemon.json
{
<span class="hljs-string">"exec-opts"</span>: [<span class="hljs-string">"native.cgroupdriver=systemd"</span>]
}
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730565371259/1d3e54e3-e010-445a-88c3-5779b8f4ea4d.png?auto=compress,format&amp;format=webp" alt /></p>
<p>7.2 Then restart the docker services</p>
<p><strong>Copy</strong></p>
<p><strong>Copy</strong></p>
<pre><code class="lang-bash">Yum install iproute-tc
</code></pre>
<h4 id="heading-8-configure-docker">8. Configure Docker</h4>
<p>Change the Docker storage driver from <code>cgroupfs</code> to <code>systemd</code>. Edit the Docker configuration:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730565643805/2bd7c643-7a36-43f5-9073-fab2f82967b7.png?auto=compress,format&amp;format=webp" alt /></p>
<p>We will set up users and clients in the future. Now, just to test, I’m making the master system the client system. Using the <code>kubectl get pods</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730565707966/49771c99-7c36-4f25-929d-a1a8011dc2e9.png?auto=compress,format&amp;format=webp" alt /></p>
<p>This command failed because Kubectl is the user/client command; they should know where the master is running. he master’s Ip address, and this command always contacts to API program. It should know port no. of the API program.</p>
<p>Now we need to configure the master as user also, To start using your cluster, you need to run the following as a regular user:</p>
<p><strong>Copy</strong></p>
<p><strong>Copy</strong></p>
<pre><code class="lang-bash">mkdir -p <span class="hljs-variable">$HOME</span>/.kube
sudo cp -i /etc/kubernetes/admin.conf <span class="hljs-variable">$HOME</span>/.kube/config
sudo chown $(id -u):$(id -g) <span class="hljs-variable">$HOME</span>/.kube/config
</code></pre>
<p>now our master system is configured as a user also</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730565803471/b0868dbe-39ce-4387-a34f-00c5af4fb9e2.png?auto=compress,format&amp;format=webp" alt /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730565821057/10257b4c-603f-41d9-8e7c-a7a79dae9b31.png?auto=compress,format&amp;format=webp" alt /></p>
<p>Now we need to configure worker nodes, Same steps as master:</p>
<p>Install docker</p>
<p>Install kubelet</p>
<p><strong>Copy</strong></p>
<p><strong>Copy</strong></p>
<pre><code class="lang-bash">sudo yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
</code></pre>
<p>now we need to go to the master node and get the token to join</p>
<p><code>kubeadm token list</code></p>
<p>master provides the command to join at the time of init</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730565913378/4004631d-9a86-4abc-be3d-e8fbe3c54d21.png?auto=compress,format&amp;format=webp" alt /></p>
<p><strong>Copy</strong></p>
<p><strong>Copy</strong></p>
<pre><code class="lang-bash">kubeadm join 172.31.15.193:6443 --token 3c43a6.368imla3sacctadi \
        --discovery-token-ca-cert-hash sha256:83ea677754b896d7222654afa84029751c4904f62a24e43da0b0934b267ca1ef
</code></pre>
<p>To get the new token, we can use the kubeadm token create –print-join-command</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730565984629/a8dd2ce5-d247-4704-9b9b-0f90088b4119.png?auto=compress,format&amp;format=webp" alt /></p>
<p>Now to test, we will run one deployment.</p>
<h3 id="heading-deploying-a-network-add-on">Deploying a Network Add-on</h3>
<p>To enable pod-to-pod communication, install a network add-on like Flannel:</p>
<p><strong>Copy</strong></p>
<p><strong>Copy</strong></p>
<pre><code class="lang-bash">kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1730566076672/f64a9848-74b6-4753-b6a6-8ac62ec5ca75.png?auto=compress,format&amp;format=webp" alt /></p>
<h3 id="heading-conclusion">Conclusion</h3>
<p>You now have a multi-node Kubernetes cluster running on AWS. This setup allows you to leverage Kubernetes to manage containerized applications effectively. In future posts, we’ll explore more advanced configurations and deployments.</p>
]]></content:encoded></item><item><title><![CDATA[How API Works]]></title><description><![CDATA[𝐇𝐨𝐰 𝐃𝐨𝐞𝐬 𝐚𝐧 𝐀𝐏𝐈 𝐖𝐨𝐫𝐤? An API (Application Programming Interface) facilitates interaction between different software systems by acting as an…]]></description><link>https://suniljoe.com/how-api-works</link><guid isPermaLink="true">https://suniljoe.com/how-api-works</guid><dc:creator><![CDATA[Sunil Joe]]></dc:creator><pubDate>Fri, 07 Feb 2025 06:39:43 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1738908324445/5a0fb1d2-d225-4ccb-9ab6-5359e62d802f.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>𝐇𝐨𝐰 𝐃𝐨𝐞𝐬 𝐚𝐧 𝐀𝐏𝐈 𝐖𝐨𝐫𝐤?  </p>
<p>An API (Application Programming Interface) facilitates interaction between different software systems by acting as an intermediary. Here’s a streamlined overview of how APIs work:  </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738909653315/cd77b423-5950-4559-8074-f5d17937f269.gif" alt class="image--center mx-auto" /></p>
<p>1. 𝐑𝐞𝐪𝐮𝐞𝐬𝐭<br />- A client sends a request to a server via the API. This request asks the server to perform a specific action or retrieve certain data.  </p>
<p>2. 𝐂𝐨𝐦𝐦𝐮𝐧𝐢𝐜𝐚𝐭𝐢𝐨𝐧 𝐏𝐫𝐨𝐭𝐨𝐜𝐨𝐥<br />- The communication is facilitated using protocols such as HTTP or HTTPS. These protocols define how messages are formatted and transmitted.  </p>
<p>3. 𝐀𝐏𝐈 𝐄𝐧𝐝𝐩𝐨𝐢𝐧𝐭<br />- The server provides specific endpoints (URLs) for clients to access its functions or data. Each endpoint is a unique address that corresponds to a particular service or resource.  </p>
<p>4. 𝐑𝐞𝐪𝐮𝐞𝐬𝐭 𝐏𝐚𝐫𝐚𝐦𝐞𝐭𝐞𝐫𝐬<br />- Clients can include additional data with their requests, known as parameters. These might be query parameters, headers, or a request body, often formatted in JSON or XML.  </p>
<p>5. 𝐏𝐫𝐨𝐜𝐞𝐬𝐬𝐢𝐧𝐠<br />- The server processes the request by performing the required operation, such as querying a database or executing a function.  </p>
<p>6. 𝐑𝐞𝐬𝐩𝐨𝐧𝐬𝐞<br />- After processing, the server sends a response back to the client. This response contains the result of the request and is usually formatted in JSON or XML, along with an HTTP status code indicating success or failure.  </p>
<p>7. 𝐃𝐚𝐭𝐚 𝐅𝐨𝐫𝐦𝐚𝐭<br />- Data exchanged between client and server is typically in a standardized format like JSON or XML to ensure compatibility and ease of use.  </p>
<p>8. 𝐀𝐮𝐭𝐡𝐞𝐧𝐭𝐢𝐜𝐚𝐭𝐢𝐨𝐧 𝐚𝐧𝐝 𝐀𝐮𝐭𝐡𝐨𝐫𝐢𝐳𝐚𝐭𝐢𝐨𝐧<br />- APIs often require authentication (e.g., API keys or tokens) to verify the client's identity and ensure that only authorized users can access certain functionalities or data.  </p>
<p>APIs are essential for integrating services, enhancing functionality, and enabling communication between different software systems, making them a cornerstone of modern application development.</p>
]]></content:encoded></item><item><title><![CDATA[𝐇𝐨𝐰 𝐂𝐈𝐂𝐃 𝐏𝐢𝐩𝐞𝐥𝐢𝐧𝐞 𝐰𝐨𝐫𝐤 𝐢𝐧 𝐀𝐖𝐒]]></title><description><![CDATA[𝐂𝐈𝐂𝐃 𝐏𝐢𝐩𝐞𝐥𝐢𝐧𝐞 𝐰𝐨𝐫𝐤 𝐢𝐧 𝐀𝐖𝐒]]></description><link>https://suniljoe.com/8j2qhcdkkjwnzcwipcdkilwnzci8j2qgvcdkimg8j2qjcdkklwnzcp8j2qnvcdkkxwnzci8j2qpcdkj4g8j2qspcdkkjwnzcr8j2qpcdwnzci8j2qpydwnzca8j2qlvcdkjig</link><guid isPermaLink="true">https://suniljoe.com/8j2qhcdkkjwnzcwipcdkilwnzci8j2qgvcdkimg8j2qjcdkklwnzcp8j2qnvcdkkxwnzci8j2qpcdkj4g8j2qspcdkkjwnzcr8j2qpcdwnzci8j2qpydwnzca8j2qlvcdkjig</guid><category><![CDATA[CI/CD]]></category><category><![CDATA[ci-cd]]></category><category><![CDATA[cicd]]></category><dc:creator><![CDATA[Sunil Joe]]></dc:creator><pubDate>Fri, 07 Feb 2025 06:03:34 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1738907771493/d5ab61e3-9cd9-4336-ac09-d44e415aca5a.avif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>AWS DevOps and CI/CD pipelines are the driving force behind achieving agile development and seamless software delivery.</p>
<p>𝐖𝐡𝐚𝐭 𝐢𝐬 𝐂𝐈/𝐂𝐃 𝐰𝐢𝐭𝐡 𝐀𝐖𝐒❓<br />CI/CD, which stands for Continuous Integration and Continuous Deployment, is an automated approach that helps developers easily integrate code changes and deploy them to production. AWS offers a number of tools, including CodeCommit, CodeDeploy, and AWS CodePipeline, to guarantee that your software is always prepared for quick deployment with small updates.  </p>
<p>🛠 𝐇𝐨𝐰 𝐃𝐨𝐞𝐬 𝐚 𝐂𝐈/𝐂𝐃 𝐏𝐢𝐩𝐞𝐥𝐢𝐧𝐞 𝐖𝐨𝐫𝐤 𝐨𝐧 𝐀𝐖𝐒❓  </p>
<p>Continuous Integration (CI):<br />🎯 Developers create and commit code to AWS CodeCommit, a fully managed source control service.<br />🎯 AWS CodeBuild automatically compiles, tests, and packages the code to ensure everything is in place.<br />Continuous Deployment (CD):<br />🎯 Once the code passes the CI phase, AWS CodePipeline ensures it’s ready for deployment.<br />🎯 AWS CodeDeploy automatically deploys the code to the target environments, such as EC2, ECS, or Lambda.  </p>
<p>⚙️ 𝐊𝐞𝐲 𝐂𝐨𝐦𝐩𝐨𝐧𝐞𝐧𝐭𝐬 𝐨𝐟 𝐚𝐧 𝐀𝐖𝐒 𝐂𝐈/𝐂𝐃 𝐏𝐢𝐩𝐞𝐥𝐢𝐧𝐞:  </p>
<p>✅ Source Control Management (SCM): AWS CodeCommit is used for version control and storing code in a secure, scalable Git-based repository.<br />✅ Build Tools: AWS CodeBuild is a managed build service that compiles the source code, runs tests, and produces artifacts.<br />✅ Artifact Repositories: Amazon S3 or AWS CodeArtifact is used for storing build artifacts, Docker images, and application binaries, ensuring they are readily available for deployment.<br />✅ Deployment Tools: AWS CodeDeploy automates deployments to various services, including Amazon EC2 instances, ECS containers, and Lambda functions.<br />✅ Testing Automation: AWS CodeBuild integrates with testing frameworks to run unit, integration, and end-to-end tests to maintain the quality and reliability of the code.  </p>
<p>🌟 𝐁𝐞𝐧𝐞𝐟𝐢𝐭𝐬 𝐨𝐟 𝐀𝐖𝐒 𝐂𝐈/𝐂𝐃:  </p>
<p>✅ Faster Delivery: Smaller, frequent releases with CodePipeline accelerate feature updates and bug fixes.<br />✅ Enhanced Collaboration: AWS DevOps promotes collaborative development, enabling developers to work on different features without conflict, leading to more effective and harmonious teamwork.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738908032538/22a8d57c-fa70-484b-b8c9-2993b71dbc34.gif" alt class="image--center mx-auto" /></p>
<p>🚀 <strong>HTTP Status Codes Every DevOps Engineer Must Know &amp; Fix!</strong>  </p>
<p>As a DevOps Engineer, handling server errors, API failures, and networking issues is part of daily operations. Understanding HTTP status codes and knowing how to fix them quickly is crucial for uptime &amp; performance.<br />📌 Here’s a quick guide to the most common HTTP errors &amp; their fixes:<br />✅ 200 OK – Everything is working fine. (No fix needed!)<br />🔄 301 Moved Permanently – Fix incorrect redirects in nginx.conf.<br />🔄 302 Found – Fix proxy_pass misconfigurations or app routing.<br />🚫 400 Bad Request – Check API payload &amp; logs.<br />🚫 401 Unauthorized – Verify API authentication headers &amp; missing tokens.<br />🚫 403 Forbidden – Fix IAM roles, firewall, or Nginx ACLs.<br />🚫 404 Not Found – Fix missing API routes or deploy lost files.<br />🚫 408 Request Timeout – Increase timeouts or scale up resources.<br />❌ 500 Internal Server Error – Debug app logs, DB failures.<br />❌ 502 Bad Gateway – Restart backend, fix Nginx/Load Balancer settings.<br />❌ 503 Service Unavailable – Scale up, restart services under high load.<br />❌ 504 Gateway Timeout – Optimize API/database queries, increase timeouts.</p>
]]></content:encoded></item><item><title><![CDATA[Cisco Basic Commands]]></title><description><![CDATA[CommandDescription enableMoves a user from user exec mode into Privileged EXEC mode. Privileged exec mode is indicated by the # symbol in the command…]]></description><link>https://suniljoe.com/cisco-basic-commands</link><guid isPermaLink="true">https://suniljoe.com/cisco-basic-commands</guid><category><![CDATA[2Articles1Week]]></category><dc:creator><![CDATA[Sunil Joe]]></dc:creator><pubDate>Mon, 11 Nov 2024 09:49:11 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1731318538131/9d086fe0-3217-4e61-bfaa-6614893b17ca.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>Command</strong></td><td><strong>Description</strong></td></tr>
</thead>
<tbody>
<tr>
<td><strong>enable</strong></td><td>Moves a user from user exec mode into Privileged EXEC mode. Privileged exec mode is indicated by the # symbol in the command prompt.</td></tr>
<tr>
<td><strong>configure terminal</strong></td><td>Logs the user into Global Configuration mode</td></tr>
<tr>
<td><strong>interface</strong> <em>fastethernet/number</em></td><td>Enters interface configuration mode for the specified fast ethernet interface</td></tr>
</tbody>
</table>
</div><div class="hn-table">
<table>
<thead>
<tr>
<td><strong>Basic Configuration Commands List</strong></td><td></td></tr>
</thead>
<tbody>
<tr>
<td><strong>reload</strong></td><td>Reboots the Cisco switch or router</td></tr>
<tr>
<td><strong>hostname</strong> <em>name</em></td><td>Sets a host name to the current Cisco network device</td></tr>
<tr>
<td><strong>copy</strong> <em>from-location to-location</em></td><td>Copies files from one file location to another</td></tr>
<tr>
<td><strong>copy running-config startup-config</strong></td><td>Replaces the startup config with the active config when  the Cisco network device initializes</td></tr>
<tr>
<td><strong>copy startup-config running-config</strong></td><td>Merges the startup config with the currently active config in RAM</td></tr>
<tr>
<td><strong>write erase</strong></td><td></td></tr>
<tr>
<td><strong>erase startup-config</strong></td><td>Deletes the startup config</td></tr>
<tr>
<td><strong>ip address</strong> <em>ip-address mask</em></td><td>Assigns the specified IP address and subnet mask</td></tr>
<tr>
<td><strong>shutdown</strong></td><td></td></tr>
<tr>
<td><strong>no shutdown</strong></td><td>Shuts the interface down (shutdown) or brings it up (no shutdown)</td></tr>
<tr>
<td><strong>ip default-gateway</strong> <em>ip_address</em></td><td>Sets the default gateway on the Cisco device</td></tr>
<tr>
<td><strong>show running-config</strong></td><td>Displays the current configuration of the device</td></tr>
<tr>
<td><strong>show startup-config</strong></td><td>Displays the saved configuration stored in the device's NVRAM, which will be loaded when the device starts up</td></tr>
<tr>
<td><strong>description</strong> <em>string</em></td><td>Assigns the specified description to an interface</td></tr>
<tr>
<td><strong>show running-config interface</strong> <em>interface slot/number</em></td><td>Displays the running configuration for the specified interface</td></tr>
<tr>
<td><strong>show ip interface</strong> <em>[type number]</em></td><td>Displays the status of a network interface as well as a detailed listing of its IP configurations and related characteristics.</td></tr>
<tr>
<td><strong>ip name-server</strong> <em>serverip-1 serverip-2</em></td><td>Sets the IP address of or more DNS servers that the device can use to resolve hostnames to IP addresses.</td></tr>
<tr>
<td></td><td></td></tr>
<tr>
<td><strong>Troubleshooting Cisco Commands List</strong></td><td></td></tr>
<tr>
<td><strong>ping</strong> *{hostname</td><td>system-address} [source source-address]*</td></tr>
<tr>
<td><strong>speed</strong> *{10</td><td>100</td></tr>
<tr>
<td><strong>duplex</strong> *{auto</td><td>full</td></tr>
<tr>
<td><strong>cdp run</strong></td><td></td></tr>
<tr>
<td><strong>no cdp run</strong></td><td>Enables or disables Cisco Discovery Protocol (CDP) for the device</td></tr>
<tr>
<td><strong>show mac address-table</strong></td><td>Displays the MAC address table</td></tr>
<tr>
<td><strong>show cdp</strong></td><td>Shows whether CDP is enabled globally</td></tr>
<tr>
<td><strong>show cdp neighbors</strong>*[detail]*</td><td>Lists summary (or detailed) information about each neighbor connected to the device</td></tr>
<tr>
<td><strong>show interfaces</strong></td><td>Displays detailed information about interface status, settings and counters</td></tr>
<tr>
<td><strong>show interface status</strong></td><td>Displays the interface line status</td></tr>
<tr>
<td><strong>show interfaces switchport</strong></td><td>Displays many configuration settings and current operational status, including VLAN trunking details</td></tr>
<tr>
<td><strong>show interfaces trunk</strong></td><td>Lists information about the currently operational trunks and the VLANs supported by those trunks</td></tr>
<tr>
<td><strong>show vlan</strong></td><td></td></tr>
<tr>
<td><strong>show vlan brief</strong></td><td>Lists each VLAN and all interfaces assigned to that VLAN but does not include trunks</td></tr>
<tr>
<td><strong>show vtp status</strong></td><td>Lists the current VLAN Trunk Protocol (VTP) status, including the current mode</td></tr>
<tr>
<td></td><td></td></tr>
<tr>
<td><strong>Routing and VLAN Commands</strong></td><td></td></tr>
<tr>
<td><strong>show ip route</strong></td><td>Displays the current state of the IP routing of all known routes that are either statically configured or learned dynamically through a routing protocol</td></tr>
<tr>
<td><strong>ip route</strong> *network-number network-mask {ip-address</td><td>interface}*</td></tr>
<tr>
<td><strong>router rip</strong></td><td>Enables a Routing Information Protocol (RIP) routing process, which places you in router configuration mode</td></tr>
<tr>
<td><strong>network</strong> <em>ip-address</em></td><td>Associates a network with a RIP routing process</td></tr>
<tr>
<td><strong>version 2</strong></td><td>Configures the software to receive and send only RIP version 2 packets</td></tr>
<tr>
<td><strong>no auto-summary</strong></td><td>Disables automatic summarization</td></tr>
<tr>
<td><strong>default-information originate</strong></td><td>Generates a default route into RIP</td></tr>
<tr>
<td><strong>passive-interface</strong> <em>interface</em></td><td>Sets the specified interface to passive RIP mode, which means RIP routing updates are accepted by, but not sent out of, the interface</td></tr>
<tr>
<td><strong>show ip rip database</strong></td><td>Displays the contents of the RIP routing database</td></tr>
<tr>
<td><strong>ip nat</strong> *[inside</td><td>outside]*</td></tr>
<tr>
<td><strong>ip nat inside source</strong> *{list{access-list-number</td><td>access-list-name}} interface type number[overload]*</td></tr>
<tr>
<td><strong>ip nat inside source static</strong> <em>local-ip global-ip</em></td><td>Establishes a static translation between an inside local address and an inside global address</td></tr>
<tr>
<td><strong>vlan</strong></td><td>Creates a VLAN and enters VLAN configuration mode for further definitions</td></tr>
<tr>
<td><strong>switchport access vlan</strong></td><td>Sets the VLAN that the interface belongs to.</td></tr>
<tr>
<td><strong>switchport trunk encapsulation dot1q</strong></td><td>Specifies 802.1Q encapsulation on the trunk link.</td></tr>
<tr>
<td><strong>switchport access</strong></td><td>Configures a specific Ethernet port on a switch to operate in access mode to accommodate an end device such as a computer, server or printer. The port must then be assigned to a single VLAN.</td></tr>
<tr>
<td><strong>vlan vlan-id</strong> <em>[name vlan-name]</em></td><td>Configures a specific VLAN name (1 to 32 characters)</td></tr>
<tr>
<td><strong>switchport mode</strong> *{ access</td><td>trunk }*</td></tr>
<tr>
<td><strong>switchport trunk</strong> <em>{encapsulation { dot1q }</em></td><td>Sets the trunk characteristics when the interface is in trunking mode. In this mode, the switch supports simultaneous tagged and untagged traffic on a port.</td></tr>
<tr>
<td><strong>encapsulation dot1q vlan-id</strong></td><td>Defines the matching criteria to map 802.1Q frames ingress on an interface to the appropriate service instance</td></tr>
<tr>
<td><strong>show spanning-tree</strong></td><td>Provides detailed information about the Spanning Tree protocol for all VLANs</td></tr>
<tr>
<td></td><td></td></tr>
<tr>
<td><strong>DHCP Commands</strong></td><td></td></tr>
<tr>
<td><strong>ip address dhcp</strong></td><td>Acquires an IP address on an interface via DHCP</td></tr>
<tr>
<td><strong>ip dhcp pool name</strong></td><td>Used to configure a DHCP address pool on a DHCP server and enter DHCP pool configuration mode</td></tr>
<tr>
<td><strong>domain-name</strong> <em>domain</em></td><td>Specifies the domain name for a DHCP client</td></tr>
<tr>
<td><strong>network</strong> <em>network-number [mask]</em></td><td>Configures the network number and mask for a DHCP address pool primary or secondary subnet on a Cisco IOS DHCP server</td></tr>
<tr>
<td><strong>ip dhcp excluded-address</strong> <em>ip-address [last-ip-address]</em></td><td>Specifies IP addresses that a DHCP server should not assign to DHCP clients</td></tr>
<tr>
<td><strong>ip helper-address</strong> <em>address</em></td><td>Enables forwarding of UDP broadcasts, including BOOTP, received on an interface</td></tr>
<tr>
<td><strong>default-router</strong> <em>address[address2 ... address8]</em></td><td>Specifies the default routers for a DHCP client</td></tr>
<tr>
<td></td><td></td></tr>
<tr>
<td><strong>Security Commands</strong></td><td></td></tr>
<tr>
<td><strong>password</strong> <em>pass-value</em></td><td>Lists the password that is required if the login command (with no other parameters) is conﬁgured</td></tr>
<tr>
<td><strong>username</strong> <em>name</em> <strong>password</strong> <em>pass-value</em></td><td>Deﬁnes one of possibly multiple user names and associated passwords used for user authentication. It is used when the <strong>login local</strong> line conﬁguration command has been used</td></tr>
<tr>
<td><strong>enable password</strong> <em>pass-value</em></td><td>Deﬁnes the password required when using the <strong>enable</strong> command</td></tr>
<tr>
<td><strong>enable secret</strong> <em>pass-value</em></td><td>Sets the password required for any user to enter enable mode</td></tr>
<tr>
<td><strong>service password-encryption</strong></td><td>Directs the Cisco IOS software to encrypt the passwords, CHAP secrets and similar data saved in its configuration file</td></tr>
<tr>
<td><strong>ip domain-name</strong> <em>name</em></td><td>Conﬁgures a DNS domain name</td></tr>
<tr>
<td><strong>crypto key generate rsa</strong></td><td>Creates and stores (in a hidden location in ﬂash memory) the keys that are required by SSH</td></tr>
<tr>
<td><strong>transport input</strong> *{telnet</td><td>ssh}*</td></tr>
<tr>
<td><strong>access-list</strong> *access-list-number {deny</td><td>permit} source [source-wildcard] [log]*</td></tr>
<tr>
<td><strong>access-class</strong></td><td>Restricts incoming and outgoing connections between a particular VTY (into a basic Cisco device) and the addresses in an access list</td></tr>
<tr>
<td><strong>ip access-list</strong> *{standard</td><td>extended} {access-list-name</td></tr>
<tr>
<td><strong>permit source</strong> <em>[source-wildcard]</em></td><td>Allows a packet to pass a named IP ACL. To remove a permit condition from an ACL, use the “no” form of this command.</td></tr>
<tr>
<td><strong>deny source</strong> <em>[source-wildcard]</em></td><td>Used to set conditions in a named IP ACL that will deny packets. To remove a deny condition from an ACL, use the “no” form of this command.</td></tr>
<tr>
<td><strong>ntp peer</strong> <em>&lt;ip-address&gt;</em></td><td>Configures the software clock to synchronize a peer or to be synchronized by a peer</td></tr>
<tr>
<td><strong>switchport port-security</strong></td><td>Enables port security on the interface</td></tr>
<tr>
<td><strong>switchport port-security maximum maximum</strong></td><td>Sets the maximum number of secure MAC addresses on the port</td></tr>
<tr>
<td><strong>switchport port-security mac-address</strong> *{mac-addr</td><td>{sticky [mac-addr]}}*</td></tr>
<tr>
<td><strong>switchport port-security violation</strong> *{shutdown</td><td>restrict</td></tr>
<tr>
<td><strong>show port security</strong> <em>[interface interface-id]</em></td><td>Displays information about security options configured on the interface</td></tr>
<tr>
<td></td><td></td></tr>
<tr>
<td><strong>Monitoring and Logging Commands</strong></td><td></td></tr>
<tr>
<td><strong>logging</strong> <em>ip address</em></td><td>Configures the IP address of the host that will receive the system logging (syslog) messages</td></tr>
<tr>
<td><strong>logging trap level</strong></td><td>Used to limit messages that are logged to the syslog servers based on severity. Specify the number or name of the desired severity level at which messages should be logged</td></tr>
<tr>
<td><strong>show logging</strong></td><td>Displays the state of system logging (syslog) and the contents of the standard system logging buffer</td></tr>
<tr>
<td><strong>terminal monitor</strong></td><td>Sends a copy of all syslog messages, including debug messages, to the Telnet or SSH user who issues this command</td></tr>
</tbody>
</table>
</div>]]></content:encoded></item><item><title><![CDATA[Identify and  Remove Orphaned ELB & RDS for Cost optimization in AWS]]></title><description><![CDATA[In Current Situation Companies are focusing on COST optimization, So We currently going to focus on RDS & Elastic Load Balancers in AWS resources, RDS &…]]></description><link>https://suniljoe.com/identify-and-remove-orphaned-elb-rds-for-cost-optimization-in-aws</link><guid isPermaLink="true">https://suniljoe.com/identify-and-remove-orphaned-elb-rds-for-cost-optimization-in-aws</guid><dc:creator><![CDATA[Sunil Joe]]></dc:creator><pubDate>Sat, 17 Aug 2024 06:39:06 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1723875768894/cb920361-ceea-4d3b-9247-514303c0d87d.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In Current Situation Companies are focusing on COST optimization, So We currently going to focus on RDS &amp; Elastic Load Balancers in AWS resources, RDS &amp; ELB resources can become orphaned but continue to incur costs</p>
<h2 id="heading-elastic-load-balancer"><strong>Elastic Load Balancer</strong></h2>
<p>ELB is a key AWS service that automatically distributes incoming application traffic across multiple targets, such as Amazon EC2 instances, containers, and IP addresses. It improves application availability and fault tolerance by balancing load across multiple resources. However, as applications and environments change, some ELBs can become detached from their target resources or are left behind after the resources they were supporting are terminated.</p>
<h3 id="heading-orphaned-elbs"><strong>Orphaned ELBs</strong></h3>
<p>Identifying and removing orphaned ELBs involves checking whether the ELB is associated with any active targets or resources</p>
<p><strong><em>Step-by-step guide using</em> :</strong></p>
<p><strong>Using Console</strong></p>
<p>Navigate to the Elastic Load Balancing console.</p>
<p>Review the list of ELBs and check their associated instances, targets, or services.</p>
<p>If an ELB has no associated targets or instances, it may be orphaned.</p>
<p>Select the orphaned ELB. &gt; Choose <strong>Actions</strong> &gt; <strong>Delete</strong>\&gt;Confirm the deletion.</p>
<p><strong>Using AWS CLI</strong></p>
<p>You can use AWS CLI commands to list ELBs and check their status. Here's a basic approach:</p>
<pre><code class="lang-bash"><span class="hljs-comment"># ELB with no instances listed is likely orphaned. </span>
    aws elb describe-load-balancers --query <span class="hljs-string">"LoadBalancerDescriptions[*].[LoadBalancerName,Instances]"</span> --output table
<span class="hljs-comment"># To remove the identified Orphaned ELBs  </span>
    aws elb delete-load-balancer --load-balancer-name &lt;your-elb-name&gt;
</code></pre>
<h2 id="heading-rds-relational-database-service"><strong>RDS (Relational Database Service)</strong></h2>
<p>Amazon RDS simplifies the setup, operation, and scaling of relational databases in the cloud.</p>
<h3 id="heading-orphaned-rds"><strong>Orphaned RDS</strong></h3>
<p>To find &amp; remove orphaned RDS instances, look for instances with no CPU utilization, low IOPS, or those running without any recent connections.</p>
<p><strong>Step-by-step guide using:</strong></p>
<ol>
<li><p><strong>Check Cloud Watch metrics:</strong> Monitor RDS metrics like CPU utilization, database connections, and read/write IOPS</p>
</li>
<li><p><strong>Analyze Billing Reports:</strong> Look for any unusual charges.</p>
</li>
<li><p><strong>Notify Stakeholders:</strong> Inform relevant parties about the orphaned instances.</p>
</li>
<li><p><strong>Backup Before Delete:</strong> Ensure you have a backup of any important data.</p>
</li>
<li><p><strong>Terminate the instance:</strong> Delete the orphaned RDS instance.</p>
</li>
</ol>
<h3 id="heading-summary"><strong>Summary</strong></h3>
<p>Orphaned Elastic Load Balancers and RDS can silently inflate your AWS bill, but with a bit of regular maintenance, you can easily identify and remove them. This not only helps in cost optimization but also keeps your AWS environment clean and efficient.</p>
]]></content:encoded></item><item><title><![CDATA[Linux Basic Concepts]]></title><description><![CDATA[Linux Basic Commands Each group of three characters define permissions for each class: Example : chmod 744 myCV.sh chmod user=7, group =4 , other =4…]]></description><link>https://suniljoe.com/linux-basic-concepts</link><guid isPermaLink="true">https://suniljoe.com/linux-basic-concepts</guid><category><![CDATA[linux for beginners]]></category><category><![CDATA[Linux]]></category><category><![CDATA[basics]]></category><category><![CDATA[chmod]]></category><category><![CDATA[file system]]></category><category><![CDATA[filestructure]]></category><dc:creator><![CDATA[Sunil Joe]]></dc:creator><pubDate>Fri, 09 Aug 2024 06:06:21 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1723184303414/aca84881-f366-4b2f-9d06-ffca42339de9.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Linux Basic Commands</p>
<pre><code class="lang-basic">whoami                               - Current user <span class="hljs-keyword">name</span>
pwd                                    - Current working dir
cd                                    - Change dir
ls                                    - <span class="hljs-keyword">List</span> file <span class="hljs-keyword">or</span> folder
ls -lrt                             - <span class="hljs-keyword">List</span> file <span class="hljs-keyword">or</span> folder with details
ls -a                               - <span class="hljs-keyword">List</span> hidden <span class="hljs-keyword">files</span>
<span class="hljs-keyword">mkdir</span> dirname                       - Create a <span class="hljs-keyword">new</span> directory
<span class="hljs-keyword">rmdir</span>                               - <span class="hljs-comment">Remove the diretory</span>
rm filename                           - <span class="hljs-comment">Remove file</span>
rm -rf                                - <span class="hljs-comment">Remove direcory forcefully</span>
cp file <span class="hljs-keyword">name</span> /destination           - Copy filename <span class="hljs-keyword">to</span> /desination directory
mv filename1 filename1               - Rename filename1 <span class="hljs-keyword">to</span> filename2
mv source destination                - Move the file source <span class="hljs-keyword">to</span> destination
<span class="hljs-keyword">mkdir</span> -p                            - Create subdirectory
touch filename                       - Create empty file
cat filename                        - Display the content of file
echo <span class="hljs-string">"hi"</span>                           - <span class="hljs-keyword">Print</span> the <span class="hljs-string">"hi"</span> in the terminal
man ls                                - Display the manual
vi filename                            - <span class="hljs-keyword">Open</span> file with editor
apt install tree                      - Install tree package
tree .                              - <span class="hljs-keyword">List</span> subdirectry
rm -f                               - Force <span class="hljs-comment">remove </span>
history                               - Display the command history
history &gt; history.txt               - Copy the history <span class="hljs-keyword">to</span> notepad 
cat /etc/os-release                   - About os information
uptime                               - Provide information <span class="hljs-keyword">system</span> running
apt update                           - Update package lists (Debian/Ubuntu)
yum update                           - Update package lists (RHEL/CentOS)

scp localfile username@<span class="hljs-comment">remotehost:/path/to/remote/directory/</span>

sudo useradd sunil                         - Adds a <span class="hljs-keyword">new</span> user named sunil.
cat /etc/passwd                             - Displays the contents of the /etc/passwd file, which contains user account information.
sudo passwd sunil                        - Sets <span class="hljs-keyword">or</span> changes the password <span class="hljs-keyword">for</span> the user sunil.
sudo useradd -s /sbin/nologin joe       - Adds a <span class="hljs-keyword">new</span> user named lalith with the <span class="hljs-keyword">shell</span> set <span class="hljs-keyword">to</span> /sbin/nologin, preventing joe from logging in interactively.
cat /etc/passwd                            - Displays the updated contents of the /etc/passwd file.
su sunil                                - Switches <span class="hljs-keyword">to</span> the user sunil.
sudo passwd joe                            - Sets <span class="hljs-keyword">or</span> changes the password <span class="hljs-keyword">for</span> the user joe.
sudo usermod -s /bin/sh joe                - Changes the <span class="hljs-keyword">shell</span> <span class="hljs-keyword">for</span> the user joe <span class="hljs-keyword">to</span> /bin/sh, allowing them <span class="hljs-keyword">to</span> <span class="hljs-keyword">log</span> in interactively.
cat /etc/group                            - Displays the contents of the /etc/group file, which contains group account information.
sudo usermod -aG docker ubuntu             - Adds the user ubuntu <span class="hljs-keyword">to</span> the docker group, allowing them <span class="hljs-keyword">to</span> <span class="hljs-keyword">run</span> Docker commands without sudo.
groups ubuntu                            - Displays the groups the user ubuntu belongs <span class="hljs-keyword">to</span>.
getent group docker                     - Retrieves <span class="hljs-keyword">and</span> displays the docker group entry from the group database.
sudo usermod -aG docker sunil            - Adds the user arunjai <span class="hljs-keyword">to</span> the docker group.
getent group docker                     - Retrieves <span class="hljs-keyword">and</span> displays the updated docker group entry.
sudo usermod -m -d /home/sunil sunil       - Moves the home directory of the user sunil <span class="hljs-keyword">to</span> /home/sunil.
sudo usermod -d /home/sunil sunil     - Sets the home directory of the user sunil <span class="hljs-keyword">to</span> /home/sunil (the -m <span class="hljs-keyword">option</span> moves the contents of the old home directory <span class="hljs-keyword">to</span> the <span class="hljs-keyword">new</span> one).
sudo groupadd sai                       - Creates a <span class="hljs-keyword">new</span> group named ramesh.
cat /etc/group                          - Displays the updated contents of the /etc/group file.
sudo init <span class="hljs-number">6</span>                                - Reboots the <span class="hljs-keyword">system</span> (init <span class="hljs-number">6</span> is equivalent <span class="hljs-keyword">to</span> a reboot).
scp -i /path/<span class="hljs-keyword">to</span>/your-<span class="hljs-keyword">key</span>.pem /path/<span class="hljs-keyword">to</span>/local/file username@<span class="hljs-comment">remote_host:/path/to/remote/directory</span>
sudo apt update
sudo apt install ufw

sudo apt-<span class="hljs-keyword">get</span> install nginx
sudo yum install nginx
sudo service nginx start
sudo service nginx <span class="hljs-keyword">stop</span>
sudo service nginx restart
sudo service nginx status

sudo systemctl restart nginx                  -  Restarts the Nginx web server
sudo systemctl start nginx                    - Starts the Nginx web server
sudo systemctl <span class="hljs-keyword">stop</span> nginx                     - Stops the Nginx web server
sudo systemctl status nginx                   -  Checks the current status of the Nginx service
sudo systemctl enable nginx                   - Enable nginx in <span class="hljs-keyword">System</span> startup

sudo ufw status                               - checks the Firewall rules (UFW) 
sufo ufw allow ssh                            - Enable the secure <span class="hljs-comment">remote access via ssh</span>
sudo ufw allow <span class="hljs-comment">'Nginx Full'                   - Enable http and https (80 *443) allow the traffice</span>
sudo ufw enable                               - Enables the UFW firewall

ctrl l
cd /var/www/html
echo <span class="hljs-string">"helloworld"</span>                            - <span class="hljs-keyword">Print</span> terminal output has helloworld
sudo touch index.html                        - create the empty file html format
sudo echo <span class="hljs-string">"Helloworld"</span> &gt; index.html
sudo vi index.html                           - Editer text file change the content
sudo rm index.html                           - <span class="hljs-comment">remove the files fromt the pwd</span>
</code></pre>
<h3 id="heading-chmod-change-the-access-permissions"><strong>chmod - change the access permissions</strong></h3>
<p>Each group of three characters define permissions for each <em>class</em>:</p>
<ul>
<li><p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1723181392403/1c83343a-88da-45dd-9667-5a482e6d3af7.png" alt class="image--center mx-auto" /></p>
<p>  <strong>Example : chmod 744</strong> myCV.sh</p>
</li>
<li><p>chmod user=7, group =4 , other =4 myCV.sh</p>
</li>
</ul>
<div class="hn-table">
<table>
<thead>
<tr>
<td>#</td><td>Sum</td><td>rwx</td><td>Permission</td></tr>
</thead>
<tbody>
<tr>
<td>7</td><td>4(r) + 2(w) + 1(x)</td><td>rwx</td><td>read, write and execute</td></tr>
<tr>
<td>6</td><td>4(r) + 2(w)</td><td>rw-</td><td>read and write</td></tr>
<tr>
<td>5</td><td>4(r)+ 1(x)</td><td>r-x</td><td>read and execute</td></tr>
<tr>
<td>4</td><td>4(r)</td><td>r--</td><td>read only</td></tr>
<tr>
<td>3</td><td>2(w) + 1(x)</td><td>-wx</td><td>write and execute</td></tr>
<tr>
<td>2</td><td>2(w)</td><td>-w-</td><td>write only</td></tr>
<tr>
<td>1</td><td>1(x)</td><td>--x</td><td>execute only</td></tr>
<tr>
<td>0</td><td>0</td><td>---</td><td>none</td></tr>
</tbody>
</table>
</div><p>above example show <strong>chmod 744</strong><br />user - can read, write and execute<br />group - can read only<br />others - can also have read access</p>
<p>Linux Directories</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1723182420615/1ec1e45c-a8f2-47e9-a22c-c29519aed2e4.png" alt class="image--center mx-auto" /></p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Windows</td><td>Linux</td><td>Description</td></tr>
</thead>
<tbody>
<tr>
<td>C:\</td><td>Root Directory (/)</td><td>The top-level directory-All other directories and files are contained within this root directory.</td></tr>
<tr>
<td>C:\users</td><td>/home</td><td>Contains user directories. For example, /home/username is where a user's personal files and settings are stored.</td></tr>
<tr>
<td>C:\Program Files</td><td>/etc</td><td>Configuration files for the system and installed applications.</td></tr>
<tr>
<td>C:\Windows</td><td>/var</td><td>Variable data like logs, spool files, and databases.</td></tr>
<tr>
<td>%appdata%</td><td>/usr</td><td>User programs and data. Includes /usr/bin (binaries), /usr/lib (libraries), and /usr/share (shared data).</td></tr>
<tr>
<td>C:\System32</td><td>/bin</td><td>Essential command binaries.</td></tr>
<tr>
<td>C:\System32</td><td>/sbin</td><td>System binaries, used for system maintenance.</td></tr>
<tr>
<td>C:\Windows\Temp</td><td>/tmp</td><td>Temporary files.</td></tr>
<tr>
<td>C:\Windows\System32\drivers</td><td>/dev</td><td>Device files.</td></tr>
<tr>
<td>C:\System32\Taskmgr.exe</td><td>/proc:</td><td>Virtual filesystem providing process and system information.</td></tr>
<tr>
<td>C:\System32\msinfo32.exe</td><td>/sys:</td><td>Virtual filesystem providing information about the kernel, devices, and other system information.</td></tr>
</tbody>
</table>
</div>]]></content:encoded></item><item><title><![CDATA[Create free SSL certificate for your Website]]></title><description><![CDATA[Now for that we are going to use free certificate provider let's encrypt. we are going to use free certificate provider let's encrypt. Download the…]]></description><link>https://suniljoe.com/create-free-ssl-certificate-for-your-website</link><guid isPermaLink="true">https://suniljoe.com/create-free-ssl-certificate-for-your-website</guid><category><![CDATA[SSL Certificates For Website]]></category><category><![CDATA[Free SSL Certificate]]></category><category><![CDATA[Secure Web Hosting]]></category><dc:creator><![CDATA[Sunil Joe]]></dc:creator><pubDate>Fri, 02 Aug 2024 08:59:23 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1722589092929/398bd105-5a12-4658-9d79-c12be397cfcb.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-creating-your-ssl-certificate-to-secure-your-site-for-free">Creating your SSL certificate to secure your Site for free</h3>
<p>Now for that we are going to use free certificate provider let's encrypt.</p>
<p>we are going to use free certificate provider let's encrypt.</p>
<p>Download the installer for windows in the below link.</p>
<p><a target="_blank" href="https://www.win-acme.com/">win-acme.com</a></p>
<p><a target="_blank" href="https://github.com/win-acme/win-acme/releases/download/v2.2.7.1621/win-acme.v2.2.7.1621.x64.trimmed.zip">Download Here</a></p>
<p><strong>now execute the in command prompt - winacme.exe</strong></p>
<p><strong>To create new certificate : N</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722588747050/02f90413-6595-42ee-a302-f4b0696fc443.jpeg" alt class="image--center mx-auto" /></p>
<p><strong>Select your site name here.</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722588764171/0cd4e3ac-688e-44ee-970e-62e17d304b3c.jpeg" alt class="image--center mx-auto" /></p>
<p><strong>Next choose all option</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722588795983/bc1e9cd0-48b0-4608-a691-f6305f4c9f9e.png" alt class="image--center mx-auto" /></p>
<p><strong>Confirm this selection</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722588811468/15bfb287-12dc-4587-ba1a-4ff517eaabeb.png" alt class="image--center mx-auto" /></p>
<p>After that it download the end user license agreement to local , <strong>AGREE</strong> the terms. By pressing Y</p>
<p><strong>Enter your mail id.</strong></p>
<p>The Email ID for communication purpose like renewal and other issue related update</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722588832329/0d7cee56-399e-4d9e-a51f-44b077c7434a.png" alt class="image--center mx-auto" /></p>
<p>We have successfully deployed the SSL certificate for our website.</p>
<p><strong>Now check you website is secured with SSL.</strong></p>
]]></content:encoded></item><item><title><![CDATA[Docker]]></title><description><![CDATA[Note : Command ADD (copy and extract tar file from source to destination), COPY (copy tar to destination location)]]></description><link>https://suniljoe.com/docker</link><guid isPermaLink="true">https://suniljoe.com/docker</guid><category><![CDATA[docker commands]]></category><dc:creator><![CDATA[Sunil Joe]]></dc:creator><pubDate>Thu, 01 Aug 2024 08:31:47 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/HSACbYjZsqQ/upload/0673bab2fbecf69ffb528cda18237fa4.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-basic-commands">Basic Commands</h3>
<pre><code class="lang-dockerfile">sudo docker images                                        <span class="hljs-comment"># to know the docker image in current machine</span>
sudo docker search httpd                                <span class="hljs-comment"># to get the list of available docker image in docker hub</span>
sudo docker pull Imagepath                                  <span class="hljs-comment"># latest tag will be pulled/download fron docker hub</span>
sudo docker push Imagepath:version                         <span class="hljs-comment"># to upload the image to dockerhub under username/appname:version </span>
sudo  docker <span class="hljs-keyword">run</span><span class="bash"> -d -it --name Myhttp -p 81:80 httpd      <span class="hljs-comment"># to run the images to get container</span></span>
sudo docker build . -t myweb:v1                            <span class="hljs-comment"># to build image using alias tags</span>
sudo docker exec it ubuntu1 /bin/bash                    <span class="hljs-comment"># to login container</span>
sudo  docker ps -a                                       <span class="hljs-comment"># to check the image status</span>
sudo docker inspect Imagepath                             <span class="hljs-comment"># to check the port used in image for port forwarding </span>
grep -A <span class="hljs-number">10</span> Config                                        <span class="hljs-comment"># to filter results</span>
sudo docker history                                        <span class="hljs-comment"># to get history of commands</span>
sudo docker save image Id &gt; snapshot.tar                <span class="hljs-comment"># backup or snapshot </span>
scp snapshot.tar username@remotemachine:path            <span class="hljs-comment"># to pull image from other server</span>


sudo docker images
sudo docker stop container_names                        <span class="hljs-comment"># to stop containers</span>
sudo docker rm  container_name                             <span class="hljs-comment"># to remove container  </span>
sudo docker rmi    image_name                                <span class="hljs-comment"># to remove images ( container need to remove before remove images)</span>
sudo docker commit docker Image_id Custom_name:tag        <span class="hljs-comment"># to convert the container to image</span>
sudo docker login                                         <span class="hljs-comment"># login dockerhub</span>
sudo docker login sunil.aws.com                            <span class="hljs-comment"># Custom repository login</span>
Sudo docker info                                        <span class="hljs-comment"># to get information about docker</span>
sudo docker logs                                        <span class="hljs-comment"># to get logs</span>
</code></pre>
<h3 id="heading-docker-file-format-image-file">Docker file Format (image file)</h3>
<pre><code class="lang-dockerfile"><span class="hljs-keyword">FROM</span> ubuntu:latest 
<span class="hljs-keyword">LABEL</span><span class="bash">                                <span class="hljs-comment">#( TO NAME AND alisa the environment ) </span></span>
<span class="hljs-keyword">EXPOSE</span> <span class="hljs-number">80</span> <span class="hljs-number">443</span>                        <span class="hljs-comment"># (define container port listen)</span>
<span class="hljs-keyword">copy</span><span class="bash"> index.html /var/www/html/       <span class="hljs-comment"># To copy index file to publish</span></span>
</code></pre>
<p>Note : Command ADD (copy and extract tar file from source to destination), COPY (copy tar to destination location)</p>
<pre><code class="lang-dockerfile"><span class="hljs-keyword">RUN</span><span class="bash"> sudo apt-get update                                     <span class="hljs-comment"># (RUN to run any command on top of image )</span></span>
<span class="hljs-keyword">RUN</span><span class="bash"> sudo apt-get in-y apache2</span>
<span class="hljs-keyword">RUN</span><span class="bash"> sudo apt-get update &amp;&amp; sudo apt-get install -y apache2  <span class="hljs-comment"># run in single layer will reduce size)</span></span>
<span class="hljs-keyword">CMD</span><span class="bash"> apachectl -D FOREGROUND                                 <span class="hljs-comment"># systemctl commad will not work here</span></span>
<span class="hljs-keyword">CMD</span><span class="bash"> ping google.com</span>
<span class="hljs-keyword">ENTRYPOINT</span><span class="bash"> ping google.com                                  <span class="hljs-comment"># SAME HAS CMD but it cant be override during excution</span></span>

<span class="hljs-keyword">VOLUME</span><span class="bash"> /PATH                                                 <span class="hljs-comment"># MOUNT VOLUME</span></span>
<span class="hljs-keyword">USER</span> USERNAME                                                <span class="hljs-comment"># SELECT USER (DEFAULT WILL USE ROOT ) </span>
<span class="hljs-keyword">WORKDIR</span><span class="bash">    /app                                                <span class="hljs-comment"># WORKING DIRECTORY </span></span>
<span class="hljs-keyword">ENV</span>                                                         <span class="hljs-comment"># ENVIRONMENT VARIABLE COMPUTER</span>
<span class="hljs-keyword">ARG</span>                                                            <span class="hljs-comment"># ENVIRONMENT VARIABLE USER DURING BUILD USED NOT IN CONTAINER</span>
</code></pre>
<h3 id="heading-docker-orchestration-docker-swarn">Docker Orchestration - Docker Swarn</h3>
<pre><code class="lang-dockerfile">sudo docker install swarm master
sudo docker init--advertise-addr Masternode_IP
sudo docker node ls 

docker service                                                                 <span class="hljs-comment"># Container called here has service</span>
sudo docker service create --replicas <span class="hljs-number">2</span> -p <span class="hljs-number">80</span>:<span class="hljs-number">8043</span> --name web1 imagename
sudo docker service ls                                                      <span class="hljs-comment"># to list the service </span>
sudo docker service ps web1                                                  <span class="hljs-comment"># to check the service running nodes</span>
sudo docker service create --mode global -p <span class="hljs-number">81</span>:<span class="hljs-number">8044</span> --name testweb1 imagename  <span class="hljs-comment"># to run the container with max replicas( max node available)</span>
sudo docker service scale web1=<span class="hljs-number">5</span>                                            <span class="hljs-comment"># scale up to  5 replicate</span>
sudo docker service scale web1=<span class="hljs-number">2</span>                                              <span class="hljs-comment"># scale down to  2 replicate</span>
sudo dcker network  create -d overlay newoverlay

sudo docker service update --image httpd:latest web1
sudo docker service rollback web1
sudo docker node update --availablity drain nodename                         <span class="hljs-comment"># maintenanace mode</span>
sudo docker node update --availablity pause nodename                          <span class="hljs-comment"># drs will not migrate container to this node</span>
sudo docker node update --availablity active nodename 

Docker compose                                                              <span class="hljs-comment"># to run multi container</span>
sudo apt-cache search docker-compose                                          <span class="hljs-comment"># to install  docker composr version</span>
sudo docker-compose -f myapp.yaml config                                     <span class="hljs-comment"># to check the configuartion issue</span>
sudo docker-compose -f myapp.yaml up -d                                     <span class="hljs-comment"># to run the compose</span>
sudo docker-compose -f myapp.yaml images                                     <span class="hljs-comment"># to check images related to compose file</span>
</code></pre>
]]></content:encoded></item></channel></rss>