<?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 Siddharth Barahalikar on Medium]]></title>
        <description><![CDATA[Stories by Siddharth Barahalikar on Medium]]></description>
        <link>https://medium.com/@barahalikar.siddharth?source=rss-da408b20ed57------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*U5d6cIUQUzIqeTLfR4vlOA.png</url>
            <title>Stories by Siddharth Barahalikar on Medium</title>
            <link>https://medium.com/@barahalikar.siddharth?source=rss-da408b20ed57------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 09:31:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@barahalikar.siddharth/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[GitOps FluxCD 101]]></title>
            <link>https://medium.com/@barahalikar.siddharth/gitops-fluxcd-101-b61b386c5ecd?source=rss-da408b20ed57------2</link>
            <guid isPermaLink="false">https://medium.com/p/b61b386c5ecd</guid>
            <category><![CDATA[flux-cd]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[gitops]]></category>
            <category><![CDATA[helm]]></category>
            <dc:creator><![CDATA[Siddharth Barahalikar]]></dc:creator>
            <pubDate>Wed, 19 Apr 2023 14:42:13 GMT</pubDate>
            <atom:updated>2023-04-19T14:42:13.964Z</atom:updated>
            <cc:license>http://creativecommons.org/publicdomain/zero/1.0/</cc:license>
            <content:encoded><![CDATA[<p>In the world of DevOps, keeping up with continuous deployment and delivery can be a daunting task. That’s where <strong>GitOps </strong>comes in — a new approach to managing infrastructure as code that uses version control systems like Git to automate deployments. <strong>FluxCD</strong> is an open-source tool that makes implementing GitOps a breeze. In this blog post, we’ll walk you through everything you need to know about using FluxCD for your next project and how it can simplify your DevOps process. So buckle up and get ready to dive into the world of GitOps with FluxCD!</p><blockquote>If you want to learn Flux by doing, please check out my <strong>Udemy course -</strong> <a href="https://www.udemy.com/course/gitops-flux/?couponCode=GITOPS-FLUX-APR-2023">FluxCD 101 with Hands-on Labs</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cIbblDOm1hkhsURG3VbpRQ.png" /><figcaption>FluxCD Udemy Course Flyer</figcaption></figure><h3><strong>Introduction to GitOps and FluxCD</strong></h3><p>GitOps is a relatively new term for a set of practices that can be used to manage infrastructure and applications using Git as the primary source of truth.</p><p>At its core, GitOps is about using Git as a central source of truth for all things related to your application or infrastructure. This includes everything from the code that makes up your application to the configurations used to deploy and run it.</p><p>FluxCD is a tool that can help automate many of the tasks associated with GitOps. It can be used to automatically deploy code changes when they are pushed to a central repository, and it can also be used to monitor and update configurations as needed.</p><p>There are many benefits to using GitOps with FluxCD. First, it can help reduce the risk of human error when deploying code or configurations. Second, it can speed up the process of deployments by automating many of the steps involved.</p><h3><strong>What is FluxCD?</strong></h3><p>FluxCD is a tool that automates the deployment of applications to Kubernetes. It can be used to manage both deployments and rollbacks, making it an ideal tool for implementing GitOps.</p><p>FluxCD works by polling a Git repository for changes and then automatically deploying those changes to Kubernetes. This means that all you need to do to trigger a deployment is push your changes to your Git repo, and FluxCD will take care of the rest.</p><p>FluxCD also supports automated rollbacks, so if there are any problems with a deployment, you can simply revert your changes in Git and FluxCD will automatically undo the deployment for you.</p><p>FluxCD is an incredibly powerful tool that can make implementing GitOps on Kubernetes a breeze. If you’re looking for a way to automate your deployments and make sure they’re always up-to-date, then FluxCD is definitely worth considering.</p><h3><strong>What are Flux Controllers?</strong></h3><p>Flux is constructed using various Controllers. These controllers are an implementation of a Kubernetes controller pattern. An overview of each controller is provided below,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GgCRrqG2FhKFSRk-E7NmxA.png" /><figcaption>source-controller</figcaption></figure><p><strong>Source Controller — </strong>It is responsible for fetching the manifests for given sources from a Git repository and storing them in the cluster. The source controller can be configured to watch for changes in the manifests and automatically fetch/pull them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TdW5zSKerm9X3_0mSijonQ.png" /><figcaption>kustomize-controller</figcaption></figure><p><strong>Kustomization Controller — </strong>It can generate manifests with Kustomize, validate, and apply them in the cluster. It will automatically reconcile the cluster when Source Controller pulls updated manifests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G-5dtVfnDoDt660xZ0ncRg.png" /><figcaption>helm-controller</figcaption></figure><p><strong>Helm Controller — It </strong>manages the deployment and operation of Helm charts. Performs automated Helm actions, including Helm releases, upgrades, tests, rollbacks, and uninstalls</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NZEd1d3Ziz3ZdQYrh4_1GA.png" /><figcaption>notification-controller</figcaption></figure><p><strong>Notification Controller — </strong>It handles events coming from external systems and notifies Flux Controllers. It can also handle events emitted by Flux Controllers and notify users through external systems like Slack, Discords, and Teams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JmqehbYkUVFm4TaMzddkZQ.png" /><figcaption>image-automation-controller</figcaption></figure><p><strong>Image Automation Controller</strong> — It is divided into two parts, the image-reflector-controller, and image-automation-controller work together to automatically update a Git repository when new images are available/pushed in the container registry.</p><h3><strong>Managing Secrets with FluxCD</strong></h3><p>In Kubernetes managing secrets in a Git Repository was and will always be a huge security challenge. FluxCD in combination with tools like Bitnami Sealed Secrets, Mozilla SOPS, and HashiCorp Vault can help you manage secrets with GitOps.</p><h3><strong>Alternatives to FluxCD</strong></h3><p>FluxCD is not the only tool available for implementing GitOps. Alternatives to FluxCD include Argo CD, Werf, Weave GitOps Core, CodeFresh, and Jenkins X.</p><h3><strong>Conclusion</strong></h3><p>In conclusion, FluxCD is a powerful tool that can help streamline your DevOps workflow and ensure efficient maintenance of applications. While GitOps has traditionally been difficult to implement, FluxCD makes it easier than ever with a wide range of features. So if you’re looking for a way to securely automate the management of your applications, we highly recommend giving FluxCD a try!</p><blockquote>If you want to learn Flux by doing, please check out my <a href="https://www.udemy.com/course/gitops-flux/?couponCode=GITOPS-FLUX-APR-2023">FluxCD 101 with Hands-on Labs course on Udemy.</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cIbblDOm1hkhsURG3VbpRQ.png" /><figcaption>FluxCD Udemy Course Flyer</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b61b386c5ecd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Brief Introduction to Apigee CICD Pipeline]]></title>
            <link>https://medium.com/@barahalikar.siddharth/a-brief-introduction-to-apigee-cicd-pipeline-d92f4570304c?source=rss-da408b20ed57------2</link>
            <guid isPermaLink="false">https://medium.com/p/d92f4570304c</guid>
            <category><![CDATA[apigee]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[api-management]]></category>
            <dc:creator><![CDATA[Siddharth Barahalikar]]></dc:creator>
            <pubDate>Wed, 28 Aug 2019 13:40:04 GMT</pubDate>
            <atom:updated>2019-08-28T13:40:04.314Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post, I am going to show you how to build a Jenkins CICD pipeline from scratch for testing and deploying an Apigee proxy. To be honest, this is not a detailed tutorial, I expect the users to know the basics of Apigee and Jenkins to understand the steps.</p><p>Often the most difficult and confusing aspect of application development is figuring out how to build a common framework for creating/deploying new applications. Over time, development teams have started using tools like Maven to automate some of these functions. This tutorial uses various tools/plugins for deploying Apigee Proxy bundles to the Apigee Edge platform.</p><blockquote>The entire source code is available on <a href="https://github.com/sidd-harth/apigee-cicd">Github</a>, please feel free to fork it.</blockquote><p><a href="https://github.com/sidd-harth/apigee-cicd">sidd-harth/apigee-cicd</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*aLwF9A0lZ9Zt0j2OHk3amg.png" /><figcaption>Pipeline Steps</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dvMafm4wxdfMgd0ZEHVmIg.png" /><figcaption>Apigee CICD Pipeline</figcaption></figure><h3>At a high level, on every pipeline execution, the code goes through the following steps:</h3><ol><li>Develop an API Proxy in test environment Apigee Edge UI, Download the proxy and push to Github.</li><li>In Jenkins, Apigee Proxy bundle is cloned from Github.</li><li>Code Analysis is done using Apigee Lint.</li><li>Any Javascript files from apiproxy directory goes through Unit Tests done using mocha.</li><li>Code coverage is done by Istanbul/nyc and reports are generated by Cobertura.</li><li>Using edge.json configurations are created/updated and a new revision is published in prod environment using Apigee Maven Build Plugin.</li><li>The newly deployed prod environment goes through Integration tests using Apickli.</li><li>Apickli produced Cucumber Reports are displayed in Jenkins.</li><li>If the test FAILS, the current revision is undeployed and a stable revision is re-deployed.</li><li>Build Success/Fail notification along with Cucumber reports are sent to Slack Room.</li></ol><h3>Prerequisites:</h3><ul><li><a href="https://login.apigee.com/login">Apigee Edge Account</a></li><li><a href="https://wiki.jenkins.io/display/JENKINS/Slack+Plugin">Slack Account + Jenkins Config</a></li><li><a href="https://wiki.jenkins.io/display/JENKINS/Cucumber+Slack+Notifier+Plugin">Cucumber-Slack-Notifier</a></li><li><a href="https://wiki.jenkins.io/display/JENKINS/Cobertura+Plugin">Cobertura Jenkins Plugin</a></li><li>NodeJS &amp; NPM</li><li>Configure Jenkins with Git, Cucumber Reports, JDK, Maven, NodeJS, Slack Plugins</li></ul><h3>Detailed Steps:</h3><ol><li>HR API — A simple API to perform CRUD operations on employee records. For backend, I am using Firestore DB.</li><li>Download HR-API.zip proxy bundle from this <a href="https://github.com/sidd-harth/apigee-cicd/tree/master/bundles">repo/bundles</a> &amp; deploy to test env or create a sample API Proxy.</li><li>Download CiCd-Security.zip proxy bundle from this <a href="https://github.com/sidd-harth/apigee-cicd/tree/master/bundles">repo/bundles</a> &amp; deploy to both prod &amp; test environments.</li><li>Fork this <a href="https://github.com/sidd-harth/apigee-cicd">repo </a>&amp; create a directory structure as per HR-API directory &amp; place your apiproxy folder.</li><li>I am using a Parameterized Build in Jenkins Job to pass the Apigee username, password and base64encoded string.</li><li>ApigeeLint will go through the apiproxy folder,</li></ol><pre>apigeelint -s HR-API/apiproxy/ -f codeframe.js</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/0*SR4Hh1Sic5OqCZbw" /></figure><p>7. Unit test any custom code within the proxy like Javascript in our case. But it can be NodeJS as well.</p><pre>npm test test/unit/*.js<br>npm run coverage test/unit/*.js</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/0*W4rNDYwityi7H2BI" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/0*ez-6zNf-g6wIQoNZ" /></figure><p>8. Using Cobertura Plugin in try-catch-finally block to generate reports in Jenkins.</p><pre>cd coverage &amp;&amp; cp cobertura-coverage.xml $WORKSPACE<br>step([$class: &#39;CoberturaPublisher&#39;, coberturaReportFile: &#39;cobertura-coverage.xml&#39;])</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/0*qQNL0-7woom4sL8P" /></figure><p>9. Build &amp; Deploy happens through Apigee Maven Plugin (update pom and edge.json files with appropiate details),</p><pre>mvn -f HR-API/pom.xml install -Pprod -Dusername=${apigeeUsername} -Dpassword=${apigeePassword} -Dapigee.config.options=update</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/0*9ZNKAvJdmI2eJsFl" /></figure><p>10. Integration tests happen through Apickli — Cucumber — Gherkin Tests,</p><pre>cd $WORKSPACE/test/integration &amp;&amp; npm install<br>cd $WORKSPACE/test/integration &amp;&amp; npm test</pre><p>11. Cucumber Reports plugin in Jenkins will use the reports.json file to create HTML Reports &amp; statistics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WFkn_Um-CVCWS5_Y" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hDDSKoRGcg80CkWj" /></figure><p>12. If Integration tests fail, then through a undeploy.sh shell script I am undoing <em>Step 9</em>. Through Jenkins Environment variable I am getting the currently deployed revision and storing it as Stable revision. Within Shell Script I am using this value to re-deploy in case of Failure.</p><pre>curl -X DELETE --header &quot;Authorization: Basic $base64encoded&quot; &quot;https://api.enterprise.apigee.com/v1/organizations/$org_name/environments/$env_name/apis/$api_name/revisions/$rev_num/deployments&quot;</pre><pre>curl -X DELETE --header &quot;Authorization: Basic $base64encoded&quot; &quot;https://api.enterprise.apigee.com/v1/organizations/$org_name/apis/$api_name/revisions/$rev_num&quot;</pre><pre>curl -X POST --header &quot;Content-Type: application/x-www-form-urlencoded&quot; --header &quot;Authorization: Basic $base64encoded&quot; &quot;https://api.enterprise.apigee.com/v1/organizations/$org_name/environments/$env_name/apis/$api_name/revisions/$stable_revision/deployments&quot;</pre><p>13. To send cucumber-reports to Slack I used cucumber-slack-notifier, but the pipeline cmd is not working as expected/documented. So, for the time being, I am running a separate FreeStyle project &gt;&gt; Build &gt;&gt; Send Cucumber Report to Slack and point it to the reports.json in this pipeline directory.</p><pre>build job: &#39;cucumber-report&#39;</pre><p>14. When Build Starts/Ends &amp; At any step if a Failure occurs, a notification is sent to Slack Room along with cucumber reports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/0*inAYA1YiWLqmK1k7" /></figure><h3>We can add more steps to the Pipeline:</h3><ol><li>Update Developer Portal.</li></ol><ul><li>After successful Integration Test, we can add another Stage to Update Developer Portal Docs.</li><li>Currently we have plugin/apis for updating Apigee Drupal based portal.</li><li>We do not have any APIs for updating Apigee Integrated Developer Portal as of 14th July 2019.</li></ul><p>2. Add Performace/Load Tests after Integrated Tests</p><p>3. Use Git Branches/Projects for dev &gt;&gt; uat &gt;&gt; prod environments and use Jenkins to Merge and Commit updates.</p><p>4. Use OAS and use Apigee Management APIs to create and deploy a proxy through Pipeline.</p><p>Also have a look at this repo for more info, <a href="https://github.com/apigee/maven-jenkins-ci-demo">Apigee — maven-jenkins-ci-demo</a></p><blockquote>The entire source code is available on <a href="https://github.com/sidd-harth/apigee-cicd">Github</a>, please feel free to fork it.</blockquote><p><a href="https://github.com/sidd-harth/apigee-cicd">sidd-harth/apigee-cicd</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d92f4570304c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>