<?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 Malith Ileperuma on Medium]]></title>
        <description><![CDATA[Stories by Malith Ileperuma on Medium]]></description>
        <link>https://medium.com/@mileperuma?source=rss-178db0bb04bc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*G6erskRhvKsWdkPlFPf2XA.png</url>
            <title>Stories by Malith Ileperuma on Medium</title>
            <link>https://medium.com/@mileperuma?source=rss-178db0bb04bc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 11:02:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mileperuma/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[Optimizing Cloud Spend with Precision: My Approach to Cutting Cloud Costs by 40%]]></title>
            <link>https://medium.com/@mileperuma/optimizing-cloud-spend-with-precision-my-approach-to-cutting-cloud-costs-by-40-d9ba311bc252?source=rss-178db0bb04bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9ba311bc252</guid>
            <category><![CDATA[cloud-cost-optimization]]></category>
            <category><![CDATA[devops-practice]]></category>
            <category><![CDATA[aws-cost-optimization]]></category>
            <category><![CDATA[cloud-governance]]></category>
            <category><![CDATA[cloud-infrastructure]]></category>
            <dc:creator><![CDATA[Malith Ileperuma]]></dc:creator>
            <pubDate>Sat, 30 Aug 2025 11:02:09 GMT</pubDate>
            <atom:updated>2025-08-30T11:04:48.430Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post, I will share a case study from my previous role. It’s all about cloud cost optimization, how I tackled rising cloud expenses and found ways to optimize both the cost and performance of the system. I’ll walk you through every step I took, explaining the process in detail so it’s easy to follow and understand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YjI2obrkm_QawTyM5A1KuQ.png" /></figure><h3>The Need for Cloud Cost Optimization</h3><p>As cloud adoption grows, so do the costs. Without proper management, cloud expenses can quickly spiral out of control, impacting budgets , operational efficiency and year end goals of organizations. Effective cloud cost optimization is essential to ensure organizations get the best value from their investments while maintaining performance and scalability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0DdetMIf3JEkiOtyezlZ0g.png" /></figure><h3>Rising Cloud Costs and Lack of Visibility</h3><p>As the cloud environments expanded within my organization, so did the associated costs. The team I was part of was rapidly developing new products and services, quickly deploying cloud resources to support this growth. However, without clear visibility or centralized control, cloud expenses began to rise unexpectedly.</p><p>In my department, around 50 professionals, including Developers, DevOps Engineers, Quality Engineers, Product Managers, and Business Analysts , relied heavily on cloud environments for their work. This usage, combined with inconsistent practices, led to several key challenges impacting cost management in my organizational department,</p><ul><li>Individual testing and distributed environments were provisioned freely, causing resource sprawl.</li><li>Cloud environments were often left running unattended during weekends and overnight, leading to wasted resources.</li><li>Higher-specification machines were requested for tasks that did not require such capacity, resulting in inefficient resource allocation.</li><li>Users frequently neglected to destroy their environments after their purpose was fulfilled.</li><li>In Kubernetes environments specifically, we faced issues such as over-provisioned pods and nodes, orphaned persistent volumes that were never released, and misconfigured autoscaling leading to either resource waste or performance bottlenecks.</li></ul><p>These issues, compounded by a lack of standardized guidelines and fragmented ownership, made spending management and cost forecasting difficult. This growing inefficiency began to strain the department’s budget and raised pressures to improve operational efficiency and governance.</p><h3>Data-Driven, Collaborative Solutions</h3><p>To tackle the escalating cloud costs and the underlying visibility issues, I adopted a structured, data-driven approach focusing on collaboration, automation, and continuous improvement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*heTJXx7YJzU7Fl6oKk3f4g.png" /></figure><p><strong>Team Size — </strong>Around 60 including developers, quality engineers, business analysts, devops engineers, project managers</p><p><strong>Setting up goals — </strong>In previous months, our monthly cloud spend averaged around $20,000 and was forecasted to rise to $24,000 if left unchecked. To counter this trend, we set a clear goal to reduce monthly cloud costs by at least 30%, aiming to bring expenses down to $14,000.</p><h4><strong>Data Collection and Analysis</strong></h4><p>A thorough analysis of cloud usage and billing data was critical. Utilizing AWS Cost Explorer along with custom tagging policies and monitoring dashboards in Prometheus and Grafana, we identified resource groups with high spend and inefficiencies. This data-driven insight highlighted,</p><ul><li>idle databases</li><li>oversized and unused snapshots</li><li>outdated images</li><li>resource up-time and off-hour usages</li><li>network costs</li><li>release data that was no longer required</li><li>over-provisioned instances</li><li>excessive node counts</li><li>orphaned persistent volumes</li><li>utilizing spot instances</li></ul><h4>Fixing Inefficiencies Through Automation and Governance</h4><p>With a detailed understanding of the problem areas, the next step was to design and implement targeted fixes. Our approach combined automation, policy enforcement, and continuous monitoring to systematically eliminate waste and optimize resource usage</p><h4>1. Idle Databases</h4><p>We identified idle databases by creating AWS Lambda functions that monitored database CPU and connection metrics via CloudWatch.If a database remained idle (no active connections and low CPU utilization) for over 4 continuous hours in the development environment, an automation script triggered to stop the database instance, saving on compute costs.</p><h4>2. Oversized and Unused Snapshots</h4><p>We enforced tagging policies where snapshots unused for 30 days were automatically tagged with usage=no_use_30. If unused for 60 days, the tag was updated to usage=no_use_60. After 75 days, snapshots with this tag were automatically deleted. Before deletion, a detailed report was sent to the DevOps team for review to ensure no unintended data loss. Additionally, we analyzed snapshot sizes and used AWS tools to reduce snapshot sizes by eliminating redundant data and compressing existing snapshots.</p><h4><strong>3. Outdated Images</strong></h4><p>We used container image scanners and AWS ECR lifecycle policies to automatically delete deprecated container images older than 60 days, reducing storage and improving security. For AWS AMIs, we adhered to CIS benchmarks and regularly patched images. Automation scripts deleted outdated and unused AMIs, keeping the image repository clean, secure, and cost-efficient.</p><h4>4. Resource Uptime and Off-Hour Usage</h4><p>To reduce costs from idle non-production resources, we automated start and stop schedules using Amazon CloudWatch Events and AWS Lambda. CloudWatch Rules triggered Lambda functions based on cron expressions matching business hours to stop EC2 instances and scale down EKS worker nodes during nights and weekends. Overrides were stored in AWS Systems Manager Parameter Store to allow teams to keep vital environments active when necessary.</p><h4>5. High Network Costs</h4><p>To control network expenses, we recommended migrating workloads to cheaper, closer AWS regions whenever possible. We also minimized regional data transfers by restricting cross-region replication to only critical data, reducing unnecessary traffic and associated costs while maintaining essential resiliency through geo-replication.</p><h4>6. Data Retention and Release</h4><p>We managed data retention primarily through AWS S3 Lifecycle Policies, automating the transition and deletion of objects based on age and access patterns. Unwanted log files were regularly deleted to reduce storage costs. Additionally, archiving infrequently accessed data to cheaper storage classes helped balance cost efficiency with data availability.</p><h4>7. Over-Provisioned Instances</h4><p>We observed instances where developers requested higher-spec machines than necessary — for example, requesting 6 vCPUs when 4 would suffice — to speed up processing in development environments. To address this, we implemented guidelines encouraging proper resource assessment before provisioning. Additionally, we utilized different CPU classes, selecting cost-effective instance types optimized for development workloads, ensuring that resource allocation balanced performance needs with cost efficiency.</p><h4>8. Excessive Kubernetes Node Counts</h4><p>We optimized Kubernetes cluster costs by tuning the Cluster Autoscaler with custom scale-down delays and resource thresholds to prevent unnecessary node over-provisioning. Standardized pod resource requests and limits were enforced via admission controllers, helping the scheduler place workloads efficiently. Custom controller scripts, integrated with AWS Lambda, identified and cordoned idle or underutilized nodes for safe termination, ensuring cost savings without compromising availability.</p><h4>9. Orphaned Persistent Volumes</h4><p>We scheduled AWS Lambda functions to regularly scan for EBS volumes unattached to any running Kubernetes pods for over 24 hours. Volumes flagged as orphaned were reviewed by the DevOps team before automated scripts safely deleted them, preventing unnecessary storage costs and resource wastage while ensuring no critical data was lost.</p><h4>10. Spot Instances</h4><p>We leveraged AWS Spot Instances for build workloads, especially for continuous builds lasting between 15 minutes and 1 hour. Spot Instances offered significant cost savings compared to on-demand instances without impacting build performance. To maximize reliability, we integrated automated fallbacks to on-demand instances in case of Spot interruptions. Additionally, we used Spot Fleets and diversified instance types to improve availability and maintain an optimal balance of cost and performance.</p><h3>Ensuring Sustainable Savings</h3><p>Sustained cloud cost savings require continuous monitoring and strong governance. Real-time dashboards and alerts quickly spot anomalies to prevent recurring waste. Automated enforcement of tagging, resource limits, and access controls ensures consistent cost discipline. Regular reviews with stakeholders foster transparency and a culture of cost awareness. Ongoing education empowers teams to make cost-conscious decisions, while automation and periodic strategy updates keep optimization agile and aligned with changing business needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1z1inw1SXE93UZaWT2X6dQ.png" /></figure><p><strong>Key Practices for Sustainable Savings:</strong></p><ul><li>Continuous monitoring with real-time dashboards and alerting</li><li>Automated governance enforcing tagging and resource usage policies</li><li>Regular cost reviews involving cross-functional stakeholders</li><li>Training and culture-building around cloud cost awareness</li><li>Expanding automation for lifecycle management and optimization</li><li>Agile adaptation of cost strategies to evolving business needs</li></ul><h3>Outcome &amp; Lessons Learned</h3><p>Reducing cloud costs is not something you do just once — it’s an ongoing process that needs a culture focused on cost awareness and good management. By using automation, monitoring, and clear policies, we were able to cut our monthly cloud costs by 40%, lowering them from $20,000 to $12,000. This shows how steady and careful cost management can make a big difference. Success comes from everyone working together — SREs, DevOps, developers, and leaders — and having clear visibility and using data to make decisions. Regular reviews, making changes when needed, and holding teams accountable keep the savings lasting, without slowing down innovation or performance.</p><p><strong>Key Takeaways:</strong></p><ul><li>Cloud cost management is a shared responsibility; cost efficiency must be part of decision-making at all levels</li><li>Visibility and transparency empower teams to align costs with business objectives</li><li>Cost governance is ongoing, requiring regular reviews, automation, and strategic leadership alignment</li><li>Every cost increase deserves scrutiny and justification to prevent waste and support sustainable growth</li><li>Embedding cost efficiency into workflows and culture ensures savings scale with evolving needs</li></ul><p><strong>Thank you</strong> for taking the time to read about my approach to cloud cost optimization. I hope these insights help you build sustainable savings and efficiency in your cloud environments. Feel free to reach out with any questions or to share your own experiences!</p><p><em>“Do not save what is left after spending, but spend what is left after saving.”</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9ba311bc252" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Passed AZ-104 in 15 Days —  My 15-Day AZ-104 Journey to Become Azure Expert]]></title>
            <link>https://medium.com/@mileperuma/how-i-passed-az-104-in-15-days-my-15-day-az-104-journey-to-become-azure-expert-2f11906627d1?source=rss-178db0bb04bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f11906627d1</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[microsoft-azure]]></category>
            <category><![CDATA[azure-administrator]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[az-104]]></category>
            <dc:creator><![CDATA[Malith Ileperuma]]></dc:creator>
            <pubDate>Mon, 28 Jul 2025 20:43:11 GMT</pubDate>
            <atom:updated>2025-07-28T20:43:11.637Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I Passed AZ-104 in 15 Days — My 15-Day AZ-104 Journey to Become Azure Expert</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*nMF1JnRMmed1v3YDhWnHDQ.png" /></figure><p>Hei! I am a DevOps engineer with skill in cloud, working with AWS, Azure and such each day. Just now, I passed the AZ-104 exam after but fifteen days of study. In here, I will share my whole journey — how I set about the learning, simple tips for all, and facts worth marking for your own path.</p><p>This guide will walk through my study ways, with honest words to help you all, should you chase this badge or strive for mastery beyond it. Yet know — this is but the beginning of a much longer road, as I seek to rise further toward the rank of true Azure expert.</p><p>Without further a do, Let’s dig deep into how I prepared and passed the <strong>AZ-104</strong> exam in 15 Days.</p><h3>The Exam Structure</h3><p>In the AZ-104 exam, Microsoft focuses on assessing your practical understanding of core azure concepts. The exam is designed to test how well you can apply your knowledge across five key areas that are essential for working as an Azure administrator.</p><ul><li><strong>Manage Azure identities and governance (20–25%)</strong></li><li><strong>Implement and manage storage (15–20%)</strong></li><li><strong>Deploy and manage Azure compute resources (20–25%)</strong></li><li><strong>Implement and manage virtual networking (15–20%)</strong></li><li><strong>Monitor and maintain Azure resources (10–15%)</strong></li></ul><p>For further details please go through this — <a href="https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/az-104">Link</a></p><p><strong>Moving Forward,</strong></p><ul><li>You have <strong>100–120 minutes</strong> to complete the exam</li><li><strong>40–60 question</strong> (I got 56) including <strong>1–2 scenario based </strong>question</li><li>Scenario based question typically includes (4–5 question)</li></ul><h3>My Study Plan</h3><p>To tackle the az-104 in just 15 days, I mapped out a clear, day-by-day study timeline with my schedule. Each step was planned with purpose from finding out exam topics and hands-on labs, to focused revision and practice tests. The visual guide below shows the exact path I followed, helping me stay organized and confident every step of the way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ivAlhEysHKpCiqYGgWCPQg.png" /></figure><p>I committed around 4–6 hours per day, depending on my schedule, and did my best to stay focused on the exam without getting distracted.</p><h3>Resources</h3><p>For my exam preparation, I primarily relied on Scott Duffy’s Udemy course, including his practice exams, alongside Alan Rodirigues’s course on udemy. Although many recommend Tutorials Dojo’s, WhizLabs exams, I didn’t use any of them during my study.</p><p>Below are the links to the resources I used,</p><ul><li>Scott Duffy’s Video Course — <a href="http://www.udemy.com/course/70533-azure">Link</a></li><li>Scott Duffy’s Practice Exams — <a href="http://www.udemy.com/course/az104-azure-practice">Link</a></li><li>Alan Rodrigues Video Course — <a href="http://www.udemy.com/course/az-104-microsoft-azure-administrator-course-with-simulations">Link</a></li><li>Microsoft Learn — <a href="http://learn.microsoft.com/en-us/azure">Link</a></li><li>AZ-104 Certification Page — <a href="https://learn.microsoft.com/en-us/credentials/certifications/azure-administrator/?practice-assessment-type=certification">Link</a></li></ul><h3>Create Free Azure Account</h3><p>Microsoft offers a free Azure account that gives you $200 in credit to explore and test Azure services for 30 days. With this account, you can safely try out real Azure resources, practice labs, and get hands-on experience without any cost. It’s the perfect way to familiarize yourself with the Azure portal, experiment with different services, and build confidence before the exam.</p><p>Check azure free account — <a href="https://azure.microsoft.com/en-us/pricing/purchase-options/azure-account">Here</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vIc_MJFyTqVPpKsaB9XMNA.png" /></figure><p>You can check here how to create your free azure account — <a href="https://youtu.be/OU1Vic_QURc">Youtube</a></p><h3>The Success Guide</h3><p>In this chapter, I’ll break down each domain and highlight the key facts and practical tips you need to know.</p><h4><strong>Manage Azure Identities and Governance (20%–25%)</strong></h4><ul><li>Create users and groups, including bulk creation and deletion.</li><li>Understand the Azure management hierarchy: Management Group → Subscription → Resource Group → Resource.</li><li>Role assignments: differentiate assigned vs. dynamic roles, understand scope hierarchy and role overriding.</li><li>Know the difference between Azure AD built-in roles and custom roles.</li><li>Work with Administrative Units for granular management.</li><li>Manage devices: assign device roles and configure self-service password reset (SSPR).</li><li>External user management: invite guests and assign roles appropriately.</li><li>Use dynamic user assignment for automation.</li><li>Understand licensing differences at a high level.</li><li>Add and verify custom domains.</li><li>Know key Azure roles (Owner, Contributor, Reader, Global Administrator, Network Contributor, etc.) and their privileges.</li><li>Utilize Azure Advisor and cost management tools.</li><li>Use tags effectively (remember tag values are case-sensitive).</li><li><strong>Important notes</strong>: Expiration policies can be set only for Office 365 Groups ,You cannot clone built-in roles.</li><li><strong>Additional recommended topics : </strong>Basics of Conditional Access policies, Multi-Factor Authentication (MFA) setup, Privileged Identity Management (PIM), including eligible vs. permanent role assignments.</li></ul><h4><strong>Implement and Manage Storage (15%-20%)</strong></h4><ul><li>Create storage accounts and containers.</li><li>Secure storage access via Azure AD, access keys, Shared Access Signatures (SAS), and stored access policies.</li><li>Understand object replication: prerequisites, supported destinations (same/different region), cross-subscription replication, and supported account types.</li><li>Distinguish between private endpoints and service endpoints.</li><li>Use Storage Explorer and AzCopy command for data management.</li><li>Manage file shares: network storage, storage tiers, snapshots.</li><li>Know differences between soft delete and versioning.</li><li>Storage redundancy types: LRS, ZRS, GRS, GZRS; including migration from GRS to ZRS.</li><li>Use cloud tiering and point-in-time restore.</li><li>Know storage account types supporting lifecycle management and data archiving.</li><li><strong>Remember</strong>: One resource belongs to a single Resource Group, but Resource Groups can contain resources from multiple regions.</li><li><strong>Additional recommended topics</strong>: Basics of Azure Data Lake Storage Gen2, Azure Files Sync feature for on-premises to cloud sync, Storage performance tiers (Standard vs. Premium).</li></ul><h4><strong>Deploy and Manage Azure Compute Resources (20%-25%)</strong></h4><ul><li>Understand ARM templates and Bicep files: structure and purpose.</li><li>Convert between ARM and Bicep templates.</li><li>Know deployment modes: complete and incremental.</li><li>Export ARM templates via Azure portal and deploy resources using them.</li><li><strong>Create and manage virtual machines (VMs)</strong> — Changing VM size while running causes an automatic reboot, Use custom script extensions.</li><li><strong>Manage disks</strong>: HDD, SSD, Ephemeral — Cannot directly move managed disks between regions; must copy or replicate.</li><li><strong>Manage Virtual Machine Scale Sets</strong> (uniform vs. flexible) — Resize VMs within scale sets, Deploy scale sets across availability zones or regions.</li><li>Move VMs between Resource Groups, Subscriptions, or Regions — know downtime implications.</li><li>Understand session persistence with load balancers.</li><li>Azure Site Recovery: use cases, VNets, public IPs, and NICs in secondary regions.</li><li>Horizontal (scale out) vs. vertical scaling (scale up).</li><li>Differentiate Recovery Services Vault, Azure Backup, and Azure Site Recovery.</li><li><strong>Remember</strong> : Azure Firewall is region-specific, Disk encryption types: server-side, client-side, customer-managed keys, To change VM availability set, VM must be deleted and recreated.</li><li><strong>Manage App Services</strong> : Moving App Service Plans across regions or subscriptions is limited, Zone redundancy support, Scaling, backups, traffic management, deployment slots, Host multiple apps in one App Service Plan.</li><li>Manage SSL certificates, DNS mapping, and FQDN for App Services.</li><li>Sync Groups: single cloud endpoint, multiple server endpoints.</li><li>Differences among Azure Container Instances, Container Apps, and App Services.</li><li>Redeploy vs. reapply: understand effects on disk data.</li><li>Multi-container groups: Linux-only support.</li><li>Availability sets vs. availability zones (differences and when to use each)</li><li><strong>Additional recommended topics</strong> : Basics of Azure Kubernetes Service (AKS), Azure Container Registry (ACR), Managed identities for Azure resources (system-assigned vs. user-assigned).</li></ul><h4><strong>Implement and Manage Virtual Networking (15%-20%)</strong></h4><ul><li>Create VNets, subnets, including BastionSubnet and GatewaySubnet.</li><li>Azure Bastion deployed after Nov 2, 2021 requires subnet size /26 or larger.</li><li>Configure VNet peering and understand one-way communication implications.</li><li>Manage Network Security Groups (NSGs) and Application Security Groups (ASGs).</li><li>Public IPs cannot be used as destination in NSGs.</li><li>NICs cannot be moved across regions.</li><li>NSGs are stateful; outbound security rules may not always be required.</li><li>Configure User Defined Routes (UDRs), virtual appliances, and BGP.</li><li>Set up service endpoints and private endpoints.</li><li>Understand Site-to-Site and Point-to-Site VPN connections.</li><li>Differentiate Azure Front Door vs. Traffic Manager.</li><li>Manage DNS zones: public, private, internal, auto-registration.</li><li><strong>Load balancers</strong> — Cannot handle regional failover, Basic SKU IP addresses are incompatible with standard load balancers.</li><li>Movement of NICs between resource groups or subscriptions limited by region.</li><li>Gateway transit functionality.</li><li>Address space planning, subnet sizing, and peering constraints.</li><li>Understand traffic flow rules for inbound and outbound.</li><li>Public and Private Azure DNS Zones</li><li><strong>Additional recommended topics</strong> : Azure Firewall basics and how it differs from NSGs, ExpressRoute overview and private connectivity, Application Gateway with Web Application Firewall (WAF) basics</li></ul><h4><strong>Monitor and Maintain Azure Resources (10%-15%)</strong></h4><ul><li>Use Kusto Query Language (KQL) for analyzing logs and monitoring data.</li><li>Create Recovery Services Vaults and manage Azure Backup.</li><li>Backup and restore resources including disk-level and individual file restore.</li><li>Configure and manage Azure Site Recovery failover processes.</li><li>Steps to delete Recovery Services Vaults.</li><li>Set up alerts, action groups, and log analytics queries.</li><li><strong>Remember</strong> : Backups must be in the same region as the resource, Cannot restore backups if VM is running, Data Collection Rules currently support only Log Analytics workspaces as their destination (not storage accounts)</li><li>Use monitoring tools such as Azure Monitor, IP Flow Verify, Packet Capture, and Traffic Analysis.</li><li>Data Collection Rules only support Log Analytics workspaces as destinations.</li><li>Monitoring Tools (Azure Monitor, Ip Flow Verify, Packet Capture, Traffic Analysis)</li></ul><p>While I have done my best to cover the key topics and important facts for the AZ-104 exam, I may have missed some details. Please accept my apologies in advance if that’s the case. The most important takeaway is to thoroughly review and understand the points listed above. These form the core foundation of what you need to know. Focus on the underlying concepts deeply, rather than just memorizing facts, also make sure you go thorugh azure labs as well for a better understanding.</p><h3>Tips</h3><ul><li>For Azure role-based certification exams, candidates have access to the full Microsoft Learn documentation during the exam — make sure to take advantage of this resource.</li><li>Complete the Microsoft Learn practice exam to familiarize yourself with the question style and exam format.</li><li>Check out the exam sandbox, available <a href="https://learn.microsoft.com/en-us/credentials/certifications/azure-administrator/?practice-assessment-type=certification">here</a>, to experience the exam interface beforehand. I lost 3–4 minutes in my real exam just figuring out how the GUI works for scenario-based questions — using the sandbox in advance can help you avoid this.</li></ul><h3>The Results</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*RRmAhNYKjjpDrc244lMXQg.png" /></figure><p>It was rewarding to see how the strategies and hard work paid off, especially considering the challenges I faced at the beginning.</p><p>Here is the certification for validate — <a href="https://learn.microsoft.com/api/credentials/share/en-us/malith97/17FDE05B3F289E01?sharingId=E4C91FDFD6D7B80D">Link</a></p><h3>The Road Continues</h3><p>As I look back on my journey preparing for and passing the AZ-104, I’m reminded that every milestone in learning is simply a step toward deeper mastery and new challenges. No matter how fast or slow your progress, commitment and curiosity will always carry you forward.</p><p><em>“Dream big. Start small. Act now.”</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f11906627d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Supercharge Kubernetes RBAC with Okta]]></title>
            <link>https://medium.com/@mileperuma/supercharge-kubernetes-rbac-with-okta-1e0462a04abe?source=rss-178db0bb04bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e0462a04abe</guid>
            <dc:creator><![CDATA[Malith Ileperuma]]></dc:creator>
            <pubDate>Sun, 15 Jun 2025 18:35:49 GMT</pubDate>
            <atom:updated>2025-06-19T11:40:17.186Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*AcU8sPG7qwOv35ChCpiEhg.png" /></figure><h4>Introduction</h4><p>Securing access to Kubernetes clusters is a big deal as teams and workloads grow. In my role as a DevOps engineer at a large organization, I’ve seen firsthand how relying on passwords or certificates quickly becomes unmanageable especially when you’re juggling hundreds of users and shifting team structures. That’s where Single Sign-On (SSO) with Okta has been a game changer, letting us centralized identity management and easily roll out security features like Multi-Factor Authentication (MFA).</p><p>But logging in is just the start. Kubernetes’ Role-Based Access Control (RBAC) lets us fine-tune exactly what each user or group can do, ensuring that access is both seamless and secure. By combining Okta SSO with Kubernetes RBAC, I’ve helped my teams simplify cluster access and enforce strong security at scale. In this guide, I’ll walk you through setting up this integration so you can keep your Kubernetes environment both user-friendly and locked down.</p><h4>Challenges with Traditional Access</h4><p>Managing access to Kubernetes clusters with traditional methods like distributing kubeconfigs or certificates can quickly become challenging as teams and environments grow. Onboarding new users often means juggling credentials and permissions across multiple clusters, while offboarding requires careful tracking to ensure no lingering access remains.</p><p>This approach can make audits stressful and slow down engineers who are waiting for the right permissions. It also increases the risk of users having more access than they actually need. These challenges highlight why many teams look for a more scalable, centralized way to handle Kubernetes access securely and efficiently.</p><h4>How to Integrate</h4><p>Recognizing the challenges of traditional access management, many teams turn to SSO solutions like Okta to streamline and secure Kubernetes access. The idea is simple, let a trusted identity provider handle authentication, and use Kubernetes built-in RBAC to control what users can actually do once they’re in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*6CeYwblSoLjU_8_smjosDg.png" /></figure><p>The process starts with setting up Okta as an OpenID Connect (OIDC) provider. This allows Kubernetes to trust the identities and group memberships managed in Okta. Next, the Kubernetes API server is configured to accept and validate tokens issued by Okta, ensuring that only authenticated users can interact with the cluster.</p><p>Once authentication is in place, the real power comes from combining it with RBAC. Teams can map Okta users or groups to specific Kubernetes roles, granting just the right level of access for each person or team. This not only simplifies onboarding and offboarding since everything is managed centrally through Okta but also makes it much easier to audit and adjust permissions as needs change.</p><p>While the steps are very straightforward, the real journey often involves careful planning and a bit of troubleshooting. But the end result is a more secure, scalable, and manageable way to control Kubernetes access one that grows with your team and keeps your clusters protected.</p><ol><li>Create an OIDC App in Okta</li><li>Map Direct URL,</li></ol><pre>https://&lt;EKS_CLUSTER_URL&gt;/oauth2/callback</pre><p>3. Create an IAM OIDC Provider</p><pre>eksctl utils associate-iam-oidc-provider --cluster &lt;cluster-name&gt; --approve</pre><p>4. Update EKS server flags (using eksctl or console in AWS)</p><pre>apiVersion: eksctl.io/v1alpha5<br>kind: ClusterConfig<br>metadata:<br>  name: &lt;cluster-name&gt;<br>  region: us-west-2<br>iam:<br>  withOIDC: true</pre><p>5. Then config OIDC parameter</p><pre>--oidc-issuer-url=&lt;OKTA_ISSUER_URL&gt;<br>--oidc-client-id=&lt;OKTA_CLIENT_ID&gt;<br>--oidc-groups-claim=groups</pre><p>6. Mapping Okta Groups to Kubernetes</p><pre>apiVersion: rbac.authorization.k8s.io/v1<br>kind: ClusterRoleBinding<br>metadata:<br>  name: okta-admins-binding<br>subjects:<br>- kind: Group<br>  name: &quot;k8s-admins&quot; # Okta group name<br>  apiGroup: rbac.authorization.k8s.io<br>roleRef:<br>  kind: ClusterRole<br>  name: cluster-admin<br>  apiGroup: rbac.authorization.k8s.io</pre><p>7. Apply and Test</p><pre># Applying the changes<br>kubectl apply -f rbac-config.yaml<br><br># To test<br>aws eks update-kubeconfig --name &lt;cluster-name&gt; --region &lt;region&gt; --role-arn &lt;IAM-ROLE-ARN&gt;<br>kubectl get pods --token=&lt;OKTA_ID_TOKEN&gt;</pre><p><strong>Benefits of using Okta as RBAC,</strong></p><ul><li><strong>Centralized Identity</strong> — Okta manages users/groups, while AWS handles cluster security and scaling.</li><li><strong>Least Privilege —</strong> RBAC ensures users only get permissions they need, even in complex AWS environments.</li><li><strong>Auditability — </strong>AWS CloudTrail and Okta logs provide end-to-end visibility into access patterns.</li></ul><h4>Technical Issues and How to Fix</h4><p>While integrating Okta SSO with Kubernetes RBAC brings clear benefits, it’s not always smooth sailing. Many teams, including mine, run into a few common technical hurdles along the way.</p><ul><li><strong>OIDC Configuration Issues</strong> — Small mismatches in issuer URL, client ID, or claims can cause authentication failures.</li><li><strong>Missing Group Claims</strong> — Okta tokens sometimes don’t include the expected group information, breaking RBAC mappings.</li><li><strong>Group Name Mismatches </strong>— If group names or claims aren’t consistent between Okta and Kubernetes, users may lose access.</li><li><strong>Token Expiry and Refresh</strong> — Some tools don’t handle token renewal smoothly, leading to frequent re-authentication.</li><li><strong>Troubleshooting Complexity</strong> — It can be tricky to pinpoint whether problems stem from Okta, OIDC settings, or RBAC policies.</li></ul><p>Overcoming these technical hurdles takes a mix of patience, research, and a few handy tricks. Here’s how teams often address the most common issues</p><ul><li><strong>Double-Check OIDC Settings</strong> — Carefully verify the issuer URL, client ID, and claims in both Okta and Kubernetes API server configs. Even a small typo can cause problems.</li><li><strong>Customize Okta Claims</strong> — Adjust Okta’s app settings to ensure tokens include the correct group claims (like groups or email). Okta’s documentation and support are helpful here.</li><li><strong>Standardize Group Names</strong> — Agree on a naming convention for groups in Okta and use the same names in your Kubernetes RBAC bindings to avoid mismatches.</li><li><strong>Automate Token Renewal </strong>— Use plugins or scripts (such as kubectl oidc-login) that handle token refresh automatically, so users aren’t constantly re-authenticating.</li><li><strong>Improve Troubleshooting</strong> — Enable detailed logging on both the Kubernetes API server and Okta. This makes it easier to trace where access is breaking down.</li></ul><p>By applying these solutions, most teams can smooth out the integration process and unlock the full benefits of SSO-driven Kubernetes access.</p><h4>Benefits &amp; Drawbacks</h4><p>Bringing Okta SSO and Kubernetes RBAC together offers some clear advantages, but it’s not without a few trade-offs. Here’s what teams typically experience:</p><p><strong>Benefits</strong></p><ul><li><strong>Centralized Access Management </strong>— SSO lets you manage all user authentication in one place, making onboarding and offboarding much faster and less error-prone.</li><li><strong>Enhanced Security</strong> — Using SSO reduces the risk of leaked or mismanaged kubeconfig files, while RBAC ensures users only get the permissions they need.</li><li><strong>Simplified Auditing</strong> — It’s easier to review and track who accessed what, since all authentication flows through Okta and permissions are enforced by RBAC.</li><li><strong>Scalability</strong> — As your team or number of clusters grows, you can scale access control without a lot of manual work.</li></ul><p><strong>Drawbacks</strong></p><ul><li><strong>Initial Complexity</strong> — Setting up OIDC, configuring claims, and mapping groups can be tricky, especially if you’re new to SSO or RBAC.</li><li><strong>Troubleshooting Pain Points</strong> — When something goes wrong, it can be hard to tell if the issue is with Okta, Kubernetes, or the integration between them.</li><li><strong>Ongoing Maintenance</strong> — Group changes in Okta or updates to RBAC policies require careful coordination to avoid accidental lockouts or over-permissioning.</li></ul><p>Overall, the combination of Okta SSO and Kubernetes RBAC leads to a more secure, manageable, and scalable environment — but expect a learning curve and some maintenance along the way.</p><h4>Lessons Learned</h4><p>Here are some key lessons and tips for teams planning a similar path</p><ul><li><strong>Start with a Clear Access Model</strong> — Define user roles and group structures before configuring SSO and RBAC. This makes mapping permissions much smoother and reduces rework down the line.</li><li><strong>Leverage Group-Based Access</strong> — Assign permissions based on groups rather than individual users. This approach simplifies onboarding, offboarding, and auditing — removing a user from a group instantly revokes their access.</li><li><strong>Document Everything </strong>— Keep detailed notes on your OIDC, Okta, and Kubernetes RBAC configurations. Good documentation helps with troubleshooting and future updates.</li><li><strong>Test in Staging First</strong> — Try out your SSO and RBAC setup in a non-production/testing environment to catch issues early and avoid accidental lockouts (Test environment is recommended)</li><li><strong>Automate Where Possible</strong> — Use tools or scripts to automate user provisioning, group assignments, and RBAC policy updates, especially as your environment grows.</li><li><strong>Stay Up to Date</strong> — Both Okta and Kubernetes evolve rapidly. Regularly review release notes and best practices to keep your setup secure and efficient.</li></ul><h4>Conclusion</h4><p>Integrating Okta SSO with Kubernetes RBAC has become a best practice for teams looking to balance security, efficiency, and scalability in their cloud-native environments. By centralizing authentication with SSO and fine-tuning access with RBAC, you can dramatically reduce the risks and headaches associated with manual access management. This approach not only streamlines onboarding and offboarding but also makes audits and compliance much simpler, all while ensuring users have only the permissions they truly need.</p><p>While the journey involves some technical hurdles and ongoing maintenance, the long-term benefits are clear. stronger security, easier management, and a more agile team. As Kubernetes adoption continues to grow, combining SSO and RBAC is a powerful strategy to keep your clusters safe and your operations running smoothly.</p><h4>Thank you</h4><p>Thank you for taking the time to read this guide. I hope my experiences and insights help you on your own journey to securing Kubernetes access with Okta SSO and RBAC. If you have questions, feedback, or want to share your own stories, feel free to leave a comment or reach out. Happy clustering!</p><p><em>“Security is not a product, but a process. Every step you take to improve access controls today builds a safer, more resilient environment for tomorrow”</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e0462a04abe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Pass the AWS Solutions Architect Associate (SAA-C03) Exam in 2025]]></title>
            <link>https://medium.com/@mileperuma/how-to-pass-the-aws-solutions-architect-associate-saa-c03-exam-in-2025-4692a160c5f8?source=rss-178db0bb04bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/4692a160c5f8</guid>
            <dc:creator><![CDATA[Malith Ileperuma]]></dc:creator>
            <pubDate>Sun, 25 May 2025 18:36:36 GMT</pubDate>
            <atom:updated>2025-05-25T18:39:34.249Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>As a DevOps engineer with experience in cloud, I’ve been working with AWS in my daily tasks. My role involves utilizing a range of AWS services such as EC2, S3, IAM, EKS, ASG, SG, and more. With this ongoing exposure, I realized that pursuing the AWS Solutions Architect — Associate (SAA-C03) certification would be a valuable addition to my professional profile. Not only would it validate my skills, but it would also enhance my ability to deliver more optimized cloud solutions in my DevOps career.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xDeALYUHJdwtI9oBN-nuqg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*97K3mQiEV1q3nRqjqZGDEw.png" /></figure><p>The AWS SAA-C03 exam serves as an excellent starting point for anyone already familiar with AWS, as well as those new to the platform. If you’re just beginning your cloud journey, I recommend taking the AWS Cloud Practitioner exam first, as it provides a solid foundation for more advanced certifications. In-depth knowledge of AWS is essential in today’s cloud and DevOps world, especially given AWS’s dominance in the cloud space. By preparing for the SAA-C03, you’ll explore a wide range of AWS services, learning how to leverage them effectively in your daily work and ultimately increase your efficiency in cloud-based tasks.</p><p>Without further a do, Let’s dig deep into how I prepared and passed the <strong>SAA-03</strong> exam in <strong>2 weeks</strong></p><h3>Struggle</h3><p>A year ago, I bought Stephene Maarek’s Udemy course for the AWS Solutions Architect — Associate (SAA-C03) exam, thinking I’d watch the entire course, get comfortable, and then schedule the exam (Lol). However, the course was longer than expected, and due to my laziness, I only managed to watch a few hours of the course before abandoning it altogether. So I never completed the course or scheduled the exam, leaving me frustrated with my lack of progress.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*n3oMby7B0gZ9fLh7-E_dYQ.jpeg" /></figure><h3>Starting Point</h3><p>I set a clear deadline by scheduling my exam for May 21, 2025 exactly 15 days from the start of my study plan. The course content spans around 28 hours, so I made a plan to make the most of my time. I began by filtering out areas I was already familiar with, like EC2, S3, IAM, RDS, DynamoDB, SG, and ASG, and focused more on the subtopics I wasn’t as comfortable with.</p><p>I marked the videos on these unfamiliar topics and committed to 4 hours of study each day for 5 days. Throughout the process, I took notes on key points from each topic to ensure I retained the most important information.</p><h3>Resources</h3><p>For my exam preparation, I primarily relied on Stephene Maarek’s Udemy course, including his practice exams, alongside Neal Davis’s practice exams. Although many recommend Tutorials Dojo’s exams, I didn’t use them during my study.</p><p>Below are the links to the resources I used,</p><ul><li>Stephane Maarek’s Video Course — <a href="https://www.udemy.com/course/practice-exams-aws-certified-solutions-architect-associate/?couponCode=LETSLEARNNOW">Link</a></li><li>Stephane Maarek’s Practice Exams — <a href="https://www.udemy.com/course/practice-exams-aws-certified-solutions-architect-associate/?couponCode=LETSLEARNNOW">Link</a></li><li>Neal Davis’s Practice Exams — <a href="https://www.udemy.com/course/aws-certified-solutions-architect-associate-practice-tests-k/?couponCode=LETSLEARNNOW">Link</a></li><li>Tutorial Dojo Practice Exams — <a href="https://www.udemy.com/course/aws-certified-solutions-architect-associate-amazon-practice-exams-saa-c03/?couponCode=LETSLEARNNOW">Link</a></li></ul><h3>Crack the Code</h3><p>When preparing for the AWS Solutions Architect — Associate exam, I focused on a few key strategies that helped me succeed.</p><p>I made sure to thoroughly understand the core AWS services that are commonly tested in the exam, such as EC2, S3, IAM, Networking, CDN. Here I have listed some important topics to checkout before you visit exam and make sure you understand all the concepts that i have mentioned below because those are the areas that SAA-03 commonly asking about.</p><h4>Storage</h4><ul><li>S3 Life Cycle Policies</li><li>Transition Storage Classes (S3-IA, OneZone, Glacier, Glacier Vault)</li><li>S3 Encryption (SSE-S3)</li><li>Storage Gateways (File, Volume, Tape) and the difference between them</li><li>DataSync vs Transfer Acceleration</li><li>EBS (Classes, IOPS) , EFS (EFS, EFS-IA) and FSX</li><li>S3 Replication</li><li>S3-Scan</li></ul><h4>Compute</h4><ul><li>Purchasing Options (On-Demand, Reserved, Scheduled, Dedicated, Spot) and Difference Between Them</li><li>Placement Groups and Limitations (Cluster, Spread, Partition)</li><li>Instance Restart vs Hibernation</li><li>Elastic Fabric Adapter (EFA)</li><li>Auto Scaling (Simple, Step, Target Tracking, Scheduled)</li><li>Instance Launching (Launch Configurations, Launch Templates)</li><li>Lambda (Timeout, Limitations, Scaling, Supported Languages, Layers)</li><li>ECS (Tasks) and Fargate (Serverless, Cost)</li></ul><h4>CloudFront</h4><ul><li>Signed Cookies vs Signed URL’s</li><li>Origin Access Control , Origin Access Identity</li><li>Lambda@Edge</li><li>Cache</li><li>Origin FailOver (S3, Custom Origins)</li><li>Security (WAF integration)</li></ul><h4>Networking</h4><ul><li>Private IP, Public IP and Elastic IP and Difference Between Them</li><li>VPC (Peering, PrivateLink, Limits)</li><li>Subnets (Private vs Public)</li><li>NACL’s vs Security Groups (Stateful vs Stateless)</li><li>Load Balancing (Application LB vs Network LB) and Limitations</li><li><strong>Global Accelerator </strong>(FailOver, Latency, Origin)</li><li>Direct Connect , Transit Gateway</li><li>Route53 (TTL, CNAME vs Alias, Routing Policies, Health-Checks)</li><li>Gateway endpoints (Internet Gateway, Transit Gatway)</li><li>NAT Instances vs NAT Gateways</li><li>Check How Request Flow from Internet to AWS Resources</li></ul><h4>Encryption and Security</h4><ul><li>Server-Side Encryption vs Client-Side Encryption (SSE-S3, SSE-KMS, SSE-C)</li><li>In-Flight and REST</li><li>AWS Managed Keys, AWS Owned Keys and Customer Managed Keys</li><li>Parameter Store, Certification Manager and Secrets Manager</li><li>KMS Keys (Single and Multi-Region Keys)</li><li>IAM (Cross-Account access, Permission Boundary, Allow/Deny Rules)</li><li>Purpose of WAF (IP Block), Shield, Inspector, Macie and Guard Duty</li></ul><h4>Databases</h4><ul><li>Difference Between Relational and No-Relational Databases</li><li>RDS (Supported Engines, Read-Replicas, Cache, Multi-AZ, Fail-Over, Proxy)</li><li>Aurora DB (Scalability, High-Performance, Serverless)</li><li>DynamoDB (Document Type, Global Tables, DAX, Steams)</li><li>Database Caching Options (In-Memory Caching, Secondary Indexes, DAX)</li></ul><h4>Monitoring</h4><ul><li>Instance Monitoring</li><li>CloudWatch Alarms and Matrix</li><li>LogWatch Log Agent</li><li>CloudTrail</li><li>Difference Between CloudWatch and CloudTrail and Config andWhen to Use What</li><li>QuickSight (For Visualizing Purposes)</li><li>EventBridge</li></ul><h4>Other Services</h4><ul><li>Database Migration from on-prem to AWS (When to use SCT)</li><li>SQS (FIFO vs Standard)</li><li>Kineses (Streams, Firehose and Analytics)</li><li>SQS vs Kinesis Steams (Study More about Partition ID, Duplicate Items, Origins)</li><li>Difference Between CloudFront and Global Accelerator</li><li>Difference Between CloudFront Routing, Route53 Routing and Global Accelerator Routing</li><li>Difference Between Cognito User Pools vs Identity Pools</li><li>Difference Between EMR, Glue and Athena</li></ul><h3>Mistakes</h3><p>While practicing for the SAA-03 exam, I made a few key mistakes during my first couple of runs in the practice exams. In my first 2–3 practice exams, I scored 49%, 53%, and 54%, which was discouraging. Here are a few key mistakes I made during my initial practice exams:</p><ul><li><strong>Not Reading The Question — </strong>I rushed through questions without properly reading them, which made me think they were easier than they were.</li><li><strong>Not Reading Explanations/ Finding Explanations </strong>— I skipped the explanations for practice questions, why my answers were right or wrong.</li><li><strong>Not knowing the difference between services —</strong> While I knew the services, I sometimes struggled to remember what made each one unique.</li><li><strong>Keywords —</strong> I missed important keywords like “Least,” “Minimum,” “NOT,” “Highest,” and “Cost-Optimized”</li><li><strong>Time management —</strong> I spent too much time on individual questions, causing my time to run out before I could finish the rest.</li></ul><h3>Learn From Mistakes</h3><p>After taking 2–3 practice tests, I identified the mistakes I had been making. Here are a few things I did to improve after realizing them,</p><ul><li><strong>Check for keywords</strong>: Focuse on keywords like “least,” “minimum overhead,” “without changing the code,” “high-availability,” and “realtime”</li><li><strong>Eliminate wrong answers</strong>: You can eliminate two options right away, as I could quickly identify which answers didn’t fit the scenario</li><li><strong>Read explanations</strong>: Make sure to review the explanations for each question, even if I got the answer right. This helped me understand the reasoning behind the correct answers</li><li><strong>Revise</strong>: I revisited practice exams multiple times, understanding and boosted my confidence</li></ul><p>After doing the above strategies, I was able to score 69%, 76%, and my highest score on a practice exam was 84%. I felt much more confident and prepared for the actual exam.</p><h3>Tips</h3><ul><li><strong>Check for discount coupons</strong> before you schedule your exam (You can easily find 50% off easily).</li><li>If you&#39;re a non-native English speaker, <strong>take the additional 30 minutes (ESL)</strong> to help with language-related challenges.</li><li><strong>Stay Calm — </strong>Stay calm and do not panic during the exam</li><li><strong>Join Telegram and Reddit groups</strong> to get tips and tricks from others who have taken the exam.</li></ul><h3>The Result</h3><p>At the end, I was able to score 863/1000, which I think is a very good score. This result not only validated my efforts and preparation but also gave me a sense of accomplishment. It was rewarding to see how the strategies and hard work paid off, especially considering the challenges I faced at the beginning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*97K3mQiEV1q3nRqjqZGDEw.png" /></figure><p>Here is the certification for validate — <a href="https://www.credly.com/badges/569792a2-e098-4c6d-b119-4fa121af39e3/public_url">Link</a></p><h3>Final Thoughts</h3><p>The journey to passing the AWS Solutions Architect — Associate exam wasn’t easy, but it was certainly worthwhile. Along the way, I learned the importance of planning, consistency, and continuous improvement. No matter how challenging the preparation might seem, staying focused and adapting your approach will make a significant difference. For anyone preparing for this exam, I’d say: Stay persistent, embrace your mistakes as learning opportunities, and remember that every step forward brings you closer to mastering AWS.</p><p><strong><em>There’s no tomorrow, do it today</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4692a160c5f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Life at Zebra Technologies Sri Lanka]]></title>
            <link>https://medium.com/@mileperuma/life-at-zebra-technologies-sri-lanka-203080c6543f?source=rss-178db0bb04bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/203080c6543f</guid>
            <category><![CDATA[life]]></category>
            <category><![CDATA[worklife]]></category>
            <category><![CDATA[worklife-balance]]></category>
            <category><![CDATA[teamwork]]></category>
            <category><![CDATA[office-culture]]></category>
            <dc:creator><![CDATA[Malith Ileperuma]]></dc:creator>
            <pubDate>Sat, 07 Jan 2023 19:33:20 GMT</pubDate>
            <atom:updated>2023-01-10T17:48:18.701Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E-Us14R1WSP1Xst2nH1dVQ.png" /></figure><h3>What is Zebra Technologies?</h3><p>Zebra Technologies is an American company founded in 1969 that focus, specialised in manufacturing and sells a range of automatic identification and data capturing products. Zebra devices are the fastest , most reliable and rugged devices which is available in the market right now.</p><p>Zebra manufactures their own hardware devices and software solutions for their hardware such as firmware , and other solutions. Specially , zebra is known as motorola solutions before it became as zebra technologies.</p><p>Currently, The Zebra Technologies have almost 9000 employees worldwide and holds more than 5200 patent licenses. Furthermore , they have 128 branches in 54 countries worldwide.</p><h3>Zebra Technologies Sri Lanka</h3><p>Zebra Technologies have research and development branch in srilanka and it has around 150 employees working for zebra products and services. Currently, Zebra Technologies Sri Lanka branch is in 6th and 7th floors of Maga One building Narahenpita , Sri Lanka.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w8FGJuXCizRJ7F0RBuUOMw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SKjZsF3J5iSgNrqFIFjF3g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5So-igULBjYe2Z4-f02HVA.jpeg" /><figcaption>Zebra Technologies Sri Lanka</figcaption></figure><h3>What Zebra Technologies Sri Lanka Do?</h3><p>In Sri Lanka, zebra technologies have two departments which are EMC (emerging mobile computing) and DCS (data capturing solutions) and in both departments there are couple of teams that working on different business needs. Since Zebra Sri Lankas is a research and development branch, majority of teams are working on research projects.</p><p>In DCS Srilanka department , they are working on delivering hardware SDK for zebra devices and several other new tools for zebra customers to ease their work.</p><h3>Internship at Zebra Technologies</h3><p>I was opportune to work as a software engineer intern at Zebra Technologies Srilanka in July 2021. I have started my internship in 1st of July 2021 and i was a part of zebra <a href="https://www.zebra.com/us/en/solutions/intelligent-edge-solutions/smartlens-for-retail.html">smartlense project</a> BAR team where they produce business analytics using captured data of zebra devices in business sites.</p><p>In zebra <a href="https://www.zebra.com/content/dam/zebra_new_ia/en-us/solutions-verticals/product/location_solutions/smartlens/video-website/smartlens-solution-overview-video-website-en-us.mp4/jcr:content/renditions/original">smartlense</a>, we are capturing and monitoring realtime movements of goods with the help of RFID technology. Here in BAR team, we analyse captured data and provide analytics to business customers through special portal.</p><p>Here are my deliverables during my internship</p><p><strong>Deliverables</strong><br>• Collaborate with other engineers to design, build and maintain applications<br>• Monitoring the performance of internal systems<br>• Learning about the existing codebase and improving coding skills and design patterns<br>• Conducting manual testing procedures to ensure product quality.<br>• Writing, debugging and maintaining the codebase <br>• Build services for different system operations using SpringBoot<br>• Participating in code review sessions <br>• Bug hunting and fixing bugs in the system.</p><p><strong>Tools and Technologies I used During Internship</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*bgzgoS5C4T2QBYZrY6TPkw.jpeg" /></figure><p>In my team, we had 2 developers , 1 tester and 1 devops and intern and all together we had 5 team members in our team including myself. All of them except myself had more than 8 years of industry experience and specialised in their respective career paths.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2vITHD124vSMRdAB-k3FPg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Afg6x07K-6cAVIdZuf2OGA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FHZtwL9MIjfOJDgztnuZTw.jpeg" /><figcaption>My Team During Internship</figcaption></figure><p>During my internship i had to work with this team and i would say it was a wonderful 6 months with them. Even though i was an intern , they treated me like a permanent employee of zebra , guiding me through my career path , teaching me the best coding practices as well as other corporative skills which are mandatory to survive in industry. And still they are like a family to me.</p><p>Special thanks to <strong>Menuka (Lead)</strong> , <strong>Nishantha (Tech Lead)</strong> , <strong>Probodha (Test Lead)</strong> and <strong>Rajeev</strong> <strong>(DevOps)</strong> for being an outstanding mentors , friends to me during my internship as well as now.</p><h3>After Being Promoted…</h3><p>After my 6 months of internship , i was converted into permanent employee of Zebra Technologies Sri Lanka and my designation was <strong>Software Engineer I</strong> <strong>(Grade 10)</strong> <strong>DevOps</strong>.</p><p>After being promoted as a software engineer, i was transferred into another department which is DCS Sri Lanka as a DevOps Engineer. In there, my main responsibility was to implement DevOps infrastructure in there to automate their software engineering lifecycle.</p><p>In DCS, there were few teams and i had to collaborate with those engineers to build their build system. Furthermore, DCS Srilanka managers wanted to form a new dedicated DevOps team here in Srilanka to manage their work independently and i was able to be the first and the only member of that DevOps team here in Sri Lanka.</p><p>I would say it was a quite challenging work to perform because as i mentioned , i was the one and only DevOps guy of our department and i had to implement entire build system from scratch by my own. Also, i would say it was a golden opportunity to myself as a fresher to make something excited for all of us.</p><p><strong>Tools and Technologies I used</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*fWFRvPLU8XPALgYUV9N7LA.jpeg" /><figcaption>Technologies I Used In Zebra Technologies as an DevOps Engineer</figcaption></figure><p>In my first few weeks in new department , i conducted a small requirement gathering for our new build system and during that time period , i was able to reach to many people in our office to take their thoughts and feedbacks.</p><p>After an initial requirement gathering i designed the build architecture with the help of MS Visio tool. Then i had to request the resources that we need to our initial setup and my manager helped me with that long procedure. Also during that time , i had to attend to several architecture meetings with server , storage , network teams to defend my architecture and at the end of the day i got the approval from them to proceed further.</p><p>Furthermore, I was able to implement entire build system with minimum amount of time as a DevOps and currently we are running more than 20 projects in pilot mode for other engineers to get familiarize with new jenkins build system.</p><p><strong>My Key Deliverables,</strong></p><p>• Working on windows/linux/mac based applications<br>• Complete DevOps lifecycle implementation from code-checkout to delivery.<br>• Configuring and automating the entire build process through Jenkins and deployment <br>• Selecting proper branching strategies.<br>• Selecting and deploying appropriate CI/CD tools<br>• R&amp;D over new tools and documenting the findings for innovation in the product.<br>• Collaborate with other engineers to build and maintain applications</p><h3>Working Environment</h3><p>When we are talking about the work environment, Zebra Srilanka has a wonderful working environment for their employees. In zebra Srilanka office premises open 24x7 for their employees and they can work preferable time in the day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x0rKNZwNrIFu18m9XI5r3w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YJlMuNlCT0gDGsLN-hqmMw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kRQGZ0CBjavJzwa1zjHRNQ.jpeg" /><figcaption>Zebra Technologies Sri Lanka Workspaces</figcaption></figure><p>In zebra, they provide all the other benefits to their employees and their job security is much higher here in zebra. Also, their employees have strong independence and all the rights to say “<strong>NO”</strong> if it is necessary. If they have any personal concerns , they can immediately reach to their reporting manager , HR or zebra anonymous call number and they will take immediately actions regarding the matter.</p><p>Furthermore, Zebra LK facility is performing daily cleanups to make sure the working environment is 100% clean and germs free. also , they take various precautions against covid-19 to keep their employees safe from being infected.</p><p>Currently, Zebra Srilanka has hybrid work environment and they encourage their employees to visit at least 2–3 days per week at work to sync with their other team members.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S_nKH1M_sf7WgeeRAReVfA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3vJ7V06AO4cWr9nEPL6XNQ.jpeg" /><figcaption>While Working</figcaption></figure><p>Surprisingly, zebra srilanka provides breakfast, lunch and dinner for their employees for free of charge. For breakfast, they provide breakfast box and it includes sandwiches , cake , pastries , Chinese rolls , cutlets and it is really delicious. For lunch, they provide delicious lunch buffet for all the employees and they can take what they preferred.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_fecjsDXBsXM-qwm9JQwzw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5126cJcJTaLmU9uUKJS9Wg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VPzOgmygocRfV0r38xWW1g.jpeg" /></figure><p>For dinner, employees can order their dinner from outside restaurants and claim their dinner from office up to 1000 Rupees per person.</p><p>Also, they provide snacks for spare time and for drinks, they have cappuccino , espresso , fresh milk , tea , coffee , milo , chocolate drinks and fruit juices for their employees.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LZ4bcjXp2a1t2PfWNlLH5w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1kFKwpSWuGMKv0x6y_gv2w.jpeg" /><figcaption>Zebra Technologies Sri Lanks Cafeteria</figcaption></figure><p>Playing table tennis with my teammates at the office has been a great way to bond and have some fun during breaks. We always have a great time and it’s a great way to relax and unwind during the workday. We have a table tennis board in our play area and during our free time, we all play table tennis with our other colleges. Not only is it a fun physical activity, but it also helps to improve teamwork and communication and sometimes we play table tennis for hours without noticing it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tFpSfmLArVKCOac8u5f22g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bGIqOG5YuVfZLoitNpzBkQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lKTjuoKA3VhJLtu42lmyTg.jpeg" /><figcaption>While Playing Table Tennis After The Lunch</figcaption></figure><h3>Zebra Innovation Program</h3><p>Zebra Technologies gives their priority to new innovations and they encourage their employees to make new innovations in their free time. In early days, employees had separated time for make new innovations and currently zebra has more than 5000 patent licenses.</p><p>Also, Zebra is organising an event called ‘<strong>Srjana</strong>’ every year to showcase their employees innovation capabilities. In each year, zebra encourage their employees to submit a innovation proposal to “<strong>Srjana</strong>” and if it is accepted by the judge panel , they provide all the needful resources and funds to those employees to continue their innovation work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bfbW-d-cVyXjV-jN9kOC7A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TKyfwxpFGvQvuotfWGAY7Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pGRQsyZa4uwfuZlZkMerpA.jpeg" /><figcaption>Innovation Exhibition Held at Zebra Technologies Sri Lanka 2022</figcaption></figure><p>They strongly believe innovation is the key to success in future and In Zebra Sri Lanka office premises , they have full equipped electrical engineering lab with full of resources and anyone can use that electrical lab for their research work.</p><h3>Team Building Session 2022</h3><p>In Zebra Srilanka, they organize fun events annually to build collaboration between their employees. In 2022, they organised an event at Cinnamon bay Beruwala , Srilanka.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Pp_NV2ukmZIwxlTxW2YBg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MaqwZzGjJ8nhpxbtnuswLw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F57UPxiHLa5jnxb4twodqg.jpeg" /><figcaption>In a Fun Event At Cinnamon Bay Beruwala Hotel , Sri Lanka</figcaption></figure><p>Our annual team building session was a wonderful opportunity for our team to come together, bond, and have some fun. We participated in a variety of team building activities that helped us to improve our communication, trust, and collaboration skills. It was great to see everyone in a different setting and to get to know each other on a more personal level. Overall, the team building session was a great success!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WVlrmAvYWiGZGX3K60LZdQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vg-iqIfJJUG4t0FMRnErlg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GOnUeeq5FlVpripHY0pnZw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JtzHKZmHIKcz1Gd2mXhoJw.jpeg" /><figcaption>At Cinnamon Bay Beruwala , Sri Lanka</figcaption></figure><h3>Best Place To Work</h3><p>Zebra Technologies Sri Lanka is a really good place to learn and work that values its employees and provides them with the resources and support they need to succeed. This includes things like ongoing training and development opportunities, a positive and inclusive culture, and a supportive team of colleagues. The reason why employees love this place because here they have minimum work pressure. Also they encourage work-life balance of their workers and they never asked me to stay awake at night to attend foreign meetings. So definitely this place is a really good place to people who are looking for settle down in their career.</p><h3>Thanks For The Everything</h3><p>I just wanted to take a moment to express my sincerest gratitude for all of your hard work and support during my time at this company. I have truly enjoyed working alongside each and every one of you, and I have learned so much from your expertise and guidance.</p><p>In the end of 2021, Rohan Dehigaspitiyage promoted as country manager of Sri Lanka and he is currently holds country manager position of Zebra Technologies Sri Lanka. He was my manager when i joined Zebra back in 2021 and currently he is working for Zebra Technologies for almost 23 years. Even though he is a very busy person , he always taking care of fellow employees at his best and he is a nice and friendly person to all of us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QszH2oD1xSW82K47mHjzyw.jpeg" /><figcaption>With Country Manager, Rohan Dehigaspitiyage</figcaption></figure><p>Over the past 1.5 years, I have had the pleasure of working with an incredible team of professionals. Not only are my colleagues skilled and knowledgeable in their respective fields, but they are also kind, supportive, and always willing to lend a helping hand. I have learned so much from my workmates and have truly enjoyed collaborating with them on various projects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gyx22ZR7ajif6LCDiOlFTA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NezzKTGCStEmyVOy1hHQTQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c886aID5KtH9HskF8xu5Yw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wHNk_QwoHWr067Vlir0ELQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*APC__E9M6_jJxZFXf_ut1w.jpeg" /><figcaption>Little Memories with Work Mates</figcaption></figure><p>I have always enjoyed spending time with my teammates at the office and finding ways to have fun together. Whether it’s taking a quick break to play a round of table tennis, or just chatting and laughing over lunch, these moments have helped to strengthen our bond as a team and have made coming to work more enjoyable. I am grateful to have such a great group of colleagues and am always looking forward to our next adventure together</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0QR256K5YgzAlufhwtlj8Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n2vYSuiZ_95zuqp-yjWdnw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GcmacwGvF81TEh4QIzWuKA.png" /><figcaption>Remembering Memories</figcaption></figure><p>I am so grateful to have had the opportunity to be a part of such an amazing team, and I will always look back on my time here with fond memories. Thank you all for everything.</p><p>I was overwhelmed with emotion when my teammates presented me with a farewell party and a gift as I left the company. It was a beautifully crafted photo album filled with pictures of all the fun times we had together at the office and heartfelt messages from each and every one of them. I will always treasure this gift and look back on it with memories of my time at the company and the wonderful team that I was a part of.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aYRWmuFPN0Uf45r6lellHA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MrwG_lqj6JvzmkKRiksenQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZEw9c5ejrsBxADDGHiawpA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P7D0pyLpe6IoctuZdTrZAQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-Y5HU1bLQp4Ftt2pA4fUkQ.jpeg" /></figure><h3>Final Thoughts</h3><p>After careful consideration, I have decided to leave from Zebra Technologies in order to pursue a new opportunity that aligns more closely with my long-term career goals. While I have enjoyed my time at this company and have learned a great deal from my colleagues, I feel that this new opportunity will allow me to grow and develop my skills in a way that is not possible in my current role.</p><p>I am grateful for the support and opportunities that I have received during my time at this company, and I will always look back on my time here with fond memories.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=203080c6543f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup a Jenkins Server on Docker]]></title>
            <link>https://medium.com/@mileperuma/setup-a-jenkins-server-on-docker-efc0c322d2f0?source=rss-178db0bb04bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/efc0c322d2f0</guid>
            <dc:creator><![CDATA[Malith Ileperuma]]></dc:creator>
            <pubDate>Fri, 04 Nov 2022 19:15:49 GMT</pubDate>
            <atom:updated>2022-11-04T19:18:17.782Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UANzYCl2zZnKGyyFnbDqDQ.png" /></figure><p>Do you know about the <strong>advantages</strong> of having your Jenkins server on docker?</p><ul><li>Docker provides isolated environment for Jenkins</li><li>Easy installation, configuration, maintenance and scalable</li><li>Higher density and run more workloads</li></ul><p>Do you know that you can run your Jenkins server on docker? <strong>Using these simple steps, you can achieve your task.</strong></p><h3>Prerequisites</h3><p>To start off with this process, you need to have couple of things,</p><ol><li>Docker</li><li>Docker-compose</li></ol><p>Follow this <a href="https://docs.docker.com/engine/install/">Link</a> for installing docker on your server.</p><p>To <strong>verify</strong> your installation</p><pre>docker --version <br>docker-compose --version</pre><h3>Let’s Write Docker Compose File</h3><p>First you need to create a <strong>docker-compose.yml</strong> file.</p><pre>touch docker-compose.yml</pre><h3>Create SSL certificate (Optional)</h3><ol><li>First, create a folder in your location (folder name — cert)</li></ol><p>2. Go to the directory and execute,</p><pre>keytool -genkey -keyalg RSA -alias jenkins -keystore jenkins.jks -validity 90 keysize 2048</pre><p>3. Enter your password for the keystore</p><p>4. Provide requested details such as name, domain name and etc</p><h3>Create Docker Compose File</h3><p>In our <strong>docker-compose.yml</strong> file</p><pre>version: &#39;3.8&#39; <br>services:  <br>  Jenkins:   <br>    image: jenkins/jenkins:lts   <br>    container_name: jenkins-docker   <br>    restart: always   <br>    privilaged: true   <br>    user: root   <br>    ports:    <br>      - 8080:8080    <br>      - 50000:50000   <br>    volumes:    <br>      - ./jenkins_home:/var/jenkins_home    <br>      - ./cert/jenkins.jks:/var/lib/jenkins/jenkins.jks   <br>    environment:    <br>      JENKINS_OPTS: --httpsPort=8080 --httpsKeyStore=/var/lib/jenkins/jenkins.jks --httpKeyStorePassword=password</pre><p><strong>Important Points</strong> -</p><ol><li><strong>image</strong> — Here i’ve used jenkins:lts version. You can specify your version by jenkins:&lt;version&gt;</li><li><strong>container_name</strong> — You can use whatever the name you want here</li><li><strong>restart</strong> — Use always, otherwise your jenkins won’t turn on again after you install a plugin</li><li><strong>ports</strong> — I’ve exposed my container to localhost:8080</li><li><strong>JENKINS_OPTS</strong> — Here you can pass jenkins arguments (I defined https port , httpsKeyStore and httpKeyStorePassword)</li></ol><p>To <strong>run</strong> this compose file,</p><pre>docker-compose up -d</pre><p>To <strong>verify</strong> your jenkins container run,</p><pre>docker ps</pre><p>Now you will see your <strong>jenkins container </strong>is <strong>up and running</strong></p><p><strong>Other Commands</strong></p><pre>docker-compose down (stop compose) <br>docker-compose restart (restarting compose)</pre><p><strong>Reference</strong></p><ol><li><a href="https://hub.docker.com/_/jenkins">https://hub.docker.com/_/jenkins</a></li><li><a href="https://www.jenkins.io/doc/book/installing/docker/">https://www.jenkins.io/doc/book/installing/docker/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=efc0c322d2f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enable Multiple i2c Ports on Raspberry Pi]]></title>
            <link>https://medium.com/@mileperuma/enable-multiple-i2c-ports-on-raspberry-pi-5a8807471737?source=rss-178db0bb04bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a8807471737</guid>
            <dc:creator><![CDATA[Malith Ileperuma]]></dc:creator>
            <pubDate>Sat, 01 Oct 2022 18:25:13 GMT</pubDate>
            <atom:updated>2022-10-01T18:58:35.839Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s checkout how to enable i2c protocol and configure multiple i2c devices on raspberry pi</p><h4>Introduction</h4><p>In some scenarios we need to setup multiple sensor modules into raspberry pi to interact with multiple modules. But in default, raspberry pi boards are do not come with i2c interface pre-enabled and if we want to enable i2c interface, we need to change the board configurations.</p><p>In this post, I will be discussing how to enable i2c communication in Raspberry pi and configure multiple i2c ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vQIT91pFNgLSYWauogivwg.jpeg" /></figure><h4>What is I2c ?</h4><p>i2c is a famous , well known communication protocol when it comes to micro-controllers. The advantage of i2c is that it allows us to establish connections and communication in between multiple modules by using only Serial Data Line (SDA) and Serial Clock Lines (SCL)</p><h4>Enable i2c Interface In Raspberry Pi</h4><p>Let’s look at how to enable i2c interface in raspberry pi in detail.</p><p>Before we start, Let’s upgrade the package and install some essential libraries.</p><pre>sudo apt-get update <br>sudo apt-get install -y python-smbus i2c-tools libi2c-dev vim</pre><p>Let’s run this command to get Raspberry pi configuration management tool</p><pre>sudo raspi-config</pre><p>Then select Interface Options → i2c</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*fOxbEfcSvNDiZOil.png" /></figure><p>Then Click on Yes when it prompted to enable i2c interface</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*5WKkF6t8liaDY7Qm.png" /></figure><p>Finally , Select Yes and Reboot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*kEhzBwAO-saMR6Sw.png" /></figure><p>Now you have successfully enabled i2c interface on your raspberry pi. Let’s look at how to configure multiple i2c connections on Raspberry pi with these simple steps</p><h4>Ports</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/0*SYxWnAH49Wg8UxRJ" /></figure><p>you can simply run following command to list your i2c</p><pre>sudo i2cdetect -l</pre><h4>Enabling Multiple I2c</h4><p>Let’s have a look at how to edit config.txt file to enable multiple i2c ports</p><p>First you need to navigate to root , and then type</p><pre>sudo vim boot/config.txt</pre><p>Then add your configuration to config.txt. In my case,</p><pre>dtparam=i2c_arm=on #add after this line <br>dtoverlay=i2c-gpio,bus=4,i2c_gpio_sda=8,i2c_gpio_scl=9 dtoverlay=i2c-gpio,bus=5,i2c_gpio_sda=12,i2c_gpio_scl=13 dtoverlay=i2c-gpio,bus=6,i2c_gpio_sda=22,i2c_gpio_scl=23</pre><p>Finally, Let’s restart the Raspberry pi. (Make sure you save the file before you exit.)</p><pre>sudo reboot -h now</pre><h4>Testing the Port</h4><p>you can simply test your new port by typing following command. (bus → 4/5/6)</p><pre>sudo i2cdetect -y [bus]</pre><p>you will get a response like,</p><pre>0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f <br>00:          -- -- -- -- -- -- -- -- -- -- -- -- -- <br>10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <br>20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <br>30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <br>40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <br>50: -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- -- <br>60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <br>70: -- -- -- -- -- -- -- --</pre><h4>Test multiple i2c modules</h4><p>In this example, I will add 3 mpu6050 modules to Raspberry pi to show sensor readings.</p><p><strong>Diagram</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wcd7aD9irOfzvClWmoJG9w.jpeg" /><figcaption>sensor wiring diagram</figcaption></figure><p>Here i have 3 mpu6050 modules labeled as A B and C connected to different i2c ports on Raspberry pi.</p><p><strong>Pinout</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*fhnuMeh5GgZO-TUVefHFjw.png" /><figcaption>pinout</figcaption></figure><p><strong>Installing mpu6050 Library</strong></p><p>There are two ways of installing mpu6050 library on raspberry pi. In here i will be installing it using PyPi repository.</p><p>To install that run, (use pip3 if you’re using python3)</p><pre>pip install mpu6050-raspberrypi</pre><p><strong>Example Code</strong></p><p>run this example code to check your sensors</p><pre>from mpu6050 import mpu6050 <br>mpuA = mpu6050(0x68, bus=5) <br>mpuB = mpu6050(0x68, bus=4) <br>mpuC = mpu6050(0x68, bus=6)  </pre><pre>while True:  <br>     accel_data_mpuA = mpuA.get_accel_data()  <br>     print(&quot;Acceleration mpuA X -&gt; &quot; +str(accel_data_mpuA[&#39;x&#39;]))<br>     print()   </pre><pre>     accel_data_mpuB = mpuB.get_accel_data()  <br>     print(&quot;Acceleration mpuB X -&gt; &quot; +str(accel_data_mpuB[&#39;x&#39;]))<br>     print()   </pre><pre>     accel_data_mpuC = mpuC.get_accel_data()  <br>     print(&quot;Acceleration mpuC X -&gt; &quot; +str(accel_data_mpuC[&#39;x&#39;]))    <br>     print()   <br>     <br>     print(&quot;------------&quot;)</pre><h4>Final Thoughts</h4><p>to conclude, it is possible to have other methods as well, like there are couple of alternatives to use multiple i2c devices such as having multiple devices in same port. Or we can use multiplexers to implement this. However, now you can use some other ports to connect your i2c devices to work with.</p><h4>References</h4><p>[1] <a href="https://github.com/m-rtijn/mpu6050">https://github.com/m-rtijn/mpu6050</a></p><p>[2] <a href="https://forums.raspberrypi.com/viewtopic.php?t=205576">https://forums.raspberrypi.com/viewtopic.php?t=205576</a></p><p>[3] <a href="https://forums.raspberrypi.com/viewtopic.php?t=244947">https://forums.raspberrypi.com/viewtopic.php?t=244947</a></p><p>[4] <a href="https://forums.raspberrypi.com/viewtopic.php?t=271200">https://forums.raspberrypi.com/viewtopic.php?t=271200</a></p><h4>LinkedIn</h4><p><a href="https://www.linkedin.com/in/malith-ileperuma-8a6a97167/">https://www.linkedin.com/in/malith-ileperuma-8a6a97167/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a8807471737" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Test Ansible on Docker]]></title>
            <link>https://medium.com/@mileperuma/how-to-test-ansible-on-docker-13670d6ff83c?source=rss-178db0bb04bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/13670d6ff83c</guid>
            <dc:creator><![CDATA[Malith Ileperuma]]></dc:creator>
            <pubDate>Thu, 22 Sep 2022 13:31:35 GMT</pubDate>
            <atom:updated>2022-09-22T18:11:14.071Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*QNJ-ykhGECaGAwV3xF5dDw.png" /></figure><h4><strong>Introduction</strong></h4><p>Do you know how to test Ansible with docker container which are act as remote host? In this article i’m going to cover each and every step that you need to know about testing Ansible with your local docker containers.</p><p>Let’s understand how ansible works. Ansible is a configuration management tool which is widely use in technical industries to automate their work such as provisioning infrastructure and etc. Ansible works by connecting to remote nodes over SSH connection by default and send small scripts which includes all the steps and we called them as an ‘Ansible Playbook’</p><p>Let’s check what we need to test our Ansible with Docker containers</p><p>Here i use Linux RHEL machine as my workstation and i’m going to use an ubuntu docker containers as my remote host. So here i test ansible on this local docker container which is running on my workstation.</p><h4><strong>Generate SSH Key Pair</strong></h4><p>First you need to generate SSH key pair using <strong>ssh-keygen</strong> tool</p><p>Here you can select the type of keys as you wish (Ex — <strong>dsa , ed25519 , rsa , ecdsa-sk and etc</strong>)</p><pre>ssh-keygen -t rsa -C &quot;ansible docker&quot;</pre><p>Also you can give any description to identify your key with<strong> -C</strong> option</p><pre>Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): /tmp/ansible/docker-ansible Enter passphrase (empty for no passphrase): <br>Enter same passphrase again: <br>Your identification has been saved in /tmp/ansible/docker-ansible. Your public key has been saved in /tmp/ansible/docker-ansible.pub The key fingerprint is: SHA256:XOEobwefwefnwefwmiwopmqmqbjmnqoeutycbqkwcqhnwk ansible docker The key&#39;s randomart image is:</pre><p>Now you have your private and public keys in /tmp/ansible directory</p><h4><strong>Build Docker Image</strong></h4><p>Now we have to build a docker container which we are going to use as our remote host. So i’m using this Dockerfile to build a container</p><pre>FROM ubuntu:latest </pre><pre># Update package and install openssh-server and sudo <br>RUN apt update &amp;&amp; apt install openssh-server sudo -y </pre><pre># Create a user “sshuser” and provide sudo privilages <br>RUN useradd -ms /bin/bash -g root -G sudo -u 1000 sshuser </pre><pre># Set password for sshuser account <br>RUN echo &#39;sshuser:sshuser&#39; | chpasswd </pre><pre># Create sshuser directory in home <br>RUN mkdir -p /home/sshuser/.ssh </pre><pre># Copy the ssh public key in the authorized_keys file. The docker-ansible.pub below is a public key file you get from ssh-keygen. They are under ~/.ssh directory by default. <br>COPY docker-ansible.pub /home/sshuser/.ssh/authorized_keys<br> <br># change ownership of the key file. <br>RUN chown sshuser:root /home/sshuser/.ssh/authorized_keys &amp;&amp; chmod 600 /home/sshuser/.ssh/authorized_keys </pre><pre># Start SSH service <br>RUN service ssh start </pre><pre># Expose docker port 22 EXPOSE 22 <br>CMD [&quot;/usr/sbin/sshd&quot;,&quot;-D&quot;]</pre><p>In this dockerfile , we need to enable SSH in a container. So to enable SSH , we need to pre-configure our docker image with OpenSSH server. Also i added a user called ‘sshuser’ and gave sudo permission to this user and set password as ‘sshuser’. Also, I copied that <a href="http://docker-ansible.pub/">docker-ansible.pub</a> key to container and started ssh service and now we are good to go</p><p>So currently my folder structure look like (tmp/ansible)</p><pre>- docker-ansible <br>- docker-ansible.pub <br>- Dockerfile</pre><p>Let’s build our docker image with this command</p><pre>docker build -t docker-host .</pre><p>Now we have our base image call docker-host</p><p>Let’s build our <strong>Container</strong> which we are going to use as our remote host</p><pre>docker run -d -it --name docker-host-1 -p 2021:22 docker-host</pre><p>To check your container status you can run,</p><pre>docker ps</pre><p>so now our container is running on <strong>local port [2021]</strong></p><p><strong>You can check ansible with,</strong></p><pre>ansible --version</pre><p>Let’s create inventory and ansible.cfg files. To create these files,</p><pre>touch inventory ansible.cfg</pre><p>We could expose SSH on 127.0.0.1 with different port for each container, but Ansible does not see the difference between 127.0.0.1:2021 and 127.0.0.1:22to overcome this issue we would have to set ansible_port for each target</p><h4><strong>Inventory File</strong></h4><p>Let’s add our remote host details to inventory files</p><pre>127.0.0.1 ansible_port=2021 ansible_user=sshuser<br>ansible_ssh_private_key_file=~/../tmp/ansible/docker-ansible</pre><h4><strong>Ansible Configuration File</strong></h4><p>Let’s add configurations to ansible.cfg file</p><pre>[defaults] <br>inventory = inventory</pre><h4><strong>Folder Structure</strong></h4><p>This is how my folder structure looks like</p><pre>- docker-ansible <br>- docker-ansible.pub <br>- Dockerfile <br>- inventory <br>- ansible.cfg</pre><p>Important — By default , there is /etc/ansible/ansible.cfg file exist in your machine but it overrides by this ansible.cfg file</p><h4><strong>Finally, Let’s check our work</strong></h4><p>we can user below command to ping our host</p><pre>ansible all --key-file docker-ansible -i inventory -m ping</pre><p><strong>Results</strong>,</p><pre>localhost | SUCCESS =&gt; {  <br>   &quot;ansible_facts&quot;: {   <br>         &quot;discovered_interpreter_python&quot; : &quot;/usr/bin/python3&quot;<br>   },  <br>   &quot;changed&quot;: false,  <br>   &quot;ping&quot;: &quot;pong&quot; <br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13670d6ff83c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>