<?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 Viswanath Reddy on Medium]]></title>
        <description><![CDATA[Stories by Viswanath Reddy on Medium]]></description>
        <link>https://medium.com/@workofviswa?source=rss-97e308526a2f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Mt5ffPUAlbyio_uk</url>
            <title>Stories by Viswanath Reddy on Medium</title>
            <link>https://medium.com/@workofviswa?source=rss-97e308526a2f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 11:47:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@workofviswa/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[User and Group Management in Linux:]]></title>
            <link>https://medium.com/@workofviswa/user-and-group-management-in-linux-c652a8ece739?source=rss-97e308526a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c652a8ece739</guid>
            <category><![CDATA[user-management]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Viswanath Reddy]]></dc:creator>
            <pubDate>Mon, 18 Sep 2023 11:04:33 GMT</pubDate>
            <atom:updated>2023-09-18T11:04:33.319Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yjmsXWG-mm6PoAKhYvApPQ.gif" /></figure><p>User and group management is a fundamental aspect of Linux system administration. It plays a crucial role in maintaining security, access control, and organization within a Linux environment. In this blog, we will explore the concepts of user and group management in Linux, along with practical examples.</p><h3>Understanding Users and Groups</h3><h3>Users</h3><p>In Linux, a user is an individual who interacts with the system. Each user has a unique username and a user ID (UID). User accounts are used to log in, run processes, and access files and directories. Linux systems typically have several user accounts, including the root user, which has superuser privileges and can perform administrative tasks.</p><h3>Groups</h3><p>Groups are collections of users. They are used to simplify access control and permissions management. Users within the same group share common permissions to files and directories. A group also has a unique group ID (GID). When a user creates a file, the file’s group ownership is set to the user’s primary group by default.</p><h3>User Management</h3><h3>1. Creating Users</h3><p>To create a new user, use the useradd command followed by the username. For example, to create a user named &quot;viswa,&quot; run:</p><pre>sudo useradd viswa</pre><h3>2. Setting User Password</h3><p>Use the passwd command to set a password for the newly created user:</p><pre>sudo passwd viswa</pre><h3>3. Modifying User Attributes</h3><p>To change user attributes like the username or home directory, use the usermod command:</p><pre>sudo usermod -l new_username old_username sudo usermod -d /new/home/directory username</pre><h3>4. Deleting Users</h3><p>To remove a user account, including their home directory and files, use the userdel command:</p><pre>sudo userdel -r username</pre><h3>5. User Database files</h3><p>/etc/passwd — → this file contains all user details as a list.</p><p>/etc/shadow — → this file contains all user password details as a list.</p><h3>Group Management</h3><h3>1. Creating Groups</h3><p>You can create a group using the groupadd command:</p><pre>sudo groupadd mygroup</pre><h3>2. Adding Users to Groups</h3><p>To add users to a group, use the usermod command with the -aG flag:</p><pre>sudo usermod -aG mygroup username</pre><h3>3. Changing Group Ownership of Files</h3><p>To change the group ownership of a file or directory, use the chown command:</p><pre>sudo chown :mygroup file_or_directory</pre><h3>4. Deleting Groups</h3><p>To delete a group, use the groupdel command:</p><pre>sudo groupdel mygroup</pre><h3>5. Group Database files</h3><p>/etc/group — → this file contains all group details as a list.</p><p>/etc/gshadow — → this file contains all group members details as a list.</p><h3>Examples</h3><h3>Example 1: Creating a User and Group</h3><p>Let’s create a user named “viswa” and a group named “developers”:</p><pre>sudo useradd viswa sudo groupadd developers</pre><h3>Example 2: Adding User to a Group</h3><p>Add “viswa” to the “developers” group:</p><pre>sudo usermod -aG developers viswa</pre><h3>Example 3: Changing File Ownership</h3><p>Change ownership of a file to the “developers” group:</p><pre>sudo chown :developers file.txt</pre><h3>Example 4: Deleting User and Group</h3><p>Remove “viswa” and the “developers” group:</p><pre>sudo userdel -r viswa sudo groupdel developers</pre><h3>Conclusion</h3><p>User and group management in Linux is vital for maintaining security and access control. By understanding how to create, modify, and delete users and groups, you can effectively manage permissions and organize users in your Linux system. These fundamental skills are essential for any Linux system administrator.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c652a8ece739" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Upgrading AKS cluster using Azure CLI]]></title>
            <link>https://medium.com/@workofviswa/upgrading-aks-cluster-using-azure-cli-6358208e66b4?source=rss-97e308526a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/6358208e66b4</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Viswanath Reddy]]></dc:creator>
            <pubDate>Thu, 22 Jun 2023 09:42:13 GMT</pubDate>
            <atom:updated>2023-06-22T09:42:13.184Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G-zM-wyBaQkp-5Jbzkhe5Q.png" /><figcaption>AKS upgrade</figcaption></figure><p><strong>Kubernetes versions</strong> are expressed as <strong>x.y.z</strong>, where <strong>x</strong> is the major version, <strong>y</strong> is the minor version, and <strong>z</strong> is the patch version, following <a href="https://semver.org/">Semantic Versioning</a> terminology.</p><h4>1. Pre-Upgrade Planning</h4><p>Before upgrading AKS cluster we have to perform these tasks as Pre Upgrading Plan.</p><p><strong>a. Specifying a PodDisruptionBudget on critical deployments:</strong></p><p>A PodDisruptionBudget has three fields:</p><ul><li>A label selector .spec.selector to specify the set of pods to which it applies. This field is required.</li><li>.spec.minAvailable which is a description of the number of pods from that set that must still be available after the eviction, even in the absence of the evicted pod. minAvailable can be either an absolute number or a percentage.</li><li>.spec.maxUnavailable (available in Kubernetes 1.7 and higher) which is a description of the number of pods from that set that can be unavailable after the eviction. It can be either an absolute number or a percentage.</li></ul><p>You can specify only one of maxUnavailable and minAvailable in a single PodDisruptionBudget. maxUnavailable can only be used to control the eviction of pods that have an associated controller managing them. In the examples below, &quot;desired replicas&quot; is the scale of the controller managing the pods being selected by the PodDisruptionBudget.</p><p>Example 1: With a minAvailable of 5, evictions are allowed as long as they leave behind 5 or more <a href="https://kubernetes.io/docs/tasks/run-application/configure-pdb/#healthiness-of-a-pod">healthy</a> pods among those selected by the PodDisruptionBudget&#39;s selector.</p><p>Example 2: With a minAvailable of 30%, evictions are allowed as long as at least 30% of the number of desired replicas are healthy.</p><p>Example 3: With a maxUnavailable of 5, evictions are allowed as long as there are at most 5 unhealthy replicas among the total number of desired replicas.</p><p>Example 4: With a maxUnavailable of 30%, evictions are allowed as long as the number of unhealthy replicas does not exceed 30% of the total number of desired replica rounded up to the nearest integer. If the total number of desired replicas is just one, that single replica is still allowed for disruption, leading to an effective unavailability of 100%.</p><p>example PDB for Zookeeper app.</p><p>policies/PDB-zookeper.yaml</p><pre>apiVersion: policy/v1<br>kind: PodDisruptionBudget<br>metadata:<br>  name: zk-pdb<br>spec:<br>  minAvailable: 2<br>  selector:<br>    matchLabels:<br>      app: zookeeper</pre><p>Check this <a href="https://kubernetes.io/docs/tasks/run-application/configure-pdb/"><strong><em>Kubernetes article</em></strong></a><strong><em> </em></strong>for more PDB details.</p><p><strong>b. Get available upgrads.</strong></p><p><strong>i. Get available node pool upgrades.</strong></p><p>Get the available upgrade versions for nodepool of the managed Kubernetes cluster using Azure CLI.</p><p>az aks nodepool get-upgrades --resource-group MyResourceGroup --cluster-name MyManagedCluster --nodepool-name MyNodePool --output table</p><p><strong>ii. Get available AKS cluster upgrades.</strong></p><p>Get the available upgrade versions for the managed Kubernetes cluster using Azure CLI.</p><p>az aks get-upgrades --resource-group MyResourceGroup --cluster-name MyManagedCluster --output table</p><p>Name ResourceGroup MasterVersion Upgrades<br> — — — — — — — — — — — — — — — — — — — — — — — — — — — <br>default myResourceGroup 1.18.10 1.19.1, 1.19.3</p><p><strong>C. Customize node surge upgrade<em>.</em></strong></p><p>By default, AKS configures upgrades to surge with one extra node. A default value of one for the max surge settings enables AKS to minimize workload disruption by creating an extra node before the cordon/drain of existing applications to replace an older versioned node. The max surge value can be customized per node pool to enable a trade-off between upgrade speed and upgrade disruption. When you increase the max surge value, the upgrade process completes faster. If you set a large value for max surge, you might experience disruptions during the upgrade process.</p><p>For example, a max surge value of <em>100%</em> provides the fastest possible upgrade process (doubling the node count) but also causes all nodes in the node pool to be drained simultaneously. You might want to use a higher value such as this for testing environments. For production node pools, we recommend a max_surge setting of <em>33%</em>.</p><p>AKS accepts both integer values and a percentage value for max surge. An integer such as <em>5</em> indicates five extra nodes to surge. A value of <em>50%</em> indicates a surge value of half the current node count in the pool. Max surge percent values can be a minimum of <em>1%</em> and a maximum of <em>100%</em>. A percent value is rounded up to the nearest node count. If the max surge value is higher than the required number of nodes to be upgraded, the number of nodes to be upgraded is used for the max surge value.</p><pre># Set max surge for a new node pool<br>az aks nodepool add -n mynodepool -g MyResourceGroup --cluster-name MyManagedCluster --max-surge 33%<br><br># Update max surge for an existing node pool <br>az aks nodepool update -n mynodepool -g MyResourceGroup --cluster-name MyManagedCluster --max-surge 5</pre><h4>2. Upgrade an AKS cluster</h4><p>During the cluster upgrade process, AKS performs the following operations:</p><ul><li>Add a new buffer node (or as many nodes as configured in <a href="https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster?tabs=azure-cli#customize-node-surge-upgrade">max surge</a>) to the cluster that runs the specified Kubernetes version.</li><li><a href="https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/">Cordon and drain</a> one of the old nodes to minimize disruption to running applications. If you’re using max surge, it <a href="https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/">cordons and drains</a> as many nodes at the same time as the number of buffer nodes specified.</li><li>When the old node is fully drained, it’s reimaged to receive the new version and becomes the buffer node for the following node to be upgraded.</li><li>This process repeats until all nodes in the cluster have been upgraded.</li><li>At the end of the process, the last buffer node is deleted, maintaining the existing agent node count and zone balance.</li></ul><p><strong>a. Upgrade your cluster using the </strong><strong>az aks upgrade command.</strong></p><p>az aks upgrade --resource-group myResourceGroup <br>--name myAKSCluster --kubernetes-version KUBERNETES_VERSION</p><p><strong>b. Confirm the upgrade was successful using the </strong><strong>az aks show command.</strong></p><p>az aks show --resource-group myResourceGroup --name myAKSCluster --output table</p><p>output</p><p>Name Location ResourceGroup KubernetesVersion ProvisioningState Fqdn<br> — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — <br>myAKSCluster eastus myResourceGroup 1.19.1 Succeeded myakscluster-dns-379cbbb9.hcp.eastus.azmk8s.io</p><p><strong>c. View the upgrade events</strong></p><p>When you upgrade your cluster, the following Kubernetes events may occur on each node:</p><ul><li>Surge: Creates a surge node.</li><li>Drain: Evicts pods from the node. Each pod has a 30-second timeout to complete the eviction.</li><li>Update: Update of a node succeeds or fails.</li><li>Delete: Deletes a surge node.</li></ul><p>Use kubectl get events to show events in the default namespaces while running an upgrade.</p><p>…<br>default 2m1s Normal Drain node/aks-nodepool1–96663640-vmss000001 Draining node: [aks-nodepool1–96663640-vmss000001]<br>…<br>default 9m22s Normal Surge node/aks-nodepool1–96663640-vmss000002 Created a surge node [aks-nodepool1–96663640-vmss000002 nodepool1] for agentpool %!s(MISSING)<br>…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6358208e66b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrating SonarCloud with Azure Devops Pipelines.]]></title>
            <link>https://medium.com/@workofviswa/integrating-sonarcloud-with-azure-devops-pipelines-2210502491bf?source=rss-97e308526a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/2210502491bf</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[sonarcloud]]></category>
            <category><![CDATA[sonarqube]]></category>
            <category><![CDATA[azure-devops]]></category>
            <dc:creator><![CDATA[Viswanath Reddy]]></dc:creator>
            <pubDate>Sun, 18 Jun 2023 06:36:44 GMT</pubDate>
            <atom:updated>2023-06-18T08:31:12.631Z</atom:updated>
            <content:encoded><![CDATA[<p>SonarQube/Cloud Installation, exploration and Integration (Azure DevOps) has been illustrated in three stories simultaneously.</p><p><a href="https://medium.com/@workofviswa/postgresql-and-sonarqube-installation-and-integration-in-rhel-954760eb7bc6">https://medium.com/@workofviswa/postgresql-and-sonarqube-installation-and-integration-in-rhel-954760eb7bc6</a><br><a href="https://medium.com/@workofviswa/exploring-sonarqube-or-sonarcloud-13307670ee29">https://medium.com/@workofviswa/exploring-sonarqube-or-sonarcloud-13307670ee29</a><br><a href="https://medium.com/@workofviswa/integrating-sonarcloud-with-azure-devops-pipelines-2210502491bf">https://medium.com/@workofviswa/integrating-sonarcloud-with-azure-devops-pipelines-2210502491bf</a></p><p>This is Part 3 of 3.</p><p>In this article we are going to learn how to integrate sonar cloud in our CI pipeline(Azure Devops).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*XS8GD0pm6R73Z8gV72csBg.png" /><figcaption>SonarCloud Integration with Azure DevOps</figcaption></figure><h4>SonarCloud Extension for Azure DevOps</h4><p>The SonarCloud extension for Azure DevOps makes it easy to integrate analysis into your build pipeline. The extension allows the analysis of all languages supported by SonarCloud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bd5TrZ7j0PHmBtu9heD6uw.png" /><figcaption>SonarCloud Extension</figcaption></figure><h4>Installation</h4><ol><li>Install the extension <a href="https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarcloud">from the Microsoft marketplace</a>. If you are using <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops">Microsoft-hosted build agents</a> then there is nothing else to install. The extension will work with all of the hosted agents (Windows, Linux, and macOS).</li><li>If you are self-hosting the build agents, check that at least the minimal version of Java supported by SonarCloud is installed. In addition, make sure the appropriate build tools are installed on the agent for the type of project you are analyzing. For example, .NET Framework v4.6+/NET Core 2.0+ if building using MSBuild, Maven for Java projects, etc.</li></ol><h4>Configuration</h4><p>First of all, you have to declare SonarCloud as a service endpoint in your Azure DevOps project settings.</p><ol><li>Open the Connections page in your Azure DevOps project: <strong>Project Settings</strong> &gt; <strong>Pipelines</strong> &gt; <strong>Service Connections</strong>.</li><li>Select <strong>New service connection</strong> and choose <strong>SonarCloud</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*gehUGN2Ioh226djr1iIziw.png" /><figcaption>SonarCloud Service Connection</figcaption></figure><p>SonarCloud extension provides three tasks you will use in your build pipeline to analyze your projects:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DV4o-lj_bUznp1ImkUmp_g.png" /><figcaption>pipeline showing required tasks</figcaption></figure><ol><li><strong>Prepare Analysis Configuration</strong> task: To configure all the required settings before executing the build.</li></ol><ul><li>This task is mandatory.</li><li>In the case of .NET solutions or Java projects, it helps to integrate seamlessly with MSBuild, Maven, and Gradle tasks.</li><li>All necessary properties from <strong><em>sonar-scanner.properties</em></strong>(service connection) and <strong><em>sonar-project.properties</em></strong>(Organization, ProjecKey) we are mentioning here in this task.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H1VukJ6Wv8VYZ656FBXt8g.png" /><figcaption>Prepare Analysis Task</figcaption></figure><p><strong>2. Run Code Analysis</strong> task: To execute the analysis of the source code.</p><ul><li>This task is not required for Maven or Gradle projects because the scanner will be run as part of the Maven/Gradle build.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l9t6XCndai4vBQk0_doGnA.png" /><figcaption>Run Code Analysis task</figcaption></figure><p><strong>3. Publish Quality Gate Result</strong> task: To display the quality gate status in the build summary and give you a sense of whether the application is ready for production “quality-wise”.</p><ul><li>This task is required if you are using the SonarCloud Quality Gate status pre-deployment gate in a release pipeline; otherwise, it is optional.</li><li>This task can significantly increase the overall build time because it will poll SonarCloud until the analysis is complete. Omitting this task will not affect the analysis results on SonarCloud. It simply means the Azure DevOps Build Summary page will not show the status of the analysis or a link to the project dashboard on SonarCloud.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vuJ-_X84Pfp3swsUcuVS5w.png" /><figcaption>Publish Quality Gate Result Task</figcaption></figure><p>When creating a build pipeline, you can filter the list of available tasks by typing “Sonar” to display only the relevant tasks.</p><p>4. Additional task <strong>Break Build on Quality gate failure: </strong>This task makes sure to fail the build when the SonarCloud quality gate fails.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3zh0Q-F0RApf1jEH_AXQCQ.png" /><figcaption>SonarQube Build Breaker Task</figcaption></figure><p>Subscribe for more content like this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2210502491bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring SonarQube or SonarCloud.]]></title>
            <link>https://medium.com/@workofviswa/exploring-sonarqube-or-sonarcloud-13307670ee29?source=rss-97e308526a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/13307670ee29</guid>
            <category><![CDATA[sonarqube]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[sonarcloud]]></category>
            <dc:creator><![CDATA[Viswanath Reddy]]></dc:creator>
            <pubDate>Sat, 17 Jun 2023 18:03:40 GMT</pubDate>
            <atom:updated>2023-06-18T08:30:04.283Z</atom:updated>
            <content:encoded><![CDATA[<p>SonarQube/Cloud Installation, exploration and Integration (Azure DevOps) has been illustrated in three stories simultaneously.</p><p><a href="https://medium.com/@workofviswa/postgresql-and-sonarqube-installation-and-integration-in-rhel-954760eb7bc6">https://medium.com/@workofviswa/postgresql-and-sonarqube-installation-and-integration-in-rhel-954760eb7bc6</a><br><a href="https://medium.com/@workofviswa/exploring-sonarqube-or-sonarcloud-13307670ee29">https://medium.com/@workofviswa/exploring-sonarqube-or-sonarcloud-13307670ee29</a><br><a href="https://medium.com/@workofviswa/integrating-sonarcloud-with-azure-devops-pipelines-2210502491bf">https://medium.com/@workofviswa/integrating-sonarcloud-with-azure-devops-pipelines-2210502491bf</a></p><p>This is Part 2 of 3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*N6HHDuhdoDDKreXcY7z7Sw.png" /></figure><p>SonarQube and SonarCloud offers same functionality, for our convenience we explore SonarCloud in this article.</p><p><strong>Important Account settings to observer:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XMARnS_RuYc0ipCo0aTH2g.png" /><figcaption>Click on My Account</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aqZPN4EISmlOZXyjCf6IqQ.png" /><figcaption>My Account/Security</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J_yV0c4iO0LNBsBe7dfPzg.png" /><figcaption>My Account/Organizations</figcaption></figure><p>Here in<strong> Sonar</strong> we have <strong>5 important things</strong> to be observed.</p><ul><li>Organizations</li><li>Projects</li><li>Rules</li><li>Quality Profiles</li><li>Quality Gates</li></ul><h4>1. What is a SonarCloud organization?</h4><p>Each SonarCloud organization represents a corresponding organization on the repository platform side. The two organizations are bound one-to-one.</p><p>In GitHub and Azure DevOps collections of projects are called organizations, in BitBucket Cloud, workspaces, and in GitLab, groups. For simplicity, we will refer to all of these generically as organizations.</p><p>An organization in SonarCloud is composed of:</p><ul><li>The connection to the corresponding organization on the repository platform side.</li><li>The <strong>projects</strong> from that repository platform organization that have been imported.</li><li>The members of the organization. Each member has a set of permissions that govern which operations they may perform.</li><li>Organization-level configurations such as the <a href="https://docs.sonarcloud.io/improving/new-code-definition/">new code definition</a> default, the <a href="https://docs.sonarcloud.io/improving/quality-gates/">quality gate</a> definition, and the <a href="https://docs.sonarcloud.io/standards/managing-quality-profiles/">quality profiles</a>.</li><li>Whether the organization is free or paid and if it is paid, the payment information and tier of the paid plan.</li></ul><h4>Creating an organization</h4><p>When you sign in to SonarCloud for the first time, it will prompt you to choose one of your existing organizations (or your personal account) on the repository service to import. On import, a corresponding organization is created on the SonarCloud side.</p><p>SonarCloud will then let you choose which repositories to import from your platform-side organization (or personal account) to the SonarCloud-side organization.</p><p>Later, you can create additional SonarCloud organizations by clicking <strong>+ &gt; Create New Organization</strong> (under the plus sign in the top bar) and specifying an organization on the repository platform side to import.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QSSPa0KPsE0lZTC7SCvoDg.png" /></figure><h4>2. What is a SonarCloud Project?</h4><p>In SonarCloud, a project is a unit of analysis. It can be a single application, a library, or a set of related applications. A project is defined by its source code, its programming language, and its quality profile.</p><p>The source code of a project is the code that is analyzed by SonarCloud. It can be in a variety of formats, including Java, C++, Python, and JavaScript.</p><p>The programming language of a project is the language that is used to write the source code. SonarCloud has plugins for many different programming languages.</p><p>The quality profile of a project is a set of rules and metrics that are used to assess the quality of the code. SonarCloud comes with a default quality profile, but you can customize it to meet the specific needs of your project.</p><p>Once a project is defined, you can start analyzing its code. SonarCloud will scan the code for potential problems, such as security vulnerabilities, coding errors, and style violations. It will also generate reports that show the results of the analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rgFviZ16-hPb10zqeLofhw.png" /></figure><h4>3. Rules Overview</h4><p>In SonarCloud, analyzers contribute rules executed on source code to generate issues. There are four types of rules:</p><ul><li>Code smell (maintainability domain)</li><li>Bug (reliability domain)</li><li>Vulnerability (security domain)</li><li>Security hotspot (security domain)</li></ul><p>For code smells and bugs, zero false-positives are expected. At least this is the target so that developers don’t have to wonder if a fix is required.</p><p>For vulnerabilities, the target is to have more than 80% of issues be true-positives.</p><p>Security hotspot rules draw attention to code that is security-sensitive. The hotspots identified by the rules must be reviewed and flagged as safe or a fix applied.</p><p>The <a href="https://rules.sonarsource.com/">Sonar Rules catalog</a> is the entry point where you can discover all the existing rules.</p><h4>Rules</h4><p>You can access the Rules top menu only from within your organization. By default, when entering the top menu item “Rules,” you will see all the available rules brought by the analyzers available on SonarCloud. You can narrow the selection based on search criteria in the left pane:</p><ul><li><strong>Language</strong>: the language to which a rule applies.</li><li><strong>Type</strong>: bug, vulnerability, code smell, or security hotspot rules.</li><li><strong>Tag</strong>: it is possible to add tags to rules in order to classify them and to help discover them more easily.</li><li><strong>Repository</strong>: the engine/analyzer that contributes rules to SonarCloud.</li><li><strong>Default severity</strong>: the original severity of the rule — as defined by the analyzer that contributes this rule.</li><li><strong>Status</strong>: rules can have 3 different statuses:</li></ul><blockquote><strong>Beta</strong>: The rule has been recently implemented and we haven’t gotten enough feedback from users yet, so there may be false positives or false negatives.</blockquote><blockquote><strong>Deprecated</strong>: The rule should no longer be used because a similar, but more powerful and accurate rule exists.</blockquote><blockquote><strong>Ready</strong>: The rule is ready to be used in production.</blockquote><ul><li><strong>Security category</strong>: security rules are classified according to well-established security standards such as:</li></ul><blockquote><a href="https://cwe.mitre.org/">CWE</a></blockquote><blockquote><a href="https://owasp.org/Top10/">OWASP Top 10</a></blockquote><ul><li><strong>Available since</strong>: the date when a rule was first added on SonarCloud. This is useful to list all the new rules since the last upgrade of a plugin for instance.</li><li><strong>Quality Profile</strong>: inclusion in or exclusion from a specific profile.</li><li><strong>Inheritance</strong>: available when an inherited quality profile is selected. It can filter inherited rules, other rules, or inherited rules that have been overridden by other settings.</li><li><strong>Activation severity:</strong> available when an inherited quality profile is selected. It can filter by severity using the value chosen when the rule was activated in the quality profile.</li></ul><p>For more detailed information on the use of rules in Quality Profiles, see <a href="https://docs.sonarcloud.io/standards/managing-quality-profiles/">Quality Profiles</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sEkecFzsvc8nSwOIji58Vw.png" /></figure><h4>4. Quality Profiles</h4><p>Quality profiles are a key part of your SonarCloud configuration. They define the set of <a href="https://docs.sonarcloud.io/digging-deeper/rules/">rules</a> to be applied during code analysis.</p><p>Every project has a quality profile set for each supported language. When a project is analyzed, SonarCloud determines which languages are used and uses the active quality profile for each of those languages in that specific project.</p><p>Go to <em>organization name</em> &gt; <strong>Quality Profiles</strong> to see all the currently defined profiles grouped by language.</p><h4>Built-in and default profiles</h4><p>SonarCloud comes with a built-in quality profile defined for each supported language, called the <strong>Sonar way</strong> profile (it is marked with the <strong>BUILT-IN</strong> tag in the interface). The <strong>Sonar way</strong> profile activates a set of rules that should be applicable to most projects.</p><p>In a newly set up organization, the <strong>Sonar way</strong> profile is the default for every language (marked with the <strong>DEFAULT</strong> tag in the interface). The default profile is used for that language if no other profile is explicitly defined at the project level. The default profile for a given language can be changed.</p><h4>Customizing a quality profile</h4><p>The <strong>Sonar way</strong> profile is designed to be broadly suitable for most projects, but it is intended only as a starting point. In most cases, you will want to adjust your profile as the project progresses.</p><p>If you have multiple projects, you might also need to have different profiles for each. You might run into the following situations:</p><ul><li>You have different technical requirements from one project to another.</li><li>You want to ensure stronger requirements for some of your projects than for others.</li></ul><p>New profiles can be created in two ways:</p><ul><li>Copying an existing profile and adjusting the copy.</li><li>Extending an existing profile.</li></ul><h4>Copying a quality profile</h4><p>When you copy a profile, you clone all activated rules of the original. From here, you independently activate or deactivate rules to fit your needs; your new profile won’t inherit changes made to the original profile.</p><p>Follow these steps to copy a profile:</p><ol><li>Go to the page of the profile you want to copy (<em>organization name</em> &gt; <strong>Quality Profiles </strong>&gt;<strong> </strong><em>profile name</em>).</li><li>Select <strong>Copy</strong> from the dropdown menu in the upper-right corner of the page.</li><li>Give your new profile a name and select <strong>Copy</strong>.</li><li>Modify the copy as needed.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*GXzHoxjGqZU2leIZMhaqig.png" /><figcaption>Overview of Quality Profiles</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*sEyhUC0WJc3ief6yc0cNAA.png" /><figcaption>Create New Quality Profile</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tqujcPH0kc2w3A_Ije5ylA.png" /><figcaption>New Quality Profile overview</figcaption></figure><h4>Applying profiles to projects</h4><p>One profile for each language is marked as the default. Barring any other intervention, all projects that use that language will be analyzed with that profile. To have a project analyzed by a non-default profile instead, start from <strong>Quality Profiles</strong>, and navigate to your target profile, then use the <strong>Projects</strong> part of the interface to manage which projects are explicitly assigned to that profile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XKdsNgiS8YQURpH0JuFv-Q.png" /><figcaption>Applying new profile to project</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*SSve9zEz-LjVmPGsVtt5Jg.png" /></figure><h4>5. Quality Gates</h4><p>Quality gates are defined at the organization level and applied at the project level. Each project has one quality gate assigned from among those defined in the organization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*k2XSiXECuaG9sa0cDtSgLQ.png" /><figcaption>Default Quality Gateway</figcaption></figure><h4>Defining new quality gates for your organization</h4><p>Every organization comes with the built-in Sonar way quality gate set as the default to be assigned to all new projects.</p><p>Though the Sonar way quality gate is suitable for most projects, there are cases where you may want to make adjustments. In those situations, you can create a new quality gate definition and either just make it available to projects in the organization or set it as the default for all new projects.</p><p>To create a new quality gate definition in an organization, you must be an administrator of that organization.</p><p>You can copy an existing quality gate, such as the Sonar way, and adjust it, or create an empty one and add conditions to it. The changes are made in <em>Your Organization</em> &gt; <strong>Quality Gates</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rKeYW6Zgx8jHOPgFrnrRng.png" /><figcaption>Create New Quality Gate</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_5ZJ7WO4x1v6gk-7MzaQ8g.png" /></figure><p>In the example above we see two quality gates defined: the built-in one, called <em>Sonar way</em>, and another custom-defined gate, called <em>myProjQualityGate</em>.</p><p>A quality gate can have conditions on new code, conditions on overall code, both, or neither (though such an empty quality gate is not particularly useful, as it will always report a status of <em>Passed</em>).</p><p><em>Claudia’s way</em>, above, consists of six <strong>Conditions</strong> <strong>on New Code</strong> and five <strong>Conditions</strong> <strong>on Overall Code</strong>.</p><p>Conditions can be added to either section by selecting <strong>Add Condition</strong>. Adjustments can be made to conditions by selecting the <strong>edit pen,</strong> and conditions are deleted by selecting the <strong>trash can</strong>.</p><h4>Conditions define failure</h4><p>Quality gate conditions are always stated in terms of failure. In other words, if <em>any</em> condition in the quality gate (in either new or overall code) is <em>true</em>, then the quality gate <em>fails</em>.</p><h4>Deciding on a quality gate</h4><p>For most cases, we recommend directly using or adapting the built-in <em>Sonar way</em> quality gate.</p><p>The Sonar way quality gate places a minimum requirement of an <strong>A</strong> rating on <strong>Reliability</strong>, <strong>Security</strong> and <strong>Maintainability</strong>, a minimum requirement of 50% <strong>Coverage</strong> and a maximum of 3% <strong>Duplicated Lines</strong> of code. This is applied to <em>new code only</em>. There are no conditions on overall code.</p><p>This quality gate represents our view of the best way to implement the <a href="https://docs.sonarcloud.io/improving/clean-as-you-code/">Clean As You Code</a> methodology, which we strongly recommend as the best way to get the most out of SonarCloud.</p><p>Some users may wish to add, remove or adjust the conditions (including adding some on overall code) using the Sonar way as a starting point.</p><p>The <strong>Add Condition</strong> button provides a selection of possible metrics for use in quality gate conditions. Keep in mind as you define your own quality gates, that the ultimate goal is to provide useful feedback to your developers when they look at the quality gate on their project page.</p><h4>Setting the quality gate for your project</h4><p>Once an organization administrator has made a new quality gate available in your organization, you can select that quality gate for use in your project.</p><p>To select a quality gate for a project, you must be an administrator of that project.</p><p>You select the quality gate that you want from the available ones listed in <em>Your Organization &gt; Your Project</em> &gt; <strong>Administration</strong> — <strong>Quality Gates</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VajC_7bwtE2uwWqwXTOn9A.png" /><figcaption>Applying New Quality Gate to Project</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*F9hcDZY9TDZ1MDlbOcIoxg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13307670ee29" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Azure Boards]]></title>
            <link>https://medium.com/@workofviswa/what-is-azure-boards-1ab49cf49f9b?source=rss-97e308526a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ab49cf49f9b</guid>
            <category><![CDATA[azure-boards]]></category>
            <category><![CDATA[azure-devops]]></category>
            <dc:creator><![CDATA[Viswanath Reddy]]></dc:creator>
            <pubDate>Wed, 14 Jun 2023 03:32:27 GMT</pubDate>
            <atom:updated>2023-06-14T03:32:27.084Z</atom:updated>
            <content:encoded><![CDATA[<p>Azure Boards is a standalone service within the Azure DevOps suite that helps teams plan, track, and discuss work across the entire software development process. It provides a flexible, customizable platform for managing work items, such as user stories, bugs, tasks, and issues, so you can track your work item’s progress throughout the development lifecycle.</p><p>Azure Boards supports agile methodologies, including <a href="https://learn.microsoft.com/en-us/azure/devops/boards/get-started/what-is-azure-boards?view=azure-devops#implement-agile-scrum-and-kanban-processes">Scrum and Kanban</a>. It provides a range of features and integrations to help teams <a href="https://learn.microsoft.com/en-us/azure/devops/cross-service/cross-service-overview?view=azure-devops">collaborate</a> and stay organized with <a href="https://learn.microsoft.com/en-us/azure/devops/boards/get-started/what-is-azure-boards?view=azure-devops#configure-dashboards-and-power-bi-reports">dashboards, reports</a>, and notifications.</p><p>If you’re ready, <a href="https://learn.microsoft.com/en-us/azure/devops/boards/get-started/sign-up-invite-teammates?view=azure-devops">sign up and invite your teammates</a>. If you want more information, see the <a href="https://learn.microsoft.com/en-us/azure/devops/boards/get-started/what-is-azure-boards?view=azure-devops#benefits-of-using-azure-boards">benefits of using Azure Boards</a>, later on in this article.</p><h3>Use Azure Boards hubs</h3><p>You can track work in Azure Boards using default or customized work item types and standard system fields, and manage those work items with interactive backlogs, boards, lists, and calendar views. You can access various functions within each hub in Azure Boards, as shown in the following table.</p><p>Azure Boards hubFunctions<a href="https://learn.microsoft.com/en-us/azure/devops/boards/work-items/view-add-work-items?view=azure-devops">Work items</a>Access lists of work items based on specific criteria, such as those assigned to you, ones you follow, and work items you viewed or updated.<a href="https://learn.microsoft.com/en-us/azure/devops/boards/boards/kanban-quickstart?view=azure-devops">Boards</a>View work items as cards and update their status through drag-and-drop, similar to physical sticky notes on a whiteboard. Use this feature to implement Kanban practices and visualize work flow for a team.<a href="https://learn.microsoft.com/en-us/azure/devops/boards/backlogs/create-your-backlog?view=azure-devops">Backlogs</a>View, plan, order, and organize work items, including using a product backlog to represent your project plan and a portfolio backlog to group work under features and epics.<a href="https://learn.microsoft.com/en-us/azure/devops/boards/sprints/assign-work-sprint?view=azure-devops">Sprints</a>Access your team’s filtered view of work items based on a specific sprint or iteration path. Assign work to a sprint using drag-and-drop from the backlog. Interact with a backlog list or card-based taskboard to implement Scrum practices.<a href="https://learn.microsoft.com/en-us/azure/devops/boards/queries/view-run-query?view=azure-devops">Queries</a>Generate custom work item lists and perform various tasks, such as triage work, make bulk updates, and view relationships between work items. Queries also allow for creating status and trend charts that can be added to dashboards.<a href="https://learn.microsoft.com/en-us/azure/devops/boards/plans/review-team-plans?view=azure-devops">Delivery Plans</a>Management teams can view deliverables and track dependencies across multiple teams in a calendar view. Delivery plans support tasks such as viewing up to 15 team backlogs, custom portfolio backlogs and epics, and work that spans several iterations. Users can add backlog items to a plan, view rollup progress of features and epics, and dependencies between work items.<a href="https://learn.microsoft.com/en-us/azure/devops/report/powerbi/what-are-analytics-views?view=azure-devops">Analytics views</a>Create highly sophisticated Power BI reports, based on Azure Boards data (work items). Access default Analytics views or create a custom view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/0*uQkZKsvFpwEzZr7z" /></figure><h3>Connect Azure Boards to GitHub</h3><p>Connect Azure Boards with GitHub repositories to link GitHub commits, pull requests, and issues to work items. Use GitHub for software development and Azure Boards to plan and track work. Quickly open linked GitHub commits, pull requests, or issues from the Kanban board. For more information, see <a href="https://learn.microsoft.com/en-us/azure/devops/boards/github/?view=azure-devops">GitHub &amp; Azure Boards</a>.</p><h3>Implement Agile, Scrum, and Kanban processes</h3><p>Azure Boards supports software development processes with default process models. Each process includes a set of work item types with a natural hierarchy.</p><p><a href="https://learn.microsoft.com/en-us/azure/devops/boards/get-started/plan-track-work?view=azure-devops"><strong>Basic</strong></a><strong> </strong>provides the simplest model that tracks work through Issues, Tasks, and Epics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/230/0*94eYQHxPzPzz2Qzi" /></figure><p><a href="https://learn.microsoft.com/en-us/azure/devops/boards/work-items/guidance/agile-process?view=azure-devops"><strong>Agile</strong></a><strong> </strong>supports Agile planning methods (learn more about Agile methodologies at the <a href="https://www.agilealliance.org/">Agile Alliance</a>), including Scrum, and tracks development and test activities separately. This process works great if you want to track user stories and (optionally) bugs on the Kanban board, or track bugs and tasks on the taskboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/0*n1jD_oxZeWUUXwlu" /></figure><p><a href="https://learn.microsoft.com/en-us/azure/devops/boards/work-items/guidance/scrum-process?view=azure-devops"><strong>Scrum</strong></a> tracks work using product backlog items (PBIs) and bugs on the Kanban board or viewed on a sprint taskboard.</p><p>This process supports the Scrum methodology as defined by the <a href="https://www.scrum.org/">Scrum organization</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/0*4NzZdn4CyBBguOjq" /></figure><p><a href="https://learn.microsoft.com/en-us/azure/devops/boards/work-items/guidance/cmmi-process?view=azure-devops"><strong>Capability Maturity Model Integration (CMMI)</strong></a> supports a framework for process improvement and an auditable record of decisions. With this process, you can track requirements, change requests, risks, and reviews. This process supports <a href="https://learn.microsoft.com/en-us/azure/devops/boards/work-items/guidance/cmmi/guidance-background-to-cmmi?view=azure-devops">formal change management activities</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/0*b6Twatl-Mv3Y2zBs" /></figure><p>For more details check microsoft official documentation</p><p><a href="https://learn.microsoft.com/en-us/azure/devops/boards/get-started/what-is-azure-boards?view=azure-devops">What is Azure Boards? Tools to manage software development projects. — Azure Boards | Microsoft Learn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ab49cf49f9b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configure Jenkins reverse proxy in nginx server.]]></title>
            <link>https://medium.com/@workofviswa/configure-jenkins-reverse-proxy-in-nginx-server-c0c80617c73a?source=rss-97e308526a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0c80617c73a</guid>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[nginx-proxy]]></category>
            <dc:creator><![CDATA[Viswanath Reddy]]></dc:creator>
            <pubDate>Mon, 12 Jun 2023 15:26:27 GMT</pubDate>
            <atom:updated>2023-06-12T15:26:27.874Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*zdU2rHW5Mv-GuS3TATjx4Q.png" /></figure><h3>1. Install NGINX on a Red Hat Enterprise Linux (RHEL).</h3><p>a. First, you will need to add the official NGINX repository to your system.</p><p>You can do this by creating a new file in the <strong><em>/etc/yum.repos.d/ </em></strong>directory, for example <strong><em>/etc/yum.repos.d/nginx.repo</em></strong>, and adding the following content to it:</p><pre>[nginx<br>name=nginx repo</pre><pre>baseurl=http://nginx.org/packages/rhel/7/$basearch/</pre><pre>gpgcheck=0</pre><pre>enabled=1]</pre><p>b. Next, update your package list by running the command:</p><p><strong><em>sudo yum update</em></strong></p><p>c. Finally, install NGINX by running the command:</p><p><strong><em>sudo yum install nginx</em></strong></p><p>d. Once the installation is complete, you can start the NGINX service by running the command:</p><p><strong><em>sudo systemctl start nginx</em></strong></p><p>e. To ensure that NGINX starts automatically when the system boots, you can enable the service with the command:</p><p><strong><em>sudo systemctl enable nginx</em></strong></p><p>f. Finally, you can check the status of the NGINX service with the command:</p><p><strong><em>sudo systemctl status nginx</em></strong></p><p>Once you’ve finished the installation, you can verify that NGINX is working by opening a web browser and navigating to<strong><em> </em></strong><a href="http://localhost/"><strong><em>http://localhost</em></strong></a>. You should see the default NGINX welcome page.</p><p>NGINX configuration files are located in <strong><em>/etc/nginx</em></strong>. The main configuration file is nginx.conf, and the virtual host configurations are located in the <strong><em>conf.d</em></strong> directory.</p><h3>2. Delete the default server details from /etc/nginx/nginx.conf</h3><p>delete <strong>server{….}</strong> block</p><pre>http {<br>server {<br>       listen 80;<br>       server_name example.com;<br>        location / {<br>           proxy_pass localhost:8080;<br>       }<br>   }<br>}</pre><h3>3.Add jenkins.conf file in /etc/nginx/nginx.d/ folder.</h3><p>a. Copy content from <a href="https://www.jenkins.io/doc/book/system-administration/reverse-proxy-configuration-with-jenkins/reverse-proxy-configuration-nginx/">Reverse proxy — Nginx (jenkins.io)</a></p><p>b. Run these three commands.</p><p>nginx -t → for jenkins.conf file validation</p><p>nginx -T → check the nginx daemon loaded content</p><p>Restart nginx</p><p><strong><em>systemctl restart nginx</em></strong></p><h3>4. Open browser and check the above-mentioned jenkins.conf server URL</h3><p><a href="http://jenkins.example.com/">http://jenkins.example.com</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/0*ZnGhdxet20487E-G" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0c80617c73a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adding Self Hosted Agents in Azure DevOps.]]></title>
            <link>https://medium.com/@workofviswa/adding-self-hosted-agents-in-azure-devops-b61f0d030aac?source=rss-97e308526a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b61f0d030aac</guid>
            <category><![CDATA[azure-devops]]></category>
            <dc:creator><![CDATA[Viswanath Reddy]]></dc:creator>
            <pubDate>Mon, 12 Jun 2023 15:15:53 GMT</pubDate>
            <atom:updated>2023-06-12T15:15:53.334Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we are going to add a Linux machine as an agent to build our Azure pipelines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*SJ6BTqWtxe30fpeVaqUKyw.png" /></figure><p><strong>Azure DevOps + Linux Machine</strong></p><p>The process is the same if you have a VM on Azure, a VM on your laptop or any Linux machine and want to use it as an Agent in your Azure DevOps.</p><p>Let’s see how we can do that.</p><p>Prerequisite:</p><ul><li>A Linux machine</li><li>Azure DevOps account.</li></ul><ol><li><strong>Setting up the Agent Pool</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/249/1*GJi7zfHbG8FIqJT-khWyuw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*jyFGSw5l_ltaeCc_xQuykQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WYZE5haqVCezvNKY15HUcg.png" /></figure><p>Go to your Azure DevOps account -&gt; Organization Settings, then Agent Pools in Pipelines</p><p>Click on Add Pool</p><p>Choose Self-Hosted, and give it a name and description</p><p>You can choose to grant access permissions to specific pipelines too. Uncheck the option if needed.</p><p>Open the created Agent pool and click “Agents” then “New Agent”</p><p>Choose Linux and “x64” which is what many use these days. You can also choose RHEL6 or other ARM architectures if needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qCa_Y6wH-ej-jI0IEd7JFw.png" /></figure><p>2. <strong>Installing the Agent</strong></p><p>Check the download location of your file just to be sure. I have mine in Downloads</p><p>Change your working directory to Downloads using cd Downloads in your terminal Then make a new Directory and change the directory into it using mkdir myagent &amp;&amp; cd myagent</p><p>Use tar zxvf ~/Downloads/vsts-agent-linux-x64–2.195.2.tar.gz check the version. Instead, you can use the command you are presented by Azure DevOps</p><p>Run ./<a href="http://config.sh/">config.sh</a> and Y after you check the Agreement.</p><p>The Server URL is <a href="http://dev.azure.com/YourOrganizationName">dev.azure.com/YourOrganizationName</a> find it on your Azure DevOps</p><p>Press “Enter” as we are going to use the PAT token to authenticate.</p><p>3. <strong>Generating a PAT token</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*zsVrANkI1NYEZEbxNFBa8A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*XSSH8Mm-Cq4P-41IbTFYzw.png" /></figure><p>For the PAT token go to your Azure DevOps Account</p><p>Click “New Token”</p><p>Give the token a name and Full access. You can choose your custom-defined scope if you know what you won’t be needing.</p><p>Create a New token.</p><p>This token once disappeared cannot be retrieved later. So make sure you copy it just in case you need it later.</p><p>4. <strong>Final steps</strong></p><p>Enter the Agent pool Name which is “newAgent” for me and a name for your Agent. R2D2 in my case.</p><p>Next run ./<a href="http://run.sh/">run.sh</a></p><p>5. Enjoy!</p><p>Now check your Agents and there we have it, our new Agent up and running</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b61f0d030aac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Azure DevOps?]]></title>
            <link>https://medium.com/@workofviswa/what-is-azure-devops-d453180031ee?source=rss-97e308526a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d453180031ee</guid>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Viswanath Reddy]]></dc:creator>
            <pubDate>Mon, 12 Jun 2023 14:57:14 GMT</pubDate>
            <atom:updated>2023-06-12T14:57:14.756Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/752/0*kkrPF4GOJB-9sUfV" /></figure><p>Azure DevOps is a collection of services provided by Microsoft that allows developers to build, test, and deploy software.</p><p>It includes features such as Git and TFVC source control, agile project management, continuous integration and continuous deployment (CI/CD), and more.</p><p>Azure DevOps can be used to support both cloud and on-premises applications, and it integrates with a variety of other tools and services.</p><p>It is part of the Azure platform and can be used in combination with other Azure services like Azure Boards, Azure Repos, Azure Pipelines, Azure Test Plans and Azure Artifacts to support end-to-end DevOps practices.</p><h3>Pillars (5 Services) of Azure DevOps</h3><p>Azure DevOps is a collection of services that can be used to support the entire software development lifecycle. The main services offered by Azure DevOps include:</p><ul><li>Azure Boards: A service for tracking and managing work items, such as user stories, tasks, and bugs. It includes features for agile project management, such as Kanban boards and sprint planning.</li><li>Azure Repos: A service for source control management, which includes support for both Git and TFVC. It provides features such as pull requests, code reviews, and branch policies.</li><li>Azure Pipeline: A service for continuous integration and continuous deployment (CI/CD). It allows teams to automate the build, test, and deployment of code.</li><li>Azure Artifacts: A service for managing packages and dependencies. It allows teams to create, share, and consume packages across different projects and environments.</li><li>Azure Test Plans: A service for testing and quality assurance. It includes features such as manual testing, automated testing, continuous testing, and test case management.</li></ul><h3>1. Key terms used in Azure Boards</h3><p>Azure Boards is a service within Azure DevOps that provides features for tracking and managing work items, such as user stories, tasks, and bugs. It includes features for agile project management, such as Kanban boards and sprint planning. The following are some key terms used in Azure Boards:</p><ul><li>Work Item: A tracking mechanism to document and manage work that needs to be done, such as user stories, tasks, and bugs.</li><li>Sprint: A time-boxed iteration of work in an Agile development process.</li><li>Backlog: A prioritized list of work items that need to be completed in a project.</li><li>Kanban Board: A visual system for managing and prioritizing work items, typically used in an Agile development process.</li><li>Swim Lane: A horizontal section of a Kanban board that represents a specific stage of a workflow.</li><li>Query: A searchable list of work items that match specific criteria.</li><li>Dashboard: A customizable collection of widgets that provide an overview of the status and progress of a project.</li><li>Epic: A high-level work item that represents a large piece of work that can be broken down into smaller user stories.</li><li>User Story: A work item that represents a small piece of functionality that is valuable to a user.</li><li>Task: A work item that represents a specific piece of work that needs to be done to complete a user story or bug.</li><li>Bug: A work item that represents an issue or defect that needs to be fixed.</li><li>Parent-Child relation: A relation between two work items where one item is the parent and the other is a child.</li><li>Area Path: A hierarchical structure used to organize work items in a project.</li><li>Iteration Path: A hierarchical structure used to organize work items by sprints or iterations.</li><li>State: The current status of a work item, e.g. active, closed, resolved.</li><li>Assigned To: The team member responsible for completing a work item.</li><li>Tags: A label that can be added to work items to categorize them or to help with filtering and querying.</li></ul><h3>2. key terms used in Azure Repos</h3><p>Azure Repos is a service within Azure DevOps that provides features for source control management, including support for both Git and TFVC. The following are some key terms used in Azure Repos:</p><ul><li>Repository: A place where developers can store and manage their source code.</li><li>Branch: A way to separate different versions of source code within a repository.</li><li>Merge: The process of combining changes made in one branch with another branch.</li><li>Pull request: A feature that allows developers to submit changes to a repository for review by other team members before they are merged into the main branch.</li><li>Commit: A snapshot of the source code at a specific point in time.</li><li>Push: The process of uploading local changes to a remote repository.</li><li>Pull: The process of downloading changes from a remote repository to a local repository.</li><li>Conflict: A situation that occurs when changes made to the same file in different branches cannot be automatically merged.</li><li>Git: A distributed version control system.</li><li>TFVC: Team Foundation Version Control, a centralized version control system.</li><li>GitFlow: A popular branching model for Git repositories.</li><li>Master Branch: The main branch where the source code is considered stable and ready for release.</li><li>Feature Branch: A branch created to work on a specific feature or bug fix.</li><li>Release Branch: A branch created to prepare for a release, where only bug fixes and minor adjustments are made.</li><li>Pull Request Policies: a set of rules that must be followed before a pull request can be completed.</li><li>Code Reviews: The process of reviewing and approving code changes before they are merged into the main branch.</li><li>Code History: The history of changes made to the source code over time, including who made the changes and when.</li></ul><h3>3. key terms used in Azure Pipelines</h3><p>Azure Pipelines is a service within Azure DevOps that provides features for continuous integration and continuous deployment (CI/CD). The following are some key terms used in Azure Pipelines:</p><ul><li>Pipeline: The process of automating the build, test, and deployment of code.</li><li>Build: The process of compiling and testing code.</li><li>Release: The process of deploying code to different environments.</li><li>Agent: A software that runs on a machine and is used to perform tasks, such as building or deploying code.</li><li>Task: A specific step in a pipeline that performs a specific action, such as compiling code or running tests.</li><li>Job: A collection of tasks that are executed together.</li><li>Trigger: A condition that causes a pipeline to run automatically.</li><li>YAML: A markup language used to define pipelines in Azure DevOps.</li><li>Artifacts: files produced and consumed by a pipeline, e.g. build output, test results, etc.</li><li>Environments: different stages of a pipeline, e.g. development, staging, production.</li><li>Deployment: The process of making code changes live in a production environment.</li><li>Continuous Integration (CI): The practice of integrating code changes frequently and automatically.</li><li>Continuous Deployment (CD): The practice of automatically deploying code changes to different environments as soon as they are integrated.</li><li>Deployment Gates: Quality gates that must be passed before a release is promoted to the next environment</li><li>Deployment Approvals: Approval process that must be passed before a release is deployed to a specific environment</li><li>Deployment Strategies: Method used to deploy software to different environments, such as blue-green deployment or canary deployment.</li><li>Deployment condition: a set of rules that must be met before a deployment can proceed to the next stage.</li></ul><h3>4. key terms used in Azure Test Plans</h3><p>Azure Test Plans is a service within Azure DevOps that provides features for testing and quality assurance. The following are some key terms used in Azure Test Plans:</p><ul><li>Test Plan: A collection of test cases and test suites that are used to test a specific product or feature.</li><li>Test Suite: A collection of test cases that are related to a specific feature or scenario.</li><li>Test Case: A set of steps and expected results that are used to test a specific feature or scenario.</li><li>Test Run: The execution of a set of test cases.</li><li>Test Configuration: A set of settings that define the environment and conditions in which a test is run.</li><li>Test Results: The outcome of a test run, including whether the test passed or failed and any associated data.</li><li>Test Management: The process of creating, executing, and tracking the results of tests.</li><li>Manual Testing: Testing that is performed manually by a human tester.</li><li>Automated Testing: Testing that is performed using automated scripts or tools.</li><li>Continuous Testing: The practice of testing code changes as soon as they are committed.</li><li>Test Case Management: The process of creating, organizing, and tracking the results of test cases.</li><li>Test Plan Configuration: Settings that can be used to customize a Test plan, such as area and iteration paths, and test suites</li><li>Test Case Workflow: A set of states that a test case goes through, such as active, passed, failed.</li><li>Test Case Priority: A value that indicates the importance of a test case.</li><li>Test Case Automation Status: Indicates whether a test case is automated or manual.</li><li>Test Case Steps: A set of instructions that describes how to perform a test case.</li><li>Test Plan Requirements: A set of requirements that a test plan must meet to be considered complete.</li></ul><h3>5. key terms used in Azure Artifacts</h3><p>Azure Artifacts is a service within Azure DevOps that provides features for managing packages and dependencies. The following are some key terms used in Azure Artifacts:</p><ul><li>Package: A collection of files or dependencies that can be used to distribute software.</li><li>Feed: A container for packages, similar to a package repository.</li><li>Nuget: A package manager for the Microsoft development platform, used to create and consume packages.</li><li>Maven: A package manager for Java development, used to create and consume packages.</li><li>npm: A package manager for JavaScript development, used to create and consume packages.</li><li>Dependency: A package that another package relies on to function.</li><li>Package Management: The process of creating, publishing, and consuming packages.</li><li>Versioning: The practice of assigning a version number to a package.</li><li>Upstream: The source of a package, such as a public repository or an internal feed.</li><li>Downstream: The consumer of a package, such as an application or another package.</li><li>Package Promotion: The process of moving a package from one feed to another, such as from a development feed to a production feed.</li><li>Package Retention: A set of rules that control how long packages are kept before they are deleted.</li><li>Package security: security checks and controls applied to packages</li><li>Symbol Server: A feature that allows you to store and retrieve debugging symbols for your builds</li><li>Package Management UI: a web interface that allows you to manage packages and feeds</li><li>Package Management API: an API that allows you to automate package management tasks</li><li>Proxies: a way to access packages from behind a firewall</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d453180031ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Jenkins?]]></title>
            <link>https://medium.com/@workofviswa/what-is-jenkins-c4bb78b7a2a?source=rss-97e308526a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4bb78b7a2a</guid>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Viswanath Reddy]]></dc:creator>
            <pubDate>Mon, 12 Jun 2023 14:52:43 GMT</pubDate>
            <atom:updated>2023-06-12T14:52:43.947Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/752/0*NZxCTIAwd_winoXB" /></figure><p>Jenkins is an open-source automation server that helps automate parts of the software development process. It is commonly used for continuous integration and delivery of projects, although it can also be used to automate other tasks. Jenkins provides hundreds of plugins to support building, deploying, and automating any project. Some common use cases for Jenkins include building and testing software projects continuously, running automated tests, deploying software to production, and more</p><p>Here are some important topics related to Jenkins:</p><ol><li>Continuous integration (CI) and continuous delivery (CD): Jenkins is a popular tool for implementing CI/CD pipelines. CI/CD pipelines allow developers to automatically build, test, and deploy their code changes, helping them to deliver software faster and with fewer errors.</li><li>Pipeline as code: Jenkins supports pipeline as code, which means that the CI/CD pipeline can be defined using code (usually Groovy or YAML). This makes it easy to version control the pipeline and reuse it across multiple projects.</li><li>Plugins: Jenkins has a rich ecosystem of plugins that extend its functionality. There are plugins for almost everything, from building and testing code, to deploying applications, to integrating with other tools and services.</li><li>Distributed builds: Jenkins can be configured to run builds on multiple machines, allowing developers to scale their CI/CD pipelines and reduce the build time.</li><li>Security: Jenkins has a number of security features, such as user authentication, access control, and secure communication, to help organizations protect their CI/CD pipelines and the software they are building.</li><li>Monitoring and reporting: Jenkins provides a number of tools and features to help developers monitor and troubleshoot their CI/CD pipelines, including real-time build logs, integration with test results and coverage reports, and trend analysis.</li></ol><h3>Jenkins important plugins</h3><p>Jenkins plugins are add-ons that extend the functionality of Jenkins. There are hundreds of plugins available, which provide integration with a wide range of tools and services. Some common Jenkins plugins include:</p><ol><li>Git plugin: Provides integration with Git version control system.</li><li>Maven plugin: Provides integration with Apache Maven build tool.</li><li>Pipeline plugin: Allows you to define your build pipeline as code.</li><li>Docker plugin: Provides integration with Docker containers.</li><li>Ansible plugin: Provides integration with Ansible playbook.</li><li>Slack plugin: Allows you to send notifications to Slack channels.</li></ol><p>These are just a few examples, but there are many more Jenkins plugins available that you can use to customize Jenkins to meet your specific needs.</p><h3>Jenkins Backup</h3><p>There are several ways you can back up your Jenkins instance:</p><ol><li>Use the Jenkins Backup Plugin: This plugin allows you to create backups of your Jenkins instance and store them in a secure location.</li><li>Manually back up the Jenkins home directory: You can manually back up the Jenkins home directory, which contains all of the configurations, build logs, and other data for your Jenkins instance.</li><li>Use a version control system: You can use a version control system such as Git to track changes to your Jenkins configuration and build scripts. This allows you to roll back changes if necessary.</li><li>Use a Jenkins plugin to create backups: There are several Jenkins plugins available that can help you create backups of your Jenkins instance. Some examples include the Simple Backup Plugin and the S3 Backup Plugin.</li></ol><p>It is important to regularly back up your Jenkins instance to protect against data loss. You should determine the best backup strategy for your needs based on your specific requirements and available resources.</p><h3>Declarative VS Scripted pipeline</h3><p>In Jenkins, a pipeline is a suite of plugins that supports implementing and integrating continuous delivery pipelines into Jenkins. There are two types of pipelines in Jenkins: Declarative and Scripted.</p><p>Declarative Pipeline is a more recent feature of Jenkins that provides a more simplified and efficient syntax for defining pipelines as code. It is based on a Domain Specific Language (DSL) that is written in Groovy and uses a more structured and concise syntax. Declarative pipelines are easier to read and understand, and they can be more flexible and powerful than traditional scripted pipelines.</p><p>Scripted Pipeline is the older, more traditional way of defining pipelines in Jenkins. It is a more powerful and flexible way of defining pipelines, but it requires you to write code in the Groovy programming language. Scripted pipelines can be more complex to write and maintain than declarative pipelines.</p><p>Both Declarative and Scripted pipelines can be used to create Jenkins pipelines, and the choice between the two will depend on your specific needs and preferences.</p><h3>Declarative Pipeline</h3><p>In Jenkins, a Declarative Pipeline is a way to define a Jenkins pipeline using a more structured and simplified syntax. Declarative Pipelines are defined using a Groovy-based DSL (Domain Specific Language).</p><p>A Declarative Multi-Stage Pipeline is a Declarative Pipeline that is divided into multiple stages. Each stage represents a phase in the delivery pipeline, and it specifies the actions that need to be executed in that phase. For example, a multi-stage pipeline might have stages for building, testing, and deploying a software application.</p><p>Here is an example of a Declarative Multi-Stage Pipeline:</p><pre>pipeline {<br>    agent {<br>        docker {<br>            image &#39;maven:3.6.3-jdk-11&#39;<br>            args &#39;-v /root/.m2:/root/.m2&#39;<br>        }<br>    }<br>    stages {<br>        stage(&#39;Build&#39;) {<br>            steps {<br>                sh &#39;mvn -B -DskipTests clean package&#39;<br>            }<br>        }<br>        stage(&#39;Test&#39;) {<br>            steps {<br>                sh &#39;mvn test&#39;<br>            }<br>        }<br>        stage(&#39;Deploy&#39;) {<br>            steps {<br>                sh &#39;./deploy.sh&#39;<br>            }<br>        }<br>    }<br>}</pre><p>In this example, the pipeline has three stages: Build, Test, and Deploy. The Build stage runs the Maven clean and package goals, the Test stage runs the Maven test goal, and the Deploy stage runs a script called deploy.sh.</p><h3>Scripted Pipeline</h3><p>In Jenkins, a Scripted Pipeline is a way to define a Jenkins pipeline using the Groovy programming language. A Scripted Pipeline is typically written in a Jenkinsfile, which is checked into source control.</p><p>A Scripted Multi-Stage Pipeline is a Scripted Pipeline that is divided into multiple stages. Each stage represents a phase in the delivery pipeline, and it specifies the actions that need to be executed in that phase. For example, a multi-stage pipeline might have stages for building, testing, and deploying a software application.</p><p>Here is an example of a Scripted Multi-Stage Pipeline:</p><pre>node {<br>    stage(&#39;Build&#39;) {<br>        sh &#39;mvn -B -DskipTests clean package&#39;<br>    }<br>    stage(&#39;Test&#39;) {<br>        sh &#39;mvn test&#39;<br>    }<br>    stage(&#39;Deploy&#39;) {<br>        sh &#39;./deploy.sh&#39;<br>    }<br>}</pre><p>In this example, the pipeline has three stages: Build, Test, and Deploy. The Build stage runs the Maven clean and package goals, the Test stage runs the Maven test goal, and the Deploy stage runs a script called deploy.sh.</p><p>Scripted pipelines offer more flexibility and power than Declarative Pipelines, but they can be more difficult to write and maintain. You should choose the type of pipeline that is best suited to your needs based on your specific requirements and expertise.</p><h3>Declarative pipeline with an example</h3><p>This is an example of a Declarative Pipeline that can be used to build, test, and deploy a Java application using Maven, SonarQube, Docker, and Ansible:</p><pre>pipeline {<br>    agent {<br>        docker {<br>            image &#39;maven:3.6.3-jdk-11&#39;<br>            args &#39;-v /root/.m2:/root/.m2&#39;<br>        }<br>    }<br>    stages {<br>        stage(&#39;Build&#39;) {<br>            steps {<br>                sh &#39;mvn -B -DskipTests clean package&#39;<br>            }<br>        }<br>        stage(&#39;Test&#39;) {<br>            steps {<br>                sh &#39;mvn test&#39;<br>                sh &#39;sonar-scanner&#39;<br>            }<br>        }<br>        stage(&#39;Containerize&#39;) {<br>            steps {<br>                sh &#39;./containerize.sh&#39;<br>            }<br>        }<br>        stage(&#39;Deploy&#39;) {<br>            steps {<br>                withCredentials([usernamePassword(credentialsId: &#39;kubernetes-deploy&#39;, passwordVariable: &#39;KUBERNETES_PASSWORD&#39;, usernameVariable: &#39;KUBERNETES_USERNAME&#39;)]) {<br>                    sh &#39;ansible-playbook deploy.yml -e &quot;kubernetes_username=${KUBERNETES_USERNAME} kubernetes_password=${KUBERNETES_PASSWORD}&quot;&#39;<br>                }<br>            }<br>        }<br>    }<br>}</pre><p>In this example, the pipeline has four stages: Build, Test, Containerize, and Deploy. The Build stage runs the Maven clean and package goals, the Test stage runs the Maven test goal and runs a SonarQube scan, the Containerize stage runs a script called containarize.sh to create a Docker container, and the Deploy stage uses Ansible to deploy the container to Kubernetes.</p><p>This pipeline assumes that the necessary credentials for deploying to Kubernetes are stored in Jenkins and are configured with the ID kubernetes-deploy. It also assumes that the sonar-scanner command is available on the PATH and that an Ansible playbook called deploy.yml exists in the Jenkins workspace.</p><h3>Restart Jenkins Server</h3><p>There are several ways to restart a Jenkins server:</p><p>Restart from the Jenkins UI:</p><ul><li>Log in to the Jenkins UI as an administrator.</li><li>Click on “Manage Jenkins” in the left navigation menu.</li><li>Click on “Restart” in the “System Information” section.</li><li>Click on the “Yes” button in the confirmation dialog.</li></ul><p>Restart from the command line:</p><ul><li>Connect to the Jenkins server via SSH.</li><li>Run the systemctl restart jenkins command to restart the Jenkins service.</li></ul><p>Restart from the Jenkins CLI:</p><ul><li>Run the java -jar jenkins-cli.jar -s <a href="http://jenkins-server:port/">http://jenkins-server:port/</a> restart command to restart the Jenkins server.</li></ul><p>It is important to note that restarting the Jenkins server will interrupt any running builds and may cause other disruptions. You should only restart the Jenkins server if it is necessary for maintenance or troubleshooting purposes.</p><h3>Jenkins Password Reset</h3><p>If you have forgotten the admin password for your Jenkins instance and you are unable to log in, you can try resetting the password using the following steps:</p><p>Check if you have access to the Jenkins server file system:</p><ul><li>You will need to have access to the Jenkins server file system to reset the admin password.</li><li>If you do not have access to the Jenkins server file system, you will need to request access from the Jenkins administrator.</li></ul><p>Reset the password:</p><ul><li>On the Jenkins server, navigate to the secrets directory in the Jenkins home directory (usually /var/lib/jenkins/secrets).</li><li>In the secrets directory, you will find a file named initialAdminPassword. This file contains the initial admin password for the Jenkins instance.</li><li>Open the initialAdminPassword file and copy the password.</li><li>Go to the Jenkins login page and paste the password into the “Admin password” field.</li><li>Click on the “Continue” button.</li><li>You will be prompted to create a new password for the Jenkins admin user. Enter your new password and click on the “Save” button.</li></ul><p>It is important to note that resetting the Jenkins admin password will also reset the passwords of any other users who have forgotten their passwords. You should only reset the password if you are unable to log in and you do not have any other options.</p><h3>Jenkins Job types</h3><p>Jenkins is an open-source automation tool that allows users to build, test, and deploy software. It supports various job types, including:</p><ol><li>Freestyle: This is the most basic and common job type in Jenkins. It allows users to configure various options and settings for their build, test, and deploy processes.</li><li>Pipeline: This job type allows users to define their build, test, and deploy processes as code using Jenkins’ pipeline DSL (domain-specific language).</li><li>Multi-configuration: This job type allows users to run the same build with different configurations.</li><li>External Job: This job type allows users to run jobs outside of Jenkins, such as a script on a remote machine.</li><li>Folder: This job type allows users to organize other Jenkins jobs into a single folder, making it easier to manage and maintain large numbers of jobs.</li><li>Github organization: This job type allows users to automatically build and test pull requests and branches from a Github organization.</li><li>Jenkinsfile: This job type allows users to define and execute their Jenkins pipeline in a Jenkinsfile.</li></ol><p>These are just a few examples of the many job types available in Jenkins. Depending on the version you are using, you may have access to other job types as well.</p><h3>Adding Slave node to Jenkins server</h3><p>To add a slave node to a Jenkins server, you will need to follow these steps:</p><ol><li>On the Jenkins server, click on “Manage Jenkins” in the left navigation menu.</li><li>Click on “Manage Nodes” in the “Nodes” section.</li><li>Click on the “New Node” button.</li><li>Enter a name for the slave node and select the “Permanent Agent” option.</li><li>Click on the “OK” button.</li><li>In the “Launch Method” section, select the “Launch agent via Java Web Start” option.</li><li>Click on the “Save” button.</li></ol><p>After saving the configuration, Jenkins will display the command that you need to run on the slave machine to launch the slave agent. You will need to run this command on the slave machine to launch the agent and connect it to the Jenkins server.</p><p>It is important to note that the slave node will need to be able to communicate with the Jenkins server over the network in order to be able to connect. You may need to configure your firewall and network settings to allow communication between the slave and the Jenkins server.</p><h3>Integrate Jenkins with other DevOps tools.</h3><h3>1. To add Git to Jenkins, you will need to follow these steps:</h3><p>a. Install Git:</p><ul><li>On the Jenkins server, download and install Git. You can download Git from the Git website ( <a href="https://git-scm.com/downloads).">https://git-scm.com/downloads).</a></li><li>Make sure that the git command is available on the PATH. You can test this by running git — version in a terminal window.</li></ul><p>b. Install the Git Plugin:</p><ul><li>In Jenkins, go to “Manage Jenkins” &gt; “Manage Plugins”.</li><li>In the “Available” tab, search for “Git Plugin” and select it.</li><li>Click on the “Install” button.</li><li>Restart Jenkins after the installation is complete.</li></ul><p>c. Configure Git:</p><ul><li>In Jenkins, go to “Manage Jenkins” &gt; “Global Tool Configuration”.</li><li>Scroll down to the “Git” section.</li><li>Click on the “Add Git” button.</li><li>Enter a name for the Git installation and specify the path to the git executable.</li><li>Click on the “Save” button to save the configuration.</li></ul><p>After you have completed these steps, you should be able to use Git in your Jenkins builds. You can specify the Git installation that you configured in the “Global Tool Configuration” page as a build tool in your Jenkins projects.</p><h3>2. To integrate GitHub with a Jenkins pipeline, you will need to follow these steps:</h3><p>a. Install the GitHub Plugin:</p><ul><li>In Jenkins, go to “Manage Jenkins” &gt; “Manage Plugins”.</li><li>In the “Available” tab, search for “GitHub Plugin” and select it.</li><li>Click on the “Install” button.</li><li>Restart Jenkins after the installation is complete.</li></ul><p>b. Configure the GitHub Webhook:</p><ul><li>In GitHub, go to the repository settings.</li><li>In the “Webhooks” section, click on the “Add webhook” button.</li><li>Enter the URL of your Jenkins instance and select the events that you want to trigger the webhook (e.g., push, pull request).</li><li>Click on the “Add webhook” button to save the configuration.</li></ul><p>c. Create a Jenkins pipeline and add a step to fetch the code from GitHub.</p><p>Here is an example of how you can fetch code from GitHub and build it in a Jenkins pipeline:</p><pre>pipeline {<br>  agent any<br>  stages {<br>    stage(&#39;Fetch&#39;) {<br>      steps {<br>        git url: &#39;https://github.com/user/repo.git&#39;<br>      }<br>    }<br>    stage(&#39;Build&#39;) {<br>      steps {<br>        // Build steps go here<br>      }<br>    }<br>  }<br>}</pre><p>In this example, the git step is used to fetch the code from GitHub. The url parameter specifies the URL of the Git repository.</p><p>It is important to note that you will need to have the GitHub Plugin installed and the GitHub webhook configured for the pipeline to be triggered when code is pushed to or a pull request is created in the GitHub repository. You can configure the GitHub webhook as described in step 2.</p><h3>3. To add SonarQube to Jenkins, you will need to follow these steps:</h3><p>a. Install the SonarQube Plugin:</p><ul><li>In Jenkins, go to “Manage Jenkins” &gt; “Manage Plugins”.</li><li>In the “Available” tab, search for “SonarQube Plugin” and select it.</li><li>Click on the “Install” button.</li><li>Restart Jenkins after the installation is complete.</li></ul><p>b. Configure the SonarQube Server:</p><ul><li>In Jenkins, go to “Manage Jenkins” &gt; “Configure System”.</li><li>Scroll down to the “SonarQube servers” section.</li><li>Click on the “Add SonarQube” button.</li><li>Enter the URL of your SonarQube server and a name for the server.</li><li>Click on the “Test Connection” button to make sure Jenkins can connect to the SonarQube server.</li><li>If the connection is successful, click on the “Save” button to save the configuration.</li></ul><p>c. Analyze Your Code:</p><ul><li>In your Jenkins project, go to “Configure” &gt; “Build” &gt; “Add build step” &gt; “Execute SonarQube Scanner”.</li><li>Select the SonarQube server that you configured in step 2.</li><li>Enter the required analysis properties.</li><li>Click on the “Save” button to save the configuration. After you have completed these.</li></ul><h3>4. To add Maven to Jenkins, you will need to follow these steps:</h3><p>a. Install Maven:</p><ul><li>On the Jenkins server, download and install the latest version of Maven. You can download Maven from the Apache Maven website ( <a href="https://maven.apache.org/download.cgi">https://maven.apache.org/download.cgi</a>).</li><li>Make sure that the mvn command is available on the PATH. You can test this by running mvn -v in a terminal window.</li></ul><p>b. Install the Maven Plugin:</p><ul><li>In Jenkins, go to “Manage Jenkins” &gt; “Manage Plugins”.</li><li>In the “Available” tab, search for “Maven Plugin” and select it.</li><li>Click on the “Install” button.</li><li>Restart Jenkins after the installation is complete.</li></ul><p>c. Configure Maven:</p><ul><li>In Jenkins, go to “Manage Jenkins” &gt; “Global Tool Configuration”.</li><li>Scroll down to the “Maven” section.</li><li>Click on the “Add Maven” button.</li><li>Enter a name for the Maven installation and select the version that you installed in step 1.</li><li>Click on the “Save” button to save the configuration. After you have completed these steps, you should be able to use Maven in your Jenkins builds. You can specify the Maven installation that you configured in the “Global Tool Configuration” page as a build.</li></ul><h3>5. To add Docker to Jenkins, you will need to follow these steps:</h3><p>a. Install Docker:</p><ul><li>On the Jenkins server, download and install Docker. You can download Docker from the Docker website ( <a href="https://www.docker.com/get-started">https://www.docker.com/get-started</a>).</li><li>Make sure that the docker command is available on the PATH. You can test this by running docker — version in a terminal window.</li></ul><p>b. Install the Docker Plugin:</p><ul><li>In Jenkins, go to “Manage Jenkins” &gt; “Manage Plugins”.</li><li>In the “Available” tab, search for “Docker Plugin” and select it.</li><li>Click on the “Install” button.</li><li>Restart Jenkins after the installation is complete.</li></ul><p>c. Configure Docker:</p><ul><li>In Jenkins, go to “Manage Jenkins” &gt; “Configure System”.</li><li>Scroll down to the “Cloud” section.</li><li>Click on the “Add a new cloud” button and select “Docker”.</li><li>Enter a name for the Docker cloud and specify the Docker host URI.</li><li>Click on the “Test Connection” button to make sure Jenkins can connect to the Docker host.</li><li>If the connection is successful, click on the “Save” button to save the configuration.</li></ul><p>After you have completed these steps, you should be able to use.</p><h3>6. To use Kubernetes in Jenkins, you will need to follow these steps:</h3><p>a. Install the Kubernetes Plugin:</p><ul><li>In Jenkins, go to “Manage Jenkins” &gt; “Manage Plugins”.</li><li>In the “Available” tab, search for “Kubernetes Plugin” and select it.</li><li>Click on the “Install” button.</li><li>Restart Jenkins after the installation is complete.</li></ul><p>b. Configure the Kubernetes Plugin:</p><ul><li>In Jenkins, go to “Manage Jenkins” &gt; “Configure System”.</li><li>Scroll down to the “Cloud” section.</li><li>Click on the “Add a new cloud” button and select “Kubernetes”.</li><li>Enter a name for the Kubernetes cloud and specify the Kubernetes server URL.</li><li>Select the “Kubernetes Service Account” option and enter the service account token and namespace.</li><li>Click on the “Test Connection” button to make sure Jenkins can connect to the Kubernetes cluster.</li><li>If the connection is successful, click on the “Save” button to save the configuration.</li></ul><p>After you have completed these steps, you should be able to use Kubernetes in your Jenkins builds. You can use the Kubernetes Plugin to run Jenkins agents in Kubernetes pods and to dynamically provision and manage the resources required for your Jenkins builds.</p><h3>7. To use Ansible in Jenkins, you will need to follow these steps:</h3><p>a. Install Ansible:</p><ul><li>On the Jenkins server, download and install Ansible. You can download Ansible from the Ansible website ( <a href="https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html">https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html</a>)</li><li>Make sure that the ansible command is available on the PATH. You can test this by running ansible — version in a terminal window.</li></ul><p>b. Install the Ansible Plugin:</p><ul><li>In Jenkins, go to “Manage Jenkins” &gt; “Manage Plugins”.</li><li>In the “Available” tab, search for “Ansible Plugin” and select it.</li><li>Click on the “Install” button.</li><li>Restart Jenkins after the installation is complete.</li></ul><p>c. Configure Ansible:</p><ul><li>In Jenkins, go to “Manage Jenkins” &gt; “Global Tool Configuration”.</li><li>Scroll down to the “Ansible” section.</li><li>Click on the “Add Ansible” button.</li><li>Enter a name for the Ansible installation and specify the path to the ansible executable.</li><li>Click on the “Save” button to save the configuration.</li></ul><p>After you have completed these steps, you should be able to use Ansible in your Jenkins builds. You can specify the Ansible installation that you configured in the “Global Tool Configuration” page as a build tool in your Jenkins projects. You can also use the Ansible Plugin to run Ansible playbook tasks as part of your Jenkins builds.</p><h3>8. To configure email notifications in Jenkins, you will need to follow these steps:</h3><p>a. Install the Email Extension Plugin:</p><ul><li>In Jenkins, go to “Manage Jenkins” &gt; “Manage Plugins”.</li><li>In the “Available” tab, search for “Email Extension Plugin” and select it.</li><li>Click on the “Install” button.</li><li>Restart Jenkins after the installation is complete.</li></ul><p>b. Configure the SMTP Server:</p><ul><li>In Jenkins, go to “Manage Jenkins” &gt; “Configure System”.</li><li>Scroll down to the “Email Notification” section.</li><li>Enter the required information to configure the SMTP server (SMTP server, port, use SSL/TLS, username, and password).</li><li>Click on the “Test Configuration” button to make sure Jenkins can send emails through the specified SMTP server.</li><li>If the test is successful, click on the “Save” button to save the configuration.</li></ul><p>c. Configure the Email Notifications:</p><ul><li>In your Jenkins project, go to “Configure” &gt; “Post-build Actions” &gt; “Editable Email Notification”.</li><li>Enter the required information to configure the email notifications (recipients, subject, content).</li><li>You can use variables such as ${BUILD_STATUS} and ${BUILD_URL} in the subject and content to include build status and build URL in the email.</li><li>Click on the “Save” button to save the configuration. After you have completed these steps, Jenkins will send email notifications for the events that you have configured (e.g., build success, build failure).</li><li>You can also customize the email templates and add additional triggers for the email notifications.</li></ul><p>Create a Jenkins pipeline and add a step to send an email notification.</p><p>Here is an example of how you can send an email notification in a Jenkins pipeline:</p><pre>pipeline {<br>   agent any<br>   stages {<br>     stage(&#39;Build&#39;) {<br>       steps {<br>         // Build steps go here<br>       }<br>     }<br>     stage(&#39;Notify&#39;) {<br>       steps {<br>         script {<br>           // Send an email notification<br>           emailext attachmentsPattern: &#39;**/build.log&#39;, body: &#39;The build has completed. See attached build log for details.&#39;, subject: &#39;Build Results - ${currentBuild.fullDisplayName}&#39;, to: &#39;recipient@example.com&#39;<br>         }<br>       }<br>     }<br>   }<br> }</pre><p>In this example, the emailext step is used to send an email notification. The attachmentsPattern parameter specifies the pattern of the files to be attached to the email. The body parameter specifies the content of the email, and the subject parameter specifies the subject of the email. The to parameter specifies the recipients of the email. You can customize the email notification by using variables such as ${currentBuild.fullDisplayName} and ${currentBuild.status} in the subject and body of the mail.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4bb78b7a2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PostgreSQL and SonarQube Installation and Integration in RHEL.]]></title>
            <link>https://medium.com/@workofviswa/postgresql-and-sonarqube-installation-and-integration-in-rhel-954760eb7bc6?source=rss-97e308526a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/954760eb7bc6</guid>
            <category><![CDATA[sonarqube]]></category>
            <category><![CDATA[sonarqube-setup]]></category>
            <dc:creator><![CDATA[Viswanath Reddy]]></dc:creator>
            <pubDate>Mon, 12 Jun 2023 07:06:30 GMT</pubDate>
            <atom:updated>2023-06-18T08:32:06.518Z</atom:updated>
            <content:encoded><![CDATA[<p>SonarQube/Cloud Installation, exploration and Integration (Azure DevOps) has been illustrated in three stories simultaneously.</p><p><a href="https://medium.com/@workofviswa/postgresql-and-sonarqube-installation-and-integration-in-rhel-954760eb7bc6">https://medium.com/@workofviswa/postgresql-and-sonarqube-installation-and-integration-in-rhel-954760eb7bc6</a><br><a href="https://medium.com/@workofviswa/exploring-sonarqube-or-sonarcloud-13307670ee29">https://medium.com/@workofviswa/exploring-sonarqube-or-sonarcloud-13307670ee29</a><br><a href="https://medium.com/@workofviswa/integrating-sonarcloud-with-azure-devops-pipelines-2210502491bf">https://medium.com/@workofviswa/integrating-sonarcloud-with-azure-devops-pipelines-2210502491bf</a></p><p>This is Part 1 of 3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/0*f7WXZ6nT0oOwBrjj" /></figure><p>This Story illustrates the components with the color of the above image.</p><h3>Installing PostgreSQL on Red Hat Enterprise Linux (RHEL):</h3><ol><li>Add the PostgreSQL Yum repository to your system by creating a new file called “pgdg.repo” in the /etc/yum.repos.d/ directory:</li></ol><p><strong><em>sudo vi /etc/yum.repos.d/pgdg.repo</em></strong></p><p>2. Add the following content to the “pgdg.repo” file:</p><pre>[pgdg13] name=PostgreSQL 13 for RHEL/CentOS 7 - x86_64 <br>baseurl=https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-7-x86_64 <br>enabled=<br>gpgcheck=01</pre><p>Note: You can replace “13” with the version of PostgreSQL you want to install, if it’s different.</p><p>3. Update the package list and install PostgreSQL:</p><p><strong><em>sudo yum update</em></strong></p><p><strong><em>sudo yum install postgresql-server</em></strong></p><p>4. Initialize the PostgreSQL database:</p><p>sudo postgresql-setup initdb</p><p>5. Start the PostgreSQL service and enable it to start on boot:</p><p><strong><em>sudo systemctl start postgresql</em></strong></p><p><strong><em>sudo systemctl enable postgresql</em></strong></p><p>6. That’s it! PostgreSQL should now be installed and running on your RHEL system. You can log in to the PostgreSQL server by running the following command:</p><p><strong><em>sudo -i -u postgres</em></strong></p><p><strong><em>psql</em></strong></p><p>From here, you can start creating databases and tables.</p><h3>Installing SonarQube and integrating it with PostgreSQL.</h3><p>1.Install Java 11 if it is not already installed:</p><p><strong><em>sudo yum install java-11-openjdk-devel</em></strong></p><p>2.Download and install the latest version of SonarQube from the official website:</p><p><strong><em>sudo wget </em></strong><a href="https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-9.3.1.45539.zip"><strong><em>https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-9.3.1.45539.zip</em></strong></a></p><p><strong><em>sudo unzip </em></strong><a href="http://sonarqube-9.3.1.45539.zip/"><strong><em>sonarqube-9.3.1.45539.zip</em></strong></a><strong><em> -d /opt</em></strong></p><p>3.Create a new PostgreSQL database and user:</p><pre>sudo su - postgres</pre><pre>create user sonar</pre><pre>psql</pre><pre>ALTER USER sonarqube WITH ENCRYPTED password &#39;password&#39;;</pre><pre>create database sonarqube;</pre><pre>GRANT ALL PRIVILEGES ON DATABASE sonarqube TO sonar;</pre><pre>\q</pre><pre>exit</pre><p>Note: Replace ‘password’ with a strong password of your choice.</p><p>4.Configure SonarQube to use PostgreSQL by editing the file /opt/sonarqube/conf/sonar.properties:</p><pre>sonar.jdbc.username=sona</pre><pre>sonar.jdbc.password=password</pre><pre>sonar.jdbc.url=jdbc:postgresql://localhost/sonarquber</pre><p>Note: Replace ‘password’ with the password you set in step 3.</p><p>5.Start SonarQube:</p><p><strong><em>sudo /opt/sonarqube/bin/linux-x86–64/sonar.sh start</em></strong></p><p>6.Open the SonarQube web interface by visiting http://&lt;your_server_ip&gt;:9000 in a web browser.</p><p>7.Log in with the default credentials (admin/admin) and follow the prompts to change the password.</p><p>That’s it! SonarQube should now be up and running and integrated with your PostgreSQL database.</p><p>You can now start analyzing your projects and improving your code quality.</p><p>Subscribe for more content like this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=954760eb7bc6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>