<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dhrubajyoti Chakraborty</title>
    <description>The latest articles on DEV Community by Dhrubajyoti Chakraborty (@codewdhruv).</description>
    <link>https://dev.to/codewdhruv</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F465532%2F1cd52e3f-e977-4dec-b211-255c67611cfc.jpg</url>
      <title>DEV Community: Dhrubajyoti Chakraborty</title>
      <link>https://dev.to/codewdhruv</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codewdhruv"/>
    <language>en</language>
    <item>
      <title>Scaling Build Time of Open Source projects using Harness CI</title>
      <dc:creator>Dhrubajyoti Chakraborty</dc:creator>
      <pubDate>Mon, 13 Mar 2023 19:41:18 +0000</pubDate>
      <link>https://dev.to/codewdhruv/scaling-build-time-of-open-source-projects-using-harness-ci-4bpl</link>
      <guid>https://dev.to/codewdhruv/scaling-build-time-of-open-source-projects-using-harness-ci-4bpl</guid>
      <description>&lt;p&gt;In the world of software development, open-source projects play a critical role in shaping the industry. However, as these projects grow in complexity and size, so does their build time, which can make it challenging to test and release software on schedule.&lt;/p&gt;

&lt;p&gt;While there are various Continuous Integration (CI) tools available to tackle this problem, I decided to try building some of the most well-known open-source projects on the Harness CI module. In this article, I will share my experience and provide a comparison of the build time with other CI tools available in the market.&lt;/p&gt;

&lt;h3&gt;
  
  
  Harness &amp;amp; Continuous Integration
&lt;/h3&gt;

&lt;p&gt;Harness is a prominent player in the world of Continuous Integration and Continuous Deployment (CI/CD) platforms, offering a comprehensive suite of tools designed to help organizations streamline their software deployment and integration processes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---gh1BhET--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/65tqylzwgfdk4pzyuvn4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---gh1BhET--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/65tqylzwgfdk4pzyuvn4.png" alt="Harness CI" width="880" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of their most recent additions is the recent release of its Hosted Builds Solution for Harness CI which provides a new way for developers to scale their build times by leveraging remote infrastructure managed by Harness. This offering provides a dependable and efficient approach for projects to optimize their testing and software release processes by reducing build times.&lt;/p&gt;

&lt;h3&gt;
  
  
  Harness CI &amp;amp; Hosted Builds Architecture
&lt;/h3&gt;

&lt;p&gt;Harness Cloud offers a robust and efficient solution for running builds on infrastructure hosted by Harnesss on cloud. By leveraging the power of &lt;strong&gt;Harness-Hosted Builds&lt;/strong&gt;, developers can run builds in isolation and scale them as per requirement.&lt;/p&gt;

&lt;p&gt;This solution can potentially become the game-changer for developers as it takes care of maintaining and upgrading build infrastructure, allowing teams to focus on building software without worrying about the underlying infrastructure.&lt;/p&gt;

&lt;p&gt;One of the biggest advantages of Harness Cloud is the availability of free monthly credits for up to 2,000 build minutes, making it a cost-effective option for small and large-scale projects. Harness Cloud also offers starter pipelines for different programming languages, which can help accelerate the development process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Underlying Architecture of Pipeline executions on Harness Cloud&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When a pipeline is built using Harness Cloud, each stage of the pipeline is executed on a dedicated, ephemeral virtual machine (VM).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cFizRVF5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b00mlxf37gastnrs60at.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cFizRVF5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b00mlxf37gastnrs60at.gif" alt="Harness CI Architecture" width="880" height="296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Within each stage, the steps are executed on the VM and can easily share information through the underlying filesystem. You can choose to run your CI steps directly on the VM or in a Docker container, depending on your project's needs.&lt;/p&gt;

&lt;p&gt;One significant advantage of using Harness Cloud is that once a stage is complete, the VM automatically shuts down. This helps to optimize resource usage and avoid any unnecessary costs associated with running idle VMs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.harness.io/docs/getting-started"&gt;To learn more about the architecture of the Harness Platform refer to their documentation here.&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Replicating workflows of OSS projects in Harness CI
&lt;/h3&gt;

&lt;p&gt;The task of replicating or migrating workflows from one tool to another can be quite daunting, especially for those who are new to the process. Thankfully, the Harness CI community has released various migration guides in the Harness Developer Hub and on Github to simplify this task.&lt;/p&gt;

