<?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 Sameer Imtiaz on Medium]]></title>
        <description><![CDATA[Stories by Sameer Imtiaz on Medium]]></description>
        <link>https://medium.com/@isameer3056?source=rss-34d9a75bca1c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*PyVa1Y_UfyAvjIlD</url>
            <title>Stories by Sameer Imtiaz on Medium</title>
            <link>https://medium.com/@isameer3056?source=rss-34d9a75bca1c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 14:22:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@isameer3056/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[I Built a Fully Automated YouTube Shorts Channel That Costs $0 a Month — Here’s Everything That…]]></title>
            <link>https://medium.com/@isameer3056/i-built-a-fully-automated-youtube-shorts-channel-that-costs-0-a-month-heres-everything-that-df792db7f42d?source=rss-34d9a75bca1c------2</link>
            <guid isPermaLink="false">https://medium.com/p/df792db7f42d</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[content-creation]]></category>
            <category><![CDATA[no-code]]></category>
            <category><![CDATA[n8n]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Sameer Imtiaz]]></dc:creator>
            <pubDate>Thu, 30 Jul 2026 22:22:05 GMT</pubDate>
            <atom:updated>2026-07-30T22:22:05.465Z</atom:updated>
            <content:encoded><![CDATA[<h3>I Built a Fully Automated YouTube Shorts Channel That Costs $0 a Month — Here’s Everything That Broke Along the Way</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N26lFsLMwlsTvpkkHIwqeg.png" /></figure><p>I run a small YouTube channel, Health Fact, posting daily short videos about nutrition facts — vitamins, minerals, and the foods that actually contain them. Writing, recording, and editing one of these every single day isn’t sustainable long-term, so I set out to automate the entire pipeline: research a topic, write a script, fact-check it, generate a voiceover, source visuals, assemble the video, and upload it — hands-off, on a schedule, for free.</p><p>It works now. Getting there took a lot longer than I expected, and almost every step taught me something the documentation doesn’t mention. This is the story of building it, written for anyone about to attempt something similar.</p><h3>The plan</h3><p>n8n (self-hosted, for unlimited free workflow runs) orchestrating:</p><ul><li>A free-tier LLM for research and script-writing</li><li>A second, independent LLM call to fact-check the first one’s claims</li><li>Free text-to-speech for the voiceover</li><li>Free stock-photo APIs for visuals</li><li>ffmpeg to assemble everything into a vertical video with burned-in captions</li><li>The YouTube API to publish it</li></ul><p>Every single piece had a free tier. The challenge was making them all talk to each other reliably.</p><h3>Problem 1: the free VM that wouldn’t spin up</h3><p>Oracle Cloud’s Always Free tier is a genuinely good deal — 2 OCPUs and 12GB of RAM on an Arm instance, forever, with a guarantee that your card can’t be charged without you explicitly upgrading the account. I picked it as my host.</p><p>Then I spent over 24 hours hitting “Out of host capacity” every time I tried to create the instance. My region simply didn’t have free Ampere capacity available at that moment — a real, if annoying, tradeoff of “free forever” infrastructure being popular.</p><p>The fix was a small shell script that automated the retry loop I was doing by hand — attempt the launch, catch the specific capacity error, wait, try again — run from Oracle’s browser-based Cloud Shell so it didn’t need any local setup. Two details mattered more than I expected: Oracle returns the <em>same</em> capacity error under two different error codes depending on the day, so the script had to check for both; and hammering the launch API too fast trips its own rate limiter, so the retry interval had to be generous (five minutes, not one).</p><p>It found a slot within a day. Small win, but a real one.</p><h3>Problem 2: the Docker image with no package manager</h3><p>Once the VM was up, I containerized n8n and tried to add ffmpeg the obvious way: apt-get install ffmpeg. It failed — apt-get: not found. So I assumed it was Alpine-based and tried apk add instead. Also not found.</p><p>Turns out n8n’s official image, as of a recent major version, ships on a deliberately minimal, distroless-style base — no package manager included at all, for security hardening. The fix was to stop trying to install anything inside the image, and instead copy in an already-compiled, statically-linked ffmpeg binary from a separate, purpose-built image, using Docker’s multi-stage COPY --from= — a completely different mental model than &quot;install a package,&quot; but more robust once I understood it.</p><h3>Problem 3: a network with no way out</h3><p>HTTPS ports open in the firewall, SSH working, everything looking correct — and the site still wasn’t reachable. The actual problem was one layer deeper than the firewall: the subnet had no route sending outbound traffic to an Internet Gateway at all. A cloud firewall rule allowing traffic <em>and</em> an actual route out are two separate things, and it’s easy to configure one while forgetting the other, especially when parts of the network got created via API calls rather than a setup wizard that handles both automatically.</p><h3>Problem 4: “free” LLM tier that wasn’t</h3><p>I picked a well-known LLM API for the research/script-writing step, generated a key, and got hit with a quota error showing a hard limit of <strong>zero</strong> requests. It turns out some providers split “free” into two tiers: a legacy, essentially non-functional free tier for accounts with no billing linked, and a genuinely usable free allowance that only unlocks once you link a billing account — still $0 unless you exceed it, but requiring a card as a verification gate.</p><p>Not wanting to hand over another card for something that was supposed to be card-free, I switched to a different provider entirely — one built specifically around a real, no-card free tier with a generous daily rate limit. Different response shape, different auth header, but a clean swap once I adjusted for it.</p><h3>Problem 5: a voice server that refused to speak HTTP</h3><p>For text-to-speech, I wanted something fully offline — no API key, no card, ever. I found an actively maintained open-source engine with genuinely good voice quality and got it running in its own container easily enough.</p><p>The catch: it speaks a custom, lightweight network protocol designed for smart-home integrations, not plain HTTP. My workflow tool could only make normal HTTP requests. I tried hand-writing a small client for that protocol from memory — wrong move. I got just far enough wrong on the exact message framing that it broke in a way that took a while to diagnose. The fix was dropping my own implementation entirely and using the <em>official</em> client library for that protocol, wrapped in a tiny Python HTTP server — a few dozen lines, and it worked correctly on the first real try, because the framing logic was actually correct this time instead of reconstructed from memory.</p><h3>Problem 6: the node that quietly stopped existing</h3><p>For the final video-assembly step, I needed to run ffmpeg commands from within my workflow tool. The node for exactly that — running arbitrary shell commands — simply wasn’t in the node picker at all. It turns out it had been disabled by default in a recent major version, for sound security reasons (arbitrary shell execution is a real risk in shared environments), and the documented environment variable to re-enable it didn’t reliably work for me either.</p><p>Rather than fight it, I reused a pattern from the TTS problem: a tiny sidecar container, this time just wrapping ffmpeg behind a one-endpoint HTTP server. My workflow tool posts a command to it, it runs the command, returns the result. Simple, and it sidestepped the missing node entirely.</p><h3>What I’d tell someone starting this today</h3><ul><li>Budget real time for infrastructure friction before you get to write a single line of the actual pipeline logic. Almost every hour I spent was on plumbing, not on the research/script/video logic itself.</li><li>When something that should be simple breaks in a confusing way, check whether the tool changed its defaults recently before assuming you’re holding it wrong. Several of these (the missing package manager, the disabled shell-command node, the zero-quota “free” tier) were deliberate, fairly recent changes that just hadn’t filtered into what I expected.</li><li>A small HTTP-wrapper sidecar container is a surprisingly general fix for “my main tool can only speak HTTP, but the thing I need doesn’t.” I used the same pattern twice, for two unrelated problems.</li><li>Test each piece in isolation before wiring it into the full workflow. Every one of these bugs was far easier to diagnose with a direct command-line test than by staring at an error inside the workflow UI.</li></ul><p>The pipeline runs on its own now: pick a topic, research and write, fact-check, voice it, source images, assemble the video, upload. Every component still sits comfortably inside a free tier. It took a lot longer to build than “free automated YouTube channel” made it sound — but it’s built, and it’s real.</p><p><em>If you’re building something similar and hit one of these exact walls, I’m happy to compare notes in the comments.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df792db7f42d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beating “Out of Host Capacity”: How I Automated My Way Into an Oracle Cloud Free Tier VM]]></title>
            <link>https://medium.com/@isameer3056/beating-out-of-host-capacity-how-i-automated-my-way-into-an-oracle-cloud-free-tier-vm-9935af02f4ab?source=rss-34d9a75bca1c------2</link>
            <guid isPermaLink="false">https://medium.com/p/9935af02f4ab</guid>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[bash-script]]></category>
            <category><![CDATA[oracle-cloud-free-tier]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Sameer Imtiaz]]></dc:creator>
            <pubDate>Tue, 28 Jul 2026 23:45:32 GMT</pubDate>
            <atom:updated>2026-07-28T23:45:32.238Z</atom:updated>
            <content:encoded><![CDATA[<p>Oracle Cloud’s Always Free tier is one of the best deals in cloud computing — up to 2 OCPUs and 12 GB of RAM on an Arm-based Ampere A1 instance, genuinely free forever, no time limit, and (unlike most other providers) your card literally cannot be charged unless you deliberately click “Upgrade Account.”</p><p>But there’s a catch that trips up a lot of people the moment they try to actually use it: <strong>capacity</strong>. Ampere A1 instances are popular precisely because they’re free, which means in many regions — especially smaller or newer ones, or regions with only a single Availability Domain — you’ll hit this error the moment you click “Create”:</p><pre>Out of host capacity.</pre><p>I ran into this for over a day straight trying to spin up a simple VM for a side project. This article walks through the account setup, why this error happens, and the small automation script that eventually got me a running instance without me babysitting the console.</p><h3>Part 1: Setting up the account</h3><ol><li>Go to <a href="https://www.oracle.com/cloud/free/">oracle.com/cloud/free</a> and click <strong>Start for free</strong>.</li><li>Fill in your country, name, and email. Verify the email via the link Oracle sends.</li><li>You’ll need a <strong>mobile number</strong> (for SMS verification) and a <strong>credit card</strong> (for identity verification only). To repeat the important part: Oracle explicitly states the card will not be charged unless you upgrade your account — the $300/30-day trial credit and the Always Free resources both work without ever touching your card again.</li><li>Choose your <strong>home region</strong> carefully at signup — this cannot be changed later without opening a support ticket, and in some cases isn’t changeable at all. If you have a choice between a region with 1 Availability Domain and one with 3, prefer the one with 3 — capacity issues are noticeably less common there.</li><li>Once verified, you’ll land in the OCI Console.</li></ol><h3>Part 2: Creating the instance (the manual way)</h3><ol><li>From the hamburger menu: <strong>Compute → Instances → Create Instance</strong>.</li><li>Give it a name.</li><li>Under <strong>Image and shape → Edit</strong>: change the image to <strong>Canonical Ubuntu 24.04 (aarch64)</strong>, and change the shape to <strong>Ampere → VM.Standard.A1.Flex</strong>, sized to however many OCPUs/GB you want within the Always Free ceiling (currently 2 OCPU / 12 GB total across all your Ampere instances).</li><li>Leave networking on its defaults (a new VCN and public subnet), and make sure <strong>“Assign a public IPv4 address”</strong> is checked.</li><li>Under <strong>SSH keys</strong>, choose “Generate a key pair for me” and download both files — you’ll need the private key to log in later.</li><li>Click <strong>Create</strong>.</li></ol><p>If you’re in a capacity-constrained region, this is where you’ll see the error. Clicking Create again and again by hand is what I did for the first few hours — until I automated it instead.</p><h3>Part 3: Automating the retry with Cloud Shell</h3><p>Oracle’s browser-based <strong>Cloud Shell</strong> (the terminal icon, top-right of the console) comes with the OCI CLI pre-authenticated — no local setup, no API keys to configure by hand. That makes it the easiest place to run a retry loop.</p><h3>Step 1 — Gather four values</h3><p>Open Cloud Shell and run:</p><pre># Your tenancy (root compartment) OCID — already set as an env var in Cloud Shell<br>echo $OCI_CLI_TENANCY_ID</pre><pre># Your Availability Domain name<br>oci iam availability-domain list --query &quot;data[0].name&quot; --raw-output</pre><pre># Your subnet OCID (swap in your compartment OCID from above)<br>oci network subnet list --compartment-id &lt;compartment-ocid&gt; --query &quot;data[].{name:\&quot;display-name\&quot;, id:id}&quot;</pre><pre># An Ubuntu 24.04 aarch64 image OCID compatible with the Ampere shape<br>oci compute image list \<br>  --compartment-id &lt;compartment-ocid&gt; \<br>  --operating-system &quot;Canonical Ubuntu&quot; \<br>  --operating-system-version &quot;24.04&quot; \<br>  --shape &quot;VM.Standard.A1.Flex&quot; \<br>  --query &quot;data[].{name:\&quot;display-name\&quot;, id:id}&quot;</pre><h3>Step 2 — Write the retry script</h3><pre>nano retry-launch.sh</pre><p>Paste this in, replacing the four placeholders at the top:</p><pre>#!/bin/bash<br>COMPARTMENT_ID=&quot;&lt;compartment-ocid&gt;&quot;<br>AD=&quot;&lt;availability-domain-name&gt;&quot;<br>SUBNET_ID=&quot;&lt;subnet-ocid&gt;&quot;<br>IMAGE_ID=&quot;&lt;image-ocid&gt;&quot;<br>SHAPE=&quot;VM.Standard.A1.Flex&quot;<br>OCPUS=1          # start small — a 1-OCPU request succeeds far more often than a 2-OCPU one<br>MEMORY_GB=6<br>DISPLAY_NAME=&quot;my-free-tier-vm&quot;</pre><pre># generate an SSH key pair if you don&#39;t already have one<br>[ -f ~/.ssh/id_rsa.pub ] || ssh-keygen -t rsa -N &quot;&quot; -f ~/.ssh/id_rsa</pre><pre>while true; do<br>  echo &quot;$(date): attempting launch...&quot;<br>  oci compute instance launch \<br>    --compartment-id &quot;$COMPARTMENT_ID&quot; \<br>    --availability-domain &quot;$AD&quot; \<br>    --shape &quot;$SHAPE&quot; \<br>    --shape-config &quot;{\&quot;ocpus\&quot;: $OCPUS, \&quot;memoryInGBs\&quot;: $MEMORY_GB}&quot; \<br>    --subnet-id &quot;$SUBNET_ID&quot; \<br>    --image-id &quot;$IMAGE_ID&quot; \<br>    --display-name &quot;$DISPLAY_NAME&quot; \<br>    --assign-public-ip true \<br>    --ssh-authorized-keys-file ~/.ssh/id_rsa.pub \<br>    --wait-for-state RUNNING 2&gt; launch_error.log</pre><pre>  if [ $? -eq 0 ]; then<br>    echo &quot;$(date): SUCCESS — instance is running!&quot;<br>    break<br>  elif grep -qi &quot;OutOfCapacity\|OutOfHostCapacity\|out of host capacity&quot; launch_error.log; then<br>    echo &quot;$(date): out of capacity, retrying in 5 min...&quot;<br>    sleep 300<br>  elif grep -qi &quot;TooManyRequests&quot; launch_error.log; then<br>    echo &quot;$(date): rate-limited by Oracle, backing off 5 min...&quot;<br>    sleep 300<br>  else<br>    echo &quot;$(date): different error — stopping to show you:&quot;<br>    cat launch_error.log<br>    break<br>  fi<br>done</pre><p>Save with Ctrl+O, Enter, then Ctrl+X.</p><p>A few design choices worth explaining:</p><ul><li><strong>It starts at 1 OCPU, not 2.</strong> Smaller requests succeed more often when capacity is tight; you can resize the instance upward later (Instance → Edit → Shape) once it’s running, no need to recreate it.</li><li><strong>It treats two different error shapes as the same “capacity” problem.</strong> Oracle sometimes returns a clean OutOfHostCapacity code, and sometimes wraps the exact same situation as a generic InternalError with the message text &quot;Out of host capacity.&quot; The script checks for both, otherwise you&#39;d see it stop on an error that&#39;s actually retryable.</li><li><strong>It also backs off on </strong><strong>TooManyRequests (HTTP 429).</strong> Oracle&#39;s launch API has a strict rate limit specifically to discourage exactly this kind of capacity-polling — hammering it every 60 seconds will eventually trip that limiter. A 5-minute interval keeps you comfortably under it while still being fully automated.</li><li><strong>It stops immediately on any other error</strong> and prints it, rather than silently retrying something that isn’t actually a capacity issue (a bad image ID, a malformed subnet, etc. — you want to see those, not loop on them forever).</li></ul><h3>Step 3 — Run it in the background</h3><pre>chmod +x retry-launch.sh<br>nohup ./retry-launch.sh &gt; retry.log 2&gt;&amp;1 &amp;<br>disown<br>tail -f retry.log</pre><p>nohup and disown keep it running even if you close the browser tab. Press Ctrl+C to stop watching the log without killing the script.</p><p><strong>One caveat about Cloud Shell specifically</strong>: Oracle reclaims idle Cloud Shell machines after a period of inactivity, which kills any background process running inside it — nohup/disown protect against a closed tab, not against the whole machine being shut down for being idle. Check back every 10–15 minutes rather than walking away for hours; if the session did reset, just rerun the nohup line — your script file and its values are untouched.</p><h3>Part 4: What I’d tell someone starting this today</h3><ul><li>If your region only has one Availability Domain, you have nowhere to “hop” to within that region — you’re purely waiting on the same capacity pool to free up. Some regions clear up in minutes; others (particularly newer or smaller ones) can take a day or more.</li><li>Try off-peak local hours — early morning tends to have better luck than daytime, based on when I eventually succeeded.</li><li>If you’re still stuck after a day or two, it’s worth checking whether your tenancy supports adding a <strong>second home region</strong> with an independent capacity pool (Governance &amp; Administration → Region Management), rather than continuing to wait on a single constrained region.</li><li>If none of that works out, Google Cloud’s Always Free e2-micro is a reasonable fallback — smaller specs (1 GB RAM, limited free egress), but it isn&#39;t capacity-constrained the way Oracle&#39;s Ampere tier currently is.</li></ul><p>The retry script isn’t a workaround for anything against Oracle’s rules — it’s just automating the same “click Create, see error, click Create again” loop a human would otherwise do manually, at a rate that respects Oracle’s own API limits. It’s the difference between checking back every few minutes yourself for a day, and letting a script do that waiting for you.</p><p><em>If this saved you some manual clicking, feel free to adapt the script for your own region and shape — the core retry logic works regardless of what you’re trying to launch it for.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9935af02f4ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ubuntu Automated Project with AppDynamics, Docker and Kubernetes with Active Directory integration]]></title>
            <link>https://medium.com/@isameer3056/ubuntu-automated-project-with-appdynamics-docker-and-kubernetes-with-active-directory-integration-e0fd944d3c6c?source=rss-34d9a75bca1c------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0fd944d3c6c</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[security-patching]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Sameer Imtiaz]]></dc:creator>
            <pubDate>Wed, 28 Aug 2024 20:26:27 GMT</pubDate>
            <atom:updated>2024-08-28T20:26:27.220Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gqhp2UxDvaXvWngPpSPh6Q.jpeg" /></figure><p>Creating a project that encompasses the full scope of the job description will involve setting up a Linux server environment, configuring AppDynamics, managing Docker and Kubernetes, setting up SFTP, and ensuring security measures are in place. Below is a detailed outline of the project, including the necessary scripts, codes, and instructions to facilitate the services mentioned.</p><h3>Project Overview</h3><p><strong>Objective:</strong> To create a robust Linux-based server environment that includes:</p><ul><li>Patch management and OS upgrades</li><li>Vulnerability scanning and mitigation</li><li>AppDynamics deployment and monitoring</li><li>Docker and Kubernetes environment setup and management</li><li>SFTP setup and integration with Active Directory</li><li>Proactive security measures</li></ul><h3>Project Components</h3><ol><li><strong>Setting Up the Linux Server (Ubuntu):</strong></li></ol><ul><li>Update and upgrade the system</li><li>Install necessary packages</li><li>Set up SFTP, Docker, Kubernetes, and AppDynamics</li></ul><p><strong>2. Patch Management and OS Upgrades:</strong></p><ul><li>Automate patch management</li><li>Regular OS upgrades with backup and restore capabilities</li></ul><p>3. <strong>Vulnerability Management:</strong></p><ul><li>Implement vulnerability scanning tools</li><li>Automate remediation of common vulnerabilities</li></ul><p><strong>4. AppDynamics Installation and Configuration:</strong></p><ul><li>Deploy AppDynamics on CentOS</li><li>Configure VM replication between data centers (DC) and disaster recovery (DR) sites</li></ul><p><strong>5. Docker and Kubernetes Management:</strong></p><ul><li>Set up Docker containers</li><li>Deploy and manage Kubernetes clusters</li><li>Automate container management tasks</li></ul><p><strong>6. SFTP Server Setup:</strong></p><ul><li>Configure SFTP with basic security settings</li><li>Integrate with Active Directory</li></ul><p><strong>7. Proactive Security Measures:</strong></p><ul><li>Implement firewalls, intrusion detection/prevention systems (IDS/IPS)</li><li>Regular security audits</li></ul><h3>Step-by-Step Instructions and Scripts</h3><h4>1. Setting Up the Linux Server</h4><p><strong>Script to update and upgrade the system:</strong></p><pre>#!/bin/bash<br><br># Update and upgrade the system<br>sudo apt-get update -y<br>sudo apt-get upgrade -y<br><br># Install necessary packages<br>sudo apt-get install -y curl wget git<br><br># Install Docker<br>sudo apt-get install -y docker.io<br><br># Install Kubernetes<br>sudo apt-get install -y kubectl kubelet kubeadm<br><br># Install SFTP<br>sudo apt-get install -y openssh-server<br><br># Enable and start services<br>sudo systemctl enable docker<br>sudo systemctl start docker<br>sudo systemctl enable ssh<br>sudo systemctl start ssh</pre><p>Installation of AppDynamics on Ubuntu:</p><pre>#!/bin/bash<br><br># Install dependencies<br>sudo yum update -y<br>sudo yum install -y wget unzip java-1.8.0-openjdk<br><br># Download and install AppDynamics agent<br>wget https://example.com/appdynamics-agent.zip<br>unzip appdynamics-agent.zip -d /opt/appdynamics<br><br># Configure the agent<br>export APPD_AGENT_HOME=/opt/appdynamics<br>export APPD_CONTROLLER_HOST=controller.example.com<br>export APPD_CONTROLLER_PORT=8090<br>export APPD_ACCOUNT_NAME=customer1<br>export APPD_ACCESS_KEY=abcdefg1234567<br><br># Start the agent<br>$APPD_AGENT_HOME/bin/start.sh</pre><h4>2. Patch Management and OS Upgrades</h4><p><strong>Automated patch management script:</strong></p><pre>#!/bin/bash<br><br># Update and upgrade system weekly<br>echo &quot;0 3 * * 1 root apt-get update &amp;&amp; apt-get upgrade -y&quot; &gt;&gt; /etc/crontab<br><br># Configure unattended-upgrades<br>sudo apt-get install -y unattended-upgrades<br>sudo dpkg-reconfigure -plow unattended-upgrades</pre><h4>3. Vulnerability Management</h4><p><strong>Script for vulnerability scanning (using Lynis):</strong></p><pre>#!/bin/bash<br><br># Install Lynis<br>sudo apt-get install -y lynis<br><br># Run security audit<br>sudo lynis audit system &gt; /var/log/lynis.log<br><br># Optional: Create a cron job to run weekly<br>echo &quot;0 3 * * 7 root lynis audit system&quot; &gt;&gt; /etc/crontab</pre><h4>4. AppDynamics VM Replication</h4><p><strong>Setting up replication using rsync:</strong></p><pre>#!/bin/bash<br><br># Replicate VM data to DR site<br>rsync -avz /opt/appdynamics/ user@dr-site:/opt/appdynamics-backup/</pre><h4>5. Docker and Kubernetes Management</h4><p><strong>Creating a Docker container:</strong></p><pre>#!/bin/bash<br><br># Pull a Docker image<br>sudo docker pull nginx<br><br># Run a container<br>sudo docker run -d -p 80:80 --name nginx-server nginx</pre><p>Setting up Kubernetes cluster:</p><pre>#!/bin/bash<br><br># Initialize Kubernetes master<br>sudo kubeadm init --pod-network-cidr=192.168.0.0/16<br><br># Set up Kubernetes config<br>mkdir -p $HOME/.kube<br>sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config<br>sudo chown $(id -u):$(id -g) $HOME/.kube/config<br><br># Install Calico network plugin<br>kubectl apply -f https://docs.projectcalico.org/v3.14/manifests/calico.yaml</pre><h4>6. SFTP Server Setup</h4><p><strong>Setting up SFTP:</strong></p><pre>#!/bin/bash<br><br># Create SFTP group and user<br>sudo groupadd sftpusers<br>sudo useradd -m sftpuser -g sftpusers -s /sbin/nologin<br><br># Set directory permissions<br>sudo mkdir -p /sftp/sftpuser/uploads<br>sudo chown root:sftpusers /sftp/sftpuser<br>sudo chown sftpuser:sftpusers /sftp/sftpuser/uploads<br><br># Configure SSH for SFTP<br>echo &quot;Match Group sftpusers<br>ChrootDirectory /sftp/%u<br>ForceCommand internal-sftp<br>X11Forwarding no<br>AllowTcpForwarding no&quot; | sudo tee -a /etc/ssh/sshd_config<br><br># Restart SSH service<br>sudo systemctl restart sshd</pre><p>Integrating with Active Directory:</p><pre>#!/bin/bash<br><br># Install necessary packages<br>sudo apt-get install -y realmd sssd<br><br># Join AD domain<br>sudo realm join --user=admin example.com<br><br># Configure SSSD for AD integration<br>sudo cp /etc/sssd/sssd.conf /etc/sssd/sssd.conf.bak<br>echo &quot;[sssd]<br>domains = example.com<br>config_file_version = 2<br>services = nss, pam<br><br>[domain/example.com]<br>ad_domain = example.com<br>krb5_realm = EXAMPLE.COM<br>realmd_tags = manages-system joined-with-samba<br>cache_credentials = True<br>id_provider = ad<br>fallback_homedir = /home/%u<br>default_shell = /bin/bash<br>ldap_id_mapping = True<br>use_fully_qualified_names = False&quot; | sudo tee /etc/sssd/sssd.conf<br><br># Restart SSSD service<br>sudo systemctl restart sssd</pre><h4>7. Proactive Security Measures</h4><p><strong>Firewall setup with UFW:</strong></p><pre>#!/bin/bash<br><br># Install UFW<br>sudo apt-get install -y ufw<br><br># Allow SSH and web traffic<br>sudo ufw allow 22<br>sudo ufw allow 80<br>sudo ufw allow 443<br><br># Enable UFW<br>sudo ufw enable</pre><p>Intrusion Detection System (IDS) setup with Snort:</p><pre>#!/bin/bash<br><br># Install Snort<br>sudo apt-get install -y snort<br><br># Configure Snort for monitoring<br>sudo cp /etc/snort/snort.conf /etc/snort/snort.conf.bak<br>echo &quot;var HOME_NET any<br>var EXTERNAL_NET !$HOME_NET<br>include $RULE_PATH/local.rules&quot; | sudo tee -a /etc/snort/snort.conf<br><br># Start Snort<br>sudo snort -A console -i eth0 -c /etc/snort/snort.conf</pre><h3>Final Steps</h3><ol><li><strong>Testing and Validation:</strong></li></ol><ul><li>Verify that all services are running as expected.</li><li>Test AppDynamics deployment by monitoring application performance.</li><li>Ensure that the Docker and Kubernetes environments are operational.</li><li>Validate the SFTP configuration and Active Directory integration.</li><li>Conduct security audits to ensure the environment is secure.</li></ul><p><strong>2. Documentation:</strong></p><ul><li>Document all configurations, scripts, and procedures for future reference and troubleshooting.</li></ul><p><strong>3. Backup and Disaster Recovery:</strong></p><ul><li>Implement regular backup schedules and test the disaster recovery procedures.</li></ul><p>This project template will help you set up and manage a Linux server environment, ensuring that all tasks are automated and efficiently managed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0fd944d3c6c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding SSH-Keygen: Formats, Key Differences, and Configuration in Linux Distributions]]></title>
            <link>https://medium.com/@isameer3056/understanding-ssh-keygen-formats-key-differences-and-configuration-in-linux-distributions-39e97947a80b?source=rss-34d9a75bca1c------2</link>
            <guid isPermaLink="false">https://medium.com/p/39e97947a80b</guid>
            <category><![CDATA[ssh]]></category>
            <category><![CDATA[ssh-keygen]]></category>
            <category><![CDATA[distribution]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Sameer Imtiaz]]></dc:creator>
            <pubDate>Tue, 13 Aug 2024 09:21:39 GMT</pubDate>
            <atom:updated>2024-08-13T09:21:39.063Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZGZtzmoTVwP8BGoKxNTi0w.jpeg" /></figure><p><strong>Overview of SSH-Keygen</strong></p><p><strong>SSH (Secure Shell)</strong> is a cryptographic network protocol for secure communication over unsecured networks. <strong>SSH key pairs</strong> — composed of a public and private key — are used for authenticating users without passwords. ssh-keygen is a command-line tool used to generate these key pairs.</p><p><strong>Key Formats</strong></p><p>SSH keys can be generated in various formats, each serving different purposes and compatibility requirements. The primary formats include:</p><ol><li><strong>RSA (Rivest-Shamir-Adleman)</strong></li></ol><ul><li><strong>Usage</strong>: Most common, used for both encryption and digital signatures.</li><li><strong>Bit-length</strong>: Commonly 2048 or 4096 bits.</li><li><strong>Security</strong>: Considered secure, but gradually being phased out in favor of more modern algorithms.</li><li><strong>Command</strong>:</li></ul><pre>ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa</pre><p><strong>2. ECDSA (Elliptic Curve Digital Signature Algorithm)</strong></p><ul><li><strong>Usage</strong>: Preferred for speed and shorter key lengths.</li><li><strong>Bit-length</strong>: Typically 256, 384, or 521 bits.</li><li><strong>Security</strong>: Stronger security with shorter keys; widely accepted.</li><li><strong>Command:</strong></li></ul><pre>ssh-keygen -t ecdsa -b 521 -f ~/.ssh/id_ecdsa</pre><p>3. <strong>Ed25519</strong></p><ul><li><strong>Usage</strong>: Modern, highly secure, and efficient. Recommended for new deployments.</li><li><strong>Bit-length</strong>: Fixed at 256 bits.</li><li><strong>Security</strong>: Superior to ECDSA and RSA in terms of security and performance.</li><li><strong>Command:</strong></li></ul><pre>ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519</pre><p>4. <strong>DSA (Digital Signature Algorithm)</strong></p><ul><li><strong>Usage</strong>: Older, less secure; often deprecated.</li><li><strong>Bit-length</strong>: Typically 1024 bits.</li><li><strong>Security</strong>: Not recommended due to weaker security.</li><li><strong>Command</strong>:</li></ul><pre>ssh-keygen -t dsa -b 1024 -f ~/.ssh/id_dsa</pre><h4>Key Differences Across Linux Distributions</h4><ul><li><strong>Default Key Format</strong>:</li></ul><blockquote><strong>Debian/Ubuntu</strong>: Default key format is RSA.</blockquote><blockquote><strong>Red Hat/CentOS</strong>: Usually also default to RSA, but support generating all key types.</blockquote><blockquote><strong>OpenSUSE</strong>: Often defaults to RSA, with options to select others.</blockquote><ul><li><strong>Key Length</strong>:</li></ul><blockquote>Most distributions allow key length customization, though defaults are generally 2048 or 4096 for RSA.</blockquote><ul><li><strong>Configuration Files</strong>:</li></ul><blockquote><strong>/etc/ssh/sshd_config</strong>: Controls the SSH server configuration, including accepted key types.</blockquote><blockquote><strong>/etc/ssh/ssh_config</strong>: Controls client-side SSH behavior.</blockquote><h3><strong>Changing Default Key Type and Length</strong></h3><p>You can modify the default key type or length by configuring ssh-keygen command-line options in a shell profile or by editing SSH configuration files:</p><ol><li><strong>Customizing via </strong><strong>.bashrc or </strong><strong>.zshrc</strong>:</li></ol><pre>alias ssh-keygen=&#39;ssh-keygen -t ed25519&#39;</pre><p>2. <strong>Updating SSH Configuration</strong>:</p><ul><li>Edit /etc/ssh/sshd_config to specify accepted key types:</li></ul><pre>PubkeyAcceptedKeyTypes ssh-ed25519,rsa-sha2-512,rsa-sha2-256</pre><p>3. <strong>Setting Default Key Format in User Profile</strong>:</p><ul><li>Modify ~/.ssh/config to default to a specific key format</li></ul><pre>Host *<br>  IdentityFile ~/.ssh/id_ed25519</pre><p><strong>Conclusion</strong></p><p>Understanding the differences between SSH key formats and how they vary across Linux distributions is crucial for secure and efficient SSH usage. With ssh-keygen, users have the flexibility to generate keys in multiple formats, customize their defaults, and ensure compatibility across systems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39e97947a80b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps vs SRE vs Platform Engineering]]></title>
            <link>https://medium.com/@isameer3056/devops-vs-sre-vs-platform-engineering-161a48449878?source=rss-34d9a75bca1c------2</link>
            <guid isPermaLink="false">https://medium.com/p/161a48449878</guid>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-services]]></category>
            <category><![CDATA[site-reliability-engineer]]></category>
            <dc:creator><![CDATA[Sameer Imtiaz]]></dc:creator>
            <pubDate>Mon, 12 Aug 2024 10:00:02 GMT</pubDate>
            <atom:updated>2024-08-12T10:00:02.020Z</atom:updated>
            <content:encoded><![CDATA[<p>Enterprises must navigate and optimize their operational frameworks in the fast-paced world of modern IT. In this revolutionary journey, Site Reliability Engineering (SRE), DevOps, and Platform Engineering are three particularly well-known methods. Each strategy highlights the variety of approaches available to businesses to improve their operational efficiency and effectively navigate the ever-changing terrain of modern IT. Each method has its own principles, advantages, and potential dangers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f6J1twP5OgQt9znM1gksxA.jpeg" /></figure><p>Site Reliability Engineering, or SRE, is a very powerful tool for fostering reliability in businesses. Conversely, DevOps places more of an emphasis on automation and teamwork. Platform engineering, on the other hand, is concentrated on creating a strong basis for effectively and scalable application management. Understanding the advantages these approaches provide will help firms traverse this dynamic digital landscape and move even closer to improved performance and agility.</p><p>Businesses may obtain not only the greatest operational frameworks but also transformative tools to flourish in a landscape supported by agility, collaboration, and scalability by grasping the distinctions between SRE, DevOps, and Platform Engineering. By embracing the distinct benefits of each technique, businesses may better position themselves to meet and exceed the expectations of the digital age and ensure an operational strategy that is flexible and future-ready.</p><p>This blog will illustrate the similarities and differences between SRE, DevOps, and Platform Engineering to assist businesses in making informed decisions that correspond with their specific requirements and long-term objectives. So let’s go straight to the details without further ado.</p><h3><strong>Breaking down Site Reliability Engineering (SRE)</strong></h3><p>SRE is a discipline that guarantees high-quality, scalable, and dependable software systems by fusing system administration with software engineering. SREs concentrate on all phases of the system lifetime, including development, deployment, and maintenance. To track, diagnose, and enhance the functionality of software systems, they employ a variety of instruments and methods.</p><p>In order to improve product design, cost, and operations to satisfy customer expectations, 75% of enterprises — up from 10% in 2022 — will apply site reliability engineering principles organization-wide by 2027, according to a Gartner report. <br> <br>This only indicates that there has been a notable shift in the market and that adopting SRE methods is becoming commonplace for organizations. SRE is quickly emerging as a key technique for enhancing operational effectiveness, cost control, and product creation.</p><p><strong>Important ideas that SRE highlights to improve software system reliability are as follows:</strong></p><p><strong>Automation</strong></p><p>SRE places a high priority on automating repetitive processes to cut down on manual labor and lower the possibility of human error. Tasks related to capacity planning, incident response, and system monitoring can all be automated.</p><p><strong>Incident Management</strong></p><p>SRE prioritizes prompt incident identification, reaction, and resolution in addition to robust incident management. This entails establishing precise protocols, carrying out post-event investigations, and consistently enhancing systems in light of learned lessons.</p><p><strong>Error Budgets</strong></p><p>An error budget, in terms of Site Reliability Engineering (SRE) concepts, is the number of system failures allowed during a given period of time. It acts as a quantifiable gauge of how much service deterioration or outage is acceptable for users. It also seeks to strike a balance between innovation and dependability, allowing development teams to investigate new features and enhancements while preserving system stability and satisfying user requirements.</p><p><strong>Service Level Indicator (SLI)</strong></p><p>SLI is a measure that provides instantaneous information on a service’s performance. It offers details on a number of factors, including throughput, latency, availability, and more.</p><p><strong>Service Level Objective (SLO)</strong></p><p>For SLIs, or service level indicators, SLO is a predetermined target that is set over a given amount of time. It is created by working together with developers, operators, and the business. The system’s intended level of performance is described in the SLO.</p><p><strong>SLAs, or service level agreements</strong></p><p>The SLA specifies what happens if the predetermined SLOs are not met. Penalties or reimbursements in cash are some examples of these repercussions.</p><h3>Advantages of SRE for Businesses</h3><p>Businesses can benefit from SRE (Site Reliability Engineering) in a number of ways, including:</p><p><strong>Enhanced reliability </strong><br> <br>Implementing Site Reliability Engineering (SRE) has major benefits for businesses. They can establish a software environment that is more dependable and stable by implementing SRE techniques. As a result, there are fewer interruptions, constant service delivery, and an improved reputation for offering clients and customers trustworthy services. <br> <br><strong>Efficient response to incidents </strong><br> <br>SRE minimizes the effect of disruptions on crucial business processes by assisting with effective incident response. Rapid issue identification, diagnosis, and resolution guarantee timely resolution of possible problems, avoiding protracted downtime and maintaining the integrity of business processes.</p><p><strong>Scalability </strong><br> <br>SRE concepts are very helpful to expanding companies. Businesses can grow while preserving the performance and dependability of their systems because to SRE’s scalability. Meeting increasing expectations is critical, especially in times of business development or increased customer activity. <br> <br><strong>Cost-effectiveness</strong> <br> <br>Businesses can save expenses by increasing resource utilization and decreasing manual labor through automation and optimized SRE procedures. In the fast-paced commercial world of today, this is essential to preserving profitability and competitiveness. <br> <br><strong>Decision-Making Based on Data</strong> <br> <br>Actionable insights are obtained through ongoing system performance assessment, analysis, and monitoring. This helps companies to plan forward technologically, optimize workflows, and make well-informed decisions.</p><h3>Examples of Enterprises Using SRE</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TRhhKReqrcpW6Kkk" /><figcaption><strong>Google: </strong>The approach is utilized by Google to improve the dependability of services such as Gmail and Google Search</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sAPLD8RTN6KUMClA" /><figcaption><strong>LinkedIn</strong>: In order to maintain the stability of its professional networking platform, LinkedIn has adopted SRE principles.</figcaption></figure><h3>Understanding DevOps for Businesses</h3><p>DevOps is an automation-driven methodology, a collection of behaviors, and a culture that strives to remove boundaries between development and operations teams. Planning, coding, testing, and deployment are all part of the software development lifecycle that it supports with an emphasis on efficiency, collaboration, and communication. <br> <br>Businesses and corporations looking to improve cooperation, expedite processes, and provide goods and services more reliably and quickly must comprehend DevOps and its advantages.</p><p>Its broad acceptance only serves to demonstrate that adopting a DevOps culture is a strategic necessity for enterprises rather than just a choice. DevOps is becoming more and more popular, indicating that this is a major shift in how companies handle software development and operations rather than merely a fad. Businesses around the world may benefit from this change in terms of productivity, creativity, and long-term success.</p><p><strong>Collaboration </strong><br> <br>Promotes smooth collaboration between stakeholders, operational teams, and developers. This facilitates more rapid issue solving and efficient information exchange. <br> <br><strong>Automation</strong> <br> <br>Automating repetitive operations lowers mistake rates and expedites development and deployment processes, which is the foundation of DevOps. Time-to-market is accelerated as a result. <br> <br><strong>Continuous Integration (CI) </strong><br> <br>incorporates automated testing for early problem identification and frequent integration of code changes into a shared repository, resulting in software that is more stable.<br> <br><strong>Continuous Delivery (CD)</strong> <br> <br>Focuses on automating every step of the release process, from testing to deployment, in order to provide more dependable and frequent software upgrades.</p><h3>Benefits of DevOps for Businesses</h3><p>With its revolutionary approach to software development and operations, DevOps offers a range of benefits to businesses that improve productivity and teamwork. Let’s take a closer look at them below.</p><p><strong>Accelerated time to market </strong><br> <br>DevOps speeds up the development and deployment of software, enabling businesses to publish changes more often. This is vital in the fast-paced business world of today. <br> <br><strong>Improved Collaboration and Interaction </strong><br> <br>Teams are encouraged to collaborate and communicate well within DevOps. This fosters a culture of shared accountability, which expedites the settlement of problems and raises general productivity. <br> <br><strong>Increased Productivity and Efficiency </strong><br> <br>Process simplification and automation reduce the amount of manual labor, which lowers errors and increases overall efficiency. Teams working on operations and development can therefore accomplish more.</p><p><strong>Enhanced Software Reliability and Quality </strong><br> <br>Software quality and dependability are increased through automated testing and ongoing monitoring. As a result, there are less issues, they are resolved more quickly, and the customer experience is improved. <br> <br><strong>Cost Savings </strong><br> <br>Over time, DevOps can result in significant cost savings by avoiding downtime, preventing costly errors, and reducing human labor.</p><h3>Examples of Enterprises Using DevOps</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*otqF-rjUfUIYrgug" /><figcaption><strong>Amazon (AWS)</strong>: Using strong DevOps techniques, AWS, Amazon’s cloud computing division, expedites software development and guarantees continuous delivery.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*tnlwS9g61nBo3INKdRyOzA.png" /><figcaption><strong>Etsy</strong>: Etsy uses DevOps to accelerate software delivery and promote teamwork for timely releases and effective improvements to the marketplace.</figcaption></figure><h3>What is Platform Engineering?</h3><p>Platform engineering is the process of creating, building, and maintaining the fundamental tools and infrastructure that allow a business to create, implement, and run software applications. Its main goal is to create a robust platform that enables development teams to produce software reliably and efficiently. <br> <br>Platform engineering is a cutting-edge technological strategy that, according to Gartner, can quicken the delivery of applications and the rate at which they generate commercial value. <br> <br>To put it plainly, platform engineering plays a critical role in fostering innovation, cutting time-to-market, and ultimately enhancing the general prosperity of contemporary companies.</p><h3>Benefits of Platform Engineering for Businesses</h3><p>Businesses can benefit greatly from platform engineering, which creates a scalable and robust architecture that drives development, deployment, and operations.</p><p><strong>Speed and Efficiency </strong><br> <br>Software delivery can be sped by streamlining the development and deployment procedures, which is made possible via platform engineering. This effectiveness is critical for quickly meeting constantly evolving business needs. <br> <br><strong>Reliability and stability</strong> <br> <br>Software application stability and dependability are greatly enhanced by platform engineering. Building a solid foundation improves user experience, decreases downtime, and increases stakeholder trust. <br> <br><strong>Scalability </strong><br> <br>Platform engineering makes it simple for companies to expand and adjust as customer needs rise. Because of the platform’s scalability, enterprises can easily handle increasing workloads without sacrificing performance. <br> <br><strong>Assurance of Security</strong> <br> <br>Platform engineering ensures data confidentiality, integrity, and availability by integrating robust security measures to safeguard applications and infrastructure. This is essential for protecting the company from possible dangers.</p><h3>Examples of Enterprises Using Platform Engineering</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*HOqsF4mklOpYq9RuTM2Vvw.jpeg" /><figcaption><strong>Netflix</strong>: Netflix maintains a scalable infrastructure for smooth cross-platform streaming and is well-known for its efficient Platform Engineering.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KGl9aGjLTGlo4FZjbBGFfw.jpeg" /><figcaption><strong>Uber</strong>: Uber uses Platform Engineering to provide a robust infrastructure to support its popular food delivery and ridesharing services.</figcaption></figure><p>After carefully examining each strategy, let’s compare and contrast them, emphasizing the key distinctions and similarities between DevOps, SRE, and platform engineering.</p><h3><strong>Understanding the Difference Between SRE, DevOps, and Platform Engineering</strong></h3><p>While efficiency and dependability are shared goals among SRE, DevOps, and Platform Engineering, their approaches, focuses, and goals diverge. Businesses frequently mix and match components of these methods to develop a customized strategy that meets their specific needs and goals in the context of technology. <br> <br>To gain a deeper understanding of each technique, let’s examine the parallels and distinctions among SRE, DevOps, and Platform Engineering. This investigation will offer a thorough grasp of the ways in which these approaches support the resilience and general success of contemporary technology ecosystems.</p><h3>SRE vs DevOps</h3><p>Enhancing software delivery and lowering downtime are two areas where DevOps and SRE are similar. On the other hand, the breadth and emphasis of DevOps and Site Reliability Engineer varies. The goal of SRE is to improve system dependability by anticipating problems and taking proactive measures to address them. DevOps, on the other hand, places a strong emphasis on speed and reliability in order to optimize the software delivery process from development to deployment. <br> <br><strong>What separates DevOps from SRE? </strong><br> <br>SRE makes ensuring software systems operate smoothly and are dependable, which is essential for companies that provide customers with consistent services. <br> <br>DevOps can dismantle corporate barriers because of its more inclusive culture approach. This facilitates cross-functional cooperation by coordinating development and operations teams with business goals to improve overall operational effectiveness.</p><p><strong>Site Reliability Engineering and DevOps are similar in that: </strong><br> <br>Improved user experience, more customer happiness, and a stronger brand reputation are the results of SRE and DevOps efforts to strengthen the efficiency and dependability of software systems. <br> <br>Businesses must integrate automation into both Site Reliability Engineering and DevOps. Because automation makes operations repeatable and consistent, it lowers the possibility of errors and improves the overall quality of services.</p><h3>SRE vs Platform Engineering</h3><p>The objective of guaranteeing system performance and reliability is shared by SRE and Platform Engineering. Their methods vary, nevertheless, in terms of their duties and areas of emphasis. SRE adopts a holistic strategy, tackling every stage of the system lifecycle with a focus on failure prevention and downtime reduction. Conversely, Platform Engineering focuses on the infrastructure layer, giving developers the resources and instruments they need to create and manage dependable applications. <br> <br><strong>Distinctions between SRE and Platform Engineer: </strong><br> <br>SRE puts performance and dependability first, which is in line with the corporate goal of providing users with a high-performing software environment. <br> <br>Platform engineering is the process of building a scalable and robust infrastructure, which is essential for companies that want to grow, handle increasing workloads, and maintain operational stability.</p><p><strong>Comparing Platform Engineers and SREs: </strong><br> <br>Platform engineering and SRE both contribute to the general stability and effectiveness of software systems. For organizations, this stability is essential because it preserves a dependable and consistent user experience, which builds client trust. <br> <br>Automation is emphasized heavily by both Platform Engineering and SRE, demonstrating their dedication to consistency and dependability in their specialized fields. This allows for dependable and predictable operations for enterprises.</p><h3>Choosing between Platform Engineering, DevOps, and SRE</h3><p>The organization’s unique needs and goals will choose which of the three disciplines — DevOps, SRE, and Platform Engineering — to use.</p><ul><li>For companies looking to increase cooperation between the development and operations teams and expedite software delivery, DevOps is a good option.</li><li>For businesses that need to create and manage a reliable and scalable infrastructure to support their software applications, platform engineering is a great choice.</li><li>Organizations that need to proactively manage complex systems and place a high priority on system dependability are especially well-suited for SRE.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=161a48449878" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fast-food chain Business end to end Project using Terraform, Docker, Jenkins, Ansible, Gitlab…]]></title>
            <link>https://medium.com/@isameer3056/fast-food-chain-business-end-to-end-project-using-terraform-docker-jenkins-ansible-gitlab-8911f63ec0a4?source=rss-34d9a75bca1c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8911f63ec0a4</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[appdynamics]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Sameer Imtiaz]]></dc:creator>
            <pubDate>Sun, 11 Aug 2024 13:54:04 GMT</pubDate>
            <atom:updated>2024-08-11T14:07:30.378Z</atom:updated>
            <content:encoded><![CDATA[<h3>Fast-food chain Business end to end Project using Terraform, Docker, Jenkins, Ansible, Gitlab, Docker Swarm and AppDynamics</h3><p>This is a Mock project on which I am working on but with slight changes of tools and platform. This project will simulate a fast-food chain’s online ordering system, including a web application for customers to place orders, a backend system to process orders, and monitoring and alerting systems to ensure everything runs smoothly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KeVCkepIzqCYN4msWyidnQ.png" /></figure><h3>Tools and Technologies</h3><ul><li><strong>Infrastructure as Code (IaC)</strong>: Terraform</li><li><strong>CI/CD</strong>: Jenkins, GitLab</li><li><strong>Configuration Management</strong>: Ansible</li><li><strong>Containerization</strong>: Docker, Docker Swarm</li><li><strong>Monitoring</strong>: AppDynamics</li><li><strong>Communication</strong>: Slack</li></ul><h3>Detailed Plan</h3><h4>1. Infrastructure Setup with Terraform</h4><ul><li><strong>Step 1</strong>: Install Terraform and configure it to use GCP.</li><li><strong>Step 2</strong>: Write Terraform scripts to provision the following resources:</li></ul><blockquote><em>VPC and subnets</em></blockquote><blockquote><em>GKE (Google Kubernetes Engine) cluster</em></blockquote><blockquote><em>Google Cloud Storage buckets</em></blockquote><blockquote><em>IAM roles and permissions</em></blockquote><ul><li><strong>Step 3</strong>: Apply the Terraform scripts to create the infrastructure.</li></ul><pre>provider &quot;google&quot; {<br>  project = &quot;Fastfood project&quot; #Project ID<br>  region  = &quot;us-central1&quot;<br>}<br><br>resource &quot;google_compute_network&quot; &quot;vpc_network&quot; {<br>  name = &quot;vpc-network&quot;<br>}<br><br>resource &quot;google_container_cluster&quot; &quot;primary&quot; {<br>  name     = &quot;gke-cluster&quot;<br>  location = &quot;us-central1&quot;<br>  network  = google_compute_network.vpc_network.name<br>}</pre><p><strong><em>Please Note</em></strong><em>: I am not mentioning any Secret keys for security purpose.</em></p><h4>2. CI/CD Pipeline with Jenkins and GitLab</h4><ul><li><strong>Step 1</strong>: Set up a Jenkins server on a GCP VM.</li><li><strong>Step 2</strong>: Integrate Jenkins with GitLab for source code management.</li><li><strong>Step 3</strong>: Create Jenkins pipelines for building, testing, and deploying the application</li></ul><pre>pipeline {<br>  agent any<br>  stages {<br>    stage(&#39;Build&#39;) {<br>      steps {<br>        git &#39;https://gitlab.com/your-repo.git&#39;<br>        sh &#39;docker build -t your-image .&#39;<br>      }<br>    }<br>    stage(&#39;Test&#39;) {<br>      steps {<br>        sh &#39;docker run your-image test&#39;<br>      }<br>    }<br>    stage(&#39;Deploy&#39;) {<br>      steps {<br>        sh &#39;docker push your-image&#39;<br>        sh &#39;kubectl apply -f k8s/deployment.yaml&#39;<br>      }<br>    }<br>  }<br>}</pre><h4>3. Configuration Management with Ansible</h4><ul><li><strong>Step 1</strong>: Write Ansible playbooks to configure the VMs and deploy the application.</li><li><strong>Step 2</strong>: Use Ansible to manage Docker containers and ensure they are running correctly.</li></ul><pre>- name: Configure VM and deploy application<br>  hosts: all<br>  tasks:<br>    - name: Install Docker<br>      apt:<br>        name: docker.io<br>        state: present<br>    - name: Deploy application<br>      docker_container:<br>        name: app<br>        image: your-image<br>        state: started</pre><h4>4. Containerization with Docker and Docker Swarm</h4><ul><li><strong>Step 1</strong>: Create Dockerfiles for the application.</li><li><strong>Step 2</strong>: Use Docker Swarm to manage the container orchestration.</li></ul><pre>FROM node:14<br>WORKDIR /app<br>COPY . .<br>RUN npm install<br>CMD [&quot;npm&quot;, &quot;start&quot;]</pre><h4>5. Monitoring with AppDynamics</h4><ul><li><strong>Step 1</strong>: Set up AppDynamics agents on the application servers.</li><li><strong>Step 2</strong>: Configure AppDynamics to monitor application performance and send alerts to Slack.</li></ul><h4>Install AppDynamics Agents</h4><ul><li><strong>Java Application</strong>: Download the AppDynamics Java Agent and configure it with your application.</li></ul><pre># Download the AppDynamics Java Agent<br>wget https://download.appdynamics.com/download/prox/download-file/sun-jvm/21.11.0.3333/AppServerAgent-21.11.0.3333.zip<br><br># Unzip the agent<br>unzip AppServerAgent-21.11.0.3333.zip<br><br># Add the agent to your application startup script<br>export JAVA_OPTS=&quot;$JAVA_OPTS -javaagent:/path/to/appdynamics/javaagent.jar -Dappdynamics.controller.hostName=&lt;controller-host&gt; -Dappdynamics.agent.applicationName=&lt;application-name&gt; -Dappdynamics.agent.tierName=&lt;tier-name&gt; -Dappdynamics.agent.nodeName=&lt;node-name&gt;&quot;</pre><ul><li><strong>Node.js Application</strong>: Install the AppDynamics Node.js Agent.</li></ul><pre># Install the AppDynamics Node.js Agent<br>npm install appdynamics<br><br># Configure the agent in your application<br>require(&quot;appdynamics&quot;).profile({<br>  controllerHostName: &#39;&lt;controller-host&gt;&#39;,<br>  controllerPort: 443,<br>  controllerSslEnabled: true,<br>  accountName: &#39;&lt;account-name&gt;&#39;,<br>  accountAccessKey: &#39;&lt;access-key&gt;&#39;,<br>  applicationName: &#39;&lt;application-name&gt;&#39;,<br>  tierName: &#39;&lt;tier-name&gt;&#39;,<br>  nodeName: &#39;&lt;node-name&gt;&#39;<br>});</pre><h4>Configure Monitoring and Alerts</h4><ul><li>In the AppDynamics dashboard, configure health rules, policies, and actions to monitor application performance.</li><li>Set up alerts to be sent to Slack.</li></ul><h4>6. Communication with Slack</h4><ul><li><strong>Step 1</strong>: Integrate Slack with Jenkins to receive build and deployment notifications.</li></ul><pre>pipeline {<br>  agent any<br>  environment {<br>    SLACK_WEBHOOK_URL = credentials(&#39;slack-webhook-url&#39;)<br>  }<br>  stages {<br>    stage(&#39;Build&#39;) {<br>      steps {<br>        git &#39;https://gitlab.com/your-repo.git&#39;<br>        sh &#39;docker build -t your-image .&#39;<br>      }<br>    }<br>    stage(&#39;Test&#39;) {<br>      steps {<br>        sh &#39;docker run your-image test&#39;<br>      }<br>    }<br>    stage(&#39;Deploy&#39;) {<br>      steps {<br>        sh &#39;docker push your-image&#39;<br>        sh &#39;kubectl apply -f k8s/deployment.yaml&#39;<br>      }<br>    }<br>  }<br>  post {<br>    success {<br>      slackSend (color: &#39;#00FF00&#39;, message: &quot;Build and Deployment Successful: ${env.JOB_NAME} ${env.BUILD_NUMBER}&quot;)<br>    }<br>    failure {<br>      slackSend (color: &#39;#FF0000&#39;, message: &quot;Build and Deployment Failed: ${env.JOB_NAME} ${env.BUILD_NUMBER}&quot;)<br>    }<br>  }<br>}</pre><ul><li><strong>Step 2</strong>: Set up Slack alerts for monitoring and incident management. Also in the AppDynamics dashboard, configure actions to send alerts to Slack using the webhook URL.</li></ul><pre>{<br>  &quot;channel&quot;: &quot;#alerts&quot;,<br>  &quot;username&quot;: &quot;AppDynamics&quot;,<br>  &quot;text&quot;: &quot;Alert: ${alertName} - ${severity}&quot;,<br>  &quot;icon_emoji&quot;: &quot;:warning:&quot;<br>}</pre><p>By following these steps, you can set up monitoring with AppDynamics and integrate Slack for notifications, ensuring your application is well-monitored and any issues are promptly communicated</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8911f63ec0a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>