<?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 Shankar Asknani on Medium]]></title>
        <description><![CDATA[Stories by Shankar Asknani on Medium]]></description>
        <link>https://medium.com/@asknanishankar?source=rss-f5eeddb06e31------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*pC-h2rcTrJzia9BpPJfNNw.jpeg</url>
            <title>Stories by Shankar Asknani on Medium</title>
            <link>https://medium.com/@asknanishankar?source=rss-f5eeddb06e31------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 22:12:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@asknanishankar/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[Protocols Every DevOps and Cloud Engineer Should Know]]></title>
            <link>https://medium.com/@asknanishankar/protocols-every-devops-and-cloud-engineer-should-know-d2e94e43dafd?source=rss-f5eeddb06e31------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2e94e43dafd</guid>
            <category><![CDATA[protocol]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[https]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[quantum-encryption]]></category>
            <dc:creator><![CDATA[Shankar Asknani]]></dc:creator>
            <pubDate>Sun, 06 Dec 2026 06:54:05 GMT</pubDate>
            <atom:updated>2026-12-06T07:19:06.782Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UgC-1iekwh2H1ZTZhlf2Wg.png" /></figure><p>Every time you open a website, log in to a server or send an email, computers follow a set of rules called a protocol.</p><p>Think of protocols as the manners computers use to talk to each other safely: who speaks first, how they prove who they are, and how they keep secrets. Some of those manners are old and no longer safe, and a few will break once quantum computers arrive. This complete guide explains the ones every DevOps and cloud engineer meets, <strong>i have extensively listed what are current scenarios on different protocols used as of today and the usage recommendations.</strong></p><h3><strong>TL;DR</strong></h3><blockquote>As a summary, i have tried covering all the widely used protocols and here is what should be used as recommended</blockquote><blockquote><strong>Use now:</strong> TLS 1.3, SSH with Ed25519 keys, HTTP/3 at the edge, SFTP, SNMPv3, DNS over HTTPS or TLS, and certificate renewal automated with ACME.</blockquote><blockquote><strong>Retire now:</strong> SSL, TLS 1.0 and 1.1, SSH version 1, DSA keys, RSA with SHA-1, FTP, Telnet, SNMPv1 and v2c, MD5 and SHA-1.</blockquote><blockquote><strong>Dates to remember:</strong> public certificates shrink to 100 days on 15 March 2027 and 47 days on 15 March 2029. NIST deprecates RSA, ECDSA and Diffie-Hellman after 2030 and disallows them after 2035.</blockquote><blockquote><strong>First step:</strong> list every place you use RSA, ECDSA and old TLS or SSH settings, then make the algorithm a setting you can change, not something written into code.</blockquote><blockquote><strong>The quantum fix:</strong> switch key exchange to hybrid X25519 plus ML-KEM first, because recorded traffic can be cracked later. Signatures (ML-DSA) come second. About 4 in 10 popular sites already offer the hybrid key exchange.</blockquote><p>If you do not understand any of these above listed things, do not worry at all — i have tried to explain in-detail all these with an analogy — which we you will learn. but first lets see the bigger picture and foundations.</p><h3>The big picture: four jobs, one locked box</h3><p>Every protocol in this guide does some mix of the same four jobs. Imagine mailing a birthday present to a friend in another city, through many post offices you do not trust.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xw4eQNVM1JTlvJr77ubFeA.png" /></figure><p>Quantum computers threaten the first and third jobs (the handshake and the ID card). Symmetric encryption, the locked box itself, is considered quantum resistant, so the work ahead is mostly about handshakes and signatures.</p><p>Before we deep dive in protocols, Let us see where is world in 2026 — what are the using to communicate and how.</p><h3>Where the world is in December 2026</h3><ul><li><strong>Key exchange:</strong> Roughly 40% of popular websites already offer hybrid post-quantum key exchange, and a 2026 measurement found 49.3% of domains support it. OpenSSH defaults to it, RHEL 10 ships it in OpenSSL, GnuTLS and NSS, and RHEL 10.2 enables it by default in SSH, including in FIPS mode.</li><li><strong>Signatures and certificates lag:</strong> That same measurement found no hybrid post-quantum certificates at all. Android 17 is adding ML-DSA signatures.</li><li><strong>Merkle Tree Certificates (MTCs):</strong> Post-quantum signatures are big, and a classic certificate chain carries several. Chrome has said it has no immediate plan to add classic post-quantum X.509 certificates to its root store, and is building MTCs with Cloudflare in the IETF’s PLANTS working group instead. Analogy: instead of carrying a thick passport full of stamps, you carry a tiny receipt pointing to a public logbook. Chrome’s plan has a feasibility study underway, then a CA invitation in Q1 2027, then a separate quantum-resistant root store in Q3 2027.</li><li><strong>Deadlines:</strong> NIST’s final IR 8547 deprecates RSA, ECDSA, EdDSA and Diffie-Hellman after 2030 and disallows them after 2035. High-value US federal systems must have post-quantum key establishment by 31 December 2030 and signatures by 31 December 2031.</li></ul><h3>Quantum key distribution (QKD)</h3><p>QKD uses the physics of light sent over special fibre to share keys, with no maths to break. It needs dedicated hardware and short links, so for most cloud and DevOps work the answer is software-based post-quantum cryptography, which runs on ordinary servers. QKD is mostly studied as an extra layer for critical infrastructure, often combined with post-quantum algorithms. For IPsec, RFC 9370 already lets a tunnel mix several key exchanges in one session.</p><h3>The roadmap: the dates that matter</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G18JdBiO7Nh7tPgWrZTcmQ.png" /></figure><p>Vendors move first on ciphers and key types, certificate lifetimes shrink next, and NIST’s cut-offs for RSA and elliptic curves arrive after that. Start with the left side of the line, because it needs automation that the right side will reuse.</p><h3>Cheat sheet: what is dying and what replaces it -</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FjoSJkPU8dJLornjtor8_g.png" /></figure><h3>What to do on Monday the 7th december 2026.</h3><p>Ordered by how soon it bites.</p><ul><li>Scan every public and internal endpoint for TLS 1.0 and 1.1, and for weak TLS 1.2 cipher suites, before your vendors switch them off.</li><li>Move certificate renewal to ACME before 15 March 2027, when public certificates drop to 100 days.</li><li>Replace DSA and RSA-with-SHA-1 SSH keys; use Ed25519 and update OpenSSH so post-quantum key exchange is on.</li><li>Turn off Telnet, FTP and SNMPv1 or v2c on network devices; use SSH, SFTP and SNMPv3 with authentication and privacy.</li><li>Enable TLS 1.3 and hybrid post-quantum key exchange on load balancers, CDNs and ingress, with HTTP/3 where it helps.</li><li>Build an inventory of every place RSA, ECDSA and Diffie-Hellman are used (certificates, JWTs, code signing, VPNs, SSH), with an owner and a date.</li><li>Make algorithm names configuration instead of code, so swapping in ML-KEM and ML-DSA is a change window, not a rewrite.</li><li>Pilot ML-DSA in a private PKI or internal signing path, and wait for FIPS 206 to be final before relying on FN-DSA.</li></ul><p>Each entry below follows the same order:</p><blockquote>a one-line picture, then the analogy, how it works, when you meet it, what is good, what is risky, when it dies and what to use instead. Dates are as of 6 December 2026.</blockquote><h3>* HTTPS and TLS: the armoured truck</h3><p>HTTPS is ordinary web traffic (HTTP) carried inside TLS, Transport Layer Security. SSL is TLS’s old name, and people still say “SSL certificate” for what is really a TLS certificate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OrLTx1wbE-NyxhfbPXPAWA.png" /></figure><ul><li><strong>Analogy:</strong> Sending a gift by armoured truck instead of an open postcard. Everyone sees the truck go by, nobody sees inside, and the receiving house has a name plate checked by a trusted authority.</li><li><strong>How it works:</strong> The browser says hello, the server shows its ID card (a certificate), and both sides agree a one-time secret key. Everything after that is locked with that key. TLS 1.3 needs one round trip for this.</li><li><strong>Used when:</strong> Every website, API call, Kubernetes ingress, service mesh (mTLS, where both sides show an ID card), database and message-queue connection.</li><li><strong>Good:</strong> It hides, verifies and tamper-proofs the traffic. TLS 1.3 removed the broken options and gives forward secrecy, so a stolen key today cannot open yesterday’s recorded traffic.</li><li><strong>Risks:</strong> Expired or mis-issued certificates, old versions and weak ciphers left switched on, plain traffic inside the network after a load balancer ends TLS, and attackers recording today’s traffic to decrypt later once quantum computers arrive.</li><li><strong>End of life:</strong> SSL 2 and 3 are long dead. TLS 1.0 and 1.1 were formally deprecated by the IETF in 2021 (RFC 8996) and are now being switched off by cloud vendors; Azure Storage stopped accepting them in early 2026. TLS 1.2 has no published retirement date and is still the PCI-DSS minimum, but weak TLS 1.2 cipher suites are going: Auth0 removed them in July 2026, Supabase planned the same for 10 November 2026, and Cloudflare lists 1 February 2027 as an end-of-life date for suites without forward secrecy. A late-2026 study found 15.7% of domains still relying on TLS 1.2.</li><li><strong>Use instead:</strong> TLS 1.3 everywhere, with a hybrid post-quantum key exchange (X25519 plus ML-KEM-768). The same study found 49.3% of domains already support it. Certificates are also getting shorter-lived: 200 days since 15 March 2026, 100 days from 15 March 2027, 47 days from 15 March 2029, so automate renewal with ACME.</li></ul><h3>* SSH: the private tunnel to a server’s front door</h3><p>SSH (Secure Shell) lets you log in to a remote machine, run commands, copy files and forward ports, all inside an encrypted tunnel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qlvpiUo-01wxb1nzV4LtqQ.png" /></figure><ul><li><strong>Analogy:</strong> A private underground tunnel from your house to a friend’s house. You also carry a secret key that only fits their lock, so they let you in without asking for a password.</li><li><strong>How it works:</strong> The client and server agree a session key, the server proves its identity with a host key, and you prove yours with a password or, better, a key pair: the server holds your public lock, you hold the private key.</li><li><strong>Used when:</strong> Logging in to Linux servers and network gear, Git over SSH, Ansible and Terraform provisioners, bastion hosts, SFTP and SCP file copies, port-forwarding to private databases.</li><li><strong>Good:</strong> Strong encryption by default, key-based login with no password to steal, and it works through almost any network.</li><li><strong>Risks:</strong> Leaked or never-rotated private keys, passwords left enabled, trusting a changed host key without checking, old RSA-with-SHA-1 signatures, and SSH version 1.</li><li><strong>End of life:</strong> SSH version 1 is being removed from Cisco platforms. OpenSSH 10 finished removing DSA keys, which had been off by default since 2015. GitHub is removing RSA-with-SHA-1 signatures and the diffie-hellman-group-exchange-sha256 key exchange, with brownouts ahead of removal (one on 9 December 2026), and has required all new RSA keys uploaded after 14 October 2026 to be at least 3072 bits. Your existing RSA key keeps working if your client supports RSA with SHA-2.</li><li><strong>Use instead:</strong> Ed25519 keys, short-lived SSH certificates, and a post-quantum key exchange. OpenSSH has offered one by default since 9.0 (2022), and mlkem768x25519-sha256 became the default in 10.0 (April 2025). OpenSSH 10.1 prints a warning when a session is not quantum-safe. Post-quantum host and user keys are still only competing IETF drafts, so keep Ed25519 for now.</li></ul><h3>VPNs: IPsec and WireGuard, the private highway</h3><p>A VPN joins two networks, or a laptop and a network, as if they shared one cable. IPsec is the old industry standard (its key-setup part is called IKEv2); WireGuard is the small modern newcomer.</p><pre>Office A  [router] ==== encrypted tunnel over the internet ==== [router]  Cloud VPC</pre><ul><li><strong>Analogy:</strong> A convoy of sealed buses on a public road. Strangers see the buses and where they go, but never who or what is inside.</li><li><strong>How it works:</strong> The two ends first agree keys (IKEv2 for IPsec, a short Noise-style handshake for WireGuard), then wrap every packet inside an encrypted packet addressed to the other end.</li><li><strong>Used when:</strong> Site-to-site links to cloud VPCs, remote-worker access, cluster-to-cluster links, and mesh tools built on WireGuard.</li><li><strong>Good:</strong> IPsec is everywhere and certified for government use. WireGuard has a tiny codebase (easier to audit), fast setup and fixed modern ciphers, so there is little to misconfigure.</li><li><strong>Risks:</strong> IPsec is complex, and weak pre-shared keys, old IKEv1 and outdated Diffie-Hellman groups are common mistakes. Static WireGuard keys that are never rotated are the usual WireGuard problem. Both rely on key exchanges a quantum computer would break.</li><li><strong>End of life:</strong> IPsec and WireGuard have no end date. PPTP and IKEv1 should already be gone from your estate.</li><li><strong>Use instead:</strong> IKEv2 with certificate or modern pre-shared authentication, plus the hybrid key exchange from RFC 9370, which allows extra key exchanges such as ML-KEM in the same session. An IETF draft defines the ML-KEM profile. WireGuard has no built-in post-quantum mode, so add-ons such as Rosenpass are used where it matters (approximate: from general knowledge, not checked this week).</li></ul><h3>Keys, signatures and certificates: the maths under the locks</h3><p>These are not protocols you configure on their own. They are the building blocks that TLS, SSH, VPNs and code signing all reuse, and they are exactly what quantum computers threaten.</p><h3>Diffie-Hellman and ECDH (X25519): the secret handshake</h3><pre>Alice: secret + public paint ---+<br>                                +--&gt; both end up with the SAME secret colour<br>Bob:   secret + public paint ---+     (watchers cannot unmix it)</pre><ul><li><strong>Analogy:</strong> Two kids each mix their private colour into a shared public paint, swap the mixtures, then add their own colour again. Both get the same final colour; anyone watching only saw mixtures.</li><li><strong>Used when:</strong> The first step of every TLS 1.3, SSH and IPsec session. X25519 is the usual curve.</li><li><strong>Risks:</strong> Weak or reused groups, and a quantum computer running Shor’s algorithm, which breaks it. Recorded traffic can be opened later.</li><li><strong>End of life:</strong> NIST’s final IR 8547 (27 October 2026) deprecates Diffie-Hellman and elliptic-curve key exchange after 2030 and disallows them after 2035.</li><li><strong>Use instead:</strong> Hybrid X25519 plus ML-KEM-768, then ML-KEM alone later.</li></ul><h3>RSA: the padlock anyone can close</h3><ul><li><strong>Analogy:</strong> A mailbox with a slot. Anyone can drop a letter in (public key); only the owner has the key to open the box (private key).</li><li><strong>Used when:</strong> Older TLS certificates, code signing, JWTs signed with RS256, SSH keys, email (S/MIME, PGP).</li><li><strong>Good:</strong> Understood everywhere. <strong>Risks:</strong> Big keys and slow signing, and keys under 2048 bits are weak. It falls to Shor’s algorithm.</li><li><strong>End of life:</strong> RSA-2048 (112-bit strength) is deprecated after 2030 and disallowed after 2035 in NIST’s timeline. GitHub already demands 3072-bit RSA for new SSH keys.</li><li><strong>Use instead:</strong> ECDSA or Ed25519 today, ML-DSA tomorrow.</li></ul><h3>ECDSA and Ed25519: the signature stamp</h3><pre>Sign:    message + PRIVATE key             --&gt; signature<br>Verify:  message + signature + PUBLIC key  --&gt; &quot;genuine&quot; or &quot;fake&quot;</pre><ul><li><strong>Analogy:</strong> A wax seal only you can press, that anyone can compare against a sample of your seal pattern.</li><li><strong>How it works:</strong> You mix your private key with a hash of the message to make a short signature; anyone with your public key can check it, but nobody can forge it.</li><li><strong>Used when:</strong> TLS certificates (ECDSA P-256), SSH (Ed25519), software and container signing, JWTs (ES256, EdDSA), Bitcoin and Ethereum wallets.</li><li><strong>Good:</strong> Small and fast. Ed25519 avoids ECDSA’s classic trap, a bad random number leaking the private key.</li><li><strong>Risks:</strong> A quantum computer forges both. ECDSA with a repeated random value gives the key away.</li><li><strong>End of life:</strong> NIST says ECDSA and EdDSA are deprecated after 2030 and disallowed after 2035. For high-value federal systems the deadlines are earlier: post-quantum key establishment by 31 December 2030 and post-quantum signatures by 31 December 2031.</li><li><strong>Use instead:</strong> ML-DSA (FIPS 204), with SLH-DSA (FIPS 205) as the hash-based backup and FN-DSA (FIPS 206, still a draft) for tight space.</li></ul><h3>SHA hashes: the fingerprint</h3><pre>&quot;hello&quot;  --SHA-256--&gt;  2cf24dba...  (always 64 hex characters, changes totally if one letter changes)</pre><ul><li><strong>Analogy:</strong> A fingerprint of a document. Change one comma and the fingerprint is completely different, and nobody can work backwards from a fingerprint to the document.</li><li><strong>Used when:</strong> Signatures, certificates, Git commits, container image digests, file integrity checks, HMAC.</li><li><strong>Risks:</strong> MD5 and SHA-1 can be forced to collide, so a forged document can share a real fingerprint.</li><li><strong>End of life:</strong> MD5 and SHA-1 are dead for security work. Cisco is removing TLS ciphers that use SHA-1 for signatures, and GitHub is dropping SSH signatures that use it. Old Git still uses SHA-1 internally.</li><li><strong>Use instead:</strong> SHA-256 or SHA-384; SHA-3 as an alternative. Hashes survive the quantum era with a larger size.</li></ul><h3>X.509 certificates and ACME: the ID card and the office that prints it</h3><pre>Your server --&quot;prove you own example.com&quot;--&gt; CA (e.g. Let&#39;s Encrypt) --&gt; signed certificate</pre><ul><li><strong>Analogy:</strong> A passport. A trusted office checks who you are, stamps the passport, and everyone who trusts that office trusts you. ACME is the robot at the passport counter that renews it for you.</li><li><strong>Used when:</strong> Every public website, mTLS between services, internal PKI, device identity.</li><li><strong>Risks:</strong> Forgetting to renew (outages), a compromised CA, and certificates that outlive their usefulness.</li><li><strong>End of life:</strong> Manual renewal is ending: certificate lifetimes drop to 100 days on 15 March 2027 and 47 days on 15 March 2029. Chrome says it has no plan to add classic post-quantum X.509 certificates to its root store.</li><li><strong>Use instead:</strong> ACME automation (cert-manager, Caddy, Certbot) now, and Merkle Tree Certificates for the quantum-safe web (see the quantum section).</li></ul><h3>DNS and the HTTP family: the phone book and the delivery trucks</h3><h3>DNS (with DNSSEC, DoT and DoH): the internet’s phone book</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ozcIdmIt0xcjCPNg8HudPw.png" /></figure><ul><li><strong>Analogy:</strong> You know your friend’s name, not their street address. You ask the phone book, which asks a bigger phone book, until someone knows the number.</li><li><strong>How it works:</strong> Your computer asks a resolver for “shop.example.com”; the resolver asks the root, then the .com servers, then the example.com servers, and hands back an IP address. Classic DNS sends this in plain text on port 53.</li><li><strong>Used when:</strong> Every connection you make, plus service discovery in Kubernetes (CoreDNS), blue-green cutovers, and traffic steering.</li><li><strong>Good:</strong> Simple, cached and fast. <strong>Risks:</strong> Anyone on the path can read or forge plain DNS answers (cache poisoning, hijacking), and DNS is a favourite for data exfiltration and DDoS amplification.</li><li><strong>End of life:</strong> Plain DNS is not going away, but unencrypted DNS over untrusted networks is increasingly treated as a finding in audits. DNSSEC signatures use RSA or ECDSA, which are on NIST’s 2030 and 2035 timeline.</li><li><strong>Use instead:</strong> DNS over HTTPS (DoH) or DNS over TLS (DoT) between you and the resolver, DNSSEC on your zones with ECDSA P-256 or Ed25519, and post-quantum DNSSEC when it is standardised (still research, approximate).</li></ul><h3>HTTP/1.1, HTTP/2 and HTTP/3: three generations of delivery trucks</h3><pre>HTTP/1.1  one truck per parcel, one at a time        (over TCP)<br>HTTP/2    one road, many parcels interleaved         (over TCP + TLS)<br>HTTP/3    a faster road with built-in security       (over QUIC, which runs on UDP)</pre><ul><li><strong>Analogy:</strong> HTTP/1.1 is a shop that serves one customer at a time. HTTP/2 serves many at once through a single door, but if the door jams, everyone waits. HTTP/3 gives every customer their own door.</li><li><strong>How it works:</strong> All three carry the same web requests and responses. HTTP/3 swaps TCP for QUIC, which has TLS 1.3 built in, so one stalled packet no longer blocks the others, and reconnecting after a Wi-Fi change is instant.</li><li><strong>Used when:</strong> Everything on the web. HTTP/3 shines on mobile and lossy links; gRPC runs on HTTP/2.</li><li><strong>Good:</strong> HTTP/3 is used by about 40% of websites and supported by more than 95% of major browsers as of mid-2026.</li><li><strong>Risks:</strong> UDP is blocked by some corporate firewalls, so always keep an HTTP/2 fallback. Security teams must learn to inspect QUIC.</li><li><strong>End of life:</strong> HTTP/1.1 and HTTP/2 have no end date. Plain HTTP without TLS is the real casualty: browsers warn on it and most regulators treat it as a finding.</li><li><strong>Use instead:</strong> HTTP/3 at the edge (CDN or load balancer), HTTP/2 or 3 inside, and HTTPS only.</li></ul><h3>The legacy four: FTP, Telnet, SNMP and SMTP</h3><p>These were designed when networks were trusted. Cisco has published a plan to phase out Telnet, FTP, TFTP, SSH version 1, TLS 1.0 and 1.1, SNMPv1 and SNMPv2c, and SHA-1-signed TLS ciphers across its products. The pattern is warnings first, then restricted-by-default on fresh installs, then removal, with release numbers that differ per platform, so check your vendor’s list.</p><h3>FTP: the open postcard for files</h3><pre>Client --username + password + file, all readable--&gt; Server</pre><ul><li><strong>Analogy:</strong> Handing your house key and your parcel to a courier on a glass bus.</li><li><strong>Used when:</strong> Old partner file drops, router config backups, legacy batch jobs.</li><li><strong>Risks:</strong> Passwords and data cross the network in plain text.</li><li><strong>End of life:</strong> Cisco is removing it and recommends SFTP or HTTPS instead.</li><li><strong>Use instead:</strong> SFTP (file transfer over SSH, not the same as FTPS), or object storage with signed HTTPS URLs.</li></ul><h3>Telnet: shouting your password across the room</h3><ul><li><strong>Analogy:</strong> A walkie-talkie conversation anyone nearby can hear, including the password you say out loud.</li><li><strong>Used when:</strong> Ancient switches, serial consoles, IoT devices nobody updated.</li><li><strong>Risks:</strong> No encryption at all; keystrokes and credentials are visible.</li><li><strong>End of life:</strong> Cisco warns about it in its platform releases and recommends SSH version 2.</li><li><strong>Use instead:</strong> SSH, with keys.</li></ul><h3>SNMP: the building’s alarm panel</h3><pre>Monitoring tool --&quot;community string: public&quot;--&gt; Router  (v1 and v2c: no encryption)</pre><ul><li><strong>Analogy:</strong> A caretaker walks the building asking each room “how are you?”. Version 1 and 2c rooms answer anyone who says the shared word “public”. Version 3 checks ID and whispers.</li><li><strong>Used when:</strong> Network and server monitoring (Zabbix, Nagios, Datadog agents, cloud network appliances).</li><li><strong>Risks:</strong> SNMPv1 and v2c send the community string and data unencrypted; write access lets an attacker change device configuration. SNMPv3 with no auth, MD5 or DES is also weak.</li><li><strong>End of life:</strong> Cisco lists SNMPv1, SNMPv2c and SNMPv3 without authentication and encryption as insecure. Meraki is deprecating SNMPv1 while keeping v2c for now, and its newer Campus Gateway supports only SNMPv3.</li><li><strong>Use instead:</strong> SNMPv3 with authentication and privacy (SHA-2 and AES), or streaming telemetry (gNMI, OpenTelemetry) where the device supports it.</li></ul><h3>SMTP: the post office between mail servers</h3><ul><li><strong>Analogy:</strong> Mail servers pass your letter hand to hand. Plain SMTP is a postcard; STARTTLS is an envelope the sender may or may not bother to use.</li><li><strong>Used when:</strong> Sending alerts, transactional email and notifications from your apps and CI.</li><li><strong>Risks:</strong> Opportunistic encryption can be stripped by an attacker, and spoofed senders are everywhere.</li><li><strong>End of life:</strong> SMTP itself stays. Microsoft has been retiring legacy TLS for POP and IMAP in Exchange Online during 2026.</li><li><strong>Use instead:</strong> TLS 1.2 or later, MTA-STS to force encryption, and SPF, DKIM and DMARC to prove who sent it.</li></ul><h3>Quantum-safe cryptography: changing the locks before the master key exists</h3><p><strong>Analogy:</strong> Someone is building a master key that opens every padlock of one design (RSA, Diffie-Hellman, elliptic curves). Nobody has finished it, but burglars are already photographing your locked boxes to open later, and the locksmith needs years to change every lock in town.</p><h3>The two threats</h3><ul><li><strong>Harvest now, decrypt later:</strong> Someone records your encrypted traffic today and opens it when a big enough quantum computer exists. This is why key exchange moves first. Google says the threat to encryption is relevant today for this reason.</li><li><strong>Forged signatures:</strong> A future quantum computer could forge certificates and signed software. Signatures only need replacing before that computer exists, but replacing them takes longer, which is why Google’s own deadline for migration is 2029 and NIST deprecates RSA and ECDSA after 2030.</li></ul><h3>⚙️— — — The new toolbox — — — ⚙️</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*TJ8vekVKL5B_FXmJwSmn8w.png" /></figure><h3>Hybrid: belt and braces</h3><p>A hybrid handshake runs the classic exchange (X25519) and the post-quantum one (ML-KEM-768) side by side and mixes both secrets. The OpenSSH team’s reasoning is that the result is no weaker than the best classical option even if the new algorithm is later broken. Think of two different locks on one door: a burglar needs to beat both.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8cG-ToI1i_uW0eQzGknNIg.png" /></figure><h3>— — —</h3><h3>Sources</h3><p>Checked 6 December 2026. The NIST IR 8547 page was opened in full; every other fact comes from search-result excerpts of the pages below. Items from general knowledge and worth a second check: RFC 8996, WireGuard and Rosenpass, QKD, DNSSEC algorithm choices, and the history of MD5 and SHA-1.</p><ul><li><a href="https://csrc.nist.gov/pubs/ir/8547/final">NIST IR 8547 (final)</a>, with deadline summaries from <a href="https://quantumsentinel.uk/nist-ir-8547-deprecated-2030-disallowed-2035/">Quantum Sentinel</a> and <a href="https://quantumiscoming.com/en/nist-finalises-its-post-quantum-roadmap-rsa-and-ecdsa-out-of-its-standards-after-2035/">Quantum is Coming</a></li><li><a href="https://www.openssh.com/pq.html">OpenSSH post-quantum page</a> and <a href="https://heise.de/-10346176">heise on OpenSSH 10</a></li><li><a href="https://github.blog/changelog/2026-09-22-security-improvements-for-ssh">GitHub: security improvements for SSH</a></li><li><a href="https://www.redhat.com/en/blog/advancing-post-quantum-capabilities-ssh-red-hat-enterprise-linux">Red Hat: post-quantum SSH in RHEL</a></li><li><a href="https://blog.google/innovation-and-ai/technology/safety-security/cryptography-migration-timeline/">Google: quantum timeline of 2029</a> and <a href="https://www.eff.org/node/111938">EFF’s reading of it</a></li><li><a href="https://blog.google/security/cultivating-a-robust-and-efficient-quantum-safe-https/">Chrome: quantum-safe HTTPS and Merkle Tree Certificates</a></li><li><a href="https://arxiv.org/pdf/2606.16473">Measurement study of post-quantum readiness, 2026</a></li><li><a href="https://www.encryptionconsulting.com/education-center/fn-dsa-fips-206/">FN-DSA (FIPS 206) status</a> and <a href="https://www.securityweek.com/nist-announces-hqc-as-fifth-standardized-post-quantum-algorithm/">HQC announcement</a></li><li><a href="https://arxiv.org/pdf/2507.09288">IPsec hybrid key exchange, RFC 9370 overview</a></li><li><a href="https://telcobridges.com/learning/voip-security/tls-1-2-end-of-life/">TelcoBridges: is TLS 1.2 end of life?</a>, <a href="https://support.auth0.com/center/s/article/end-of-life-rollout-for-weak-tls-1-2-cipher-suites">Auth0 cipher removal</a>, <a href="https://github.com/orgs/supabase/discussions/51553">Supabase cipher notice</a>, <a href="https://developers.cloudflare.com/fundamentals/api/reference/deprecations/">Cloudflare deprecations</a></li><li><a href="https://www.cisco.com/c/en/us/about/trust-center/resilient-infrastructure/feature-removal-and-suggested-alternatives.html">Cisco: feature removal and suggested alternatives</a> and <a href="https://documentation.meraki.com/Platform_Management/Product_Information/Privacy%2C_Security%2C_Compliance/FAQ%3A_SNMPv1_Deprecation">Meraki SNMPv1 deprecation</a></li><li><a href="https://www.ssl.com/article/preparing-for-47-day-ssl-tls-certificates/amp/">SSL.com: 47-day certificates</a></li><li><a href="https://w3techs.com/technologies/details/ce-http3">W3Techs: HTTP/3 usage</a> and <a href="https://en.wikipedia.org/wiki/HTTP/3">Wikipedia: HTTP/3</a></li></ul><p>— — —</p><p>We covered a lot of ground today, so go grab a coffee and let it sink in. Have a good one!🙇🏻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2e94e43dafd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[New story]]></title>
            <link>https://medium.com/@asknanishankar/setting-up-ai-orchestrator-agent-1d3b208d8f68?source=rss-f5eeddb06e31------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d3b208d8f68</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Shankar Asknani]]></dc:creator>
            <pubDate>Mon, 10 Aug 2026 10:11:06 GMT</pubDate>
            <atom:updated>2026-08-11T11:39:42.412Z</atom:updated>
            <content:encoded><![CDATA[<img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d3b208d8f68" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Headlamp: The Modern Kubernetes Dashboard You Should Be Using Instead of kubernetes-dashboard.]]></title>
            <link>https://medium.com/@asknanishankar/headlamp-the-modern-kubernetes-dashboard-you-should-be-using-instead-of-kubernetes-dashboard-e3ca830a0483?source=rss-f5eeddb06e31------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3ca830a0483</guid>
            <dc:creator><![CDATA[Shankar Asknani]]></dc:creator>
            <pubDate>Sun, 29 Mar 2026 10:54:08 GMT</pubDate>
            <atom:updated>2026-03-29T10:54:08.484Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve been running k8s-dashboard in your clusters, you already know the pain — clunky UI, complex rbac setup, token-based login that expires, and a general feeling that it was built for a different era. <strong>Headlamp</strong> is the modern alternative: extensible, plugin-friendly, OIDC-ready, and genuinely pleasant to use.</p><p>This guide walks you through everything — what Headlamp is, how its Helm chart is structured, and how to install it using both raw helm commands and helmfile (the GitOps-friendly way).</p><blockquote><strong>TL;DR</strong></blockquote><blockquote><strong><em>Headlamp is a modern, multi-cluster extensible Kubernetes web UI that replaces the aging </em></strong><strong><em>kubernetes-dashboard. To get it running:</em></strong></blockquote><blockquote><strong><em>Add the Helm repo: </em></strong><strong><em>helm repo add headlamp </em></strong><a href="https://headlamp-k8s.github.io/headlamp/"><strong><em>https://headlamp-k8s.github.io/headlamp/</em></strong></a></blockquote><blockquote><strong><em>Install it: </em></strong><strong><em>helm install headlamp headlamp/headlamp --namespace kubernetes-dashboard --create-namespace</em></strong></blockquote><blockquote><strong><em>Enable ingress in values and point </em></strong><strong><em>headlamp.yourdomain.com at it</em></strong></blockquote><blockquote><strong><em>If using helmfile, add it as a release, then run </em></strong><strong><em>helmfile diff → </em></strong><strong><em>helmfile apply</em></strong></blockquote><blockquote><strong><em>Log in with a service account token, or wire up OIDC for SSO</em></strong></blockquote><blockquote><strong><em>The key commands you’ll live in: </em></strong><strong><em>helmfile diff to preview, </em></strong><strong><em>helmfile apply to deploy, </em></strong><strong><em>kubectl get pods -n kubernetes-dashboard to verify, and </em></strong><strong><em>kubectl port-forward svc/headlamp -n kubernetes-dashboard 8080:80 if you need local access without ingress.</em></strong></blockquote><blockquote>Full setup, all commands, and the helmfile config are below.</blockquote><h3>What Is Headlamp?</h3><p>Headlamp is an open-source Kubernetes web UI maintained by the Kinvolk team (now part of Microsoft). It runs as a pod inside your cluster and exposes a clean dashboard at a URL like <a href="https://headlamp.yourdomain.com./">https://headlamp.yourdomain.com.</a></p><p><strong>Why switch from kubernetes-dashboard?</strong></p><ul><li>Plugin architecture — extend the UI without forking it</li><li>First-class OIDC/SSO support — no more manual token copying</li><li>Works in-cluster and as a desktop app</li><li>Active development and a modern React frontend</li><li>Works cleanly behind an ALB or nginx ingress with TLS</li></ul><h3>Understanding the Helm Chart Structure</h3><p>Headlamp helm chart layout:</p><p><em>(Chart version covered: headlamp 0.25.0 / appVersion 0.25.1)</em></p><pre>headlamp/<br>├── Chart.yaml                  # Chart metadata, version, appVersion<br>├── values.yaml                 # All default config knobs<br>├── values.schema.json          # optional: JSON schema validation for values<br>└── templates/<br>    ├── deployment.yaml         # The main Headlamp pod<br>    ├── service.yaml            # ClusterIP service (port 80 by default)<br>    ├── ingress.yaml            # Optional ingress resource<br>    ├── serviceaccount.yaml     # Dedicated service account<br>    ├── clusterrolebinding.yaml # Cluster-wide read access<br>    ├── secret.yaml             # OIDC credentials (if configured)<br>    ├── pvc.yaml                # optional persistent volume for plugins<br>    └── NOTES.txt               # Post-install instructions</pre><h3>Key components explained</h3><p><strong>Deployment</strong> — Runs a single replica of the Headlamp container (ghcr.io/headlamp-k8s/headlamp:v0.25.1). It mounts plugin directories and injects OIDC environment variables from a Secret. Non-root by default (runAsUser: 100).</p><p><strong>ServiceAccount + ClusterRoleBinding</strong> — Headlamp needs read access across your cluster to show you resources. The chart creates a ServiceAccount and binds it to the cluster-admin ClusterRole by default. In production you&#39;ll want to tighten this.</p><p><strong>Service</strong> — A plain ClusterIP service on port 80. <strong>Traffic comes in through Ingress</strong>, gets forwarded here, and lands on the pod&#39;s port 4466.</p><p><strong>Ingress</strong> — Disabled by default. When enabled, supports any ingress class (nginx, alb), custom annotations, and TLS with cert-manager.</p><p><strong>Secret</strong> — If you pass OIDC credentials via config.oidc.*, the chart creates a Kubernetes Secret and mounts the values as environment variables (OIDC_CLIENT_ID, OIDC_CLIENT_SECRET, OIDC_ISSUER_URL, OIDC_SCOPES).</p><p><strong>PVC</strong> — Optional. Enable it if you’re installing plugins that need to persist across pod restarts.</p><h3>Prerequisites</h3><p>before you start, make sure you have:</p><pre># Check kubectl is connected to your cluster<br>kubectl cluster-info<br><br># Check helm version (need v3+)<br>helm version<br><br># Check helmfile is installed<br>helmfile --version</pre><p>If helmfile isn’t installed:</p><pre># macOS<br>brew install helmfile<br><br># Linux<br>curl -Lo helmfile https://github.com/helmfile/helmfile/releases/latest/download/helmfile_linux_amd64<br>chmod +x helmfile &amp;&amp; sudo mv helmfile /usr/local/bin/</pre><h3>Option 1: Install with Plain Helm (quickstart)</h3><p>This is the fastest way to get Headlamp running. Good for exploration or a dev cluster.</p><h3>Step 1 — Add the Headlamp Helm repo</h3><p>bash</p><pre>helm repo add headlamp https://headlamp-k8s.github.io/headlamp/<br>helm repo update</pre><h3>Step 2 — Create the namespace</h3><p>bash</p><pre>kubectl create namespace kubernetes-dashboard</pre><h3>Step 3 — Install with basic ingress</h3><p>bash</p><pre>helm install headlamp headlamp/headlamp \<br>  --namespace kubernetes-dashboard \<br>  --set ingress.enabled=true \<br>  --set ingress.ingressClassName=nginx \<br>  --set &quot;ingress.hosts[0].host=headlamp.yourdomain.com&quot; \<br>  --set &quot;ingress.hosts[0].paths[0].path=/&quot; \<br>  --set &quot;ingress.hosts[0].paths[0].type=ImplementationSpecific&quot; \<br>  --set &quot;ingress.tls[0].secretName=headlamp-tls&quot; \<br>  --set &quot;ingress.tls[0].hosts[0]=headlamp.yourdomain.com&quot;</pre><p>Replace headlamp.yourdomain.com with your actual domain.</p><h3>Step 4 — Verify the installation</h3><pre># Check pods are running<br>kubectl get pods -n kubernetes-dashboard</pre><pre># Check the service<br>kubectl get svc -n kubernetes-dashboard</pre><pre># Check ingress<br>kubectl get ingress -n kubernetes-dashboard</pre><h3>Step 5 — Get an access token (for non-OIDC setups)</h3><pre># Create a service account token to log in<br>kubectl create serviceaccount headlamp-admin -n kubernetes-dashboard<br><br>kubectl create clusterrolebinding headlamp-admin \<br>  --clusterrole=cluster-admin \<br>  --serviceaccount=kubernetes-dashboard:headlamp-admin<br>kubectl create token headlamp-admin -n kubernetes-dashboard<br>or <br>kubectl create token headlamp-admin -n kubernetes-dashboard --duration=8760h </pre><p>Copy that token and paste it into the Headlamp login screen at `<a href="https://headlamp.yourdomain.com`/">https://headlamp.yourdomain.com`</a>.</p><pre>Project structure<br>```<br>helmfile/<br>├── helmfile.yaml                    # Main helmfile<br>├── values/<br>│   ├── headlamp.yaml.gotmpl         # Headlamp values (templated)<br>│   └── environments/<br>│       └── ap-south-1-qa-02.yaml    # Env-specific overrides<br>└── charts/<br>    └── headlamp-0.25.0.tgz          # Local chart (optional)</pre><p>Option 2: Install with Helmfile (GitOps Way)</p><p>Helmfile lets you manage all your Helm releases as code — reproducible, diffable, and easy to review in pull requests. This is how teams manage multiple environments (like the `ap-south-1-qa-02` setup you might already have).</p><h3>helmfile.yaml</h3><pre>repositories:<br>  - name: headlamp<br>    url: https://headlamp-k8s.github.io/headlamp/</pre><pre>helmDefaults:<br>  wait: true<br>  timeout: 300<br>  atomic: true</pre><pre>environments:<br>  ap-south-1-qa-02:<br>    values:<br>      - values/environments/ap-south-1-qa-02.yaml</pre><pre>releases:<br>  - name: headlamp<br>    namespace: kubernetes-dashboard<br>    chart: headlamp/headlamp<br>    version: 0.25.0<br>    createNamespace: true<br>    values:<br>      - values/headlamp.yaml.gotmpl</pre><h3>values/headlamp.yaml.gotmpl</h3><pre>replicaCount: 1<br>image:<br>  registry: ghcr.io<br>  repository: headlamp-k8s/headlamp<br>  pullPolicy: IfNotPresent</pre><pre>serviceAccount:<br>  create: true</pre><pre>clusterRoleBinding:<br>  create: true</pre><pre>service:<br>  type: ClusterIP<br>  port: 80</pre><pre>ingress:<br>  enabled: true<br>  ingressClassName: nginx<br>  annotations:<br>    kubernetes.io/tls-acme: &quot;true&quot;<br>  hosts:<br>    - host: headlamp.{{ .Environment.Name }}.yourdomain.com<br>      paths:<br>        - path: /<br>          type: ImplementationSpecific<br>  tls:<br>    - secretName: headlamp-tls<br>      hosts:<br>        - headlamp.{{ .Environment.Name }}.yourdomain.com</pre><pre>config:<br>  oidc:<br>    secret:<br>      create: true<br>      name: headlamp-oidc<br>    clientID: &quot;{{ .Values.oidc.clientID }}&quot;<br>    clientSecret: &quot;{{ .Values.oidc.clientSecret }}&quot;<br>    issuerURL: &quot;{{ .Values.oidc.issuerURL }}&quot;<br>    scopes: &quot;openid profile email&quot;</pre><pre>resources:<br>  requests:<br>    cpu: 100m<br>    memory: 128Mi<br>  limits:<br>    cpu: 250m<br>    memory: 256Mi. # bump this up based on your requirements.</pre><h3>values/environments/ap-south-1-qa-02.yaml</h3><pre>oidc:<br>  clientID: &quot;YOUR_CLIENT_ID&quot;<br>  clientSecret: &quot;YOUR_CLIENT_SECRET&quot;<br>  issuerURL: &quot;https://your-idp.yourdomain.com&quot;</pre><blockquote><strong><em>Security tip:</em></strong><em> Never commit real OIDC secrets to git. Use a secrets manager (AWS Secrets Manager, Vault, Sealed Secrets) and inject them at deploy time, or use the </em><em>externalSecret option in the chart values to reference an existing Kubernetes Secret.</em></blockquote><h3>Helmfile Commands — Complete Reference</h3><p>Here are all the commands a beginner needs to know:</p><h3>See what would change before touching the cluster</h3><pre># Show a diff of what helmfile WOULD apply vs what&#39;s live<br># switch to right directory or under helfile.d or wherever is your helmfile.yaml is present<br>helmfile -e ap-south-1-qa-02 diff</pre><p>This is your most important command. Always run it before apply. It shows added, removed, and changed Kubernetes resources — like terraform plan for Helm.</p><h3>Apply the changes</h3><pre># Deploy all releases defined in helmfile.yaml<br>helmfile -e ap-south-1-qa-02 apply</pre><pre># or if you are maintaining env file seperately as mentioned above<br>helmfile -e ap-south-1-qa-02 -f 90-ap-south-1-qa-02.yaml apply  --selector name=headlamp</pre><p>apply runs diff first and only proceeds if there are changes. If --atomic is set (it is, in this setup), it rolls back automatically on failure.<br>- if atomic fails increase the timeout to 300s in your helmfile.yaml</p><h3>Sync (force apply regardless of diff)</h3><pre>helmfile -e ap-south-1-qa-02 sync</pre><p><strong>Same as apply but skips the diff check </strong>— useful when you know something is out of sync.</p><h3>Apply only Headlamp (not the entire helmfile)</h3><pre>helmfile -e ap-south-1-qa-02 -l name=headlamp apply</pre><h3>Dry run — render templates without deploying</h3><pre>helmfile -e ap-south-1-qa-02 template</pre><p>This outputs all the rendered Kubernetes YAML to stdout. Useful for debugging templating issues.</p><h3>Destroy / uninstall</h3><pre>helmfile -e ap-south-1-qa-02 destroy</pre><h3>kubectl Commands — Complete Reference</h3><h4>Check what’s running</h4><pre># All resources in the dashboard namespace<br>kubectl get all -n kubernetes-dashboard</pre><pre># Pods with more detail<br>kubectl get pods -n kubernetes-dashboard -o wide</pre><pre># Watch pods in real time<br>kubectl get pods -n kubernetes-dashboard -w</pre><h3>Debug a pod</h3><pre># Get pod name first<br>kubectl get pods -n kubernetes-dashboard</pre><pre># Tail logs<br>kubectl logs -n kubernetes-dashboard &lt;pod-name&gt; -f</pre><pre># Describe pod (shows events, image, resource usage)<br>kubectl describe pod -n kubernetes-dashboard &lt;pod-name&gt;</pre><h3>Check ingress and TLS</h3><pre># See the ingress resource<br>kubectl get ingress -n kubernetes-dashboard</pre><pre># See if TLS cert was issued<br>kubectl get certificate -n kubernetes-dashboard</pre><pre># Describe ingress for detailed routing info<br>kubectl describe ingress headlamp -n kubernetes-dashboard</pre><h3>Port-forward for local access (no ingress needed)</h3><pre>kubectl port-forward svc/headlamp -n kubernetes-dashboard 8080:80<br># Then open http://localhost:8080</pre><h3>Upgrade the chart manually</h3><pre>helm upgrade headlamp headlamp/headlamp \<br>  --namespace kubernetes-dashboard \<br>  --reuse-values \<br>  --set image.tag=&quot;v0.26.0&quot;</pre><h3>Rollback if something breaks</h3><pre># See release history<br>helm history headlamp -n kubernetes-dashboard</pre><pre># Roll back to previous revision<br>helm rollback headlamp -n kubernetes-dashboard</pre><h3>Uninstall</h3><pre>helm uninstall headlamp -n kubernetes-dashboard<br>kubectl delete namespace kubernetes-dashboard</pre><h3>Replacing kubernetes-dashboard in Your Helmfile</h3><p>If your existing helmfile.yaml has a kubernetes-dashboard release like this:</p><pre>- name: kubernetes-dashboard<br>  namespace: kubernetes-dashboard<br>  chart: ../charts/dashboard-chart/dashboard<br>  createNamespace: true<br>  values:<br>    - ../values/k8s-dashboard-oauth2-proxy.yaml.gotmpl</pre><p>You can replace it with:</p><pre>- name: headlamp<br>  namespace: kubernetes-dashboard<br>  chart: headlamp/headlamp<br>  version: 0.25.0<br>  createNamespace: true<br>  values:<br>    - ../values/headlamp.yaml.gotmpl</pre><p>Then run:</p><pre># See exactly what will be removed and added<br>helmfile -e ap-south-1-qa-02 diff</pre><pre># Apply the migration<br>helmfile -e ap-south-1-qa-02 apply</pre><p>Helmfile will uninstall kubernetes-dashboard and install headlamp in the same namespace cleanly.</p><h3>What Headlamp Looks Like</h3><p>Once installed and accessible at https://headlamp.yourdomain.com, you&#39;ll see: <strong><em>[if its not accessible check your DNS/ Route 53 under your domain if CNAME or A type Record is created or not — if not create it manual once]</em></strong></p><ul><li><strong>Cluster Overview</strong> — nodes, namespaces, pod count, resource pressure at a glance</li><li><strong>Workloads</strong> — Deployments, StatefulSets, DaemonSets, with live status and restart counts</li><li><strong>Pod terminal</strong> — exec into any pod directly from the browser (no kubectl exec needed)</li><li><strong>Resource editor</strong> — edit any manifest inline with a YAML editor and diff view</li><li><strong>Multi-cluster support</strong> — switch between clusters from the top nav —<strong> For multi-cluster support we have to mount our kubeconfig file where the connectivity between clusters is open and can be accessible.</strong></li></ul><pre># Like add these in your values.yaml or gotmpl values<br>  config:<br>    extraArgs:<br>      - -kubeconfig=/kubeconfig/config   # replaces -in-cluster<br>      - -plugins-dir=/headlamp/plugins<br><br>  volumeMounts:<br>    - name: kubeconfig<br>      mountPath: /kubeconfig<br>      readOnly: true<br>    - name: plugins<br>      mountPath: /headlamp/plugins<br>    - name: home-config<br>      mountPath: /home/headlamp<br><br>  volumes:<br>    - name: kubeconfig<br>      secret:<br>        secretName: headlamp-kubeconfig<br>    - name: plugins<br>      emptyDir: {}<br>    - name: home-config<br>      emptyDir: {}</pre><ul><li><strong>Plugin panel</strong> — install community plugins for Prometheus metrics, Flux, Argo CD, and more</li></ul><p>The login page at https://headlamp.yourdomain.com will either show an OIDC &quot;Sign in&quot; button (if you configured OIDC) or a token input field. Either way, no more wrestling with the old kubernetes-dashboard RBAC setup.</p><h3>Screenshots for Reference —</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*osshTt2u0tQhCNPLjTxsRg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*voq2Kgv5kvQWUJOGNTRLFA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0vzYfo1KRW-eM5YM-yF5lA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hwbrdVqxpYav075SgPCWyw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X_vGzb1a8TdMhEscfT7Jxg.png" /></figure><h3>Troubleshooting Common Issues</h3><p><strong>Pod is CrashLoopBackOff</strong></p><pre>kubectl logs -n kubernetes-dashboard &lt;headlamp-pod&gt; --previous</pre><pre>kubectl describe ingress headlamp -n kubernetes-dashboard</pre><p>Usually caused by a bad OIDC config — check that issuerURL is reachable from inside the cluster.</p><p><strong>Ingress returns 404</strong></p><pre>kubectl describe ingress headlamp -n kubernetes-dashboard</pre><p>Make sure ingressClassName matches your cluster&#39;s ingress controller. Use kubectl get ingressclass to check what&#39;s available.</p><p><strong>TLS certificate not issued</strong></p><pre>kubectl get certificaterequest -n kubernetes-dashboard<br>kubectl describe certificaterequest -n kubernetes-dashboard</pre><p>Cert-manager needs the kubernetes.io/tls-acme: &quot;true&quot; annotation and a working ClusterIssuer.</p><p><strong>Helmfile diff shows no changes but pod is broken</strong></p><pre>helmfile -e ap-south-1-qa-02 sync</pre><p>Force a full sync to reconcile any drift between the live cluster and your helmfile state.</p><h3>Summary</h3><p>TaskCommandPreview changeshelmfile -e &lt;env&gt; diffDeploy everythinghelmfile -e &lt;env&gt; applyDeploy one releasehelmfile -e &lt;env&gt; -l name=headlamp applyCheck podskubectl get pods -n kubernetes-dashboardRead logskubectl logs -n kubernetes-dashboard &lt;pod&gt; -fLocal accesskubectl port-forward svc/headlamp -n kubernetes-dashboard 8080:80Roll backhelm rollback headlamp -n kubernetes-dashboardUninstallhelm uninstall headlamp -n kubernetes-dashboard</p><p>Headlamp is a clean, zero-drama multi-cluster in single pane replacement for kubernetes-dashboard. With helmfile managing the release, you get reproducible deploys, easy diffs before every change, and a setup that fits naturally into any GitOps pipeline. The OIDC integration alone is worth the migration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3ca830a0483" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Python to Golang: Revolutionising DevOps Automation.]]></title>
            <link>https://medium.com/@asknanishankar/from-python-to-golang-revolutionising-devops-automation-0c8a069b5280?source=rss-f5eeddb06e31------2</link>
            <guid isPermaLink="false">https://medium.com/p/0c8a069b5280</guid>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Shankar Asknani]]></dc:creator>
            <pubDate>Sun, 07 Dec 2025 09:24:59 GMT</pubDate>
            <atom:updated>2025-12-16T14:03:04.115Z</atom:updated>
            <content:encoded><![CDATA[<h3>A DevOps Engineer’s Journey from Python to Go</h3><p>As CloudOps engineers, we’ve all been there — python scripts growing larger, dependency management becoming a nightmare, and that nagging feeling that our automation could be faster and more reliable. After years of relying on Python for everything from CI/CD orchestration to infrastructure automation, I discovered Go (Golang), and it transformed how I approach DevOps tooling.</p><p>In this post, I’ll walk you through why Go is becoming the de-facto language for modern devops, how it integrates beautifully with your existing tech stack <strong>(jenkins, kubernetes,helm, terraform, AWS)</strong>, and provide a real-world refactoring example that will make you want to start your Go journey today.</p><h3>Why Go for DevOps?</h3><h3>The Pizza Delivery Analogy</h3><p>Think of your automation scripts like a pizza delivery service:</p><ul><li><strong>Python</strong> is like having multiple delivery drivers (dependencies) who each need their own vehicle (virtual env), GPS system (packages), and may or may not show up on time. when one driver is sick, deliveries stop.</li><li><strong>Go</strong> is like having a single, ultra-efficient autonomous vehicle with everything built-in. One driver, one vehicle, guaranteed delivery time, and it works the same way everywhere.</li></ul><h3>Key Benefits of GO for DevOps:</h3><ol><li><strong>Single Binary Deployment</strong> — No more “but it works on my machine!” Deploy one file, done.</li><li><strong>Lightning Fast Execution</strong> — Compiled code runs 10–50x faster than Python</li><li><strong>Built-in Concurrency</strong> — Handle multiple operations simultaneously with goroutines</li><li><strong>Strong Typing</strong> — Catch errors at compile time, not in production</li><li><strong>Minimal Resource Footprint</strong> — Perfect for containers and cloud environments</li><li><strong>Cross-Platform Compilation</strong> — “<strong>Build for any OS from any OS</strong>”</li></ol><h3>Go’s Data Structures: The Foundation</h3><p>Before diving into our refactoring example, let’s understand Go’s fundamental data structures with a DevOps context.</p><h3>1. Structs: Your configuration blueprint -</h3><p>Structs are like json objects but with type safety. Think of them as your terraform variable definitions, but enforced at compile time.</p><pre>package main</pre><pre>import &quot;fmt&quot;</pre><pre>// jira ticket represents a jira deployment ticket<br>type JiraTicket struct {<br>    ID          string<br>    Status      string<br>    Environment string<br>    Releasejson string<br>    DueDate     string<br>}</pre><pre>// deploymentconfig holds all deployment parameters<br>type DeploymentConfig struct {<br>    Environment    string<br>    JenkinsURL     string<br>    JiraBaseURL    string<br>    AllowedEnvs    []string<br>    Credentials    map[string]string<br>}</pre><pre>func main() {<br>    // Creating a ticket (like parsing Jira API response)<br>    ticket := JiraTicket{<br>        ID:          &quot;DO-1234&quot;,<br>        Status:      &quot;Approved&quot;,<br>        Environment: &quot;us-west-2-staging-01&quot;,<br>        ReleaseJSON: &quot;release-v1.2.3.json&quot;,<br>        DueDate:     &quot;2025-12-07&quot;,<br>    }</pre><pre>    // Creating deployment config<br>    config := DeploymentConfig{<br>        Environment: &quot;us-west-2-staging-01&quot;,<br>        JenkinsURL:  &quot;https://jenkins-env.staging.tools.com&quot;,<br>        JiraBaseURL: &quot;https://jira.shankar.com&quot;,<br>        AllowedEnvs: []string{&quot;staging&quot;, &quot;qa&quot;, &quot;prod&quot;},<br>        Credentials: map[string]string{<br>            &quot;jenkins_user&quot;:  &quot;automation-bot&quot;,<br>            &quot;jenkins_token&quot;: &quot;secret-token&quot;,<br>        },<br>    }</pre><pre>    fmt.Printf(&quot;Processing ticket: %s for %s\n&quot;, ticket.ID, ticket.Environment)<br>    fmt.Printf(&quot;Jenkins URL: %s\n&quot;, config.JenkinsURL)<br>}</pre><h3>2. Slices &amp; Maps: Dynamic Collections</h3><pre>// Slices - like Python lists (dynamic arrays)<br>environments := []string{&quot;staging&quot;, &quot;qa&quot;, &quot;prod&quot;}<br>environments = append(environments, &quot;uat&quot;) // Adding elements</pre><pre>// Maps - like Python dictionaries<br>envMapping := map[string]string{<br>    &quot;us-west-2-staging-01&quot;: &quot;Staging&quot;,<br>    &quot;us-east-1-qa-01&quot;:      &quot;QA&quot;,<br>    &quot;us-east-1-prod-01&quot;:    &quot;Production&quot;,<br>}</pre><pre>// Access map values<br>if envName, exists := envMapping[&quot;us-west-2-staging-01&quot;]; exists {<br>    fmt.Println(&quot;Environment:&quot;, envName)<br>}</pre><h3>3. Interfaces: Polymorphic Behavior</h3><p>Interfaces define behavior contracts — perfect for creating pluggable automation components.</p><pre>// Notifier interface - any service that can send notifications<br>type Notifier interface {<br>    Send(message string) error<br>}</pre><pre>// SlackNotifier implements Notifier<br>type SlackNotifier struct {<br>    WebhookURL string<br>}</pre><pre>func (s *SlackNotifier) Send(message string) error {<br>    // Send to Slack<br>    fmt.Println(&quot;Slack:&quot;, message)<br>    return nil<br>}</pre><pre>// JiraNotifier implements Notifier<br>type JiraNotifier struct {<br>    BaseURL string<br>    Token   string<br>}</pre><pre>func (j *JiraNotifier) Send(message string) error {<br>    // Update Jira ticket<br>    fmt.Println(&quot;Jira:&quot;, message)<br>    return nil<br>}</pre><pre>// NotifyAll sends to all notification channels<br>func NotifyAll(notifiers []Notifier, message string) {<br>    for _, notifier := range notifiers {<br>        notifier.Send(message)<br>    }<br>}</pre><h3>Architecture: Python vs Go in DevOps Pipeline</h3><h3>Current Python Architecture:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C3zLfsUXu962iKS2Rgnehw.png" /></figure><pre>⚠️ Issues:<br>• Single-threaded execution<br>• Runtime dependency conflicts<br>• Error handling scattered across functions<br>• No compile-time type checking</pre><h3>Proposed Go Architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s2-2K0-PYbO5f5ibpEwrRg.png" /></figure><pre>✅ Benefits:<br>• Concurrent operations (3-5x faster)<br>• Single binary (no dependencies)<br>• Type-safe configuration<br>• Structured error handling<br>• Better resource utilization</pre><h3>Real-World Refactoring: Python to Go</h3><p>Let’s refactor the Jenkins-Jira automation from your example. I’ll show the key improvements Go brings.</p><h3>Python Version Pain Points</h3><pre># Python: Multiple imports, runtime dependencies<br>import requests<br>import boto3<br>import configparser<br>import sys<br>from slack_sdk import WebClient<br>from tenacity import retry</pre><pre># Configuration scattered across functions<br>def load_jenkins_credentials(config_file):<br>    config = configparser.ConfigParser()<br>    config.read(config_file)<br>    return config.get(&#39;jenkins&#39;, &#39;user&#39;), config.get(&#39;jenkins&#39;, &#39;password&#39;)</pre><pre># Error handling mixed with business logic<br>def find_jira_ticket(jira_base_url, jira_project_key, ...):<br>    response = requests.get(search_url, headers=headers)<br>    if response.status_code != 200:<br>        raise Exception(f&quot;Failed: {response.status_code}&quot;)</pre><h3>Go Version: Clean &amp; Structured</h3><pre>package main</pre><pre>import (<br>    &quot;context&quot;<br>    &quot;encoding/json&quot;<br>    &quot;fmt&quot;<br>    &quot;io&quot;<br>    &quot;net/http&quot;<br>    &quot;os&quot;<br>    &quot;time&quot;</pre><pre>    &quot;github.com/aws/aws-sdk-go-v2/config&quot;<br>    &quot;github.com/aws/aws-sdk-go-v2/service/ssm&quot;<br>)</pre><pre>// ============================================<br>// 1. TYPE DEFINITIONS (Configuration as Code)<br>// ============================================</pre><pre>type Config struct {<br>    Environment       string<br>    JiraBaseURL      string<br>    JenkinsBaseURL   string<br>    AllowedEnvs      map[string]bool<br>    JiraProjectKey   string<br>    JiraStatus       string<br>}</pre><pre>type JiraTicket struct {<br>    ID          string `json:&quot;key&quot;`<br>    Fields      JiraFields `json:&quot;fields&quot;`<br>}</pre><pre>type JiraFields struct {<br>    Status      Status `json:&quot;status&quot;`<br>    Environment CustomField `json:&quot;customfield_10001&quot;`<br>    ReleaseJSON string `json:&quot;customfield_10002&quot;`<br>}</pre><pre>type Status struct {<br>    Name string `json:&quot;name&quot;`<br>}</pre><pre>type CustomField struct {<br>    Value string `json:&quot;value&quot;`<br>}</pre><pre>type DeploymentParams struct {<br>    ReleaseVersion  string<br>    EnvironmentName string<br>}</pre><pre>// ============================================<br>// 2. SERVICE LAYER (Clean Separation)<br>// ============================================</pre><pre>type JiraService struct {<br>    BaseURL string<br>    Token   string<br>    Client  *http.Client<br>}</pre><pre>func NewJiraService(baseURL, token string) *JiraService {<br>    return &amp;JiraService{<br>        BaseURL: baseURL,<br>        Token:   token,<br>        Client:  &amp;http.Client{Timeout: 30 * time.Second},<br>    }<br>}</pre><pre>func (j *JiraService) FindTickets(ctx context.Context, projectKey, status, env string) ([]JiraTicket, error) {<br>    today := time.Now().Format(&quot;2006-01-02&quot;)<br>    jql := fmt.Sprintf(`project=%s AND status=&quot;%s&quot; AND type=&quot;Release Change Request&quot; AND duedate=&quot;%s&quot; AND env=&quot;%s&quot;`,<br>        projectKey, status, today, env)<br>    <br>    url := fmt.Sprintf(&quot;%s/rest/api/2/search?jql=%s&quot;, j.BaseURL, jql)<br>    <br>    req, err := http.NewRequestWithContext(ctx, &quot;GET&quot;, url, nil)<br>    if err != nil {<br>        return nil, fmt.Errorf(&quot;creating request: %w&quot;, err)<br>    }<br>    <br>    req.Header.Set(&quot;Authorization&quot;, &quot;Bearer &quot;+j.Token)<br>    req.Header.Set(&quot;Accept&quot;, &quot;application/json&quot;)<br>    <br>    resp, err := j.Client.Do(req)<br>    if err != nil {<br>        return nil, fmt.Errorf(&quot;executing request: %w&quot;, err)<br>    }<br>    defer resp.Body.Close()<br>    <br>    if resp.StatusCode != http.StatusOK {<br>        body, _ := io.ReadAll(resp.Body)<br>        return nil, fmt.Errorf(&quot;API returned %d: %s&quot;, resp.StatusCode, body)<br>    }<br>    <br>    var result struct {<br>        Issues []JiraTicket `json:&quot;issues&quot;`<br>    }<br>    <br>    if err := json.NewDecoder(resp.Body).Decode(&amp;result); err != nil {<br>        return nil, fmt.Errorf(&quot;decoding response: %w&quot;, err)<br>    }<br>    <br>    return result.Issues, nil<br>}</pre><pre>func (j *JiraService) UpdateTicket(ctx context.Context, ticketID, comment string) error {<br>    url := fmt.Sprintf(&quot;%s/rest/api/2/issue/%s/comment&quot;, j.BaseURL, ticketID)<br>    <br>    payload := map[string]interface{}{<br>        &quot;body&quot;: comment,<br>    }<br>    <br>    body, _ := json.Marshal(payload)<br>    req, _ := http.NewRequestWithContext(ctx, &quot;POST&quot;, url, bytes.NewReader(body))<br>    req.Header.Set(&quot;Authorization&quot;, &quot;Bearer &quot;+j.Token)<br>    req.Header.Set(&quot;Content-Type&quot;, &quot;application/json&quot;)<br>    <br>    resp, err := j.Client.Do(req)<br>    if err != nil {<br>        return fmt.Errorf(&quot;updating ticket: %w&quot;, err)<br>    }<br>    defer resp.Body.Close()<br>    <br>    if resp.StatusCode != http.StatusCreated {<br>        return fmt.Errorf(&quot;failed to update ticket: status %d&quot;, resp.StatusCode)<br>    }<br>    <br>    return nil<br>}</pre><pre>type JenkinsService struct {<br>    BaseURL  string<br>    Username string<br>    Token    string<br>    Client   *http.Client<br>}</pre><pre>func NewJenkinsService(baseURL, username, token string) *JenkinsService {<br>    return &amp;JenkinsService{<br>        BaseURL:  baseURL,<br>        Username: username,<br>        Token:    token,<br>        Client:   &amp;http.Client{Timeout: 30 * time.Second},<br>    }<br>}</pre><pre>func (j *JenkinsService) TriggerBuild(ctx context.Context, jobName string, params DeploymentParams) (string, error) {<br>    url := fmt.Sprintf(&quot;%s/job/%s/buildWithParameters&quot;, j.BaseURL, jobName)<br>    <br>    req, err := http.NewRequestWithContext(ctx, &quot;POST&quot;, url, nil)<br>    if err != nil {<br>        return &quot;&quot;, err<br>    }<br>    <br>    q := req.URL.Query()<br>    q.Add(&quot;RELEASE_VERSION&quot;, params.ReleaseVersion)<br>    q.Add(&quot;ENVIRONMENT_NAME&quot;, params.EnvironmentName)<br>    req.URL.RawQuery = q.Encode()<br>    <br>    req.SetBasicAuth(j.Username, j.Token)<br>    <br>    resp, err := j.Client.Do(req)<br>    if err != nil {<br>        return &quot;&quot;, fmt.Errorf(&quot;triggering build: %w&quot;, err)<br>    }<br>    defer resp.Body.Close()<br>    <br>    if resp.StatusCode != http.StatusCreated {<br>        return &quot;&quot;, fmt.Errorf(&quot;failed to trigger build: status %d&quot;, resp.StatusCode)<br>    }<br>    <br>    queueURL := resp.Header.Get(&quot;Location&quot;)<br>    return queueURL, nil<br>}</pre><pre>// ============================================<br>// 3. CONCURRENT ORCHESTRATION<br>// ============================================</pre><pre>type Orchestrator struct {<br>    Config  Config<br>    Jira    *JiraService<br>    Jenkins *JenkinsService<br>}</pre><pre>func (o *Orchestrator) ProcessDeployment(ctx context.Context) error {<br>    // Step 1: Find tickets concurrently with validation<br>    ticketsChan := make(chan []JiraTicket, 1)<br>    errChan := make(chan error, 1)<br>    <br>    go func() {<br>        tickets, err := o.Jira.FindTickets(ctx, o.Config.JiraProjectKey, o.Config.JiraStatus, o.Config.Environment)<br>        if err != nil {<br>            errChan &lt;- err<br>            return<br>        }<br>        ticketsChan &lt;- tickets<br>    }()<br>    <br>    // Wait for tickets with timeout<br>    select {<br>    case tickets := &lt;-ticketsChan:<br>        if len(tickets) == 0 {<br>            return fmt.Errorf(&quot;no tickets found for deployment&quot;)<br>        }<br>        <br>        // Step 2: Process each ticket concurrently<br>        return o.processTicketsConcurrently(ctx, tickets)<br>        <br>    case err := &lt;-errChan:<br>        return fmt.Errorf(&quot;failed to fetch tickets: %w&quot;, err)<br>        <br>    case &lt;-ctx.Done():<br>        return ctx.Err()<br>    }<br>}</pre><pre>func (o *Orchestrator) processTicketsConcurrently(ctx context.Context, tickets []JiraTicket) error {<br>    // Use semaphore pattern to limit concurrent deployments<br>    semaphore := make(chan struct{}, 3) // Max 3 concurrent deployments<br>    errors := make(chan error, len(tickets))<br>    <br>    for _, ticket := range tickets {<br>        semaphore &lt;- struct{}{} // Acquire<br>        <br>        go func(t JiraTicket) {<br>            defer func() { &lt;-semaphore }() // Release<br>            <br>            if err := o.processTicket(ctx, t); err != nil {<br>                errors &lt;- fmt.Errorf(&quot;ticket %s: %w&quot;, t.ID, err)<br>            }<br>        }(ticket)<br>    }<br>    <br>    // Wait for all goroutines<br>    for i := 0; i &lt; cap(semaphore); i++ {<br>        semaphore &lt;- struct{}{}<br>    }<br>    close(errors)<br>    <br>    // Collect errors<br>    var errs []error<br>    for err := range errors {<br>        errs = append(errs, err)<br>    }<br>    <br>    if len(errs) &gt; 0 {<br>        return fmt.Errorf(&quot;encountered %d errors during deployment&quot;, len(errs))<br>    }<br>    <br>    return nil<br>}</pre><pre>func (o *Orchestrator) processTicket(ctx context.Context, ticket JiraTicket) error {<br>    params := DeploymentParams{<br>        ReleaseVersion:  ticket.Fields.ReleaseJSON,<br>        EnvironmentName: o.Config.Environment,<br>    }<br>    <br>    // Trigger build<br>    queueURL, err := o.Jenkins.TriggerBuild(ctx, fmt.Sprintf(&quot;release-%s-v3&quot;, o.Config.Environment), params)<br>    if err != nil {<br>        return err<br>    }<br>    <br>    // Update Jira with deployment started<br>    comment := fmt.Sprintf(&quot;Deployment started: %s&quot;, queueURL)<br>    if err := o.Jira.UpdateTicket(ctx, ticket.ID, comment); err != nil {<br>        fmt.Printf(&quot;Warning: failed to update Jira: %v\n&quot;, err)<br>    }<br>    <br>    fmt.Printf(&quot;✅ Successfully triggered deployment for %s\n&quot;, ticket.ID)<br>    return nil<br>}</pre><pre>// ============================================<br>// 4. MAIN ENTRY POINT<br>// ============================================</pre><pre>func main() {<br>    if len(os.Args) &lt; 2 {<br>        fmt.Println(&quot;Usage: deployment-automation &lt;environment&gt;&quot;)<br>        os.Exit(1)<br>    }<br>    <br>    environment := os.Args[1]<br>    <br>    // Load configuration<br>    cfg := Config{<br>        Environment:    environment,<br>        JiraBaseURL:    &quot;https://jira.shankar.com&quot;,<br>        JenkinsBaseURL: fmt.Sprintf(&quot;https://jenkins.%s.tools.com&quot;, environment),<br>        JiraProjectKey: &quot;EdCast-DevOps&quot;,<br>        JiraStatus:     &quot;Approved&quot;,<br>        AllowedEnvs:    map[string]bool{<br>            &quot;us-west-2-staging-01&quot;: true,<br>            &quot;us-east-1-prod-01&quot;:    true,<br>        },<br>    }<br>    <br>    // Initialize services<br>    jiraToken := os.Getenv(&quot;JIRA_AUTH_TOKEN&quot;)<br>    jenkinsUser := os.Getenv(&quot;JENKINS_USER&quot;)<br>    jenkinsToken := os.Getenv(&quot;JENKINS_TOKEN&quot;)<br>    <br>    jiraService := NewJiraService(cfg.JiraBaseURL, jiraToken)<br>    jenkinsService := NewJenkinsService(cfg.JenkinsBaseURL, jenkinsUser, jenkinsToken)<br>    <br>    orchestrator := &amp;Orchestrator{<br>        Config:  cfg,<br>        Jira:    jiraService,<br>        Jenkins: jenkinsService,<br>    }<br>    <br>    // Execute with context and timeout<br>    ctx, cancel := context.WithTimeout(context.Background(), 30*time.Minute)<br>    defer cancel()<br>    <br>    if err := orchestrator.ProcessDeployment(ctx); err != nil {<br>        fmt.Fprintf(os.Stderr, &quot;❌ Deployment failed: %v\n&quot;, err)<br>        os.Exit(1)<br>    }<br>    <br>    fmt.Println(&quot;🎉 Deployment automation completed successfully!&quot;)<br>}</pre><h3>📈 Performance Comparison</h3><h3>Python Execution Flow</h3><pre>Total Time: ~45 seconds (sequential)</pre><pre>Find Jira Tickets:        [####] 5s<br>Get AWS Parameters:       [####] 4s<br>Trigger Jenkins:          [###] 3s<br>Wait for Build Start:     [#####] 8s<br>Monitor Build:            [####################] 20s (polling)<br>Update Jira:              [###] 3s<br>Send Notifications:       [##] 2s</pre><h3>Go Execution Flow</h3><pre>Total Time: ~18 seconds (concurrent)</pre><pre>Concurrent Phase 1:       [####] 5s<br>├─ Find Jira Tickets      [####]<br>├─ Get AWS Parameters     [####]<br>└─ Validate Config        [#]</pre><pre>Trigger Jenkins:          [##] 2s</pre><pre>Concurrent Phase 2:       [########] 8s<br>├─ Monitor Build          [########]<br>├─ Update Jira            [##]<br>└─ Send Notifications     [#]</pre><pre>Post-Deployment:          [###] 3s<br>└─ Health Checks          [###]</pre><pre>⚡ 2.5x faster execution!</pre><h3>🎯 Integration with Your Tech Stack</h3><h3>Jenkins Integration</h3><p><strong>Simplified Jenkinsfile:</strong></p><pre>pipeline {<br>    agent any<br>    stages {<br>        stage(&#39;Run Go Automation&#39;) {<br>            steps {<br>                container(&#39;golang&#39;) {<br>                    sh &#39;&#39;&#39;<br>                        # Single binary, no dependencies!<br>                        ./deployment-automation us-west-2-staging-01<br>                    &#39;&#39;&#39;<br>                }<br>            }<br>        }<br>    }<br>}</pre><h3>Kubernetes Deployment</h3><pre>apiVersion: batch/v1<br>kind: CronJob<br>metadata:<br>  name: auto-deployment<br>spec:<br>  schedule: &quot;0 2 * * *&quot;<br>  jobTemplate:<br>    spec:<br>      template:<br>        spec:<br>          containers:<br>          - name: deployment-bot<br>            image: myregistry/deployment-automation:latest<br>            # Image size: 15MB (vs 500MB+ Python image)<br>            env:<br>            - name: ENVIRONMENT<br>              value: &quot;us-west-2-staging-01&quot;<br>            resources:<br>              requests:<br>                memory: &quot;32Mi&quot;  # Python needs 256Mi+<br>                cpu: &quot;100m&quot;<br>              limits:<br>                memory: &quot;128Mi&quot;<br>                cpu: &quot;500m&quot;</pre><h3>Terraform Module</h3><pre>resource &quot;aws_lambda_function&quot; &quot;deployment_automation&quot; {<br>  function_name = &quot;deployment-automation&quot;<br>  handler       = &quot;main&quot;<br>  runtime       = &quot;provided.al2&quot;  # Custom runtime for Go<br>  <br>  # Single binary deployment<br>  filename      = &quot;deployment-automation.zip&quot;<br>  <br>  memory_size   = 256  # Python would need 1024+<br>  timeout       = 900<br>  <br>  environment {<br>    variables = {<br>      JIRA_BASE_URL    = var.jira_url<br>      JENKINS_BASE_URL = var.jenkins_url<br>    }<br>  }<br>}</pre><h3>🚀 Getting Started: Your Migration Path</h3><h3>Week 1: Setup &amp; Basics</h3><ol><li>Install Go: brew install go or download from golang.org</li><li>Learn basics: <a href="https://tour.golang.org/">tour.golang.org</a></li><li>Set up your project structure:</li></ol><pre>deployment-automation/<br>├── main.go<br>├── internal/<br>│   ├── jira/<br>│   │   └── client.go<br>│   ├── jenkins/<br>│   │   └── client.go<br>│   └── config/<br>│       └── config.go<br>├── go.mod<br>└── go.sum</pre><h3>Week 2: Convert One Script</h3><ul><li>Pick your simplest Python script</li><li>Rewrite it in Go</li><li>Compare performance and complexity</li></ul><h3>Week 3: Build CI/CD Integration</h3><ul><li>Create Docker image with multi-stage build</li><li>Integrate with Jenkins</li><li>Deploy to Kubernetes</li></ul><h3>Week 4: Optimize &amp; Scale</h3><ul><li>Add concurrency where appropriate</li><li>Implement proper error handling</li><li>Set up monitoring and logging</li></ul><h3>💡 Key Takeaways</h3><h3>When to Use Go in DevOps</h3><p>✅ <strong>Perfect for:</strong></p><ul><li>CLI tools and automation scripts</li><li>API services and webhooks</li><li>Container-based applications</li><li>Performance-critical paths</li><li>Multi-platform tools</li><li>Long-running services</li></ul><p>❌ <strong>Stick with Python for:</strong></p><ul><li>Quick one-off scripts (&lt; 50 lines)</li><li>Heavy data science/ML workloads</li><li>When team has zero Go experience</li><li>Rapid prototyping without type safety requirements</li></ul><h3>The Bottom Line</h3><p>Go isn’t about replacing Python everywhere — it’s about using the right tool for the job. For production DevOps automation that needs to be <strong>fast</strong>, <strong>reliable</strong>, and <strong>maintainable</strong>, Go is increasingly becoming the obvious choice.</p><p>Your Python scripts got you here. Go will take you further.</p><h3>🔗 Resources</h3><ul><li><strong>Official Go Tour</strong>: <a href="https://tour.golang.org/">tour.golang.org</a></li><li><strong>Go by Example</strong>: <a href="https://gobyexample.com/">gobyexample.com</a></li><li><strong>Awesome Go</strong>: <a href="https://github.com/avelino/awesome-go">github.com/avelino/awesome-go</a></li><li><strong>Go DevOps Tools</strong>: Terraform, Kubernetes, Docker, Prometheus (all written in Go!)</li></ul><p><em>What’s your biggest pain point with Python in DevOps? Drop a comment below, and let’s discuss how Go might solve it!</em> 💬</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0c8a069b5280" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Handling On-prem Oracle Database Automation with Ansible like a pro.]]></title>
            <link>https://medium.com/@asknanishankar/handling-on-prem-oracle-database-automation-with-ansible-like-a-pro-5f942d073157?source=rss-f5eeddb06e31------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f942d073157</guid>
            <category><![CDATA[oracle-database]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[ansible]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[ansible-awx]]></category>
            <dc:creator><![CDATA[Shankar Asknani]]></dc:creator>
            <pubDate>Sat, 18 Nov 2023 10:44:53 GMT</pubDate>
            <atom:updated>2024-04-17T19:30:45.288Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*o1fSTuH81AyclcH-QexYZw.png" /></figure><h3>TL;DR</h3><p><strong>This article is focused on extending legitimate ways to handle automation of oracle databases using ansible as there is no official support for oracle db’s from RedHat ansible. While designing a new system, architect might change the architecture for better efficiency based on functional requirement, hence I will discuss most of the approches here in this article to achieve automated oracle db operations using ansible or AWX.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/0*SHkAfkMhqDSnkyJq" /></figure><h4><strong>Requirements &amp; Installations :</strong></h4><ul><li>Python</li><li>Control Machine (where Ansible should be installed)</li><li>Target machine (with oracle db installed)</li><li>Ansible Software</li></ul><p>Click Here for detailed installation steps — <a href="https://docs.ansible.com/ansible/latest/installation_guide/index.html">follow the official documentation</a>.</p><h4>How to Install Ansible</h4><ul><li>Using Yum– Linux</li><li>Using apt– Ubuntu &amp; Debain</li><li>Using brew– Mac Os</li><li>Pip– Python</li><li>Clone From Git</li></ul><blockquote>Note :</blockquote><blockquote>Python is required on Target Machine for Certain Modules &amp; to Copy authorized_keys of the ansible control machine to target hosts</blockquote><p>Once we are all set with ansible we require a <strong>target host with oracle database installed </strong>on it.</p><p><strong>Rule based operations in db may vary based on requirements — this automation can also be as simple as checking all the users in the database with a single ‘select’ query to as complex as performing a major version patching with backup / snapshot creation.</strong></p><blockquote>We need credentials or LDAP/authorized user (added in sudoers) to login into the database server and switch to /home/oracle directory to do the required operations OR we can directly use oracle/orainst user.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/0*i7i1whNPq9akw3Mu.png" /></figure><p><strong>Handling Operations on on-prem hosted database servers</strong></p><p><strong>There are various ways to handle on-prem hosted database servers:</strong></p><ol><li><strong>Connecting to server via ssh (as ansible does) &amp; simply run shell modules</strong></li><li><strong>Create template (.j2 files) and push it from source (local) onto target server and run the shell script using script module in ansible</strong></li><li><strong>Make your own shell wrapper module using subprocess library, by keeping the python module file under library section of ansible role structure.</strong></li><li><strong>Use external available collection from oraivrt or ari_stark- </strong><a href="https://github.com/ari-stark/ansible-oracle-modules"><strong>ansible_oracle_modules</strong></a></li></ol><h3>1. Using simply a shell module in ansible</h3><p>This method is very simple and easy to use, but it comes with lot of security holes — like non-idempotency and un-secure way to do operations on database.</p><p>Here is a example of running a select query using shell modules — we will connect to oracle database using shell commands and run the query as shown below-</p><pre>---<br>- name: Running a select query on database server<br>  hosts: ud000110014r  # here you can add your target server<br>  tasks:<br>     - name: running a shell commands for db query<br>       shell: |<br>             . orav {{database_name}}<br>             sqlplus / as sysdba<br>             set feed off head off<br>             set long 99999;<br>             select username from dba_users;<br>             exit;<br>             EOF<br>       register: user_output<br><br>      - name: show list of user output<br>        debug: var=user_output.stdout      <br>  become: True<br>  become_user: &quot;oracle&quot;<br>  become_flags: &quot;--login&quot;<br>  vars:<br>    ansible_shell_allow_world_readable_temp: true<br></pre><p>This can be made more secure alike idempotent behaviour using various task arguments like <em>change_when</em> as false attribute and also we can achieve this behaviour by adding adding various checks and make sure that desired code runs only when certain criteria is satisfied.</p><h3>2. Using jinja (.j2) templates in ansible role</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*PeK2pbttrd7BcYSI" /></figure><p>In ansible role we have <em>templates</em> directory where we can store .j2 templates, using these templates we can create a shell scripts on target host and run all of them directly as shell script.</p><pre>. orav {{database_name}}<br>sqlplus / as sysdba<br>set feed off head off<br>set long 99999;<br>select username from dba_users;<br>exit;<br>EOF</pre><p>Above file is <em>check_users.j2</em> which is placed under templates folder of ansible role.</p><p>now in our playbook we need to use template module and create a shell script on target host and run that shell script.</p><p>Template module will create a shell script on target host referring to our jinja template placed under templates folder of ansible role.</p><pre>---<br>- name: making a shell script on target host.<br>  ansible.builtin.template:<br>    src: check_user.j2  #this will search in your templates folder<br>    dest: /home/oracle/check_user.sh<br>    owner: oracle<br>    mode: &#39;0755&#39;<br>  register: template_copy<br><br>- name: running a shell script<br>  ansible.builtin.shell: /home/oracle/check_user.sh<br>  register: running_shell_scr</pre><blockquote>Similarly, we can acheive this using a script module in ansible, while using this module, <strong>script module </strong>will directly copy a script from your local to target host and also run it — you can explore more on using script module <a href="https://www.youtube.com/watch?v=gXD4KlH82MU&amp;pp=ygUVc2NyaXB0IG1vZHVsZSBhbnNpYmxl">Here</a>.. Using jinja (.j2) templates in ansible role</blockquote><h3>3. Developing a Custom Module — a shell wrapper.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uzSPHwNCv1c2p0ID.png" /></figure><p>we can develop a custom ansible module if we dont want to repeat the same steps again and again. We can use subprocess or os library of python to run commands.</p><p>We can develop custom modules in ansible by writing a python file and keeping the py file under library folder of ansible role — more details on developing ansible modules can be found <a href="https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html">here</a></p><p>Using this module, we can call the module in our ansible task by the name of python file we created under library folder. so if we create oracle_query.py then we can use oracle_query as our module name under our tasks — as shown below.#!usr/bin/python<br><br>#This is &quot;oracle_query.py&quot;<br><br>from ansible.module_utils.basic import AnsibleModule<br>import subprocess<br>import json<br>import os<br><br>def main():<br> fields = {<br> &quot;database_name&quot;: {&quot;required&quot;: True,&quot;type&quot;: &quot;str&quot;},<br> &quot;query&quot;: {&quot;required&quot;: True,&quot;type&quot;: &quot;str&quot;}<br> }<br><br> module = AnsibleModule(argument_spec=fields)<br> result = dict(changed=False,<br> database_name=&#39;&#39;,<br> query=&#39;&#39;)<br> result[&#39;database_name&#39;]= module.param[&#39;database_name&#39;]<br> result[&#39;query&#39;]= module.param[&#39;query&#39;]<br> <br># After input query we have to add semicolons at the end of the line.<br># do change the user if you want to connect to db with other user than sysdba<br> command = &#39;&#39;&#39;. orav &#39;&#39;&#39;+ result[&#39;database_name&#39;]+&#39;&#39;&#39;;<br> sqlplus -s /nolog &lt;&lt;EOF<br> connect / as sysdba<br> set feed off head off<br> set long 99999;<br> &#39;&#39;&#39;+ result[&#39;query&#39;] +&#39;&#39;&#39;<br> exit;<br> EOF; &#39;&#39;&#39;<br> <br> process = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True, universal_newlines=True)<br> # if you want dont want to run this in new shell everytime - make sure to remove shell=True<br> # subprocess output always returns bytes and to convert in chars and lines we use universal_newlines<br> <br> process_stdout = procss.communicate()[0].strip()<br> # this communicates with the &#39;process&#39; and reads all its output and waits for subprocess to close<br> # we want to cut the terminating new line hence we can use strip here<br> # you can also use &quot;.decode(&#39;utf-8).strip()&quot;<br><br> module.exit_json(changed=False, msg=process_stdout)<br><br><br>if __name__ == &quot;__main__&quot;:<br> main()</p><p>Above file we have to keep under our ansible roles/library folder as oracle_query.py , Above module code can be made more secure and more multi-threaded by exploring more on subprocess library methods and classes or using assert statement to keep checks in place for countering any edge cases that has to be handled by module itself.</p><p>Now our module is ready which takes 2 mandatory arguments — Database_name and Sql query to run and rest everything is taken care by module(connection and closing strings). as shown in the above code we are capturing the output and displaying as in msg on output console.</p><p>Lets use this module in our tasks:</p><pre>---<br>- name: running a oracle module<br>  hosts: ud000110014r  # here you can add your target server<br>  tasks:<br>     - name: running a custom module with required params<br>       oracle_query:<br>         database_name: &quot;ORACLE_DB&quot;<br>         query: &quot;select username from dba_users;&quot;<br>       register: user_output<br><br>     - name: show list of user output<br>       debug: var=user_output.stdout<br><br># This debug will show all the username under msg var of the console output.</pre><blockquote><em>You can call this module and loop it with items to run all the queries or call the module individually for running any type of query on remote hosted database using our custom oracle_query module.</em></blockquote><h3><strong>4. Use external available collection from oraivrt or ari_stark- ansible_oracle_modules</strong></h3><p>These are ready made and very convenient to use if all the python libraries and client libraries are in place — it usually requires <strong>cx_oracle</strong> and some <strong>instant oracle client libraries</strong> — find more details abt using these <a href="https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html"><strong>here</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6GPoeNIRMqxNFCJm.png" /></figure><p>Here is a <a href="https://github.com/oravirt/ansible-oracle-modules"><strong><em>github link </em></strong></a>of above collection — which contains all the required modules, you can read the python implementation and usage of the modules.</p><p>Finally, we can enhance and use the above methods very conveniently based on our project requirements and scenarios.</p><p>That’s it. Have a Good one!😊</p><p>Happy Learning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f942d073157" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[All about Automation with Ansible.]]></title>
            <link>https://medium.com/@asknanishankar/all-about-automation-with-ansible-a33d1a305760?source=rss-f5eeddb06e31------2</link>
            <guid isPermaLink="false">https://medium.com/p/a33d1a305760</guid>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[ansible]]></category>
            <category><![CDATA[ansible-playbook]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Shankar Asknani]]></dc:creator>
            <pubDate>Sat, 17 Sep 2022 13:45:40 GMT</pubDate>
            <atom:updated>2022-09-17T15:45:24.140Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*9UvWU2-nZ3lALj24LmNK_w.jpeg" /></figure><h3>TL;DR</h3><p>This article is for the learners who want to <strong>automate</strong> their work, which might include running commands manually and checking the health of systems and programs and making sure all are in right state. <strong>Ansible</strong> comes handy in such scenarios to reduce human effort <strong>if and only if</strong> things follow a pattern and are rule based.</p><h3><strong>Task Automation —</strong></h3><p>Automation is about implementing a system to complete repetitive and easily replicated tasks without the need for human labor. Automating <em>repetitive business processes,</em> employees are freed up for tasks that are more valuable than those that can be completed by machines.It means companies can remain smaller and more agile.</p><p><strong>We can choose ansible for majorly 3 types of tasks:</strong></p><ol><li><strong>Configuration Management</strong> — Change the configuration of an application, OS, or device; start and stop services; install or update applications; implement a security policy; or perform a wide variety of other configuration tasks.</li><li><strong>Provisioning — </strong>Set up the various servers you need in your infrastructure.</li><li><strong>Application deployment — </strong>Make devops easier by automating the deployment of internally developed applications to your production systems.</li></ol><h3>What is ansible?</h3><p>Ansible is an <strong>automation framework </strong>which simplifies complex tasks, allowing developers to work on more urgent and important tasks that add value to an organization. Ansible is an <strong>open-source product</strong> distributed under the GNU GPL.</p><h3><strong>Why are we choosing ansible?</strong></h3><p>It is a <strong>simple,</strong> <strong>powerful</strong> &amp; <strong>agent less — <em>meaning</em> i</strong>t does not install software on the target nodes that it manages, this removes a potential point of failure and security vulnerability and simultaneously saves system resources as well. Ansible works on <em>push</em> <em>model — </em>all the configurations that are need to be done are pushed via ansible control node to all the managed target nodes as shown in below image - writing tasks in <strong>playbook</strong>(simple yaml script) &amp; supplying <strong>Host inventory file </strong>which contains hosts on which the tasks should be performed.</p><figure><img alt="Ansible connectivity from control node to target node via ssh connection" src="https://cdn-images-1.medium.com/max/1024/1*WipxpodusivN9eyghzNAiw.png" /><figcaption><a href="https://docs.ansible.com/ansible/latest/dev_guide/overview_architecture.html">https://docs.ansible.com/ansible/latest/dev_guide/overview_architecture.html</a></figcaption></figure><blockquote>Ansible modules and packages, called playbooks, are relatively easy to learn. They use a simpler yaml derived syntax.</blockquote><p>we should have python downloaded in our system to install ansible- checkout <a href="https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html">Here</a> for ansible installation.</p><ul><li>we mainly need three important files — inventory file, playbook file and configurations file</li></ul><p>Sample <strong>Hosts inventory File</strong>:</p><p>The most common formats of inventory are INI and YAML — below shown file format is .ini file. should be at path — <strong><em>/etc/ansible/hosts </em></strong>.</p><pre>mail.example.com<br><br>[webservers]<br>foo.example.com<br>bar.example.com<br><br>[dbservers]<br>one.example.com<br>two.example.com<br>three.example.com</pre><p>&amp; here is the inventory with <strong>yaml format</strong></p><pre><strong>all:</strong><br>  <strong>hosts:</strong><br>    <strong>mail.example.com:</strong><br>  <strong>children:</strong><br>    <strong>webservers:</strong><br>      <strong>hosts:</strong><br>        <strong>foo.example.com:</strong><br>        <strong>bar.example.com:</strong><br>    <strong>dbservers:</strong><br>      <strong>hosts:</strong><br>        <strong>one.example.com:</strong><br>        <strong>two.example.com:</strong><br>        <strong>three.example.com:</strong></pre><p>Just to give you an idea how a <strong>playbook</strong> looks like (.yaml or .yml format) —<em>First_playbook.yml</em></p><pre><strong>---</strong><br><strong>-</strong> <strong>name:</strong> Update web servers<br>  <strong>hosts:</strong> webservers<br>  <strong>remote_user:</strong> root<br><br>  <strong>tasks:</strong><br>  <strong>-</strong> <strong>name:</strong> Ensure apache is at the latest version<br>    <strong>ansible.builtin.yum:</strong><br>      <strong>name:</strong> httpd<br>      <strong>state:</strong> latest</pre><p>Above playbook has only 1 task which makes sure the apache version is recent one. You see, it uses a builtin <strong>yum </strong>module for RHEL OS (Red Hat Enterprise Linux) and get latest version on httpd — apache.</p><p>There are around 500 modules developed by community in ansible, you can check them out here — <a href="https://docs.ansible.com/ansible/2.9/modules/list_of_all_modules.html">Ansible all Modules</a></p><h3>Action:</h3><p>we also need a <em>configurations</em> <em>file</em> — <strong>so to let ansible know where our inventory file is present and pick up right details from it. to run all the tasks which are written in playbook on specified hosts.</strong></p><p>Configurations file — <em>ansible.cfg </em>at path <em>/etc/ansible/ansible.cfg</em></p><pre>[defaults]<br>inventory = /etc/ansible/hosts<br>host_key_checking = False</pre><p>we specify path to out inventory and give same path and as shown in above diagram we make connection via ssh to remote host so now as <strong>Ansible is an automation tool and while doing SSH, there is no physical person to write “yes” so we use “host_key_checking” false, </strong>when we do SSH to any system we need to write “yes” right after we do ssh to connect to the remote system.</p><p>Now, to run this via our ansible control node, we need sshpass — which we can get by (on RHEL) by using</p><blockquote><strong>yum install sshpass -y</strong></blockquote><p>This completes our set up now we can make connection to our remote hosts — we can test it via <strong>ping</strong> module to our remote host and we must get a reply as ‘pong’</p><blockquote>[root@localhost ansible]# <em>ansible all -m ping</em></blockquote><p>we can trigger a playbook via ansible-playbook command and we can pass extra variables or tags in command line adhoc commands.</p><blockquote>[root@localhost ansible]# ansible-playbook First_playbook.yml</blockquote><p>above command will give run the tasks and consequently would give a task summary as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6QiaE0IqYtG_c1ne1HshAA.png" /></figure><h4>We can write all the tasks in playbook and use different functionalities provided by ansible, which has broader scope in a lot of areas as shown in above diagram.</h4><p>Finally, I want to give you an overall idea regarding <strong>Ansible Tower</strong> — <strong>Which requires a license to use the software</strong> &amp; provides us User Interface for all the functionalities that we have with ansible and some additional features too such as <strong>Role-based access control, Job scheduling ,Multi-playbook workflows.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*O_h7aHz51FtHRceKg6W3dA.png" /></figure><p>for more information visit — <a href="https://docs.ansible.com/ansible-tower/">Ansible Tower</a></p><h3>Widely Used Architecture in industries for DevOps projects—</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LJPUnzxAGM_toI6Lqu41Dg.jpeg" /></figure><p><strong><em>Developers do develop automation &amp; commit which is source controlled by git , Triggered the jobs via Jenkins which in-turn runs via ansible and deployed on subscribed containers.</em></strong></p><p>i hope the <strong>overview of ansible</strong> is clear, it is very crucial for industries to fast pace task development and complete important tasks without breaching any SLA’s, ansible seems like a tool to fit in perfectly in such scenarios.</p><p>Do follow Ansible Docs for more information — <a href="https://docs.ansible.com/ansible/latest/index.html">Here</a></p><p><strong><em>That’s all for now folks. Happy Learning!!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a33d1a305760" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[All About Data Science.]]></title>
            <link>https://medium.com/@asknanishankar/all-about-data-science-a82697a0f2b2?source=rss-f5eeddb06e31------2</link>
            <guid isPermaLink="false">https://medium.com/p/a82697a0f2b2</guid>
            <category><![CDATA[math]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[data-scientist]]></category>
            <dc:creator><![CDATA[Shankar Asknani]]></dc:creator>
            <pubDate>Thu, 13 Aug 2020 18:42:15 GMT</pubDate>
            <atom:updated>2020-08-13T18:42:15.131Z</atom:updated>
            <content:encoded><![CDATA[<p>People from any domain can break into data science, irrespective of any stream. Today let’s know everything we need to know about this field.</p><p>Big Picture(below): I have tried to fit things in a single picture so that reader should get a overall idea about the roles and what we need to understand about the data and provide the optimal data science solution as per the provided data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kJsyo7k4-fqK11DvwaV3SQ.jpeg" /><figcaption>BIG PICTURE..(try to read as much as you can) by Shankar Asknani.</figcaption></figure><p>As you see there are a lot of concepts and techniques, Also different <strong>types of data</strong> that one might come across, while working with data. As far as i believe, a good <strong>data scientist </strong>should<strong> </strong>have hold on mentioned pointers.</p><ol><li>Programming Language — Python/R (most preferred)</li><li>Data Visualization &amp; understanding.</li><li>Machine Learning Concepts.</li><li>Data Preprocessing and Wrangling.</li><li>SQL/NoSql ,Math &amp; statistical concepts.</li><li>Deep Learning.</li></ol><p>Now, as you can see each of them has their own use in various <em>Machine Learning Pipelines, w</em>hich contributes to overall solution . Having the strong fundamental concepts makes a lot of things easier to understand, how are the things getting processed under the hood. Even though, we see everyday their is some new research happening in Data Science and with a new benchmark scores (becoming SOTA).</p><p>if some one is interested in working with data and pulling insights from the data need to have a strong grip in all the 6 pointers mentioned. Let’s see what type of data typically a Data Engineer or a Data Scientist Deals on daily basis.</p><h4><strong><em>The Two Main Flavors of Data: Qualitative and Quantitative</em></strong></h4><p>At the highest level, two kinds of data exist: <strong><em>quantitative</em></strong> and <strong><em>qualitative</em></strong>.</p><p><strong><em>Quantitative</em> </strong>data deals with numbers and things you can measure objectively: dimensions such as height, width, and length. Temperature and humidity. Prices. Area and volume.</p><p><strong><em>Qualitative </em></strong>data deals with characteristics and descriptors that can’t be easily measured, but can be observed subjectively — such as smells, tastes, textures, attractiveness, and color.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*tL9emwZ6G8naRkU-sNZ6xQ.gif" /></figure><ul><li>Ratio (equal spaces between values and a meaningful zero value — mean makes sense)</li><li>Interval (equal spaces between values, but no meaningful zero value — mean makes sense)</li><li>Ordinal (first, second, third values, but not equal space between first and second and second and third — median makes sense)</li><li>Nominal (no numerical relationship between the different categories — mean and median are meaningless)</li><li>Image &amp; sequence of images(Video) Data</li><li>Audio Data</li><li>Text Data.</li></ul><p>As you can see most of the stuff is covered in bigger picture, every morning i have a schedule to look at the above picture and explore on various topics.</p><p>i would recommend to start learning one programming language first and start data analysis or EDA(Exploratory Data Analysis) on various data sets</p><p>find free datasets on Google Dataset search <strong>https://datasetsearch.research.google.com/</strong></p><p>The easiest way possible to learn machine learning is to explore<strong> scikit-learn</strong> module —<strong> </strong><a href="https://scikit-learn.org/stable/"><strong>https://scikit-learn.org/stable/</strong></a></p><p>Data science consists of varied topics and concepts, that most of times it very hard to keep track and recall concepts. Hence, to keep them handy i refer the below mindmaps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*potBJEsqJyIIB2Apseb5jQ.png" /><figcaption>i got this sheet from a github page as you can see at the middle</figcaption></figure><p>&amp; Also i keep track of math — <strong>probability and statistics concepts</strong> all the time</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bfEr3lIitsat7mH1vQaI7Q.png" /></figure><p>These sheets are very handy to revise concepts from time to time. Growing little bit everyday makes you great one day.</p><p>Next posts — ill focus on each of the 6 pointers and detailed concepts one should know as a <strong><em>growing Data Scientist</em></strong>.</p><p>Thanks for reading. Have a nice one.</p><p><strong><em>Cheers!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a82697a0f2b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Writing a simple python script to post data from SQL Server database using requests.]]></title>
            <link>https://medium.com/@asknanishankar/writing-a-simple-python-script-to-post-data-from-sql-server-database-using-requests-52d6fe70672f?source=rss-f5eeddb06e31------2</link>
            <guid isPermaLink="false">https://medium.com/p/52d6fe70672f</guid>
            <category><![CDATA[pyodbc]]></category>
            <category><![CDATA[scom]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[post-request]]></category>
            <category><![CDATA[python-scripting]]></category>
            <dc:creator><![CDATA[Shankar Asknani]]></dc:creator>
            <pubDate>Sun, 12 Apr 2020 10:17:03 GMT</pubDate>
            <atom:updated>2020-04-12T10:17:03.878Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xdbRa_PqLEg5eCdd75K90w.jpeg" /></figure><p>Writing REST API because it provides functionality for building web applications, including managing <strong>HTTP requests</strong> and rendering templates.</p><p>I wrote a <strong>rest api </strong>to send and receive data from various monitoring tools includes System Center Operations Manager (<strong>SCOM</strong>) and various other ITSM tools. Now to <strong>analyse the data</strong> accumulated at these tools, if we need to send this data in some particular format (let’s say <strong><em>JSON</em></strong>) to a server, where this data is explored and feed to a Complex Machine Learning algorithms to automate some process and provide some useful insights.</p><p>Connecting to a Database where the data is been stored by our monitorinng tool (scom) using a python package <strong>pyodbc.</strong></p><p>Following are the steps to fetch and send data to a server from our SCOM monitoring tool:</p><ol><li><strong>Connect to a sql server database using pyodbc.</strong></li></ol><pre>import pyodbc</pre><pre>conn = pyodbc.connect(‘Driver={SQL Server};’<br> ‘Server=localhost; ’ # can be your sever-name or  #localhost:<a href="http://127.0.0.1:5000/">http://127.0.0.1</a>:port<br> ‘Database=Dummy_operations;’<br> ‘Trusted_Connection=no;’ <br> ‘uid=userid;’ # it can be “.” , “sa” or userid<br> ‘pwd=password;’<br> )</pre><p>Above snippet of code basically creates the connection to a database. in above code if not using any uid or pwd make the ‘Trusted_Connection=Yes”.</p><p><strong>2. Execute the query and fetch the results</strong></p><pre>cursor = conn.cursor()<br>query=cursor.execute(‘SELECT * FROM Dummy_operations.dbo.Ops_alerts’)</pre><pre>payload = [dict(zip([column[0] for column in cursor.description], row))<br> for row in cursor.fetchall()]</pre><p>Here i make a <strong>cursor </strong>to <strong>retrive data</strong> from table by executing the query and converting those records in json format.</p><p>3. Pushing the data over to a server</p><pre>for i in range(0,len(payload)):<br> r=requests.post(‘<a href="https://reqres.in/">https://reqres.in/</a>api/users&#39;,json=payload[i])<br> print(‘Status Code:’, r.status_code)<br> print(payload[i])<br> r.json()</pre><p>Just to test the stuff i send this data to the URL :<a href="https://reqres.in/">https://reqres.in/</a>api/users</p><p>URL is open for everyone to test.</p><p>Here is the full script:</p><pre>import pyodbc<br>import json<br>import requestsloca</pre><pre>conn = pyodbc.connect(‘Driver={SQL Server};’<br> ‘Server=localhost; ’ # can be your sever-name or localhost<br> ‘Database=Dummy_operations;’<br> ‘Trusted_Connection=no;’ <br> ‘uid=userid;’ # it can be “.” , “sa” or userid<br> ‘pwd=password;’<br> )</pre><pre>cursor = conn.cursor()<br>query=cursor.execute(‘SELECT * FROM Dummy_operations.dbo.Ops_alerts’)</pre><pre>payload = [dict(zip([column[0] for column in cursor.description], row))<br> for row in cursor.fetchall()]</pre><pre>for i in range(0,len(payload)):<br> r=requests.post(‘<a href="https://reqres.in/">https://reqres.in/</a>api/users&#39;,json=payload[i])<br> print(‘Status Code:’, r.status_code)<br> print(payload[i])<br> r.json()</pre><p>I send the payload as:</p><pre>Pushed Payload:<br>{“name”: “Shankar Asknani”, “job”: “Python Developer”}</pre><pre>Received Response: <br>&#39;{&quot;name&quot;:&quot;Shankar Asknani&quot;,&quot;job&quot;:&quot;Python Developer&quot;,&quot;id&quot;:&quot;888&quot;,&quot;createdAt&quot;:&quot;2020-04-12T10:06:41.049Z&quot;}&#39;</pre><p>That’s all for now folks.</p><p>Hope it helps. if it helped you for whatsoever reason please comment down for the same. if you have any idea or any suggestions for me please put that down in the comment box too.</p><p>Thankyou, Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52d6fe70672f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>