<?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 Tarikbaki on Medium]]></title>
        <description><![CDATA[Stories by Tarikbaki on Medium]]></description>
        <link>https://medium.com/@tarikbaki?source=rss-19bad647cc95------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*LvvVLnHeiT4MhgqkJFXUqA.jpeg</url>
            <title>Stories by Tarikbaki on Medium</title>
            <link>https://medium.com/@tarikbaki?source=rss-19bad647cc95------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 20:24:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tarikbaki/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[End-to-End Observability Implementation using Dynatrace]]></title>
            <link>https://medium.com/@tarikbaki/end-to-end-observability-implementation-using-dynatrace-58d8a3ee170b?source=rss-19bad647cc95------2</link>
            <guid isPermaLink="false">https://medium.com/p/58d8a3ee170b</guid>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[oneagent]]></category>
            <category><![CDATA[dynatrace]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Tarikbaki]]></dc:creator>
            <pubDate>Thu, 30 Apr 2026 16:21:37 GMT</pubDate>
            <atom:updated>2026-04-30T16:21:37.952Z</atom:updated>
            <content:encoded><![CDATA[<p>A case study in designing and implementing end-to-end Dynatrace observability for a fintech platform — covering architecture analysis, OneAgent deployment strategy, Smartscape topology mapping, distributed tracing configuration, Davis AI tuning, and the operational decisions that shaped our monitoring approach.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*stLhF6HA-TWq9GHQzf3IRg.png" /></figure><p>When I joined the platform team, we had a critical problem: our fintech payment platform was growing rapidly, but our visibility into system behavior was not keeping pace. We were losing customer trust with each incident that took hours to resolve. This case study covers how I led the design and implementation of comprehensive Dynatrace observability to solve this.</p><h3>The Platform Context:</h3><p>Cloud-Native Foundation: A fintech payment processing platform built on AWS ECS with 42 containerized microservices handling user authentication, transaction processing, settlement, and reporting. The architecture spans three AWS regions with auto-scaling groups managing 200–800 container instances depending on transaction volume. Services communicate via REST APIs and Apache Kafka event streams, with PostgreSQL and DynamoDB as primary data stores. The platform processes 2M+ transactions daily with peak throughput of 15K requests/second during market hours.</p><h4>The Problem I Inherited:</h4><p>Before implementing Dynatrace, I spent two weeks understanding the current state. Here’s what I found:</p><p><strong>Limited Visibility</strong>- Fragmented monitoring across 42 services with no unified view — teams relied on CloudWatch logs and manual container inspection, averaging 45 minutes to locate issues</p><p><strong>Manual Log Access</strong>- Logs scattered across ECS container instances with no centralized aggregation; developers SSH’d into containers or used CloudWatch Insights with complex queries</p><p><strong>Unknown Dependencies</strong>- No service dependency mapping — a single transaction touched 8–12 services but the call chain was invisible, making root cause analysis nearly impossible</p><p><strong>High MTTR</strong>- Mean Time to Resolution averaged 2.5 hours for production incidents due to lack of distributed tracing and topology visibility</p><p><strong>Noisy Alerting</strong>- CloudWatch alarms generated 200+ false positives daily, causing alert fatigue and missed critical issues</p><blockquote>These weren’t just technical problems — they were business problems. Every incident that took 2.5 hours to resolve meant customer transactions were failing, support tickets were piling up, and our team was burning out on firefighting instead of building features.</blockquote><h4>My Approach</h4><p>Rather than jumping straight to tool implementation, I spent time understanding what we actually needed to monitor. Here’s the framework I used:</p><p><strong>Architecture Analysis</strong>- I mapped all 42 services by hand, traced critical user journeys, and documented dependencies. This wasn’t just for Dynatrace — it was to understand what we were actually building.</p><p><strong>End-to-End Focus</strong>- I decided early that we wouldn’t monitor services in isolation. Every alert had to connect to business impact.</p><p><strong>Signal Quality</strong>- I set a hard target: 95% alert accuracy. False positives destroy trust in monitoring systems.</p><p><strong>Scalable Design</strong>- I designed for 3x growth because I knew we’d hit it within 18 months.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*3RsCht3rP-zAOWt6n-gF8w.png" /></figure><h4>Dynatrace Implementation: The Technical Decisions</h4><p>Deployment Strategy:</p><p>I chose OneAgent v1.268 deployed via ECS DaemonSet for several reasons: automatic instrumentation meant we didn’t need to modify application code, which was critical for rapid rollout; OneAgent’s deep monitoring of HTTP, database, and message queue calls gave us visibility without custom instrumentation; and CloudFormation integration meant deployment was infrastructure-as-code, not manual. I instrumented Node.js (18 services), Java (16), and Python (8) runtimes. The key decision was enabling full-stack monitoring from day one — application, infrastructure, and network layers — because I knew we’d need all three to debug production issues effectively.</p><p><strong>Automatic Discovery</strong>: OneAgent’s auto-discovery found all 42 services and their communication patterns without manual configuration. This was critical because our container IDs changed constantly.</p><p><strong>Distributed Tracing</strong>: I configured Dynatrace to capture every HTTP call and Kafka message, creating a complete trace of each transaction. This meant we could see exactly where latency was happening.</p><p><strong>Smartscape Topology</strong>: Dynatrace’s Smartscape automatically mapped service dependencies in real-time. I used this to validate my manual architecture map and discovered 3 undocumented service dependencies.</p><h4>Davis AI: The Game Changer</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*EMfCWRwzCCkYGObJkdn_iA.png" /></figure><p>After deploying OneAgent, I faced a critical decision: how do we alert on 2.3M metric combinations without drowning in false positives? This is where Davis AI became essential.</p><p><strong>Anomaly Detection</strong>: Instead of setting static thresholds (which I knew would fail), I let Davis AI learn normal behavior for 2 weeks. It discovered that payment-processing latency normally ranges 45–120ms. When it spiked to 800ms+, Davis flagged it automatically. This was powerful because normal behavior changes with time of day and load.</p><p><strong>Root Cause Focus</strong>: The real value of Davis came when transaction failures spiked 15% during peak hours. My first instinct was to blame the payment processor (where the errors appeared), but Davis correlated the issue to database connection pool exhaustion in the settlement service. This saved us hours of investigation.</p><p><strong>Smart Correlation</strong>: Davis reduced our alert volume from 200+ daily false positives to 8–12 actionable alerts by grouping related issues. More importantly, it suppressed cascading alerts — when the settlement service was down, we got one alert about settlement, not 50 alerts from dependent services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*l6a6y7uLQGDOil4kpcpyHg.png" /></figure><h4>Dashboard &amp; Alerting: Designing for Humans</h4><p>Building dashboards and alerts is where observability becomes operational. I made three key decisions here:</p><p><strong>Key Metrics</strong>: I didn’t try to monitor everything. I focused on four metric categories tied directly to business outcomes:</p><p><strong>Latency</strong>: P50 &lt;100ms, P95 &lt;250ms, P99 &lt;500ms for payment processing</p><p><strong>Error Rate</strong>: Target &lt;0.1% for payments, &lt;0.5% for reporting</p><p><strong>Throughput</strong>: Baseline 8K-15K req/s</p><p><strong>Business Metrics</strong>: Transaction success rate and settlement completion time</p><blockquote>I tracked these separately for each of 8 critical user journeys because a slow account-creation flow is different from a slow payment.</blockquote><p><strong>Alerting Philosophy</strong>: I made a deliberate choice: only alert when business SLOs are breached. This meant setting thresholds like “payment processing P95 &gt;250ms for 5+ minutes” or “error rate &gt;0.1% for 2+ minutes.”</p><p>I also made a controversial decision to suppress all dev/staging alerts — we only alert on production. This was hard to defend initially, but it forced teams to test properly before deploying.</p><h4>Cost &amp; Optimization: Making the Business Case</h4><p>Dynatrace isn’t cheap. I had to prove ROI and optimize costs. Here’s what I did:</p><p><strong>Data Collection Refinement</strong>: I disabled collection of low-value metrics — JVM garbage collection details for non-critical services, for example. This reduced data ingestion by 35% (8TB/month to 5.2TB/month) without losing visibility into what mattered.</p><p><strong>Meaningful Metrics Only</strong>: I focused on 40 key metrics per service tied directly to SLOs. I eliminated 200+ vanity metrics that looked good in dashboards but didn’t drive decisions.</p><p><strong>Avoided Duplication</strong>: We already had CloudWatch. I made a strategic decision: Dynatrace for application/service-level observability, CloudWatch for infrastructure cost tracking. This avoided redundant monitoring and made the business case clearer — Dynatrace was paying for itself through faster incident resolution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y4qPBKi1xKx4QcDhN5Xs9w.png" /></figure><h3>Results &amp; What I Learned</h3><p><strong>Improved Visibility</strong>: We went from 45 minutes to locate an issue to 3–5 minutes. I could trace a single transaction through 8–12 service hops with microsecond-level timing. This changed how we debugged.</p><p><strong>Reduced MTTR</strong>: Mean Time to Resolution dropped from 2.5 hours to 18 minutes. More importantly, root cause identification went from 45 minutes of manual investigation to 3–5 minutes of reading a trace. This freed up our team to actually fix things instead of investigating.</p><p><strong>Stable Releases</strong>: We went from 8 rollbacks/month to &lt;1/month. Pre-deployment monitoring checks caught 95% of potential issues before they hit customers. This gave us confidence to deploy more frequently.</p><p><strong>Start Early</strong>: I learned that observability can’t be bolted on. It has to be part of the architecture from day one. If I could go back, I’d have pushed for Dynatrace in the architecture phase, not 6 months into development.</p><p><strong>Align Development</strong>: I created self-service dashboards for each team. Adoption reached 85% of developers within 3 months because they could see their own service’s behavior. This was more powerful than any top-down mandate.</p><p><strong>Define SLOs First</strong>: I made a mistake early by trying to monitor everything. The turning point was defining SLOs first (payment processing P95 &lt;250ms, error rate &lt;0.1%), then building monitoring around those. This forced clarity about what actually mattered.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58d8a3ee170b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Would Stabilize a Payment Platform in 90 Days]]></title>
            <link>https://medium.com/@tarikbaki/how-i-would-stabilize-a-payment-platform-in-90-days-561477a1992f?source=rss-19bad647cc95------2</link>
            <guid isPermaLink="false">https://medium.com/p/561477a1992f</guid>
            <category><![CDATA[site-reliability-engineer]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Tarikbaki]]></dc:creator>
            <pubDate>Sun, 12 Apr 2026 19:45:42 GMT</pubDate>
            <atom:updated>2026-04-15T12:01:04.380Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I Would Stabilize a Digital Payment Platform in 90 Days</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UAUKaYXjF8g1YeaFYhHg_g.png" /></figure><p>A BizOps perspective on operational control, risk reduction and system reliability</p><p>In my first month on the job, three critical incidents occur:</p><ul><li>A database is deleted due to a production mistake</li><li>Management access to the network is completely lost</li><li>A WAF activation introduces a memory leak and destabilizes the system</li></ul><p>At first glance, these look like unrelated technical failures.</p><p>They are not.</p><p>They are different manifestations of the same underlying issue: lack of operational control.</p><h3>The real problem</h3><p>Most teams react to incidents in a predictable way:</p><ul><li>They fix the issue</li><li>They bring the system back up</li><li>They move on</li></ul><p>But this approach only postpones the next failure.</p><p>The system continues to operate without control, and the same risks remain.</p><p>In payment systems, this is not acceptable. Problems do not stay technical. They quickly turn into customer impact and financial loss.</p><h3>My approach</h3><p>I don’t focus on fixing individual incidents.</p><p>I focus on building a system where the same type of incidents cannot happen again.</p><h3>Diagnosis</h3><p>The system is running, but it is not under control.</p><p>That means:</p><ul><li>There is a risk of data loss</li><li>There is a risk of access loss</li><li>There is a high probability of recurring incidents</li></ul><p>And if nothing changes, it is only a matter of time.</p><h3>Root causes</h3><p>Across all three incidents, the same gaps appear:</p><ul><li>Change processes are not standardized</li><li>Production access is not properly controlled</li><li>Observability is insufficient</li><li>There is no defined emergency access path</li></ul><p>This is not a technology problem. It is a discipline problem.</p><h3>Prioritization</h3><p>I do not try to solve everything at once.</p><p>My priorities are clear:</p><ol><li>Eliminate irreversible risks such as data loss</li><li>Ensure access continuity</li><li>Improve system stability and visibility</li><li>Optimize and scale</li></ol><h3>First 30 days: Stop the bleeding</h3><p>The goal is simple: bring the system under control.</p><p><strong>Change control</strong></p><ul><li>No critical production change happens without approval</li><li>Rollback readiness becomes mandatory</li><li>Change windows are defined</li></ul><p><strong>Backup and recovery</strong></p><ul><li>Restore tests are executed regularly</li><li>RTO and RPO are defined and documented</li><li>Point-in-time recovery is enabled where needed</li></ul><p>Backups are not assumed to work. They are proven to work.</p><p><strong>Access continuity</strong></p><ul><li>Out-of-band access paths are configured</li><li>Emergency access procedures are defined and logged</li></ul><p>The system must remain reachable even when primary access fails.</p><p><strong>Incident management</strong></p><ul><li>Incidents are classified (Sev1–Sev3)</li><li>War room is activated for critical cases</li><li>Root cause analysis is mandatory within 72 hours</li></ul><p>At this stage, the goal is not perfection.<br>It is to prevent the next critical failure.</p><h3>30–60 days: Make the system visible</h3><p>Once the immediate risks are contained, the next step is understanding the system.</p><p><strong>Disaster recovery</strong></p><ul><li>Failover is executed, not assumed</li><li>Data consistency is verified</li></ul><p>Tested recovery is the only real recovery.</p><p><strong>Monitoring</strong></p><ul><li>Latency</li><li>Transaction success rate</li><li>Error patterns</li></ul><p>These are tracked as core health indicators.</p><p>If a risk is not visible, it cannot be managed.</p><p><strong>SLO / SLA discipline</strong></p><ul><li>SLA represents the external commitment</li><li>SLO represents the internal target</li><li>Error budgets introduce control over change velocity</li></ul><p><strong>Release discipline</strong></p><ul><li>Pre-production validation becomes mandatory</li><li>Feature flags and canary deployments are introduced</li></ul><p>At this stage, the system becomes measurable and understandable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T2nwma0SL6-4O7qzT-ibVg.png" /></figure><h3>60–90 days: Build resilience</h3><p>With control and visibility in place, the focus shifts to resilience.</p><p><strong>Automation</strong></p><ul><li>Deployment and rollback processes are automated</li><li>Manual intervention is reduced</li></ul><p>This directly reduces human error.</p><p><strong>Testing under stress</strong></p><ul><li>Controlled stress tests are executed</li><li>System limits are identified before production failures</li></ul><p>Surprises should happen in test environments, not in production.</p><p><strong>Proactive risk management</strong></p><p>Key scenarios are defined:</p><ul><li>Replication lag</li><li>Certificate expiration</li><li>Capacity bottlenecks</li><li>Vendor outages</li></ul><p>Each scenario has:</p><ul><li>A runbook</li><li>A test plan</li></ul><p>The goal is not to eliminate all risk.<br>It is to eliminate unknown risk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*90sSx81T02MD6sBVPNGu2g.png" /></figure><h3>The role of BizOps</h3><p>BizOps is not about doing the work.</p><p>It is about ensuring the work is done correctly and consistently.</p><p>It operates across:</p><ul><li>Engineering and compliance</li><li>DevOps and business teams</li><li>Security and vendors</li></ul><p>Ownership is centralized. Execution is distributed.</p><p>Without clear ownership:</p><ul><li>Incident management becomes fragmented</li><li>Accountability disappears</li></ul><h3>Cost versus risk</h3><p>A common instinct is to start with tools.</p><p>That is usually the wrong starting point.</p><p>Tools without process create noise.</p><p>The correct approach is:</p><ul><li>Identify gaps</li><li>Establish process</li><li>Invest where necessary</li></ul><p>Because the reality is simple:</p><p>A single critical incident in a payment system can cost more than all preventive investments combined.</p><p>This is not a cost discussion.<br>It is a risk decision.</p><h3>What success looks like</h3><p>After 90 days, the system is not just operational.</p><p>It is:</p><ul><li>Controllable</li><li>Measurable</li><li>Predictable</li></ul><p>Key improvements include:</p><ul><li>Reduced incident recovery time</li><li>Lower failure rates</li><li>Verified disaster recovery capability</li><li>Documented and auditable processes</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YyWbbiIf4ILsqSS8facyaA.png" /></figure><h3>Final thought</h3><p>The goal is not to fix incidents.</p><p>The goal is to build a system where similar incidents do not happen again.</p><p>In payment systems, problems do not start as technical issues.</p><p>They are felt by customers.</p><p>And by the time customers feel them, it is already too late.</p><p>If you were stepping into this role, what would you prioritize in the first 30 days?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=561477a1992f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[İlk 90 Günde Bir Dijital Ödeme Platformunu Nasıl Kontrol Altına Alırım?]]></title>
            <link>https://medium.com/@tarikbaki/i%CC%87lk-90-g%C3%BCnde-bir-dijital-%C3%B6deme-platformunu-nas%C4%B1l-kontrol-alt%C4%B1na-al%C4%B1r%C4%B1m-e65c24e32a87?source=rss-19bad647cc95------2</link>
            <guid isPermaLink="false">https://medium.com/p/e65c24e32a87</guid>
            <category><![CDATA[bizops]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[payments]]></category>
            <category><![CDATA[operations]]></category>
            <dc:creator><![CDATA[Tarikbaki]]></dc:creator>
            <pubDate>Sun, 12 Apr 2026 19:37:01 GMT</pubDate>
            <atom:updated>2026-04-15T11:49:40.924Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>BizOps Manager perspektifiyle gerçek bir senaryo</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UAUKaYXjF8g1YeaFYhHg_g.png" /></figure><h3>Problem: 3 Olay, 1 Kök Neden</h3><p>Bir ödeme platformunda işe başladığımı düşünelim.</p><p>İlk ayda üç kritik olay yaşanıyor:</p><ul><li>Production’da yanlış disk seçimi → veritabanı siliniyor</li><li>Network tarafında erişim tamamen kayboluyor</li><li>WAF sonrası memory leak → sistem destabilize oluyor</li></ul><p>İlk bakışta bunlar ayrı problemler gibi görünüyor.</p><p>Ama aslında değil.</p><p>Bunlar <strong>aynı problemin farklı yansımaları</strong>.</p><blockquote><em>Kontrolsüz operasyon.<br>Eksik değişiklik yönetimi.<br>Zayıf operasyon disiplini.</em></blockquote><h3>Teşhis: Sistem Çalışıyor Ama Kontrol Altında Değil</h3><p>Bu platformda asıl sorun teknik değil.</p><p>Sistem çalışıyor. Ama güvenli değil.</p><p>Kontrol mekanizmaları yoksa:</p><ul><li>veri kaybı olur</li><li>erişim kaybı olur</li><li>incident’lar tekrar eder</li></ul><p>Ve bu sadece zaman meselesidir.</p><h3>Kök Neden</h3><p>Bu üç olayın ortak noktası:</p><ul><li>Change governance eksik</li><li>Production access kontrolsüz</li><li>Observability yetersiz</li><li>Acil durum senaryosu yok</li></ul><p>Yani problem:<br><strong>“teknoloji” değil, “operasyonel kontrol eksikliği”</strong></p><h3>⚠Öncelik Sırası</h3><p>Her şeyi aynı anda çözmem.</p><p>Öncelik net:</p><ol><li><strong>Veri kaybı (P0)</strong></li><li><strong>Erişilebilirlik (P1)</strong></li><li><strong>Stabilite (P2)</strong></li><li><strong>Optimizasyon (P3)</strong></li></ol><p>Önce geri dönüşü olmayan riski kapatırım.</p><h3>Faz 1: İlk 30 Gün — Stabilizasyon</h3><p>Amaç: <strong>Kontrolsüz operasyonu durdurmak</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sxapDNL84Q9GUmh_aOT0LA.png" /></figure><h3>Change Control</h3><ul><li>Tüm production değişiklikleri çift onaylı</li><li>rollback zorunlu</li><li>change window tanımlı</li></ul><p>kontrol yoksa risk vardır</p><h3>Backup &amp; Recovery</h3><ul><li>restore testleri yapılır</li><li>RTO / RPO netleştirilir</li><li>point-in-time recovery kurulur</li></ul><p>backup varsa yetmez<br><strong>çalıştığını bilmelisin</strong></p><h3>Access Continuity</h3><ul><li>out-of-band erişim kurulur</li><li>emergency access tanımlanır</li><li>runbook yazılır</li></ul><p>sistem çökerse kör kalmamalısın</p><h3>Incident Modeli</h3><ul><li>Sev1–Sev3 sınıflandırma</li><li>war room</li><li>72 saat içinde RCA</li></ul><p>incident çözülür<br>ama asıl hedef: tekrar etmemesi</p><h3>Faz 2: 30–60 Gün — Görünürlük</h3><p>Amaç: <strong>Sistemi anlamak</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vDWjUUC1YHw5VWQAR9rnww.png" /></figure><h3>DR Readiness</h3><ul><li>failover test edilir</li><li>DB consistency kontrol edilir</li></ul><p><strong>Test edilmeyen DR, DR değildir</strong></p><h3>Monitoring</h3><ul><li>latency</li><li>transaction success rate</li><li>error pattern</li></ul><p><strong>Görünmeyen riski yönetemezsin</strong></p><h3>SLO / SLA</h3><ul><li>SLA = müşteriye söz</li><li>SLO = iç hedef</li></ul><p>error budget ile disiplin sağlanır</p><h3>Release Disiplini</h3><ul><li>pre-prod zorunlu</li><li>canary release</li><li>feature flag</li></ul><p>kontrolsüz deploy = risk</p><h3>Faz 3: 60–90 Gün — Dayanıklılık</h3><p>Amaç: <strong>Proaktif yapı kurmak</strong></p><h3>Otomasyon</h3><ul><li>deploy / rollback otomatik</li><li>manuel hata azalır</li></ul><h3>Stres &amp; Chaos Testleri</h3><ul><li>sistem kontrollü zorlanır</li><li>sınırlar ölçülür</li></ul><p>sürpriz production’da yaşanmaz</p><h3>Risk Yönetimi</h3><p>Senaryolar:</p><ul><li>replication lag</li><li>sertifika expiry</li><li>kapasite tıkanması</li><li>vendor kesintisi</li></ul><p>her biri için:</p><ul><li>runbook</li><li>test planı</li></ul><h3>Organizasyon: BizOps Gerçekte Ne Yapar?</h3><p>BizOps bir “yapıcı” rol değildir; <strong>bağlayıcı roldür</strong></p><ul><li>Engineering ↔ Compliance</li><li>DevOps ↔ Business</li><li>Güvenlik ↔ Vendor</li></ul><h3>Rol Tanımı</h3><p><strong>İşi yapmak değil, doğru yapılmasını sağlamak</strong></p><ul><li>ownership BizOps’ta</li><li>execution dağıtılmış</li></ul><h3>Ritim</h3><p>Haftalık:</p><ul><li>Ops review</li><li>Risk review</li><li>Aksiyon takibi</li></ul><p>ownership yoksa yönetim yoktur</p><h3>Maliyet vs Risk</h3><p>İlk refleks:</p><p>❌ tool almak<br>✔ süreç kurmak</p><h3>Yaklaşım</h3><ul><li>önce boşlukları gör</li><li>sonra yatırım yap</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GuzSOrDrf80vgXMNnnkXAQ.png" /></figure><h3>Gerçek</h3><p>Tek bir P0 incident:</p><ul><li>ceza</li><li>müşteri kaybı</li><li>operasyon yükü</li></ul><p>toplam maliyet = tüm yatırımlardan fazla</p><h3>Sonuç</h3><p><strong>Bu plan maliyet değil, sigorta primidir</strong></p><h3>Başarı Kriterleri</h3><p>90 gün sonunda:</p><ul><li>MTTR &lt; 2 saat</li><li>Change failure rate &lt; %5</li><li>DR testleri doğrulanmış</li><li>runbook hazır</li></ul><p>sistem:</p><ul><li>çalışır ✔</li><li>ölçülür ✔</li><li>yönetilir ✔</li></ul><p>Bu planın amacı:</p><ul><li>sadece incident çözmek değil</li><li><strong>incident oluşmayacak bir yapı kurmak</strong></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e65c24e32a87" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Legacy SaaS Modernization Architecture Proposal]]></title>
            <link>https://medium.com/@tarikbaki/legacy-saas-modernization-architecture-proposal-13bdf8a7d3e1?source=rss-19bad647cc95------2</link>
            <guid isPermaLink="false">https://medium.com/p/13bdf8a7d3e1</guid>
            <category><![CDATA[iac]]></category>
            <category><![CDATA[solution-architect]]></category>
            <category><![CDATA[saas]]></category>
            <category><![CDATA[migration]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Tarikbaki]]></dc:creator>
            <pubDate>Thu, 21 Aug 2025 16:03:01 GMT</pubDate>
            <atom:updated>2025-08-21T16:03:01.713Z</atom:updated>
            <content:encoded><![CDATA[<p>CHALLENGE Sparkrock</p><h4><em>Project Github: </em><a href="https://github.com/tarikbaki/SaaS-Modernization-Infrastructure-Automation-Deployment-Pipeline/blob/main/README.md"><strong><em>https://github.com/tarikbaki/SaaS-Modernization</em></strong></a></h4><h4><strong><em>Overview</em></strong></h4><p><em>This blog with git repository contains </em><strong><em>Terraform IaC</em></strong><em> and a </em><strong><em>GitHub Actions pipeline</em></strong><em> to provision and deploy a SaaS application on AWS in a secure, automated, and scalable way.</em></p><p><em>This project enables SaaS companies to accelerate </em><strong><em>**time-to-market**</em></strong><em> by providing an automated, secure, and scalable AWS infrastructure.</em></p><h4><em>Key business benefits:</em></h4><p><em>- </em><strong><em>Faster onboarding &amp; releases</em></strong><em>: GitHub Actions pipeline shortens deployment cycles from days to minutes.</em></p><p><em>- </em><strong><em>Reduced operational risk</em></strong><em>: Rollback and multi-AZ design minimize downtime and service disruption.</em></p><p><em>- </em><strong><em>Cost control</em></strong><em>: NAT, auto-scaling ready subnets, and least-privilege IAM ensure optimized spend without sacrificing reliability.</em></p><p><em>- </em><strong><em>Compliance &amp; security by design</em></strong><em>: TLS (443), secret management via AWS SSM/Secrets Manager, and IAM roles align with SaaS security standards (ISO, PCI-DSS readiness).</em></p><p><em>- </em><strong><em>Customer trust</em></strong><em>: High availability and secure deployments improve end-user confidence and SLA adherence.</em></p><h3>Current State:</h3><ul><li>Monolithic Java app on EC2</li><li>Single MySQL DB at capacity limit</li><li>Manual deployments → 4 hours</li><li>Peak traffic → performance degradation</li><li>$50k/month AWS costs (outdated instances)</li><li>No documentation</li><li>Customer complaints +40%</li></ul><h3>Key Problems</h3><ul><li>Scalability blocked by single DB</li><li>Operational inefficiency (manual deploys)</li><li>High AWS costs</li><li>Customer dissatisfaction</li></ul><h3>Target Architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/0*lec4wY0HMydJ7dhm" /></figure><ul><li>App: Monolith → containerized (Docker + ECS/EKS)</li><li>DB: MySQL → Amazon Aurora (multi-AZ, read replicas)</li><li>CI/CD: Automated deployments (Jenkins/GitHub Actions)</li><li>Caching: Redis/ElastiCache for peak load</li><li>Monitoring: CloudWatch + Centralized Logging</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*gPQH9aszBPvFomsO" /></figure><h3>Migration Phases</h3><p><strong>0–90 days (Quick Wins):</strong></p><ul><li>Modernize EC2 instances (c6g, etc.)</li><li>CI/CD pipeline → deploy time 4h → 15min</li><li>Aurora POC with read replicas</li></ul><p><strong>3–6 months:</strong></p><ul><li>Split critical modules into microservices</li><li>Implement logging &amp; monitoring</li></ul><p><strong>6–12 months:</strong></p><ul><li>Full Aurora migration</li><li>Container orchestration (EKS)</li><li>Performance tuning</li></ul><h3>ROI &amp; Cost Analysis</h3><ul><li>CapEx: ≤ $250k (12 months)</li><li>AWS costs reduced by 20% ($10k/month)</li><li>Deployment speed: 4h → 15min</li><li>Higher customer retention (reduced churn risk)</li><li>ROI visible in first year</li></ul><h3>Risk Mitigation</h3><ul><li><strong>Downtime risk</strong> → Blue/Green + Canary deploys</li><li><strong>Team capacity risk</strong> → Clear phased plan</li><li><strong>Budget risk</strong> → Prioritize DB + CI/CD + infra first</li></ul><h3>Resource Plan (6 engineers)</h3><ul><li>2 × Backend → refactor monolith</li><li>2 × DevOps → CI/CD, containerization, infra-as-code</li><li>1 × DB specialist → Aurora migration</li><li>1 × QA/Automation → testing &amp; rollback</li></ul><h3>Trade-Offs</h3><ul><li>Full microservices = expensive &amp; long-term → phased approach instead</li><li>Serverless ideal but costly now → ECS/EKS is pragmatic</li><li>Focus first on ROI &amp; stability → expand later</li></ul><h3>Executive Summary</h3><ul><li><strong>First 90 days:</strong> Quick Wins (CI/CD, Aurora POC, infra optimization)</li><li><strong>12 months:</strong> Scalable SaaS platform, modern infra</li></ul><h4><strong>Outcome:</strong></h4><ul><li>Performance ↑</li><li>Costs ↓</li><li>ROI achieved</li><li>Customer satisfaction ↑</li></ul><h3>Executive Summary</h3><h4><strong>Executive Summary (Final Delivery)</strong></h4><p>Today our legacy SaaS platform faces three major issues:</p><ol><li><strong>Scalability bottleneck</strong> due to a single MySQL database.</li><li><strong>Operational inefficiency</strong> with manual 4-hour deployments.</li><li><strong>High costs and customer dissatisfaction</strong> — $50k/month AWS bill and a 40% increase in complaints.</li></ol><p><strong>Our modernization plan</strong> is pragmatic and phased:</p><ul><li>In the <strong>first 90 days</strong>, we deliver quick wins:</li><li>Automated CI/CD → reduce deployments from 4 hours to 15 minutes.</li><li>Modernize EC2 instances to cut costs.</li><li>Start Aurora POC with read replicas to address DB bottleneck.</li><li>Over <strong>12 months</strong>, we move to a scalable architecture:</li><li>Containerized services on ECS/EKS.</li><li>Full Aurora migration with multi-AZ resilience.</li><li>Redis caching and centralized monitoring.</li></ul><p><strong>The business outcome is clear:</strong></p><ul><li><strong>20% AWS cost reduction</strong> (~$10k/month savings).</li><li><strong>Faster time-to-market</strong> with reliable deployments.</li><li><strong>Improved customer retention</strong> through better performance and fewer outages.</li><li>All within the approved <strong>$250k budget</strong> and using the existing 6-person team.</li></ul><p><strong>In short:</strong> Within 90 days we’ll show tangible improvements; within 12 months we’ll transform the platform into a modern, cost-efficient, and scalable SaaS solution that supports growth and customer satisfaction.</p><p><a href="/service/mailto:tarikbaki@hotmail.com"><strong>tarikbaki@hotmail.com</strong></a></p><p><a href="https://github.com/tarikbaki/SaaS-Modernization-Infrastructure-Automation-Deployment-Pipeline/blob/main/README.md"><strong>https://github.com/tarikbaki/SaaS-Modernization</strong></a></p><p><a href="https://medium.com/@tarikbaki"><strong>https://medium.com/@tarikbaki</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13bdf8a7d3e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Apache Kafka? A Beginner-Friendly Overview]]></title>
            <link>https://medium.com/@tarikbaki/what-is-apache-kafka-a-beginner-friendly-overview-a32a04783ee3?source=rss-19bad647cc95------2</link>
            <guid isPermaLink="false">https://medium.com/p/a32a04783ee3</guid>
            <dc:creator><![CDATA[Tarikbaki]]></dc:creator>
            <pubDate>Thu, 07 Aug 2025 11:29:32 GMT</pubDate>
            <atom:updated>2025-12-02T10:29:56.436Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, in this article, I’ll explain what Apache Kafka is and what kind of problems it solves. To best explain Kafka, let me take you back to the 90s and explain how the architectures used changed, paving the way for Kafka’s emergence.</p><p><em>(I’ll skip the mainframe era of the ’70s and ’80s for now.)</em></p><p>Data Streaming Case — Runbook<br><a href="https://github.com/tarikbaki/Data-Streaming-Case-Study_2026/blob/main/README.md">https://github.com/tarikbaki/Data-Streaming-Case-Study_2026/blob/main/README.md</a></p><h4>Why Do We Need Kafka?</h4><p>Modern systems rely on <strong>decoupled, scalable, and fault-tolerant</strong> architectures. Whether it’s logging, messaging, or analytics, real-time data flow has become essential.</p><p>Kafka helps by:</p><ul><li>Enabling <strong>event-driven architecture</strong></li><li>Handling <strong>large-scale throughput</strong></li><li>Supporting <strong>microservices communication</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_9b9bx2bSj8Cx2MNkLRgvw.png" /></figure><p>In the 1990s, client-server architectures dominated the software world — a natural evolution from the mainframe era.<br> Applications were typically hosted on central servers, and users accessed them through dedicated software or protocols installed on their local machines..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C0xYodsVEu7Aa0gW_Ov5EQ.png" /></figure><p>These server-side applications were typically <strong>monoliths</strong> — large, tightly-coupled systems where all components lived in a single codebase.<br> This approach worked for a time, but as systems grew, monolithic architectures started to reveal serious limitations in scalability, maintainability, and deployment flexibility.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Trb0IlnKOcYsAndAyL4sg.png" /></figure><p>A <strong>monolith</strong> refers to an application where all components — from the UI to the business logic and data access layer — are bundled together into a single deployable unit.<br> As the internet evolved, computing became cheaper, and businesses demanded faster release cycles, monolithic architectures started falling short.<br> This led to a shift towards <strong>modular</strong>, <strong>independently deployable</strong> components. Among these, <strong>microservices</strong> have become the dominant architectural pattern.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s0Yd_lgW6pgJdPJe6h5Iuw.png" /></figure><p>These services were deployed and operated as distributed components on the same servers.<br> Since a previously unified application was now running in a distributed fashion, new types of challenges started to appear.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h9gdwmfQOj-sQoyVDBEkcQ.png" /></figure><p>How will all these applications communicate with each other?<br> Which protocols should they use — TCP, HTTP, FTP, or UDP?<br> In what format will the data be exchanged?<br> And how will the receiver interpret what the sender is trying to convey?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h9gdwmfQOj-sQoyVDBEkcQ.png" /></figure><p>Today, various data formats are available — XML, JSON, CSV, and more.<br> As the software industry evolves, new requirements and expectations continue to emerge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nyWQEAymmKFX2DeFylKk6w.png" /></figure><p>For example, reporting, analytics, monitoring, auditing — and many other components too numerous to list — began to emerge.<br> Each new component added more connections to the application network.<br> Over time, the architecture became tangled, with components depending on multiple others.<br> What you’re seeing here is a <strong>request-response</strong> design: one component calls another and waits for a response.<br> In some cases, <strong>asynchronous communication</strong> was used — allowing the caller to continue without waiting for a reply.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UlWk7kLK1N6oCxRVcHt1UQ.png" /></figure><p>Consider a customer service company as an example. Its service component interacts with nearly every other component in the system.<br> If even one of those dependent components fails, it can become a <strong>single point of failure</strong>, potentially disrupting the entire network.<br> Let’s walk through a simple real-life scenario to see how this architecture behaves in practice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CJD2rVAadECehANKkwPTfg.png" /></figure><p>Let’s say a customer wants to close their bank account.<br> First, the card is canceled. Then, the account service initiates the closure and transfers any remaining funds to another account by calling a different service.<br> The customer is notified that their account and card have been successfully terminated.<br> Additionally, any active subscriptions are deactivated, and operational tasks like monitoring, auditing, and analytics are triggered as part of the process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EVwzuJ4A2sFRVjP5VQZu6w.png" /></figure><p>As you can see, each component knows about the others — how to call them, and where to find them.<br> In this flow, <strong>Customer Service</strong> plays a critical role. If even one component is unavailable, the entire chain can break down.<br> This level of coupling became unsustainable, leading to the rise of a new architectural style: <strong>Event-Driven Architecture (EDA)</strong>.<br> At the heart of this shift is the <strong>message bus</strong> — a messaging backbone that allows components to communicate <strong>indirectly</strong>.<br> Instead of calling each other directly, services began to interact through the message bus using a concept called <strong>events</strong>.<br> An <strong>event</strong> represents something that has occurred at a specific point in time.<br> Let’s now revisit our earlier example using events and a message bus to see how the flow changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ENWf0HgN7bE24_WRX8_Nqw.png" /></figure><p>This approach also makes the concept of events much clearer.<br> In this example, no component communicates directly with another.<br> The <strong>Customer Service</strong> initiates the process by creating a CloseAccount event, embedding all necessary account details, and publishing it to the message bus.<br> Multiple components are already listening for this event, and as soon as it arrives, they react accordingly.<br> After completing their tasks, each component publishes a new event describing the outcome.<br> For instance, the <strong>Card Service</strong> blocks the card and emits an event like CardBlocked.<br> In this way, all components operate <strong>asynchronously</strong> without being tightly coupled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0jVZSkbnxRZzwvA1Ms5yMw.png" /></figure><p>Downstream operational components also listen to these events and perform their responsibilities accordingly.<br> There are many implementations of the message bus concept, but among them, the most popular, high-performing, and battle-tested one is <strong>Apache Kafka</strong>.<br> So, how does Apache Kafka handle this messaging process?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eaYOJ2CbafEvqFMs59mz_w.png" /></figure><p>In Kafka, messages are sent to structures called <strong>topics</strong> — think of them as labeled mailboxes.<br> Each topic has a name, and multiple components can read from the same topic.<br> When an event is published to a topic, any component subscribed to it immediately picks up the message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EXMiBaWhCRMNKLzYUmFmfQ.png" /></figure><p>For example, in this case, Services E and B read from <strong>Topic 1</strong> and write to <strong>Topic 2</strong>.<br> I won’t go into the technical details of Apache Kafka’s internals like brokers, offsets, partitions, consumers, or producers in this presentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2SqGz-5fuqfJZvy1zoMjFw.png" /></figure><h3>Use Cases:</h3><p><em>Apache Kafka is a </em><strong><em>stream processing platform</em></strong><em>.<br> Events and messages sent to Kafka form a continuous </em><strong><em>stream</em></strong><em>, and Kafka makes it possible to process them efficiently in real time.<br> It is </em><strong><em>open-source</em></strong><em>, released under the Apache 2.0 license, and completely free to use.<br> For enterprise-grade support, advanced tools, or managed cloud services, companies like </em><strong><em>Confluent</em></strong><em> offer commercial Kafka solutions. Confluent is one of the most recognized contributors and supporters of Kafka in the industry.</em></p><p><em>Kafka is a </em><strong><em>fully distributed</em></strong><em> system, designed for high resilience.<br> You can configure </em><strong><em>retention policies</em></strong><em> — for example, keeping data for 30 days or up to 100 GB. When either limit is reached, older events are automatically deleted.<br> Kafka also allows you to set </em><strong><em>replication levels</em></strong><em>. For example, setting a replication factor of 3 ensures that each message is stored on 3 different servers. Even if one or two servers fail, your data remains intact.</em></p><p><em>Kafka is </em><strong><em>highly scalable</em></strong><em> — clusters can consist of hundreds of servers.<br> It is known for its </em><strong><em>exceptional performance</em></strong><em>, capable of handling </em><strong><em>millions of events per second</em></strong><em>.<br> Thanks to its low latency, Kafka enables real-time processing at massive scale.<br> Today, it’s used by many of the world’s largest companies — in fact, it’s hard to find a serious system that doesn’t rely on Kafka in some form.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O13tOsmZoQngEsK7rmpn0A.png" /></figure><p><em>So, what can we do with Apache Kafka? Let’s look at a few real-world examples:</em></p><ul><li><strong>Fraud and anomaly detection</strong>:<br> By capturing every user action on your website as an event in Kafka, you can feed this data into detection systems to identify unusual or suspicious behavior in real time.</li><li><strong>Recommendation engines</strong>:<br> Kafka streams can power systems that provide personalized suggestions to users based on their activity patterns.</li><li><strong>Monitoring and metrics collection</strong>:<br> You can monitor hundreds of servers and services — both hardware and software — by streaming metrics into Kafka for real-time analysis.</li><li><strong>Activity tracking</strong>:<br> Every user action or system event can be captured and stored as an event for auditing, reporting, or behavioral analysis.</li><li><strong>System integration</strong>:<br> As shown in earlier examples, Kafka can act as a glue between distributed systems across your network.</li><li><strong>Real-time streaming</strong>:<br> Naturally, Kafka excels at building <strong>real-time data pipelines</strong>, and many of the above use cases rely on this capability.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rH42-gDJkemtaV8CkcTcnQ.png" /></figure><p><em>Now, let’s take a closer look at two of these use cases.<br> First, imagine we’re building a </em><strong><em>recommendation engine</em></strong><em>.</em></p><p><em>Let’s say we have a news portal that publishes articles across various categories.<br> Every user interaction — such as clicks or article views — is captured and sent to Kafka as an event.<br> This allows us to track exactly which topics each user is interested in.<br> Using this data, we can then generate </em><strong><em>personalized content recommendations</em></strong><em> tailored to each user’s behavior.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nfQx-9LehNIXPEHp7nitpg.png" /></figure><p><em>In other words, we analyze the user’s reading history using </em><strong><em>machine learning</em></strong><em> to generate smart recommendations.<br> These suggestions are stored in a database and served back to the portal via a separate API.</em></p><p><em>Every time the user clicks on a new article, the recommendations are refreshed in real time.<br> And at the heart of all this is </em><strong><em>Apache Kafka</em></strong><em> — the core engine powering the fast and seamless data flow.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dqvyu-WGLGXZtqnR1Ncznw.png" /></figure><p>In another example, let’s say we want to monitor and visualize hardware metrics across all machines in our network.<br> We deploy a small agent on each system that sends <strong>CPU, memory, and disk usage</strong> data to Kafka every second as events.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kZl9JBpcwvmJKf1GEeaDbQ.png" /></figure><p>A separate <strong>monitoring service</strong> listens to all these events from Kafka, analyzes them, and stores the results.<br> It also provides the data to a dashboard through an API for real-time visualization.<br> In this setup, Kafka ensures smooth and reliable data flow — no matter how many servers are involved, everything continues to run seamlessly.</p><h3>Apache Kafka Architecture</h3><p>Kafka is a <strong>distributed messaging system</strong>, which makes it fast, highly scalable, ordered, immutable, and resilient.<br> Let’s start with the key components of Kafka’s architecture. There are four main actors:<br> <strong>Broker</strong>, <strong>Zookeeper</strong>, <strong>Producer</strong>, and <strong>Consumer</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fpRaztrzmATHdlDaqSnk_Q.png" /></figure><p><em>A Kafka cluster consists of one or more </em><strong><em>brokers</em></strong><em>, each with a unique ID.<br> Brokers work together to store and process messages, which are written to </em><strong><em>disk</em></strong><em>, not RAM — ensuring durability and efficient use of system resources.</em></p><p><strong><em>Zookeeper</em></strong><em> is an open-source Apache project that Kafka uses to manage and coordinate brokers.<br> It doesn’t store any of the actual data. Its responsibilities include broker coordination, leader election for partitions, and discovery of new or failed brokers and topics.<br> However, in newer Kafka versions, </em><strong><em>KRaft mode</em></strong><em> (Kafka Raft Metadata mode) eliminates the need for Zookeeper due to its overhead and complexity — making Kafka more lightweight and easier to manage.</em></p><p><em>The </em><strong><em>Producer</em></strong><em> is the component that writes data to Kafka, while the </em><strong><em>Consumer</em></strong><em> reads data from it.<br> For local development, one broker and one Zookeeper instance are enough.<br> But in production environments, you need an odd number of brokers (e.g., 3, 5, or 7) to ensure proper </em><strong><em>replication</em></strong><em> and to prevent </em><strong><em>split-brain</em></strong><em> scenarios — which are critical concerns in distributed systems.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*33SRV2_JcIhlQ4myBbcZOg.png" /></figure><p>Let’s say we have a Kafka cluster with <strong>5 brokers</strong>, as shown here.<br> Now, let’s explain the concept of <strong>replication</strong>.<br> Replication means making copies of data — storing the same data across multiple brokers.<br> In this case, we’ll use a <strong>replication factor of 3</strong>, meaning each piece of data will be stored on <strong>three different brokers</strong> for fault tolerance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-wiwse4nzl3QZuW90bi1vA.png" /></figure><p>First, a blue-colored piece of data arrives, and Kafka replicates it across <strong>three different brokers</strong>.<br> Then, a red-colored data entry is received and also replicated to <strong>three separate brokers</strong>.<br> So far, everything is running smoothly — each piece of data is successfully <strong>replicated three times</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5tW8zcX90dC2sW3o2jYrkg.png" /></figure><p>Suddenly, <strong>Broker 5 crashes</strong>.<br> Since the replication factor is set to 3, Kafka detects the data previously stored on Broker 5 and automatically <strong>re-replicates</strong> it to other healthy brokers.<br> As a result, the system quickly recovers, and everything returns to normal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*In0k-UYAbhMHn4DbqX19bw.png" /></figure><p>Next, <strong>Broker 2 goes down</strong>, and Kafka performs the same recovery process.<br> The cluster self-heals, and all data continues to be stored with <strong>three copies</strong> across the remaining brokers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZVaLsCbqNp_JENOcNwFRZA.png" /></figure><p><em>So what happens if </em><strong><em>Broker 3 also crashes</em></strong><em>?<br> With only two brokers still running, Kafka can no longer maintain a replication factor of 3 — which results in </em><strong><em>replication errors</em></strong><em>.</em></p><p><em>In conclusion, the </em><strong><em>number of brokers must always be equal to or greater than the replication factor</em></strong><em> to ensure system reliability.</em></p><h3><strong>Split Brain</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NjW2fQ6rA5ux-khngHArFw.png" /></figure><p>Now let’s talk about the <strong>split brain problem</strong>.<br> Imagine we have a Kafka cluster with <strong>2 brokers</strong> and a replication factor of 1. Due to a network issue, the connection between the brokers is lost — but the brokers themselves are still running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FV0PEDRV30ipZZPC8hQTyg.png" /></figure><p>Up until that point, the brokers were working in sync.<br> But now, each broker assumes the other has failed and continues to process and write data independently.<br> As a result, <strong>conflicting data</strong> is written since they are no longer synchronized.<br> Eventually, the network issue is resolved and the brokers attempt to reconnect — but now there’s a problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cB7KhT20AedzIg9rTEMPnw.png" /></figure><p><em>Which broker should we trust now?<br> Which one has the </em><strong><em>correct</em></strong><em>, </em><strong><em>most up-to-date</em></strong><em> data?</em></p><p><em>This is exactly where the </em><strong><em>split brain</em></strong><em> problem emerges — as the name suggests, the “brain” splits, and both sides continue operating independently.<br> There are various ways to resolve this, such as using </em><strong><em>revisions</em></strong><em>, </em><strong><em>versions</em></strong><em>, or </em><strong><em>timestamps</em></strong><em>.<br> But the most critical solution is the concept of </em><strong><em>quorum</em></strong><em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PVWUNKNRIewEXJPnbykwdQ.png" /></figure><p><em>A </em><strong><em>quorum</em></strong><em> is the </em><strong><em>minimum number of members</em></strong><em> required to make a group decision valid at any given time.</em></p><p><em>For example, in a company meeting, a quorum refers to the minimum number of attendees needed for the meeting to proceed.<br> Or in football, each team starts with 11 players — but for the match to continue, a team must have </em><strong><em>at least 7 players</em></strong><em> on the field.<br> If a team receives 4 red cards, they still meet the quorum. But after the 5th red card, dropping below 7 players, the game must be stopped — quorum is no longer satisfied.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vtwIRoZEy8WOpEvV5MznJg.png" /></figure><p>The concept of <strong>quorum</strong> in distributed systems works the same way.<br> Let’s say we have a Kafka cluster with <strong>5 brokers</strong>, and the quorum is set to <strong>2</strong>.<br> This means that as long as <strong>at least 2 brokers are active</strong>, the system can continue functioning.<br> Now, suppose 3 brokers go down — with <strong>2 still running</strong>, the quorum is satisfied and the system remains operational.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bYa0VbN-uaDhBscLab4CqA.png" /></figure><p><em>Now imagine this: 3 of your 5 brokers are in a </em><strong><em>Turkey data center</em></strong><em>, and 2 are in the </em><strong><em>US</em></strong><em>.<br> If the connection between the two data centers is lost, what happens?</em></p><p><em>Since the </em><strong><em>quorum is 2</em></strong><em>, both sides independently meet the requirement — Turkey has 3 brokers, the US has 2.<br> This leads to </em><strong><em>two isolated clusters</em></strong><em> continuing to operate in parallel — and that’s a serious problem.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8vVS7vdIFBTh67V6fOBK7w.png" /></figure><p><em>Unfortunately, this results in </em><strong><em>two separate quorums</em></strong><em>, and once again, we’re facing a </em><strong><em>split brain</em></strong><em> situation.<br> So, how do we determine the </em><strong><em>optimal quorum size</em></strong><em> to prevent this?</em></p><p><em>There’s a simple formula for that.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pN-NnE9BXhE4JRE6EOOKJQ.png" /></figure><p><em>The formula is: </em><strong><em>(Total number of servers ÷ 2) + 1</em></strong><em>.</em></p><p><em>For example:</em></p><p>With <strong>3 servers</strong>, the quorum is <strong>2</strong>, so the system can tolerate 1 failure.</p><p>With <strong>5 servers</strong>, the quorum is <strong>3</strong>, allowing up to 2 failures.</p><p>With <strong>7 servers</strong>, the quorum becomes <strong>4</strong>, and the system can handle 3 failures.</p><p><em>That’s why in production, running Kafka with </em><strong><em>at least 3 servers</em></strong><em>, and ideally </em><strong><em>5</em></strong><em>, is considered best practice</em></p><p>In this presentation, I tried to explain not just how Kafka works, but <em>why</em> we need it in the first place.<br> We walked through real-world examples, broke down the architecture, and explored the problems Kafka helps us solve.</p><p>If you’re building systems that require real-time, high-throughput, and resilient data flow, <strong>Apache Kafka is definitely worth considering</strong>.<br> Even just thinking about your architecture from an event-driven perspective can bring valuable insights.</p><p>Thanks for following along — I hope this gave you a clearer picture of what Kafka is and how it fits into modern software systems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a32a04783ee3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Containerizing an ASP.NET Application with Docker on Windows]]></title>
            <link>https://medium.com/@tarikbaki/containerizing-an-asp-net-application-with-docker-on-windows-46723336e489?source=rss-19bad647cc95------2</link>
            <guid isPermaLink="false">https://medium.com/p/46723336e489</guid>
            <dc:creator><![CDATA[Tarikbaki]]></dc:creator>
            <pubDate>Fri, 22 Nov 2024 09:19:00 GMT</pubDate>
            <atom:updated>2024-11-22T09:19:00.816Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>● Explain what Docker containers are and their benefits.</p><p>● Set the context for why containerization is useful for ASP.NET applications.</p><h3>Prerequisites</h3><p>● List the prerequisites for following the tutorial:</p><p>○ <strong>.NET 8+ SDK</strong>: Ensure you have the required .NET SDK installed.</p><p>○ <strong>Docker Community Edition</strong>: Install Docker on your system.</p><p>○ <strong>Working Folder</strong>: Create a temporary working folder (e.g., “docker-working”).</p><h3>Creating the ASP.NET App</h3><ol><li>Create a New .NET Project:</li></ol><p>○ Use the .NET CLI to create a new console application (e.g., “DotNet.Docker”).</p><p>○ Verify that the app runs successfully using dotnet run.</p><ol><li>Modify the App:</li></ol><p>○ Replace the default “Hello World” output with a more meaningful functionality (e.g., a simple web API or MVC app).</p><p>○ Ensure the app loops indefinitely to keep the container running.</p><h3>Creating the Dockerfile</h3><ol><li>What Is a Dockerfile?:</li></ol><p>○ Explain the purpose of a Dockerfile.</p><p>○ Describe how it defines the environment and instructions for building a Docker image.</p><ol><li>Creating the Dockerfile:</li></ol><p>○ Create a new file named “Dockerfile” in your working folder.</p><p>○ Specify the base image (e.g., mcr.microsoft.com/dotnet/aspnet:5.0).</p><p>○ Copy the published .NET app into the container.</p><p>○ Set the entry point to run the app.</p><h3>Building the Docker Image</h3><ol><li>Build the Image:</li></ol><p>○ Use the docker build command to create the Docker image.</p><p>○ Tag the image with a meaningful name (e.g., “my-aspnet-app”).</p><ol><li>Verify the Image:</li></ol><p>○ Confirm that the image was successfully built.</p><h3>Running the Docker Container</h3><ol><li>Run the Container:</li></ol><p>○ Execute the docker run command to start the container.</p><p>○ Map the container port to a host port (e.g., -p 8080:80).</p><ol><li>Access the App:</li></ol><p>○ Open a web browser and navigate to <a href="http://localhost:8080/">http://localhost:8080</a> (or the specified port).</p><p>○ Verify that your ASP.NET app is running inside the container.</p><h3>Conclusion</h3><p>● Recap the benefits of containerization for ASP.NET applications.</p><p>● Encourage readers to explore more advanced scenarios (e.g., multi-container setups, orchestration with Kubernetes).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46723336e489" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Tips & Tricks for Developers]]></title>
            <link>https://medium.com/@tarikbaki/comprehensive-kubernetes-tips-and-tricks-for-developers-95441e0a47da?source=rss-19bad647cc95------2</link>
            <guid isPermaLink="false">https://medium.com/p/95441e0a47da</guid>
            <dc:creator><![CDATA[Tarikbaki]]></dc:creator>
            <pubDate>Fri, 22 Nov 2024 09:15:23 GMT</pubDate>
            <atom:updated>2025-08-07T23:00:04.249Z</atom:updated>
            <content:encoded><![CDATA[<p>Kubernetes is everywhere these days and basically the go-to for managing cloud apps. But just using it isn’t enough — you gotta really understand how it works and what matters when building stuff on it. Here are some key tips you should keep in mind while working with Kubernetes.</p><h3>Get Comfortable with YAML</h3><p>Kubernetes configs are mostly YAML files. Make sure you know the syntax well and double-check with online validators or linters. Also, use kubectl explain to understand what each part means.</p><h3>Optimize Performance</h3><p>Set CPU and memory limits right, keep your container images lean, and use caching where you can. Use profiling tools to find bottlenecks and fix them to make your app run smoother and scale better.</p><h3>Set Up Health Checks</h3><p>Use liveness probes to check if your app is alive — if not, Kubernetes restarts it automatically. Readiness probes tell if your app is ready to handle traffic so users don’t get errors.</p><pre>apiVersion: v1<br>kind: Pod<br>metadata:<br>  labels:<br>    test: liveness<br>  name: liveness-exec<br>spec:<br>  containers:<br>  - name: liveness<br>    image: registry.k8s.io/busybox<br>    args:<br>    - /bin/sh<br>    - -c<br>    - touch /tmp/healthy; sleep 30; rm -f /tmp/healthy; sleep 600<br>    livenessProbe:<br>      exec:<br>        command:<br>        - cat<br>        - /tmp/healthy<br>      initialDelaySeconds: 5<br>      periodSeconds: 5</pre><h3>Use ConfigMaps and Secrets Wisely</h3><p>Store non-sensitive config in ConfigMaps and sensitive data like passwords or tokens in Secrets. This way, you can update configs without rebuilding images.</p><h3>Manage Resources Properly</h3><p>Always set resource requests and limits so Kubernetes can schedule your app properly. It keeps the cluster balanced and prevents apps from hogging resources.</p><h3>Know Kubernetes Networking Basics</h3><p>Learn how Services, Ingress, and Network Policies work. Look into Service Meshes like Istio or Linkerd to improve communication between microservices.</p><h3>Handle Shutdown Gracefully</h3><p>Make sure your containers shut down cleanly so ongoing work finishes and no data is lost.</p><pre>lifecycle:<br>  preStop:<br>    exec:<br>      command:<br>      - /bin/bash<br>      - -c<br>      - sleep 20<br>terminationGracePeriodSeconds: 160</pre><h3>Keep Learning and Stay Connected</h3><p>Kubernetes keeps evolving fast. Follow official blogs, join forums or social media groups, and try out new features in safe environments.</p><h3>Wrap Up</h3><p>Kubernetes is powerful but mastering it takes effort. Use these tips to build more reliable and efficient apps. Keep experimenting and learning — that’s how you really get good.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95441e0a47da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hashicorp Vault HA with Raft]]></title>
            <link>https://medium.com/@tarikbaki/hashicorp-vault-ha-with-raft-0c3249d3a780?source=rss-19bad647cc95------2</link>
            <guid isPermaLink="false">https://medium.com/p/0c3249d3a780</guid>
            <dc:creator><![CDATA[Tarikbaki]]></dc:creator>
            <pubDate>Fri, 22 Nov 2024 09:05:40 GMT</pubDate>
            <atom:updated>2024-11-22T09:05:40.789Z</atom:updated>
            <content:encoded><![CDATA[<p>install and integrate Hashi Corp Vault.</p><h3>Scope of Work</h3><p>The purpose of this document is to outline the resources and installation efforts necessary to install and integrate Hashi Corp Vault.<br> HashiCorp Vault is a secret management system for identity-based encryption.</p><p>A secret is anything that you want to control access to, such as API encryption keys, passwords, and certificates. Vault provides secure encryption services through authentication and authorization. Using Vault’s HTTP UI, CLI or API, access to secrets and other sensitive can be securely stored and managed, controlled, and auditable.</p><h3>Architecture</h3><p>The diagram below shows components of Vault.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*xhevfZnIZpsAtY2BsS1Yog.png" /></figure><p>By default, Vault uses <a href="https://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing">Shamir’s Secret Sharing</a> to split the unseal key into a configured number of shards (key shares or unseal keys). A precise number of shards are required to reconstruct the unseal key, which is then used to decrypt the Vault’s root key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*6J3L0ckAPHA2NESQ09DmbQ.png" /></figure><p>The number of shares and the minimum number of shards required can both be specified. Shamir’s technique can be disabled, and the root key can be used directly for unsealing. Once Vault retrieves the encryption key, it decrypts the data in the storage backend, and enters the unsealed state. Once unsealed, Vault loads the configured audit devices, auth methods, and secrets engines.</p><p>Note: The default Vault configuration uses a Shamir seal; however, Vault can be <a href="https://developer.hashicorp.com/vault/docs/concepts/seal#auto-unseal">auto unsealed</a> by a trusted cloud key management system (KMS) or hardware security module (HSM) to increase security.</p><h3>Seal/Unseal</h3><p>When a Vault server is started, it starts in a sealed state. In this state, Vault is configured to know where and how to access the physical storage, but doesn’t know how to decrypt any of it.</p><p>Unsealing is the process of obtaining the plaintext root key necessary to read the decryption key to decrypt the data, allowing access to the Vault.</p><p>Prior to unsealing, almost no operations are possible with Vault. For example authentication, managing the mount tables, etc. are all not possible. The only possible operations are to unseal the Vault and check the status of the seal.</p><h3>Unsealing</h3><p>The unseal process is done by running vault operator unseal or via the API. This process is stateful: each key can be entered via multiple mechanisms from multiple client machines and it will work. This allows each shares of the root key to be on a distinct client machine for better security.</p><p>Note that when using the Shamir seal with multiple nodes, each node must be unsealed with the required threshold of shares. Partial unsealing of each node is not distributed across the cluster.</p><p>Once a Vault node is unsealed, it remains unsealed until one of these things happens:</p><ol><li>It is resealed via the API.</li><li>The server is restarted.</li><li>Vault’s storage layer encounters an unrecoverable error.</li></ol><p>Note: Unsealing makes the process of automating a Vault install difficult. Automated tools can easily install, configure, and start Vault, but unsealing it using Shamir is a very manual process. For most users Auto Unseal will provide a better experience.</p><h3>Sealing</h3><p>There is also an API to seal the Vault. This will throw away the root key in memory and require another unseal process to restore it. Sealing only requires a single operator with root privileges.</p><p>This way, if there is a detected intrusion, the Vault data can be locked quickly to try to minimize damages. It can’t be accessed again without access to the root key shares.</p><h3>Auto unseal</h3><p>Auto Unseal was developed to aid in reducing the operational complexity of keeping the unseal key secure. This feature delegates the responsibility of securing the unseal key from users to a trusted device or service. At startup Vault will connect to the device or service implementing the seal and ask it to decrypt the root key Vault read from storage.</p><p>Note: The Seal Wrap functionality is enabled by default. For this reason, the seal provider (HSM or cloud KMS) must be available throughout Vault’s runtime and not just during the unseal process. Refer to the <a href="https://developer.hashicorp.com/vault/docs/enterprise/sealwrap">Seal Wrap</a> documentation for more information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*Ya7wZfo1Fx6C1quG0Wv2gg.png" /></figure><p>There are certain operations in Vault besides unsealing that require a quorum of users to perform, e.g. generating a root token. When using a Shamir seal the unseal keys must be provided to authorize these operations. When using Auto Unseal these operations require recovery keys instead.</p><p>Just as the initialization process with a Shamir seal yields unseal keys, initializing with an Auto Unseal yields recovery keys.</p><p>It is still possible to seal a Vault node using the API. In this case Vault will remain sealed until restarted, or the unseal API is used, which with Auto Unseal requires the recovery key fragments instead of the unseal key fragments that would be provided with Shamir. The process remains the same.</p><p>For a list of examples and supported providers, please see the <a href="https://developer.hashicorp.com/vault/docs/configuration/seal">seal documentation</a>.</p><p>Warning: Recovery keys cannot decrypt the root key, and thus are not sufficient to unseal Vault if the Auto Unseal mechanism isn’t working. They are purely an authorization mechanism. Using Auto Unseal creates a strict Vault lifecycle dependency on the underlying seal mechanism. This means that if the seal mechanism (such as the Cloud KMS key) becomes unavailable, or deleted before the seal is migrated, then there is no ability to recover access to the Vault cluster until the mechanism is available again. If the seal mechanism or its keys are permanently deleted, then the Vault cluster cannot be recovered, even from backups. To mitigate this risk, we recommend careful controls around management of the seal mechanism, for example using <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html">AWS Service Control Policies</a> or similar.<br> With Vault Enterprise secondary clusters (disaster or performance) can have a seal configured independently of the primary, and when properly configured guards against some of this risk. Unreplicated items such as local mounts could still be lost.</p><h3>Recovery key</h3><p>When Vault is initialized while using an HSM or KMS, rather than unseal keys being returned to the operator, recovery keys are returned. These are generated from an internal recovery key that is split via Shamir’s Secret Sharing, similar to Vault’s treatment of unseal keys when running without an HSM or KMS.</p><p>Details about initialization and rekeying follow. When performing an operation that uses recovery keys, such as generate-root, selection of the recovery keys for this purpose, rather than the barrier unseal keys, is automatic.</p><h3>Installation Methods</h3><h3>VM Installation</h3><h3>Requirements</h3><h3>Infrastructure</h3><p>● Single Site M8 GB RAM (Minimum)</p><p>○ Full Replication 16 GB RAM (Minimum)</p><p>● Single Site 100 GB disk space (Minimum)</p><p>○ Full Replication 300 GB disk space (Minimum)</p><p>● 2 vCPU</p><p>● This document is based on Ubuntu 22.04</p><h3>Assumptions</h3><p>● TBD</p><p>● infrastructure environment.</p><h3>Install Vault</h3><p>Step 1 — Add PGP for the package signing key. (Ubuntu)</p><blockquote>sudo apt update &amp;&amp; sudo apt install gpg</blockquote><p></p><p>Step 2 — Add the HashiCorp GPG key.</p><blockquote>wget O <a href="https://apt.releases.hashicorp.com/gpg">https://apt.releases.hashicorp.com/gpg</a> | gpg — dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg</blockquote><p></p><p>Step 3 — Verify the key’s fingerprint.</p><blockquote>gpg — no-default-keyring — keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg — fingerprint</blockquote><p></p><p>Step 4 — Add the official HashiCorp Linux repository.</p><blockquote>echo “deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] <a href="https://apt.releases.hashicorp.com/">https://apt.releases.hashicorp.com</a> $(lsb_release -cs) main” | sudo tee /etc/apt/sources.list.d/hashicorp.list Step 5 — Update and install. sudo apt update &amp;&amp; sudo apt install vault</blockquote><p></p><p>Step 5 — Update and install.</p><blockquote>sudo apt update &amp;&amp; sudo apt install vaultStep 5 — Update and install. sudo apt update &amp;&amp; sudo apt install vault</blockquote><p></p><p>Step 6 — Create raft directory</p><blockquote>sudo mkdir /opt/vault/raft<br> sudo chown vault:vault /opt/vault/raft</blockquote><p></p><p>Step 7 — Remove default certificates</p><blockquote>rm /opt/vault/tls/*</blockquote><p></p><p>Step 8 — Create new certificates on node-1 (FOR SELF-SIGNED ONLY)</p><blockquote>cd /opt/vault/tls<br> openssl genrsa -des3 -out rootCA.key 4096<br> openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.crt<br> openssl genrsa -out tls.key 2048</blockquote><blockquote>openssl req -new -sha256 \<br> -key tls.key \<br> -subj “/C=US/ST=CA/O=MyOrg, Inc./CN=*.tr.<strong>company</strong>.local” \<br> -reqexts SAN \<br> -config &lt;(cat /etc/ssl/openssl.cnf \<br> &lt;(printf “\n[SAN]\nsubjectAltName=DNS:*.<strong>company</strong>.local”)) \<br> -out tls.csr</blockquote><blockquote>openssl x509 -req -in tls.csr -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out tls.crt -days 5000 -sha256</blockquote><blockquote>openssl x509 -req -extfile &lt;(printf “subjectAltName=DNS:*.<strong>company</strong>.local”) -days 5000 -in tls.csr -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out tls.crt -sha256</blockquote><p></p><p>Step 9 — Copy CA to node</p><blockquote>scp rootCA.crt /etc/ssl/certs</blockquote><blockquote>cp /opt/vault/tls/rootCA.crt /etc/ssl/certs/<br> update-ca-certificates</blockquote><blockquote>update-ca-trust</blockquote><blockquote>chown root:vault /opt/vault/tls/root*<br> chown vault:vault /opt/vault/tls/tls*</blockquote><p>Move /opt/vault/tls/* to other nodes</p><p></p><p>Step 10 — Edit Vault configuration for each node</p><blockquote>vi /etc/vault.d/vault.hcl</blockquote><p></p><p>Step 11 — Run service</p><blockquote>systemctl enable vault.service<br> systemctl start vault.service<br> systemctl status vault.service</blockquote><blockquote>vault status</blockquote><p></p><h3>Kubernetes Installation</h3><p>Vault works with Kubernetes in various modes: dev, standalone, ha, and external.</p><p>The Vault Helm chart is the recommended way to install and configure Vault on Kubernetes. In addition to running Vault itself, the Helm chart is the primary method for installing and configuring Vault to integrate with other services such as Consul for High Availability (HA) deployments.</p><p>While the Helm chart automatically sets up complex resources and exposes the configuration to meet your requirements, it does not automatically operate Vault. You are still responsible for learning how to monitor, backup, upgrade, etc. the Vault clusters.</p><p>By default, the chart runs in standalone mode. This mode uses a single Vault server with a file storage backend. This is a less secure and less resilient installation that is NOT appropriate for a production setup. It is highly recommended to use HA step for critical workloads.</p><h3>Requirements</h3><p>● Administrative access to OpenShift cluster</p><p>● Internet access to download necessary packages from helm repositories</p><p>● Optional linux jumpbox to use Openshift and helm CLI</p><p>TODO: kubernetes üzerine kurulum adımları eklenecek</p><h3>References:<br> <a href="https://docs.google.com/document/d/1R_PUi00dqxJDCHmhBJpyDtvJmfMsSCoCdEwDIoFfoRQ/edit?usp=sharing">HA Vault with Raft</a></h3><ol><li><a href="https://developer.hashicorp.com/vault/docs/platform/k8s/helm/run#architecture">Running Vault — Kubernetes | Vault | HashiCorp Developer</a></li><li><a href="https://developer.hashicorp.com/vault/docs/platform/k8s/helm/configuration">Helm Chart Configuration | Vault | HashiCorp Developer</a></li><li><a href="https://developer.hashicorp.com/vault/tutorials/recommended-patterns/pattern-centralized-secrets">Recommended pattern for Vault centralized secrets management | Vault | HashiCorp Developer</a></li><li><a href="https://developer.hashicorp.com/vault/tutorials/day-one-consul/deployment-guide">Vault with Consul storage deployment guide | Vault | HashiCorp Developer</a></li><li><a href="https://developer.hashicorp.com/vault/tutorials/day-one-consul/reference-architecture">Vault with Consul storage reference architecture | Vault | HashiCorp Developer</a></li><li><a href="https://docs.openshift.com/container-platform/4.8/applications/working_with_helm_charts/configuring-custom-helm-chart-repositories.html">Configuring custom Helm chart repositories — Working with Helm charts | Building Applications | OpenShift Container Platform 4.8</a></li><li><a href="https://developer.hashicorp.com/vault/tutorials/kubernetes/kubernetes-openshift">Vault installation to Red Hat OpenShift via Helm | Vault | HashiCorp Developer</a></li></ol><p>vault on Redhat:</p><blockquote>sudo su</blockquote><blockquote>sudo yum install -y yum-utils</blockquote><blockquote>yum install -y ca-certificates</blockquote><blockquote>sudo yum-config-manager — add-repo <a href="https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo">https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo</a></blockquote><blockquote>sudo yum -y install vault</blockquote><blockquote>sudo rm -rf /opt/vault/raft/</blockquote><blockquote>sudo mkdir /opt/vault/raft<br> sudo chown vault:vault /opt/vault/raft</blockquote><blockquote># Remove default certificates<br> rm /opt/vault/tls/*</blockquote><p></p><p>cd /opt/vault/tls</p><blockquote>openssl genrsa -des3 -out rootCA.key 4096<br> openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.crt<br> openssl genrsa -out tls.key 2048</blockquote><blockquote>openssl req -new -sha256 \<br> -key tls.key \<br> -subj “/C=US/ST=CA/O=MyOrg, Inc./CN=*.tr.local” \<br> -reqexts SAN \<br> -config &lt;(cat /etc/ssl/openssl.cnf \<br> &lt;(printf “\n[SAN]\nsubjectAltName=DNS:*.tr.local”)) \<br> -out tls.csr</blockquote><blockquote>openssl x509 -req -in tls.csr -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out tls.crt -days 5000 -sha256<br> openssl x509 -req -extfile &lt;(printf “subjectAltName=DNS:*.tr.local”) -days 5000 -in tls.csr -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out tls.crt -sha256</blockquote><p><strong>Copy CA to nodes</strong></p><blockquote><strong>sudo scp -i /tmp/playground_ppk.pem -r /opt/vault/tls/* ec2-user@54.74.250.254:/home/ec2-user/tls</strong></blockquote><blockquote><strong>cd /tls &gt; tls]# cp /home/ec2-user/tls/* .</strong></blockquote><blockquote>cp rootCA.crt /etc/ssl/certs</blockquote><blockquote>chown root:vault /opt/vault/tls/root*<br> chown vault:vault /opt/vault/tls/tls*</blockquote><blockquote>update-ca-trust force-enable</blockquote><blockquote>update-ca-trust extract</blockquote><p>Move /opt/vault/tls/* to other nodes</p><p></p><p><strong>Edit Vault configuration for each node</strong></p><blockquote>vi /etc/vault.d/vault.hcl</blockquote><blockquote></blockquote><blockquote><strong>ui = true</strong></blockquote><blockquote><strong>disable_mlock = true</strong></blockquote><blockquote><strong>cluster_addr = “https://vault1.tr.local:8201&quot;</strong></blockquote><blockquote><strong>api_addr = “https://vault1.tr.local:8200&quot;</strong></blockquote><blockquote><strong>storage “raft” {</strong></blockquote><blockquote><strong>path = “/opt/vault/raft”</strong></blockquote><blockquote><strong>node_id = “vault1”</strong></blockquote><blockquote><strong>retry_join {</strong></blockquote><blockquote><strong>leader_tls_servername = “vault3.tr.local”</strong></blockquote><blockquote><strong>leader_api_addr = “https://vault3.tr.local:8200&quot;</strong></blockquote><blockquote><strong>leader_ca_cert_file = “/opt/vault/tls/rootCA.crt”</strong></blockquote><blockquote><strong>leader_client_cert_file = “/opt/vault/tls/tls.crt”</strong></blockquote><blockquote><strong>leader_client_key_file = “/opt/vault/tls/tls.key”</strong></blockquote><blockquote><strong>}</strong></blockquote><blockquote><strong>retry_join {</strong></blockquote><blockquote><strong>leader_tls_servername = “vault2.tr.local”</strong></blockquote><blockquote><strong>leader_api_addr = “https://vault2.tr.local:8200&quot;</strong></blockquote><blockquote><strong>leader_ca_cert_file = “/opt/vault/tls/rootCA.crt”</strong></blockquote><blockquote><strong>leader_client_cert_file = “/opt/vault/tls/tls.crt”</strong></blockquote><blockquote><strong>leader_client_key_file = “/opt/vault/tls/tls.key”</strong></blockquote><blockquote><strong>}</strong></blockquote><blockquote><strong>}</strong></blockquote><blockquote><strong># HTTPS listener</strong></blockquote><blockquote><strong>listener “tcp” {</strong></blockquote><blockquote><strong>address = “0.0.0.0:8200”</strong></blockquote><blockquote><strong>tls_client_ca_file = “/opt/vault/tls/rootCA.crt”</strong></blockquote><blockquote><strong>tls_cert_file = “/opt/vault/tls/tls.crt”</strong></blockquote><blockquote><strong>tls_key_file = “/opt/vault/tls/tls.key”</strong></blockquote><blockquote><strong>tls_disable = 0</strong></blockquote><blockquote><strong>}</strong></blockquote><p></p><p>/etc/hosts:</p><blockquote>3.250.37.233 vault1.tr.local</blockquote><blockquote>54.74.250.254 vault2.tr.local</blockquote><blockquote>34.243.96.17 vault3.tr.local</blockquote><p></p><p>LB yerine, VIP</p><p><a href="https://blog.yasithab.com/centos/hashicorp-vault-ha-cluster-with-raft-and-aws-kms-on-centos-7/">Setup HashiCorp Vault HA Cluster with Integrated Storage (Raft) and AWS KMS Auto Unseal on CentOS 7 | Blog</a></p><p>API address is pointing F5 load balancer. Only change cluster_addr for current node. Change retry_join addresses for each node.</p><p><strong>export VAULT_ADRR=https://vault-test.tr.local</strong></p><p>export VAULT_ADDR=<a href="https://torus-vault01.tr.asseco-see.local:8200/">https://vault01.tr.local:8200<br> </a>export VAULT_ADDR=<a href="https://torus-vault02.tr.asseco-see.local:8200/">https://vault02.tr.local:8200<br> </a>export VAULT_ADDR=<a href="https://torus-vault03.tr.asseco-see.local:8200/">https://vault03.tr.local:8200</a></p><p>systemctl enable vault.service<br> systemctl start vault.service<br> systemctl status vault.service</p><p>vault status</p><p><strong>Use browser for creating keys and unseal operations for each node.</strong></p><p>Run that command on node-1 for testing quorum. <br> vault operator raft list-peers #Check status of nodes<br> vault operator step-down<br> vault operator raft list-peers #Check new leader and followers</p><p><strong>Import secrets from old server</strong></p><p><a href="https://github.com/jonasvinther/medusa">https://github.com/jonasvinther/medusa</a></p><p>./medusa import vault vault-secrets-nonprod.json -t=”VAULT_TOKEN”</p><p>vault write auth/userpass/users/devops/policies policies=”admin”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*4rypC_zvMuQBRAlGnxY2rg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*Ph6mLFltARb_D8KPZh1aJA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*8WBdYnrQjhw5XIXNKo2ozw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*A4aDhJlN8q0wsKIClWzPuw.png" /></figure><h3>Vault has been initialized! Here are your 3 keys.</h3><p>Please securely distribute the keys below. When the Vault is re-sealed, restarted, or stopped, you must provide at least <strong>2</strong> of these keys to unseal it again. Vault does not store the root key. Without at least <strong>2</strong> keys, your Vault will remain permanently sealed.</p><p>Initial root token</p><p><strong>Initial root token</strong></p><p>hvs.WNQ7ELU3Hf9vlNrrfqgACZcI</p><p><strong>Key 1</strong></p><p>N4I6U+9y7zGxSsXsg4mrMlx/n8AIemAgUEkh5SMpDzs=</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*QuGbMFkcAOdsADF0_o7bAA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*bI7-XWQAzkPeZcm3QaoUKA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0c3249d3a780" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nexus]]></title>
            <link>https://medium.com/@tarikbaki/nexus-84143795e1de?source=rss-19bad647cc95------2</link>
            <guid isPermaLink="false">https://medium.com/p/84143795e1de</guid>
            <dc:creator><![CDATA[Tarikbaki]]></dc:creator>
            <pubDate>Fri, 22 Nov 2024 08:40:06 GMT</pubDate>
            <atom:updated>2024-11-22T08:40:06.103Z</atom:updated>
            <content:encoded><![CDATA[<p>Title: The Power of Sonatype Nexus: A Comprehensive Guide</p><p>Introduction</p><p>In the dynamic landscape of software development, managing dependencies efficiently and securely is paramount. Sonatype Nexus has emerged as a reliable and powerful solution that addresses these concerns. In this blog post, we will explore the capabilities of Sonatype Nexus and how it can revolutionize your software development process.</p><h3>What is Sonatype Nexus?</h3><p>Sonatype Nexus is a repository manager. It serves as a central hub for managing software components, artifacts, and dependencies. Nexus simplifies the process of storing, retrieving, and distributing components, enhancing the efficiency and security of your development pipeline.</p><h3>Key Features and Benefits</h3><p><strong>1. Dependency Management:</strong> Nexus allows you to store and manage dependencies efficiently. This eliminates the need to download dependencies from external sources every time you build your project, reducing build times and enhancing reliability.</p><p><strong>2. Artifact Repository:</strong> It provides a centralized repository for storing and sharing artifacts, making it easy to access and distribute components across your organization. This is especially crucial in larger development teams or organizations with multiple projects.</p><p><strong>3. Security and Compliance:</strong> Sonatype Nexus integrates with various vulnerability databases and provides real-time security scanning for your components. It helps identify and mitigate security risks, ensuring that your software is as secure as possible.</p><p><strong>4. Proxy Repositories:</strong> Nexus can act as a proxy for remote repositories, caching external dependencies locally. This reduces the risk of disruptions caused by external repository downtime and speeds up build processes.</p><p><strong>5. Docker Support: </strong>Sonatype Nexus supports Docker container images, making it an excellent choice for containerized applications. You can store, manage, and distribute Docker images seamlessly.</p><p><strong>6. Fine-Grained Access Control: </strong>With Nexus, you can define granular access controls, ensuring that only authorized users have access to specific artifacts and repositories.</p><p><strong>7. High Availability:</strong> Nexus offers high availability configurations, ensuring that your repository manager remains accessible even during hardware failures or maintenance periods.</p><h3>Types of Nexus Repositories</h3><p>Sonatype Nexus supports various types of repositories tailored to different use cases:</p><p><strong>1. Proxy Repositories: </strong>These repositories act as caches for external repositories, reducing latency when fetching dependencies.</p><p><strong>2. Hosted Repositories: </strong>Hosted repositories are where your organization’s internal artifacts are stored, managed, and published.</p><p><strong>3. Group Repositories: </strong>Group repositories provide a unified view of multiple repositories, making it easy to access artifacts from different sources.</p><h3>How Sonatype Nexus Enhances DevOps</h3><p>Sonatype Nexus is a key component in a DevOps toolchain. Here’s how it contributes to the DevOps philosophy:</p><p>1. Faster Builds: By caching dependencies and artifacts locally, Nexus reduces build times, improving development efficiency.</p><p>2. Enhanced Security: Real-time security scanning ensures that only secure components are used, reducing the risk of vulnerabilities in your software.</p><p>3. Collaboration: Nexus simplifies artifact sharing, enabling teams to collaborate effectively across different projects and departments.</p><p>4. Reliability: High availability configurations ensure that the repository manager is always accessible, minimizing downtime.</p><h3>Sonatype Nexus Installation on Ubuntu</h3><p>[1: Introduction]</p><p>In this tutorial, we’ll guide you through the steps to install Sonatype Nexus Repository Manager on an Ubuntu system.</p><p>[2: Prerequisites]</p><p>Checklist:</p><p>● Ubuntu 18.04 or later installed</p><p>● Java JDK 8 or 11 installed</p><p>● A user with sudo privileges</p><p>[3: Step 1 — Update Ubuntu]</p><p>It is recommended to run an “apt update” to ensure that the system stays up to date with the latest software packages and security updates.</p><p>- Command:</p><p>`sudo apt update &amp;&amp; sudo apt upgrade -y`</p><p></p><p>[4: Step 2 — Install Java]</p><p>To install the JDK, execute the following command, which will also install the JRE</p><p>- Command:</p><p>`sudo apt install openjdk-11-jdk -y`</p><p></p><p>[5: Step 3 — Download Nexus]</p><p>Optional: You can use `wget` or your web browser.</p><p>- Command (Example with `wget`):</p><p>`wget <a href="https://download.sonatype.com/nexus/3/latest-unix.tar.gz%60">https://download.sonatype.com/nexus/3/latest-unix.tar.gz`</a></p><p></p><p>[6: Step 4 — Extract Nexus]</p><p>- Command:</p><p>`tar -zxvf latest-unix.tar.gz`</p><p></p><p>[7: Step 5 — Move Nexus Folder]</p><p>- Command:</p><p>`sudo mv nexus-&lt;version&gt; /opt/nexus`</p><p></p><p>[8: Step 6 — Create Nexus User]</p><p>- Commands:</p><p> — `sudo useradd -m -s /bin/nologin nexus`</p><p>- `sudo chown -R nexus:nexus /opt/nexus`</p><p></p><p>[9: Step 7 — Configure Nexus as a Service]</p><p>- Command:</p><p>`sudo nano /etc/systemd/system/nexus.service`</p><p></p><p>- Service Configuration Example:</p><p> [Unit]</p><p>Description=Nexus service</p><p>After=network.target</p><p>[Service]</p><p>Type=forking</p><p>LimitNOFILE=65536</p><p>ExecStart=/opt/nexus/bin/nexus start</p><p>ExecStop=/opt/nexus/bin/nexus stop</p><p>User=nexus</p><p>Restart=on-abort</p><p>[Install]</p><p>WantedBy=multi-user.target</p><p></p><p>```</p><p>[10: Step 8 — Start and Enable Nexus Service]</p><p>- Commands:</p><p> — `sudo systemctl daemon-reload`</p><p>- `sudo systemctl enable nexus`</p><p>- `sudo systemctl start nexus`</p><p></p><p>[11: Step 9 — Access Nexus Web Interface]</p><p>URL: <a href="http://localhost:8081/nexus">http://localhost:8081/nexus</a></p><p>- Initial Login: admin/admin123 (Change password immediately)</p><p>[12: Conclusion]</p><p>Key Takeaways:</p><p>You’ve successfully installed Sonatype Nexus on your Ubuntu system.</p><p>Customize Nexus settings, create repositories, and integrate it into your development workflow.</p><h3>Nexus Repository 2 to 3 Migration tips</h3><p>The main difference and innovation that we encounter in the version 3 transition is blob stores.</p><p>What is blob storage?</p><p>Blob storage is a form of storage used for storing unstructured data. A ‘blob’ is a binary large object that may not conform to any file format. These masses of data are stored in non-hierarchical data lakes.</p><p>Nexus Repository creates a file blob store named default in the $data-dir directory during installation. Additional blob stores can be configured by navigating to Administration → Repository → Blob Stores in Nexus Repository. Access to this section requires nx-all or nx-blobstore privileges.</p><h3>Migration and compatible versions:</h3><p><strong>Nexus migration from 2.14 to 3.44. To upgrade to nexus 3.5 and higher, you must first upgrade to 2.15, the latest version of version 2. Therefore, since our current environment is 2.14, the highest version we can upgrade to is 3.44. After successfully migrating from 2.14 to 3.44, it is possible to migrate to a stable higher version if needed.</strong></p><p>1- First, enable Upgrade agent under Administration → Capabilities in <strong>Nexus Repository Manager OSS 2.14.17–01.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*pXUolsfuvYdUrnjPC7MbLg.png" /></figure><p>2- You will also see token under status tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*Mrp5slunTsxVDQ15h-byqg.png" /></figure><p>3- Then switch to new Nexus OSS 3.44.0–01</p><p>4- After enabling Upgrade agent in Capabilities in new Nexus3.44, you will see Upgrade function tab left below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*zdmU7qjUj07AfLdvwEzVpw.png" /></figure><p>5- Click upgrade left below. Fill in the URL and Token blanks. Then select which repos to migrate. Then click end.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*jlWAqjcA1RPAdgfcJ9PuOw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*jlWAqjcA1RPAdgfcJ9PuOw.png" /></figure><p>6- Select content from Nexus Repository Manager 2 would you like to transfer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*cZ7bKlQR4209X0qXlJqa7g.png" /></figure><p>7- Select where the repository content should be stored and method how the repository content should be transferred.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*JupwNTCWf5L-ScZB0Z3zvA.png" /></figure><p>8- Select the repositories to be upgraded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*6gVUb_84MYuXXtrG411LTg.png" /></figure><p>9- In new Nexus3, blob storage supports both Hot and Cool access tier while General purpose storage only support Hot access tier.</p><p>10- In the existing Sonatype Nexus Repository instance UI, navigate to Administration → Blob Stores and select the existing unshared blob store that you wish to point to the shared location.</p><p>11- Change the path of your existing blob store to point to the new location if neccesary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*6G4kkmrgwli_fIJGLHhC3w.png" /></figure><p>12- Copy the blobs to the new shared location using one of the tools described above (e.g., rsync copy, vendor-provided tools, etc.)</p><p>13- Blob store is set as below on 500GB.</p><p>Migrating from Nexus Repository Manager 2 to 3 also requires the involved repository managers to use a compatible version of Nexus Repository Manager 2 and 3. Always upgrade to the latest version of Repository Manager 2, before starting the upgrade to Nexus Repository Manager 3. <a href="https://help.sonatype.com/repomanager3/installation/upgrading-from-nexus-repository-manager-2#UpgradingfromNexusRepositoryManager2-Upgradingfrom2.xto3.y">https://help.sonatype.com/repomanager3/installation/upgrading-from-nexus-repository-manager-2#UpgradingfromNexusRepositoryManager2-Upgradingfrom2.xto3.y</a></p><p>For more details see : <a href="https://help.sonatype.com/repomanager3/installation-and-upgrades/upgrading-from-nexus-repository-manager-2/nexus-repository-2-vs.-nexus-repository-3-feature-equivalency-matrix">https://help.sonatype.com/repomanager3/installation-and-upgrades/upgrading-from-nexus-repository-manager-2/nexus-repository-2-vs.-nexus-repository-3-feature-equivalency-matrix</a></p><h3>Conclusion</h3><p>Sonatype Nexus is an invaluable tool for modern software development. It streamlines dependency management, enhances security, and promotes collaboration within development teams. By incorporating Nexus into your development pipeline, you can accelerate your software development process while maintaining the highest standards of quality and security. Embrace the power of Sonatype Nexus and witness the transformation in your software development journey.</p><h3>References:</h3><p><a href="https://help.sonatype.com/repomanager3/">https://help.sonatype.com/repomanager3/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84143795e1de" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On-prem uygulamaların cloud ortama migration süreçleri]]></title>
            <link>https://medium.com/@tarikbaki/on-prem-uygulamalar%C4%B1n-cloud-ortama-migration-s%C3%BCre%C3%A7leri-cde183423042?source=rss-19bad647cc95------2</link>
            <guid isPermaLink="false">https://medium.com/p/cde183423042</guid>
            <dc:creator><![CDATA[Tarikbaki]]></dc:creator>
            <pubDate>Thu, 11 May 2023 19:49:14 GMT</pubDate>
            <atom:updated>2023-05-15T11:08:52.335Z</atom:updated>
            <content:encoded><![CDATA[<p>•Bulut servis sağlayıcıları, genel çerçeve olarak 7R yaklaşımlarını uygularlar.</p><p>1.Değiştir, (Replace)</p><p>2.Yeniden İnşa Et, (Rebuild)</p><p>3.Yeniden Düzenle, (Refactor)</p><p>4.Revize Et,</p><p>5.Rehost Et,</p><p>6.Remain,</p><p>7.Emekli Et” (Retire) olarak tanımlanabilir.</p><p>•Şirketler bir bulut ortamına geçerken, ortamlarına en uygun olan bu yaklaşımlardan dilediklerini kullanabilirler.</p><p>•7 R üç ana kategoride ele alınmaktadır : ‘Yatırım Yap’ , ‘Optimize Et’ ve ‘Yönet’.</p><p>•”Replace, Rebuild, Rehost, Revise, Refactor” <strong>Gartner</strong> tarafından buluta geçişte 5 R olarak tasarlanmıştır.</p><p>•Örneğin Oracle bu 5 R’ ye “Remain” ve “Retire “ı da eklemiştir.</p><ul><li>Aws ise bu yaklaşımı Refactor, Replatform, Repurchase, Rehost, Relocate, Retain, Retire ana başlıklarında değerlendirmektedir.</li></ul><p>•7 R’nin her birine biraz daha detaylı bakalım:</p><p>•’Yatırım’ ile tanımlanan ‘Değiştir’ (Replace): Geçişten sonra uygulamanın bir ‘on-premises’ yerine ‘Software-as-a-Service’ aboneliği ile çalıştırılmasını içerir. Gerekirse PaaS sayesinde, SaaS’ı genişletmek ve ihtiyaçlarınıza göre özelleştirmek için kullanılabilir. Bunu yaparken, uygulama ile ilişkili süreçleri SaaS uyumlu iş akışları olarak değiştirmemiz ve yeniden çalışmamız gerekebilir.</p><p>•</p><p>•’Yatırım’ kategorisinde da tanımlanan ikinci R “Yeniden Oluşturma” dır (Rebuild). “Yeniden Oluşturma “da uygulama bir bulut ortamında sıfırdan oluşturulur ve gerektiğinde diğer bulut hizmetlerine bağlanır.</p><p>•Şimdi de optimizasyon kategorisine geçelim. Bu kategoride ilk R “Rehost “tur. ‘Rehost’ birçok belgede bulunan ‘Lift &amp; Shift’ yaklaşımını ifade eder. Bu yaklaşım bize tanıdık gelmekte ve uygulamayı olduğu gibi IaaS olarak bulut ortamına aktarmaktadır. Yani uygulama ‘on-premise’den yatırılıyor, kaldırılıyor ve bulut ortamına getirilip yatırılıyor dersek anlaşılması daha kolay olabilir. Bulut ortamında bir VM oluşturulur ve uygulama VM’ye yüklenir.</p><p>•’Revize Et‘ başlığında ne yapıyoruz, uygulamayı optimize ediyoruz. Örneğin, versiyonun yükseltebiliriz. Bu şekilde, şirket içinde mevcut olmayan veya şirket içinden daha güncel olan hizmetleri buluttan ekleyebiliriz. Örneğin, bir ‘alışveriş kartı’ işlevi veya kredi kartı ile ödeme olanağı ekleyebiliriz,</p><ul><li>‘Optimizasyon’ un son R’si ‘Refactor’ dür. Bu, ‘Rehost’ ve ‘Revise’in bir kombinasyonu olarak düşünülebilir. Uygulamamızı bulutta ‘yeniden barındırır’ ve bulutun ek işlevlerinden faydalanmak için ‘gözden geçiririz’. Bu şekilde, uygulamayı modernize eder ve uygulamanın işlevselliğini genişletiriz.</li></ul><p>•6. başlığımız, Optimizasyon kategorisindeki ”Remain”:Uygulama olduğu gibi ”on-premises” bırakılabilir. “on-premises” bırakılan bu uygulamayı buluta taşınmış bir uygulama ile entegrasyon gerekiyorsa, performans sorunları olmadan çalıştığından emin olmamız gerekir.</p><ul><li>7.R ise ‘Emekliye Ayırma’dır (Retire). Bir uygulamayı emekliye ayırmamız gereken bir zaman gelebilir. Bu durumda verilerin arşivlenmesi gerekir. Uygulamayı daha sonraki durumlar için arşivleyebiliriz. Örneğin, ‘SaaS’ aboneliği kapsamında satın alınan bir uygulama neticesinde, ‘on-premise’ olan bir uygulamanın emekliye ayrılması olarak düşünülebilir.</li></ul><p>•7R bu şekilde özetlenebilir. Buluta geçiş konusunda bu kadar çok farklı yaklaşım olmasının nedeni, her şirketin her uygulama için farklı stratejileri, ölçümleri ve hatta beklentileri olmasıdır. Bu nedenle, en iyi yaklaşımı belirlemek için buluta geçiş senaryolarının şirkete ve uygulamaya bağlı olarak ‘duruma göre’ değerlendirilmesi gerekir.</p><p>•</p><p>•Uygulamaları bir bulut ortamına taşımanın doğru yolunu belirlemek için kriterler vardır. ‘Dört geçiş hedefi kriteri’ ve ‘uygulamanın anatomisi’, doğru yolun belirlenmesinde önemli faktörlerdir.</p><p>1.Uygulama iş yükü,</p><p>2.Uygulamanın mevcut ekosistemdeki konumu,</p><p>3.Uygulamanın gelecekteki ekosistemdeki konumu,</p><p>4.Buluta geçiş için iş ihtiyacı,</p><p>Uygulamaları buluta taşımaya karar verirken önemlidir.</p><p>•Şimdi ‘dört geçiş hedefi kriterine’ daha yakından bakalım.</p><p>1.İşlevsel sınıflandırma (‘Gartner Pace Katmanlama modeli’),</p><p>2.İstenen kapsam, uygulamanın yaşı,</p><p>3.Özelleştirme karmaşıklığı düzeyi ve</p><p>4.Entegrasyon ihtiyacını içerecek bir SaaS çözümü olup olmadığı.</p><p>•İşlevsel sınıflandırma (‘Gartner Pace Katmanlama modeli’) da sistemin iş ihtiyaçlarına göre üç kategoride analiz edilir:</p><p>1.’kayıt sistemi’,</p><p>2.’farklılaştırılmış sistem’ ve</p><p>3.’yenilikçi sistem’.</p><p>•İşlevsel sınıflandırmaya göre, yukarıdaki veriler uygulamanın SaaS, SaaS+PaaS, PaaS/IaaS, IaaS veya PaaS olarak buluta taşınması gerekip gerekmediğini belirlemek için kullanılabilir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XF3YUx6jyT_izeWd6YMxRg.png" /></figure><p><a href="https://cio-wiki.org/wiki/Gartner%27s_PACE_Layered_Application_Strategy">Gartner&#39;s PACE Layered Application Strategy</a></p><p><strong>AWS müşterileri nasıl geçiş yapıyor? <br> <br> </strong>AWS Cloud Adoption Framework</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q9qDFDQu1rzOT355dJFrcw.png" /></figure><p>AWS, Azure ve Google Cloud olmak üzere 3 bulut platformu adına bulutta Yönetilen Kubernetes Mimarisini inceleyelim. Genel mimarilere karşılık gelen hizmet karşılaştırmaları aşağıdaki tabloda bulunabilir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*75LkcN2_E_2X65YckcsrXg.png" /></figure><p>Cloud ortamdaki uygulamaların monitoring işlemleri ve loglama opsiyonları</p><p>•Bulut izleme, mevcut durumlarını ve herhangi bir anormalliği görmek için belirli kaynakları, kullanıcıları ve günlük dosyalarını doğrudan ölçerek çalışır. Çoğu bulut sağlayıcısı, belirli bir düzeyde izleme sunan ve birçok şirket için başlangıç noktası olabilecek yerleşik platformlara sahiptir.</p><p>•Bu yerleşik gösterge tabloları faydalı olsa da, genellikle olay korelasyonu, proaktif uyarı ve otomatik düzeltme gibi daha gelişmiş özelliklerden yoksundurlar. İkinci bir seçenek de bulut ortamıyla entegre üçüncü taraf araçları kullanmaktır. Bu, bulut altyapısının genel durumu, güvenlik duruşu ve genel sağlığı hakkında daha derin bir içgörü sağlar. Bu araçlar API’ler aracılığıyla entegre edilebilir veya sanal bir konteyner içinde buluta kurulabilir.</p><p>1.Veri Tabanı İzleme (Database Monitoring)</p><p>2.Web Sitesi İzleme (Website Monitoring)</p><p>3.Sanal Ağ İzleme (Virtual Network Monitoring)</p><p>4.Bulut Depolama İzleme (Cloud Storage Monitoring)</p><p>5.Sanal Makineleri İzleme (Monitoring Virtual Machines)</p><p>Cloud ortamdaki uygulamaların monitoring işlemleri ve loglama opsiyonları</p><p>•Bulut kaynaklarının doğru şekilde izlenmesi; maliyetleri tahmin edebilir, kesinti sürelerini önleyebilir ve olası sorunları üretkenliği etkilemeden önce öngörebilir. Her ortam farklıdır ve belirli bir işletme için neyin önemli olduğu değişecektir, ancak genel bulut ortamları mümkün olan en kısa sürede kullanılabilir ve ölçeklenebilir hale getirilmelidir.</p><p>•En populer ve kullanışlı uygulamalar</p><ol><li>Promethues : Opensource, exporter araçlar ile pull ederek çalışan izleme aracıdır. <a href="https://prometheus.io/">https://prometheus.io</a></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*e3xt0MFea7XtUOT1-L0NmQ.png" /></figure><p>2.Jaegar : açık kaynak, uçtan uca dağıtılmış izleme aracı.</p><p>3.NewRelic : Aylık 100 GB request hacmine kadar ücretsiz, log, sentetik, apm, trace izleme hizmeti nar ve mobil cihaz app imkanı ile oldukça pratiktir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*1uZsNGQVzzAa4l2_6D31YA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/329/1*Uy_-NLwVjbbY3n_14v-W4A.png" /></figure><p>●4.ELK — Elastic Search — Logstash — Kibana : Açık kaynak kodlu(Open Source), dağıtık ve ölçeklenebilir büyük verilerde çalışabilen bir uygulamadır. Bigdata ortamlarda içerik arama, veri analizi ve sorgulamaları çok hızlı yapar. . (Ekran görüntüsü, kendi test ortamımdan alınmıştır.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lA09UZ5cNYj31Q4b32Re-w.png" /></figure><p><em>Dağıtık ve ölçeklenebilir büyük verilerde çalışabilen bir uygulamadır.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/196/1*x5ZJE6LCaDhE6dM1HuHc4Q.png" /></figure><p><em>BigData; içerik arama, veri analizi, sorgulamaları çok hızlı yapar.</em></p><p><em>Gerçek zamanlı servis ve uygulama izleme yapar.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*gAIKlZiLyjV9CmLud7z4ew.png" /></figure><p><em>Gelen talepler, veritabanı sorguları, önbellek aramaları, harici HTTP istekleri, cevap verme süresi hakkında ayrıntılı performans bilgileri toplar.</em></p><p><em>İşlem(trancaction) bazlı izleme yapar.</em></p><p><em>Log analizi, Big Data Machine Learning ve Anomali Tespiti yapar.</em></p><p><em>Docker, Kubernetes gibi konteyner yapıları monitor eder.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*5YqXFb7bZ5J7ALrRm4Wg_w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*JkJgVbDFshVH4izEyw-Vug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/384/1*AvixjFvh2V7KYAwUT1e18g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*V6v0YwG-N0Lzc_u_8WY46g.png" /></figure><ul><li>5.Pinpoint <a href="http://naver.github.io/pinpoint/">http://naver.github.io/pinpoint/</a></li></ul><p>6.Jmx_exporter<strong> </strong><a href="https://github.com/prometheus/jmx_exporter">https://github.com/prometheus/jmx_exporter</a></p><p>7.Grafana : Zengin görsel yeteneklere sahip metrik analiz ve görselleştirme aracıdır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*xm1rAuBGxVdh1UNU4SE4Qg.png" /></figure><p>Cloud uygulamaların sürekli ayakta ve çalışır olmasının sağlanması<br> AWS</p><p>EC2 Auto scaling:</p><p>•Amazon EC2 Auto scaling, uygulama kullanılabilirliğinin korunmasına yardımcı olur ve tanımlanan kriterlere göre EC2 bulut sunucularını otomatik olarak ekleyebilir veya kaldırabilir.</p><ul><li>Örneğin, bir sunucunun CPU kullanımı %50&#39;yi aşarsa, iki yeni EC2 sunucusu ekleyebilir ve CPU yükü tekrar %50&#39;nin altına düştüğünde, eklenen bu iki sunucuyu kaldırıp 3 EC2 ile devam edebiliriz.</li><li>•Sanal sunucuları ihtiyaç duyulduğunda başlatma ve ihtiyaç duyulmadığında durdurma, maliyetleri mümkün olduğunca düşük tutarken kaynakların ihtiyaç duyulduğunda kullanılabilir olmasını sağlar. Otomatik kaynak ölçeklendirme, iş yükünü azaltırken sanal sunucuları gerektiği gibi ekler veya kaldırır.</li><li>•Buna ek olarak, esnek bir konfigürasyon seçeneği, sanal sunucu ölçeklendirmesini, kuralları ve eylemleri manuel olarak gerçekleştirmemize olanak tanır.</li><li>•İşletmeler genellikle yoğun ve sessiz dönemler yaşar ve Otomatik Ölçeklendirme bunların hepsini kolaylıkla idare eder — Otomatik Ölçeklendirme ihtiyaçlarımıza uyacak şekilde yapılandırılır ve bir programa göre, periyodik olarak veya alarm ilkelerine göre, sanal sunucuları kaynak gruplarına eklemek veya çıkarmak için yapılandırılabilir.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/165/1*sX_xnnWYVVfL780g87KZRQ.png" /></figure><p>Cloud uygulamaların sürekli ayakta ve çalışır olmasının sağlanması <br> <strong>Auto Scaling</strong></p><p>•Örneğin; HELM kullanarak <strong>Horizontal Pod Autoscaling</strong></p><p>•Kubernetes’te bir HorizontalPodAutoscaler, iş yükünü talebi karşılayacak şekilde otomatik olarak ölçeklendirmek amacıyla bir iş yükü kaynağını (Deployment veya StatefulSet gibi) otomatik olarak günceller.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/105/1*5rHQroHDMakvASVfLvTe5g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/122/1*aH3R2_-EpFZoJC7zfsBYqQ.png" /></figure><p>•Yatay ölçeklendirme, artan yüke verilen yanıtın daha fazla pod ayağa kaldırmak olduğu anlamına gelir. Bu, Kubernetes için zaten iş yükü için çalışmakta olan bölmelere daha fazla kaynak (örneğin: bellek veya CPU) atamak anlamına gelen dikey ölçeklendirmeden farklıdır.</p><p>•Yük azalırdığında, pod sayısı yapılandırılan minimum değerin üzerindeyse HorizontalPodAutoscaler iş yükü kaynağına (Deployment, StatefulSet veya diğer benzer kaynaklar) yeniden ölçeklendirme talimatı verir.</p><p>•Kaynak: <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/">https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/</a></p><p>•Container.d migration yapmak isteyen bir müşterimde, POC amaclı, -<strong>infra as code</strong>- olarak oluşturduğum ortamın terrafrom kodlarıın reposuna aşağıdaki linkten ulaşabilirsiniz.</p><p><a href="https://github.com/tarikbaki/terraform-aws-kube-cluster-ec2/blob/master/Readme.MD">https://github.com/tarikbaki/terraform-aws-kube-cluster-ec2/blob/master/Readme.MD</a></p><p>•Burada; tüm yapı terrafrom ile oluşturulmaktadır. Bir “kube-vpc” networkü içinde oluşturulan 1 resource <strong>“aws_instance” “master” </strong>ve 3 resource “aws_instance” “worker” nodları oluşturulmaktadır.</p><p>•</p><p>module “kube-vpc” {</p><p>source = “terraform-aws-modules/vpc/aws”</p><p>version = “3.2.0”</p><p>name = “kube-cluster-vpc”</p><p>cidr = var.vpc_cidr_range</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*vL2OtztQuCf2d40KhZ_xGw.png" /></figure><ul><li>Var olan ve on prem kullanılan müşteri uygulammamızın analizleri yapmılmış ve container hale getirilmiştir. Bu süreçte aşağıdaki docker file kullanılmıştır : <a href="https://github.com/tarikbaki/terraform-aws-kube-cluster-ec2/blob/master/app/Dockerfile">https://github.com/tarikbaki/terraform-aws-kube-cluster-ec2/blob/master/app/Dockerfile</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/253/1*mMszcfAN2O6RaF9ig-024A.png" /></figure><p>•Yeni yapıdaki container uygulama, bir önceki sayfada kurulan bu kubernetes ortamına taşınmış ve artık Aws’de çalışır hale gelmiştir.</p><p>•</p><p>•Süreçteki tüm aksiyonlar, terraform ile oluşturulmuş, konsoldan manuel hiç bir aksiyon alınmamıştır. Bu sayede oluşturulacak yeni ortamlar için (test, dev, preprod, prod) stabilite sağlanmış ve gelecekte olası yeni bir migration için bile hazır halde olunmasını sağlamıştır.</p><p>•Yine muhtemel yeni ortamlara geçişi kolaylaştırmak için tüm değişkenler, <strong>variables.tf </strong>dosyasında, parametrik halde oluşturulmuştur.</p><p><a href="https://github.com/tarikbaki/terraform-aws-kube-cluster-ec2/blob/master/variables.tf">https://github.com/tarikbaki/terraform-aws-kube-cluster-ec2/blob/master/variables.tf</a></p><ul><li>Build alınan tüm container’lar, versiyonlama ve kontrollü gelişim <strong>için Amazon Ecr </strong>reposunda saklanmış ve tüm canlıya çıkışlar, Ecr reposu üzerinden yapılmıştır.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*YoG_dqcDOhbCx07k0EA08w.png" /></figure><p>••Bu demo sürecinde opsiyonel olarak gözükse de, aslında mutlaka olması gereken <strong>helm</strong> chart ile container pod ve node’ları yönetilebilmektedir.</p><ul><li>Bu sayede hem yeni buildlerde healthy/unhealhty olan podların yönetimi ve takibi, hem auto scaling, hem de Kubernetes ortamında çalışan uygulamalarımızın kaynaklarını (deployment, statefulset, service, ingress vb.) kolayca yönetebilmemizi ve karmaşıklıklardan kurtulmamızı sağlayacaktır.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*8lgImKazvCHE2CSETQ_J0g.png" /></figure><p><a href="https://medium.com/@tarikbaki/on-prem-uygulamalar%C4%B1n-cloud-ortama-migration-s%C3%BCre%C3%A7leri-cde183423042">https://medium.com/@tarikbaki/on-prem-uygulamaların-cloud-ortama-migration-süreçleri-cde183423042</a><br> <br> <a href="https://github.com/tarikbaki?tab=repositories">https://github.com/tarikbaki?tab=repositories</a><br> <br> <a href="https://www.credly.com/badges/b4b71ed5-a1df-41a2-abf3-4ac71bbda0e2/linked_in?t=rrm5i8">https://www.credly.com/badges/b4b71ed5-a1df-41a2-abf3-4ac71bbda0e2/linked_in?t=rrm5i8</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cde183423042" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>