<?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 Lamai Anthony on Medium]]></title>
        <description><![CDATA[Stories by Lamai Anthony on Medium]]></description>
        <link>https://medium.com/@lamaianthony?source=rss-bd727d0a736a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*c7XxKvRmrO8O3_uxzqfPXQ.jpeg</url>
            <title>Stories by Lamai Anthony on Medium</title>
            <link>https://medium.com/@lamaianthony?source=rss-bd727d0a736a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 07:17:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lamaianthony/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[Jenkins/Docker Project Key points — part 5]]></title>
            <link>https://lamaianthony.medium.com/jenkins-docker-project-key-points-part-5-a812661613c3?source=rss-bd727d0a736a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a812661613c3</guid>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[cicd-pipeline]]></category>
            <category><![CDATA[kpi-reporting]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[sdlc-methodologies]]></category>
            <dc:creator><![CDATA[Lamai Anthony]]></dc:creator>
            <pubDate>Sun, 11 Jun 2023 12:42:18 GMT</pubDate>
            <atom:updated>2023-06-11T12:42:18.521Z</atom:updated>
            <content:encoded><![CDATA[<h3>Jenkins/Docker Project Key points — part 5</h3><h3>Recap the project and highlight key takeaways.</h3><p>By automating server deployment, configuring GitHub repositories securely, and properly maintaining Jenkins, you can streamline your CI/CD processes, improve efficiency, and enhance the overall security of your software development lifecycle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*xxkXKao9iwsmbEzImcHQuQ.png" /></figure><p>Deploying AWS EC2 Instances:</p><p>In this project, our server deployment was done manually. However, manual deployment can be time-consuming, especially when you need to deploy multiple servers and set up various components like network security groups, internet gateways, and network gateways. Automating the deployment process can save valuable time, allowing you to focus more on running the CI/CD process efficiently.</p><p>During the deployment process, there are several important considerations to keep in mind. Firstly, it is crucial to ensure that each virtual machine is assigned to the correct network security group to enforce the desired level of access control. Additionally, you need to verify that the necessary ports are appropriately assigned and accessible from the internet, taking into account any security requirements or restrictions.</p><p>Depending on the chosen authentication method, such as SSH keys, it is essential to ensure that the required credentials are readily available when needed and kept secure. Proper management and protection of SSH keys can help prevent unauthorized access and maintain the overall security of your EC2 instances.</p><p>GitHub Configuration:</p><p>When configuring the GitHub repository for code deployment and establishing a webhook to connect with the Jenkins server, it is important to follow the principle of least privilege. Grant users, particularly developers, only the necessary permissions required for executing their tasks. By implementing appropriate access controls, you can minimize the risk of unauthorized code modifications or accidental deployments.</p><p>To safeguard the integrity of your codebase, it is recommended to implement branch protection strategies. This prevents untested or incorrect code from being merged into your main branch, maintaining the stability of your application. Furthermore, consider enabling multifactor authentication for added security, requiring additional verification steps for accessing and modifying critical code repositories.</p><p>Jenkins Configuration:</p><p>Jenkins is a powerful tool for continuous integration and delivery. However, staying up to date with plugin updates can be challenging, as some plugins may become unsupported over time. It is crucial to regularly update and maintain your Jenkins installation to benefit from the latest features, security patches, and bug fixes. Stay connected with the Jenkins community and leverage available resources, such as forums and documentation, to overcome any hurdles and make the most of the tool’s capabilities.</p><p>Integrating Jenkins with other applications can present a learning curve, particularly for first-time users. However, due to its widespread adoption, you can find ample resources, tutorials, and best practices to guide you through the process. Take advantage of online communities, official documentation, and user forums to address integration challenges effectively and ensure a seamless workflow across your development and deployment pipeline.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a812661613c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jenkins/Docker Project Key points — part 4]]></title>
            <link>https://lamaianthony.medium.com/jenkins-docker-project-key-points-part-4-d09689906e65?source=rss-bd727d0a736a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d09689906e65</guid>
            <category><![CDATA[sonatypenexus]]></category>
            <category><![CDATA[cicd-tools]]></category>
            <category><![CDATA[sonarqube]]></category>
            <category><![CDATA[pipeline]]></category>
            <category><![CDATA[jenkins-plugins]]></category>
            <dc:creator><![CDATA[Lamai Anthony]]></dc:creator>
            <pubDate>Fri, 09 Jun 2023 14:31:30 GMT</pubDate>
            <atom:updated>2023-06-09T14:31:30.435Z</atom:updated>
            <content:encoded><![CDATA[<h3>Jenkins/Docker Project Key points — part 4</h3><h3>Configure essential Jenkins plugins and create a Jenkins pipeline project</h3><p>Before setting up a Jenkins CI/CD pipeline project, it is essential to ensure that the necessary Jenkins plugins are installed and up to date.</p><p>Launch Jenkins and navigate to the “Manage Jenkins” section. In Jenkins, Available Plugins tab, search for the plugin, click on “Install without restart” then wait for it to complete installing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*bLn45J0voIfAXzCLWrEUxQ.png" /></figure><p><strong>Sonarqube Integration:</strong></p><p>Log in to your SonarQube instance as a user with administrative privileges. Once the token is generated, make sure to copy and securely store it in a safe location. SonarQube will only display the token once, and you won’t be able to retrieve it later. Treat the token like a password, as it grants access to your SonarQube instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Y_R0nbLhnRKtRONacjFOA.png" /></figure><p>In Jenkins go to Manage credentials and add Sonarqube user credentials/token</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*0SzxILsFKyCMB_4qGR1uNQ.png" /></figure><p>Configure Sonarqube Scanner in Global Tool Configuration</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*sc2S8PmZHxm1j26-NACgOA.png" /></figure><p>Add Sonarqube server under Manage Jenkins &gt; System</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/1*UJIUeQUwteE1-6qfk_T1Yg.png" /></figure><p><strong>Sonatype Nexus:</strong></p><p>In the Nexus Server create the Repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JCf-iHeTbYAsbAY7OyCYJw.png" /></figure><p>In Jenkins go to Manage credentials and add Nexus user credentials/token. Under Manage Plugins, download Nexus artifact uploader. In the Groovy script pipeline use the “withSonarQube” plugin. Jenkins has a Pipeline Syntax tool that helps with creating the pipeline script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CC8YE5KUdMC1B-P0UEIPAg.png" /></figure><p>Create a Jenkins pipeline project, enter a project name, and click ok. The Jenkins pipeline script can be found in my <a href="https://github.com/Git-LAnthony/Jenkins-k8s">GitHub repository</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*bhpDDx2HtswNCrjm2uPjUA.png" /></figure><p><strong>Docker:</strong></p><p>To integrate Docker and push to DockerHub, install the Docker plugin, add the Docker credentials, and then configure Docker in the Global Tool Management menu. Check out my medium article on Docker for more information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*gbIblFxxdu8VE9yCM360Dg.png" /></figure><p>The Jenkins Groovy script used in this project can be found below.</p><pre>pipeline {<br>    agent any<br>    <br>    tools {<br>        maven &#39;Maven.3.8.7&#39;<br>    }<br>    <br>    stages {<br>        stage(&quot;Git Checkout&quot;) {<br>            steps {<br>                git branch: &#39;main&#39;, credentialsId: &#39;Github&#39;, url: &#39;https://github.com/Git-LAnthony/Jenkins-k8s.git&#39;<br>            }<br>        }<br>        <br>        stage(&quot;Maven Package&quot;) {<br>            steps {<br>                sh &quot;mvn clean package&quot;<br>            }<br>        }<br>        <br>        stage(&quot;Sonarqube code scan&quot;) {<br>            steps {<br>                script{withSonarQubeEnv(credentialsId: &#39;sonarqube-token&#39;) {<br>                    sh &quot;mvn clean package sonar:sonar&quot;<br>                }<br>                }<br>            }<br>        }<br>      <br>        <br>        stage(&quot;Nexus artifact&quot;) {<br>            steps {<br>                nexusArtifactUploader artifacts: [[artifactId: &#39;test-java-app&#39;, classifier: &#39;&#39;, file: &#39;target/test-java-app.war&#39;, type: &#39;war&#39;]], credentialsId: &#39;admin&#39;, groupId: &#39;com.mt&#39;, nexusUrl: &#39;54.236.49.57:8081&#39;, nexusVersion: &#39;nexus3&#39;, protocol: &#39;http&#39;, repository: &#39;maven-mixed-artifactory&#39;, version: &#39;1.1.1&#39;<br>            }<br>        }<br>        <br>        stage(&quot;Docker Build&quot;) {<br>            steps {<br><br>                sh &quot;docker build -t dockerlanthony/test-java-app:${BUILD_ID} .&quot;<br>            }<br>        }<br>        <br>        stage(&quot;Docker Push&quot;) {<br>            steps {<br>                withCredentials([string(credentialsId: &#39;Dockerhubpws&#39;, variable: &#39;Dockerhubpwd&#39;)]) {<br>                    sh &quot;docker login -u dockerlanthony -p ${Dockerhubpwd}&quot;<br>                }<br>                sh &quot;docker push dockerlanthony/webapp:${BUILD_ID}&quot;<br>            }<br>        }<br>        <br>}</pre><p>Troubleshooting a failed Jenkins pipeline requires a systematic approach, utilizing the console output logs and using external resources like Google search and official documentation effectively.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d09689906e65" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jenkins/Docker Project Key points — part 3]]></title>
            <link>https://lamaianthony.medium.com/jenkins-docker-project-key-points-part-3-e58cb8f8fd99?source=rss-bd727d0a736a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e58cb8f8fd99</guid>
            <category><![CDATA[webhooks]]></category>
            <category><![CDATA[jenkins-pipeline]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Lamai Anthony]]></dc:creator>
            <pubDate>Fri, 09 Jun 2023 01:27:14 GMT</pubDate>
            <atom:updated>2023-06-09T01:27:14.675Z</atom:updated>
            <content:encoded><![CDATA[<h3>Jenkins/Docker Project Key points — part 3</h3><h3>Set up a GitHub repository for code deployment and create a webhook to connect with the Jenkins server</h3><p>In the GitHub Key Points series, we have covered essential topics such as pulling, pushing, branching, and merging code in GitHub. In this chapter, we will delve into the branching strategy utilized for our project. However, before we proceed, let’s take a moment to understand what branching strategies are, their significance, and how we determine the most suitable strategy to employ.</p><p>A branching strategy is a set of rules that developers follow when they write, merge, and deploy shared code to a central repository. It aids easy collaboration among developers, helps avoid merging mistakes, and resolves issues such as feature prioritization, bug fixes, and release management.</p><p>There are four major branching strategies: GitFlow, GitHub Flow, GitLab Flow, and Trunk-based development. We will be using the GitHub Flow method for this project. GitHub Flow is a much simpler branching strategy and is suitable for the app that we will deploy. There is a main branch where the code is stored, but every new change branches off into a new feature or hotfix branch. After the changes are tested and approved, they are merged back into the main branch. This way, the main branch is constantly in a deployable state, and it supports the CI/CD process.</p><p>Here is a link to the GitHub <a href="https://github.com/Git-LAnthony?tab=repositories">source code repository</a>.</p><p>The repository contains the application source code, Jenkins pipeline Groovy script, Dockerfile, and pom.xml file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*ufB0EAKBV8QiYl-LAhrYtg.png" /></figure><p>After code is pushed to GitHub, it typically undergoes a peer review process and, upon approval, is merged into the main branch. Subsequently, a webhook is triggered to initiate the Jenkins CI/CD pipeline job.</p><p>Webhooks serve as triggers that prompt GitHub to send an HTTP POST payload to a designated URL. In this scenario, when code is merged into the main branch, it triggers a signal to the Jenkins server, instructing it to commence the CI/CD pipeline. It’s worth noting that the payload URL for this setup is the IP address or hostname of your Jenkins server, followed by the default port and the ‘/github-webhook/’ endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KWwsoD1lcQdOJWVk2S_aAg.png" /></figure><p>Visit <a href="https://docs.github.com/en/webhooks-and-events/webhooks/about-webhooks">GitHub doc</a> for more information on webhooks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e58cb8f8fd99" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jenkins/Docker Project key points — part 2]]></title>
            <link>https://lamaianthony.medium.com/jenkins-docker-project-key-points-part-2-7eda3b13d2df?source=rss-bd727d0a736a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7eda3b13d2df</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[sonarqube]]></category>
            <category><![CDATA[sonatypenexus]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Lamai Anthony]]></dc:creator>
            <pubDate>Fri, 09 Jun 2023 00:27:15 GMT</pubDate>
            <atom:updated>2023-06-09T00:27:15.273Z</atom:updated>
            <content:encoded><![CDATA[<h3>Jenkins/Docker Project key points — part 2</h3><h3>Deploy AWS EC2 instances to host Sonarqube, Jenkins, and Sonatype Nexus servers</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*a93-uJ6aREfBU3Ea50B1zA.png" /></figure><p>In this chapter, we will assume that you already have a free AWS Cloud account and are ready to deploy virtual machines. If you don’t have an account yet, you can create a free trial account by following the instructions provided in this <a href="https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&amp;all-free-tier.sort-order=asc&amp;awsf.Free%20Tier%20Types=*all&amp;awsf.Free%20Tier%20Categories=*all">link</a>.</p><p>It’s worth noting that while we will be using AWS for this tutorial, you can also deploy these virtual machines on other public cloud platforms such as Azure, Google Cloud, DigitalOcean, etc. The choice of cloud platform depends on your specific requirements and preferences. However, for the purpose of this tutorial, we will focus on AWS.</p><p>Why use a Cloud-hosted Virtual Machine? There are several advantages to utilizing a cloud-hosted virtual machine. Firstly, it is easier to maintain as the cloud provider handles the underlying infrastructure, including hardware maintenance and software updates. Additionally, it offers cost benefits in terms of both capital expenditure (CapEx) and operational expenditure (OpEx) since you only pay for the resources you use, and there is no need to invest in physical servers.</p><p>I will be using the web-based GUI (Graphic User Interface) provided by AWS. However, in many organizations, tools like Terraform or AWS CloudFormation are utilized for deployment. These tools help mitigate human errors and increase automation, resulting in faster deployment and resource management. In a separate module, we will focus on using Terraform to deploy resources.</p><p>To deploy an Amazon EC2 instance, you can follow the steps outlined below:</p><ol><li>Login to the <strong>AWS Management Console, click EC2 dashboard</strong>. Then click launch instance.</li></ol><figure><img alt="AWS dashboard. Launch instance" src="https://cdn-images-1.medium.com/max/885/1*LZzJ9oOz2z2iDsYblOa54w.png" /></figure><p>2. Follow the prompts and enter the Server name, select the flavor of Linux OS, and choose the instance type. In production environments, c5, m4, or t3 instances are deployed because they offer higher processing power. For this project, we will deploy Ubuntu t2 medium instances.</p><p>3. Create a key pair. The key pair is used to securely connect to your instance. You can generate the private-public key pair by running the “ssh-keygen” command on your local machine, and then import the public key into AWS. Alternatively, you can create the key on AWS, and when prompted, store the private key in a secure and accessible location on your local computer. Make sure that you have access to the selected key pair before launching the instance.</p><p>4. Create a Network security group and assign the instance to the preexisting Network security group. Ensure that the “Allow SSH connection from the local machine” rule is enabled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cq98Ea8lOBYFpJQj7giuRg.png" /></figure><p>5. Confirm that you are able to log into the respective servers after deployment using the key pair.</p><p>The respective servers, namely Jenkins, Sonarqube, and Nexus, have their own cloud-based platforms. However, for testing and cost reasons, we are deploying the server versions. Before installing any packages on the Ubuntu server instance, it is recommended to update the package manager. Log in using an elevated user and run the update command.</p><pre>sudo apt-get update -y<br></pre><h3>Jenkins Server:</h3><p>After connecting to the Jenkins box, you can run an automated script or a Linux command to deploy the Jenkins app. On Ubuntu, you can install Jenkins through apt. You can check out my <a href="https://medium.com/@lamaianthony/jenkins-key-points-part-1-2dfe439d2989">Medium article on Jenkins</a> or visit the <a href="https://www.jenkins.io/doc/book/getting-started/">Jenkins documentation</a> for more information.</p><pre>curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee \<br>  /usr/share/keyrings/jenkins-keyring.asc &gt; /dev/null<br>echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \<br>  https://pkg.jenkins.io/debian-stable binary/ | sudo tee \<br>  /etc/apt/sources.list.d/jenkins.list &gt; /dev/null<br>sudo apt-get update<br>sudo apt-get install jenkins</pre><h3>Sonatype Nexus Server:</h3><p>Wondering what a Nexus Server is? It is an open-source Artifactory used to store and retrieve build artifacts or code packages. For example, in an ice cream store, different ice cream flavors are pre-made and stored for future use. It’s a similar scenario here — the ice cream represents the code package, and the freezer represents Nexus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*tpK_SaLtAy7G2zVfubX_rg.png" /></figure><p>Other types of artifact repository servers are JFrog, AWS code artifact, and Azure code artifact. For information on installing prerequisites and more visit <a href="https://help.sonatype.com/repomanager3">here</a>.</p><pre>$ sudo -s <br>$ cd /opt<br>$ yum install wget -y<br>$ wget https://download.sonatype.com/nexus/3/nexus-3.54.1-01-unix.tar.gz<br>$ tar -zxvf nexus-3.54.1-01-unix.tar.gz<br>$ adduser nexus<br>$ cd /opt<br>$ chown -R nexus:nexus nexus-3.54.1-01/<br>$ chown -R nexus:nexus sonatype-work/<br>$ cd nexus-3.54.1-01<br>$ cd bin<br>$ vim nexus-3.54.1-01/bin/nexus.rc<br>$ run_as_user=&quot;nexus&quot;<br>$ su - nexus<br>$ /opt/nexus-3.54.1-01/bin/nexus start</pre><p>The default port and username for Sonatype Nexus is 8081 and admin.</p><h3>Sonarqube Server:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*COfrEpdD1DzMDIBObgEk5w.png" /></figure><p>SonarQube is used to detect bugs and basic vulnerabilities, review security hotspots, track code smells, and fix your technical debt for different languages. Basically, it is used for code analysis. For more information, visit the <a href="https://docs.sonarqube.org/latest/">SonarQube documentation</a>. Going back to my ice cream store analogy, SonarQube would be the quality assurance specialist that ensures the ice cream maker follows set standards.</p><p>To install the SonarQube Server, PostgreSQL needs to be installed and configured first.</p><pre>$sudo apt-get update<br>$sudo apt-get upgrade<br><br>$sudo apt-get install openjdk-17-jdk -y<br>$sudo apt-get install openjdk-17-jre -y<br><br>$sudo update-alternatives --config java<br>#switch to OpenJDK 17.<br><br>$sudo sh -c &#39;echo &quot;deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main&quot; &gt;&gt; /etc/apt/sources.list.d/pgdg.list&#39;<br><br>$wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add -<br><br>$sudo apt-get -y install postgresql postgresql-contrib<br><br>$sudo systemctl enable postgresql<br><br>$sudo systemctl start postgresql<br><br>$sudo passwd postgres<br>#change the default posgres user password<br><br>$su - postgres<br><br>$createuser sonar<br><br>$psql<br>#to switch to the shell to PostgreSQL<br><br>ALTER USER sonar WITH ENCRYPTED password &#39;password&#39;;<br>#where &#39;password&#39; is your preferred password<br><br>CREATE DATABASE sonarqube OWNER sonar;<br><br>grant all privileges on DATABASE sonarqube to sonar;<br><br>$\q<br><br>$exit<br><br>$cd /tmp<br><br>$sudo wget https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-9.7.1.62043.zip<br><br>$sudo unzip sonarqube-9.7.1.62043.zip -d /opt<br><br>$sudo mv /opt/sonarqube-9.9.0.65466 /opt/sonarqube<br><br>$sudo chown -R sonar:sonar /opt/sonarqube/<br>$sudo chmod -R 775 /opt/sonarqube/<br><br>$sudo vim /opt/sonarqube/conf/sonar.properties<br>#enter the PostgreSQL DB username and password<br>#in the sonar.jdbc.username and sonar.jdbc.password field<br>#and also the connection string value<br>#sonar.jdbc.url=jdbc:postgresql://localhost:5432/sonarqube<br>#PostgreSQL default port is 5432<br>#remember to uncomment and save<br><br>$sudo vim /opt/sonarqube/bin/linux-x86-64/sonar.sh<br>#add &quot;RUN_AS_USER=sonar&quot;<br>#remember to uncomment and save<br><br>$sudo su sonar<br>$cd /opt/sonarqube/bin/linux-x86-64/<br>$./sonar.sh start</pre><p>To increase deployment speed and reduce overhead, you can deploy SonarQube using an official SonarQube Docker image. Check out my Medium article on Docker for more information.</p><pre>docker pull sonarqube<br>docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube<br>open localhost:9000</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7eda3b13d2df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jenkins/Docker Project key points— part 1]]></title>
            <link>https://lamaianthony.medium.com/jenkins-docker-project-key-points-part-1-b120078a709?source=rss-bd727d0a736a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b120078a709</guid>
            <category><![CDATA[jenkins-pipeline]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Lamai Anthony]]></dc:creator>
            <pubDate>Thu, 08 Jun 2023 23:24:00 GMT</pubDate>
            <atom:updated>2023-06-08T23:24:00.367Z</atom:updated>
            <content:encoded><![CDATA[<p>We are launching our CI/CD project series, aimed at providing a step-by-step guide to packaging a simple web application into a Tomcat Docker image and subsequently pushing the image to DockerHub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*T0QbhBdryygpw8HTzsdA1w.png" /></figure><p>Throughout this chapter, we will emphasize understanding the CI/CD process, rather than getting lost in the details of the respective plugins and tools. Our goal is to focus on the “why’s” and “how’s” behind each step.</p><p>Learning Objectives:</p><ol><li>Develop a comprehensive understanding of the CI/CD process.</li><li>Avoid becoming overwhelmed by the technicalities of the plugins and tools involved.</li></ol><p>Key Actions:</p><ol><li>Deploy AWS EC2 instances to host Sonarqube, Jenkins, and Sonatype Nexus servers.</li><li>Set up a GitHub repository for code deployment and create a webhook to connect with the Jenkins server.</li><li>Configure essential Jenkins plugins and create a Jenkins pipeline project.</li><li>Recap the project and highlight key takeaways.</li></ol><p>Let’s delve into each of these sections to gain a better understanding of the CI/CD process and successfully package our web application.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b120078a709" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Datadog Key points — part 3]]></title>
            <link>https://lamaianthony.medium.com/datadog-key-points-part-3-72706546ba27?source=rss-bd727d0a736a------2</link>
            <guid isPermaLink="false">https://medium.com/p/72706546ba27</guid>
            <category><![CDATA[datadog-agent]]></category>
            <category><![CDATA[application-monitoring]]></category>
            <category><![CDATA[apm]]></category>
            <category><![CDATA[datadog]]></category>
            <category><![CDATA[yaml]]></category>
            <dc:creator><![CDATA[Lamai Anthony]]></dc:creator>
            <pubDate>Sun, 30 Apr 2023 19:18:44 GMT</pubDate>
            <atom:updated>2023-04-30T19:18:44.296Z</atom:updated>
            <content:encoded><![CDATA[<h3>Datadog Key points — part 3</h3><h3>Application Performance Monitoring (<strong>APM)</strong></h3><p><a href="https://docs.datadoghq.com/tracing/">Datadog “Application performance monitoring”</a> refers to the practice of continuously monitoring and tracking the performance of applications. When an application is correctly configured to send traces to the Datadog Agent, Datadog can associate those traces with all the information it has about your infrastructure.</p><p>To configure APM in your application, Datadog provides a wizard. Go to <a href="https://app.datadoghq.com/apm/service-setup">APM &gt; Setup &amp; Configuration</a> and click on the Service Setup tab. The rest of the page will guide you through instrumenting your application based on your selections.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OTvVIV3nejEY7sYqklYCMQ.png" /></figure><p>APM is configured using Datadog’s APM libraries in application code. In a containerized environment, this can be done by setting environment variables that the libraries will look for to configure themselves. The below image shows the environmental variables for a Java based application. Visit Datadog page on <a href="https://docs.datadoghq.com/tracing/trace_collection/">Application Tracing</a> for more information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*0FmUBrfyj6PhxrRqsDz2Xg.png" /></figure><p>You can confirm that the application is sending traces to APM by either Navigating to <a href="https://app.datadoghq.com/services">APM &gt; Service Catalog</a> or running the Agent status command and then scroll down to the APM section.</p><pre>datadog-agent status</pre><p>Also, you can Navigate to <a href="https://app.datadoghq.com/apm/traces">APM &gt; Traces</a>, here you see a live stream of the traces APM has captured.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72706546ba27" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Datadog key points — part 2]]></title>
            <link>https://lamaianthony.medium.com/datadog-key-points-part-2-b54c8b7f0cb9?source=rss-bd727d0a736a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b54c8b7f0cb9</guid>
            <category><![CDATA[datadog]]></category>
            <category><![CDATA[kubernetes-monitoring]]></category>
            <category><![CDATA[apm]]></category>
            <category><![CDATA[helm]]></category>
            <category><![CDATA[datadog-agent]]></category>
            <dc:creator><![CDATA[Lamai Anthony]]></dc:creator>
            <pubDate>Sun, 30 Apr 2023 19:17:00 GMT</pubDate>
            <atom:updated>2023-04-30T19:17:00.054Z</atom:updated>
            <content:encoded><![CDATA[<h3>Datadog key points — part 2</h3><h3>Installing Datadog Agent on a Kubernetes cluster using helm chart and Configuring Log Collection</h3><p>Generally, the installation of Datadog on any platform involves the following steps:</p><ol><li>Log in to datadog.</li><li>Navigate to <a href="https://app.datadoghq.com/account/settings#agent">Integrations &gt; Agent</a> and click on your desired platform.</li><li>Click the Select API Key button and select the API key. Select the Use API Key button to have your API Key automatically populated in the commands.</li></ol><p>Depending on the platform you are installing Datadog provides a one step install command. If otherwise steps to complete a basic install will be provided.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*Yxg0w_8-eBSEbxs-VqsNVA.png" /></figure><p>Currently, the Datadog Agent can be installed in a Kubernetes environment through three different methods: Datadog Operator, Helm Chart, and DaemonSet. We will install Datadog using Helm on a Windows machine.</p><ol><li><a href="https://v3.helm.sh/docs/intro/install/">Install Helm</a>. For a Windows machine, we are using the <a href="https://chocolatey.org/install">Chocolatey package manager.</a></li></ol><pre>choco install kubernetes-helm</pre><p>2. Download Datadog Chart.</p><pre>helm repo add datadog https://helm.datadoghq.com</pre><p>3. Update the Helm Chart.</p><pre>helm repo update</pre><p>4. Retrieve your Datadog API key by Signing in to Datadog. Open your Organization Settings page, and under Access select API Keys.</p><p>5. Create sample <a href="https://github.com/DataDog/helm-charts/tree/main/examples/datadog">values.yaml file</a>.</p><p>6. Run the below command to add the Datadog Agent to all nodes in your cluster with a DaemonSet. The command will install Datadog cluster Agent, create a Datadog namespace, enable log collection and Kubernetes State Metrics Core.</p><pre>helm install datadog -f values.yaml  -n datadog --set datadog.clusterName=&#39;clustername&#39; --set datadog.site=&#39;datadoghq.com&#39; --set datadog.clusterAgent.replicas=&#39;2&#39; --set datadog.clusterAgent.createPodDisruptionBudget=&#39;true&#39; --set datadog.kubeStateMetricsEnabled=true --set datadog.kubeStateMetricsCore.enabled=true --set datadog.logs.enabled=true --set datadog.logs.containerCollectAll=true --set datadog.apiKey=&#39;YourApiKey&#39; --set datadog.processAgent.enabled=true datadog/datadog --create-namespace</pre><p>For more information information on configuring the Agent visit <a href="https://docs.datadoghq.com/containers/kubernetes/configuration?tab=helm">here</a>.</p><p>When the Datadog Agent is deployed to collect logs, Datadog recommends using the Kubernetes log file logic when Docker is not the runtime, or More than 10 containers are used on each node. To enable log collection with Helm, You can set the datadog.logs.containerCollectAll to true to collect logs from all discovered containers by default.</p><p>Checkout <a href="https://docs.datadoghq.com/agent/">Datadog Agent documentation</a> for more information.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b54c8b7f0cb9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Datadog key points — part 1]]></title>
            <link>https://lamaianthony.medium.com/datadog-key-points-part-1-63309e38b139?source=rss-bd727d0a736a------2</link>
            <guid isPermaLink="false">https://medium.com/p/63309e38b139</guid>
            <category><![CDATA[monitoring-tools]]></category>
            <category><![CDATA[datadog-agent]]></category>
            <category><![CDATA[datadog]]></category>
            <category><![CDATA[apm]]></category>
            <category><![CDATA[datadog-training]]></category>
            <dc:creator><![CDATA[Lamai Anthony]]></dc:creator>
            <pubDate>Sun, 30 Apr 2023 19:14:49 GMT</pubDate>
            <atom:updated>2023-04-30T19:14:49.515Z</atom:updated>
            <content:encoded><![CDATA[<h3>Datadog key points — part 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9FyHQwL_X2bANwr3" /></figure><p>Datadog is a software-as-a-service data analytics platform used for providing monitoring of servers, databases, tools, and services.</p><h4>Architecture:</h4><p>To gather logs from your servers or applications, you need to deploy a Datadog agent. The Datadog Agent is software that runs on your hosts, collects events and metrics from hosts, and sends them to Datadog where you can analyze your monitoring and performance data. The Datadog Agent is open source, and its source code is available on <a href="https://github.com/DataDog/datadog-agent">GitHub</a>. The Agent collector collects the data and sends it via TCP 17123 on HTTPS to Datadog SaaS. The Agent sends custom data from the server to Datadog using DogstatsD, via UDP port 8125.</p><p>Basically, DogstatsD is an enhanced version of StatsD, a simple daemon developed and released by Etsy to aggregate and summarize application metrics. DogstatsD contains advanced features specific to Datadog, including available data types, events, service checks, and tags. For more information on DogstatsD, visit this <a href="https://docs.datadoghq.com/developers/dogstatsd/?tab=hostagent#how-it-works">link</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VrHn7KgUtzMXkjQG" /></figure><p>The standalone DogstatsD package can be installed as a standalone container or as a sidecar container inside pods. A Docker image is available in the <a href="https://github.com/DataDog/datadog-agent/tree/main/Dockerfiles/dogstatsd/alpine">DogStatsD6 Docker image repository</a>. However, it is recommended to fully install the Agent.</p><p>You can visit the <a href="https://www.datadoghq.com/">Datadog website</a> to start a 14-day free trial plan. Click here for more information on their pricing plan.</p><p>If you are looking for a more guided learning experience, visit the <a href="https://learn.datadoghq.com/">Datadog Learning Center</a>. It provides an interactive platform for learning about Datadog products and features.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63309e38b139" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jenkins Key points — part 2]]></title>
            <link>https://lamaianthony.medium.com/jenkins-key-points-part-2-a85f87a8ef00?source=rss-bd727d0a736a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a85f87a8ef00</guid>
            <category><![CDATA[groovy-jenkins]]></category>
            <category><![CDATA[declarative-pipeline]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[jenkins-pipeline]]></category>
            <category><![CDATA[scripted-pipeline]]></category>
            <dc:creator><![CDATA[Lamai Anthony]]></dc:creator>
            <pubDate>Mon, 24 Apr 2023 16:06:52 GMT</pubDate>
            <atom:updated>2023-04-24T16:06:52.277Z</atom:updated>
            <content:encoded><![CDATA[<h3>Jenkins Key points — part 2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oT1Ir8H24VjIt-oMKnzb7w.png" /></figure><p>On the Jenkins dashboard, you can see a list of your current projects with a submenu. You can easily access each project’s build history, configuration, and other details.</p><p>Under the Manage Jenkins menu, you can access several important features. For instance, you can configure global tools, which are essential software packages or tools required to build, test, and deploy your applications. You can also manage plugins, which add functionality to Jenkins, and customize it as per your requirements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lOovF3IPmJ6dg8FZDbZgpQ.png" /></figure><p>In the Jenkins project, one can configure the following</p><ol><li>Description: This is useful in providing information about the project so that team members can get a full picture at a glance.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nxqHyrkfCDb99x1xnpo5GQ.png" /></figure><p>2. Builds Strategy: Build Strategy: In this step, you establish the retention period for builds and the maximum number of builds to maintain.</p><p>3. Build Triggers: Are the events that initiate the pipeline execution. Examples of build triggers include building after completing other projects, scheduling periodic builds (using a Cron job), using a GitHub webhook, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*Rxopvl7-EuJiLbLso4y-Cg.png" /></figure><p>4. Pipeline Script: This is a Groovy script that defines the tasks to be executed by the Jenkins Pipeline.</p><ul><li>Declarative: This is a new way of creating a Jenkins Pipeline. Here, you define your Pipeline using a declarative syntax. The Pipeline is defined in a Jenkinsfile, which is checked into an SCM (Source Code Management).</li><li>Scripted: This is a way of writing Groovy code where you define your Pipeline using a Scripted syntax. The code is defined inside node blocks.</li></ul><p>A Jenkins declarative pipeline</p><pre>pipeline {<br>         agent any<br>         stages {<br>                 stage(&#39;Build&#39;) {<br>                 steps {<br>                     echo &#39;Hi, GeekFlare. Starting to build the App.&#39;<br>                 }<br>                 }<br>                 stage(&#39;Test&#39;) {<br>                 steps {<br>                    input(&#39;Do you want to proceed?&#39;)<br>                 }<br>                 }<br>                 stage(&#39;Deploy&#39;) {<br>                 parallel { <br>                            stage(&#39;Deploy start &#39;) {<br>                           steps {<br>                                echo &quot;Start the deploy ..&quot;<br>                           } <br>                           }<br>                            stage(&#39;Deploying now&#39;) {<br>                            agent {<br>                                    docker {<br>                                            reuseNode true<br>                                            image ‘nginx’<br>                                           }<br>                                    }<br>                            <br>                              steps {<br>                                echo &quot;Docker Created&quot;<br>                              }<br>                           }<br>                           }<br>                           }<br>                 stage(&#39;Prod&#39;) {<br>                     steps {<br>                                echo &quot;App is Prod Ready&quot;<br>                              }<br>                 <br>              }<br>}<br>}</pre><p>A Jenkins-scripted pipeline</p><pre>node {<br>     stage(&#39;Build&#39;){<br><br>      }<br>     stage(&#39;Test&#39;){<br><br>      }<br>     stage(&#39;Deploy&#39;){<br><br>      }<br>}</pre><p>Although they perform the same task the declarative pipelines are easier to maintain and they tend to have a lower learning curve. For more information click <a href="https://www.jenkins.io/doc/book/pipeline/syntax/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a85f87a8ef00" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jenkins key points — part 1]]></title>
            <link>https://lamaianthony.medium.com/jenkins-key-points-part-1-2dfe439d2989?source=rss-bd727d0a736a------2</link>
            <guid isPermaLink="false">https://medium.com/p/2dfe439d2989</guid>
            <category><![CDATA[jenkins-pipeline]]></category>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <dc:creator><![CDATA[Lamai Anthony]]></dc:creator>
            <pubDate>Mon, 24 Apr 2023 15:47:05 GMT</pubDate>
            <atom:updated>2023-04-24T15:47:05.348Z</atom:updated>
            <content:encoded><![CDATA[<h3>Jenkins key points — part 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*hSCT7u5jDen_NrcDWrOCeQ.png" /></figure><p>Jenkins is an open-source server that automates and controls several stages of the software integration and delivery process, making it one of the most widely used CI/CD tools. It integrates seamlessly with other tools, making it versatile and easy to use.</p><p>To install Jenkins on a server, Java must be installed, and the minimum hardware requirements are:</p><ul><li>256 MB of RAM</li><li>1 GB of drive space (although it is recommended to have at least 10 GB if running Jenkins as a Docker container).</li></ul><p>Jenkins can be installed on Linux, Windows, Mac, and other systems. More information on installing Jenkins can be found <a href="https://www.jenkins.io/doc/book/installing/">here</a>. Once Jenkins is installed, it can be accessed through a web browser using the default port 8080.</p><p>There are some essential terms and concepts related to Jenkins that users should know, including:</p><p><strong>Jenkins Pipeline</strong>: This is the combination of step-by-step actions and plugins that support the CI/CD process. Pipelines can be created directly through the user interface or by using a Jenkins script. A Jenkins script uses a Groovy-compatible text-based format to define pipeline processes and can be either declarative or scripted.</p><p><strong>Jenkins Job/Project</strong>: This consists of a combination of operations and tasks that define the pipeline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5gC7UyuupXm0l0iGaSw2cw.png" /></figure><p><strong>Jenkins Controller</strong>: The Jenkins architecture supports two models. It can either be a standalone server that performs all tasks, or it can have a Jenkins controller-agent architecture, in which the controller server is the brain that assigns tasks to agent servers.</p><p>The standalone architecture is a simple model in which a single server performs all tasks related to building, testing, and deploying software. This model is suitable for small projects where only a few people are involved in the development process.</p><p>The controller-agent architecture, on the other hand, is a more complex model that is suitable for large-scale projects. In this architecture, the Jenkins controller server acts as the brain of the system and assigns tasks to agent servers. The agent servers perform the actual work of building, testing, and deploying the software. This model allows for distributed processing and can handle a large number of tasks simultaneously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*63_yXmPTZOY5seL1RNInVw.png" /></figure><p><strong>Jenkins Agent</strong>: It can be a physical machine, virtual machine, cloud computing instance, Docker image, or Kubernetes cluster. An Agent server must have Java installed in order to run build jobs.</p><p><strong>Jenkins Plugins</strong>: These are application modules that integrate with the Jenkins server to enhance and extend its functionality. Examples include the Jenkins Backup plugin and the Docker API.</p><p><strong>Jenkins Shared Library</strong>: A Shared Library in Jenkins is a collection of Groovy scripts shared between different Jenkins jobs.</p><p><strong>Jenkins X</strong> is an extension of Jenkins that relies on a command line interface or application programming interface. It meets the needs of Kubernetes and cloud-native platform users by having all the necessary plugins installed to run Builds and more. Check out <a href="https://jenkins-x.io/v3/">Jenkins X documentation</a> for more information.</p><p>To learn more about Jenkins visit <a href="https://www.jenkins.io/doc/">Jenkins documentation</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2dfe439d2989" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>