&lt;p&gt;If you're looking to migrate your CI workflow to Harness CI, these guides can be incredibly helpful.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.harness.io/docs/category/migrating-to-harness-ci/"&gt;&lt;strong&gt;Check out the migration guides here: Click Here&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this article, we will be exploring how to build two well-known open-source projects hosted on Github - GraphQL.js by GraphQL and Signal-Android by Signal App - using Harness CI.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/graphql/graphql-js"&gt;Check out the codebase of GraphQL-JS here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/signalapp/Signal-Android"&gt;Check out the codebase of Signal-Android here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GraphQL-JS is the JavaScript reference implementation for GraphQL, a query language for APIs created by Facebook. See more complete documentation at &lt;a href="https://graphql.org/"&gt;https://graphql.org/&lt;/a&gt; and &lt;a href="https://graphql.org/graphql-js/"&gt;https://graphql.org/graphql-js/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Signal is a simple, powerful, and secure messenger. Signal uses your phone's data connection (WiFi/3G/4G/5G) to communicate securely. Millions of people use Signal every day for free and instantaneous communication anywhere in the world. The project codebase is based on Java &amp;amp; Kotlin. Check out the project documentation &lt;a href="https://github.com/signalapp/Signal-Android/wiki"&gt;wiki here&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Migrating the existing workflow to Harness CI
&lt;/h3&gt;

&lt;p&gt;As software development continues to evolve, so do the tools and services that developers use to build and deploy applications. In this case, both Graphql-JS and Sihgnal-Android use GitHub Actions as the CI/CD automation tool. To ensure a seamless transition when migrating workflows from GHA or any other CI tool to Harness CI, there are several important steps to consider. These include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Assess the current workflow's complexity and understand how it operates.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Determine the number of jobs or steps required to complete the workflow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Identify any dependencies that might exist between the various components of the workflow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Determine the deployment and infrastructure targets that are required to support the workflow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Configure any integrations necessary and set up the required environment for Harness CI.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Thoroughly test and validate the new pipelines to ensure they are performing as expected and producing the desired outcomes.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To begin the migration process, we need to follow the standard guidelines and activate the Github Actions workflow by enabling Actions in our forked repository. The first step is to validate the Github Actions workflow which involves verifying the syntax and structure of the workflow YAML file located under the &lt;code&gt;.github/&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ddkxw2sC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w5px34j7tknt9ljt4l09.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ddkxw2sC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w5px34j7tknt9ljt4l09.png" alt="GHA to Harness CI" width="880" height="296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, we convert the YAML file into a Harness CI workflow, which is stored in YAML format under the &lt;code&gt;.harness/&lt;/code&gt; directory. This involves mapping the corresponding jobs and actions in the GitHub Actions workflow to equivalent stages &amp;amp; steps in Harness CI. This is where we ensure the environment and variables along with secrets are setup &amp;amp; configured correctly in Harness CI.&lt;/p&gt;

&lt;p&gt;Once the migration is complete and the workflows are successfully migrated, we can trigger pipeline execution manually or through various Git events such as pull request (PR) open, PR merge, etc. Harness CI provides several other options as well for triggering pipelines, including webhooks, scheduled triggers, and integrations with various CI/CD tools.&lt;/p&gt;

&lt;p&gt;For more detailed information on the different triggering options available in Harness CI, refer to the documentation here.&lt;/p&gt;

&lt;p&gt;The migrated workflows and their corresponding pipeline files for GraphQL-JS and Signal-Android are available in the &lt;code&gt;.harness/&lt;/code&gt; directory of the forked GitHub repository.&lt;/p&gt;

&lt;h3&gt;
  
  
  Testing &amp;amp; Validating the Pipeline &amp;amp; Build Time
&lt;/h3&gt;

&lt;p&gt;The pipeline for testing and validating the GraphQL-JS and Signal-Android project can be manually executed or triggered by git events or customized use cases. The infrastructure used for the pipeline is Hosted Builds, with the respective stages and steps configured in the execution section. Working directories and default directories are specified in the Overview section, while the Advanced section allows for the implementation of failure and looping strategies if necessary.&lt;/p&gt;

&lt;p&gt;After executing the workflows of GraphQL-JS &amp;amp; Signal-Android we receive the following observations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project: GraphQL-JS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BZ-xeSEZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rhquoefkixvmypf239sq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BZ-xeSEZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rhquoefkixvmypf239sq.png" alt="GHA GraphQL-JS" width="880" height="149"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HjOtbU1N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9pmaaitk2fwl7jylbq5z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HjOtbU1N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9pmaaitk2fwl7jylbq5z.png" alt="Harness CI Graphql-JS" width="880" height="530"&gt;&lt;/a&gt;&lt;br&gt;
Build Time in GitHub Actions: 4 hours 30 minutes (Average)&lt;/p&gt;

&lt;p&gt;Build Time in Harness CI: 56 minutes (Average)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project: Signal-Android&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9TjdnHtE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/90m1p30hhkcyoo42hada.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9TjdnHtE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/90m1p30hhkcyoo42hada.png" alt="GHA Signal-Android" width="880" height="97"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MLG1g_11--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bizyq8em3bnu9sydubqb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MLG1g_11--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bizyq8em3bnu9sydubqb.png" alt="Harness CI Signal-Android" width="880" height="84"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Build Time in GitHub Actions: 26 minutes (Average)&lt;/p&gt;

&lt;p&gt;Build Time in Harness CI: 12 minutes (Average)&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Project&lt;/th&gt;
&lt;th&gt;Build Time in Harness&lt;/th&gt;
&lt;th&gt;Build Time in Github Actions&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GraphQL-JS&lt;/td&gt;
&lt;td&gt;~56 minutes&lt;/td&gt;
&lt;td&gt;~4 hours 30 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Signal-Android&lt;/td&gt;
&lt;td&gt;~12 minutes&lt;/td&gt;
&lt;td&gt;~26 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;We can observe that the build time in Harness CI is significantly faster than that in GitHub Actions. Specifically, the average build time in Harness comparatively faster than in GitHub Actions.&lt;/p&gt;

&lt;p&gt;This highlights Harness CI's capability of executing the same build at the same time with improved efficiency, potentially revolutionizing Continuous Integration in the software industry.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>harnessci</category>
      <category>opensource</category>
      <category>ci</category>
    </item>
    <item>
      <title>Object Specifier (Yolo-Coco)</title>
      <dc:creator>Dhrubajyoti Chakraborty</dc:creator>
      <pubDate>Tue, 08 Sep 2020 08:44:52 +0000</pubDate>
      <link>https://dev.to/codewdhruv/object-specifier-yolo-coco-107b</link>
      <guid>https://dev.to/codewdhruv/object-specifier-yolo-coco-107b</guid>
      <description>&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/codewdhruv"&gt;
        codewdhruv
      &lt;/a&gt; / &lt;a href="https://github.com/codewdhruv/obj-specifier"&gt;
        obj-specifier
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      AI model to detect objects from a given input picture
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
Object Specifier&lt;/h1&gt;
&lt;h2&gt;
Dataset&lt;/h2&gt;
&lt;p&gt;The dataset used can be downloaded here - &lt;a href="https://www.kaggle.com/valentynsichkar/yolo-coco-data" rel="nofollow"&gt;Click to Download&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is ready to use data with weights and configuration along with coco names to detect objects with YOLO algorithm.&lt;/p&gt;
&lt;h2&gt;
Prerequisites&lt;/h2&gt;
&lt;p&gt;All the dependencies and required libraries are included in the file &lt;code&gt;requirements.txt&lt;/code&gt; &lt;a href="https://github.com/codewdhruv/obj-specifier"&gt;See here&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
Installation&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Clone the repo&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;$ git clone https://github.com/dhrubajyoti89/obj-specifier.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ol start="2"&gt;
&lt;li&gt;Change your directory to the cloned repo and create a Python virtual environment named 'test'&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;$ mkvirtualenv test
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Now, run the following command in your Terminal/Command Prompt to install the libraries required&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;$ pip3 install -r requirements.txt
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;
Working&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Open terminal. Go into the cloned project directory folder and type the following command:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;$ python3 yolo.py --dataset dataset
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ol start="2"&gt;
&lt;li&gt;To detect objects in an image type the following command:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;$ python3 yolo.py -i "images/1.jpg" -y "yolo-coco"
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;
Results&lt;/h2&gt;
&lt;h4&gt;
Our model gave 81% accuracy for Object Detection after training&lt;/h4&gt;
&lt;h2&gt;
Project Demo&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://dev.to/dhrubajyoti89/object-specifier-yolo-coco-107b" rel="nofollow"&gt;Dev Link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/dhrubajyoti89/obj-specifier/blob/master/Readme_images/ss.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ogqf1eU9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/dhrubajyoti89/obj-specifier/raw/master/Readme_images/ss.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Feel free to mail…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/codewdhruv/obj-specifier"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Built it using yolo based object detector model. The dataset was made custom using object recognition API and Kaggle datasets of real large datasets of object images(yolo-coco). Used Python script with numpy, argparse, os libraries as the backend.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
