<?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 Sylvester Yiadom on Medium]]></title>
        <description><![CDATA[Stories by Sylvester Yiadom on Medium]]></description>
        <link>https://medium.com/@SylvesterYiadom?source=rss-217d7c78489b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9pFP56ZEZHLtuIxAkOtt4A.jpeg</url>
            <title>Stories by Sylvester Yiadom on Medium</title>
            <link>https://medium.com/@SylvesterYiadom?source=rss-217d7c78489b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 10:17:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@SylvesterYiadom/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[Integrate Jenkins with AWS — Part IV]]></title>
            <link>https://medium.com/@SylvesterYiadom/integrate-jenkins-with-aws-part-iv-f5d91b866fbe?source=rss-217d7c78489b------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5d91b866fbe</guid>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Sylvester Yiadom]]></dc:creator>
            <pubDate>Fri, 07 Jan 2022 02:26:48 GMT</pubDate>
            <atom:updated>2022-01-07T03:56:14.319Z</atom:updated>
            <content:encoded><![CDATA[<h3>Integrate Jenkins with AWS — Part IV</h3><p>In this final section we will configure Jenkins AWS EC2 Plugin and set up a jenkins job.</p><p>Lets begin.</p><ul><li>Open your web browser and browse to your Jenkins server. The url to your jenkins server would look something like this <a href="http://ec2-18-223-14-39.us-east-2.compute.amazonaws.com:8080/">http://ec2-Elastic-IPv4.us-region.compute.amazonaws.com:8080/</a></li><li>Login and click on <em>Manage Jenkins &gt; Manage Plugins &gt; </em>under the Available tab search for <strong>Amazon EC2</strong></li><li>Select it and scroll down to install without restart</li><li>After installation is successful, click on <em>Restart jenkins when installation is complete and no jobs are running . </em>Wait for Jenkins to restart then proceed.</li><li>Back to your Jenkins dashboard click on <em>Manage Jenkins</em> &gt; <em>Manage Nodes and Clouds &gt; </em>On the left menu click on<em> Configure Clouds</em></li><li>Select ‘Add a new cloud’ &gt; Amazon EC2</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*SfsUiVHkp9rzprXNbrHaAA.png" /></figure><ul><li>Use the following configuration</li><li>Name: workernode</li><li>Amazon EC2 Credentials &gt; Add &gt;Jenkins &gt; Kind &gt; AWS Credentials &gt; ID: Jenkins &gt; Access Key ID : Use Access ID and Secret Access Key from the csv file we saved in the previous step</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rA4Z5CMfpYrtBnItSzFb4g.png" /></figure><ul><li>Click ‘Add’</li><li>Region : select the region where you have your Jenkins server running mine was us-east-2 (Ohio) yours may be different. Check your AWS console.</li><li>EC2 Key Pair’s Private Key &gt; click ‘Add’ &gt; Jenkins &gt; <strong>SSH Username with private key</strong> &gt; leave everything as is and under Private Key click on ‘Add’ and select enter directly (image below)</li><li>Back to your <strong>terminal. </strong>Navigate to where you saved your <strong>&lt;Keypair&gt;.pem</strong> file and use any editor to read the RSA key, copy and past it (see below). You can use either nano or <strong>cat</strong> command to view and copy it.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*k4j3bevy-eyjm3HMwGJevg.png" /></figure><ul><li>Click on Add , select Jenkins from the ec2 keypair drop down and hit Test Connect, if you did it right you should see a success message</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*OHecvsGngKU5DbEbFBVynQ.png" /></figure><ul><li>under AMIs click Add . Most of the information for our AMI we can get from the AWS console.</li><li>Description : type <strong>workernode</strong></li><li>AMI ID: Copy the AMI ID from your AWS console under the AMI section, paste it and click on Check AMI. Leave the rest as is and scroll down</li><li>Instance Type : <strong>T2Micro</strong></li><li>Security group names: jenkins-sg (Copy the security group name for jenkins we created in previous steps)</li><li>Remote user: <strong>ec2-use</strong>r (this the default user for amazon linux2 ami)</li><li>AMI Type: <strong>Unix</strong></li><li>Remote ssh port: <strong>22</strong></li><li>labels : <strong>workernode</strong></li><li>Idle termination time: <strong>5</strong> (workernode will terminate after 5 mins of inactivity)</li><li>Click on Advance..</li><li>Subnet IDs for VPC: Use the <strong>Subnet ID </strong>from the VPC on the AWS console (eg: subnet-0ee0a5fdac27168b1)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*aNamRnT61W1deJVOn6pcsg.png" /><figcaption>VPC Subnet ID</figcaption></figure><ul><li><em>Check</em> Delete root device on instance termination</li><li><em>Check</em> Associate Public IP</li><li>Connection Strategy : Public IP</li><li>Host Key Verification Strategy : off</li></ul><p>And save.</p><p>Finally we will test our Jenkins Master/Worker node setup by running a test job using the <a href="https://github.com/spring-projects/spring-petclinic">Spring Petclinic</a> Open source project</p><p><a href="https://github.com/spring-projects/spring-petclinic">GitHub - spring-projects/spring-petclinic: A sample Spring-based application</a></p><p>On your Jenkins dashboard click on <strong>New Item</strong></p><ul><li>Enter item name : Eg: pet_clinic_workernode</li><li>select Freestyle project and click ‘ok’</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*iqrTpLfsCJxjLjerBUO4RQ.png" /></figure><ul><li>Select ‘Restrict where this project can be run’</li><li>Label Expression: <strong>workernode</strong></li><li>Under Source Code Management select <strong>Git</strong></li><li>Repository URL : <a href="https://github.com/spring-projects/spring-petclinic">https://github.com/spring-projects/spring-petclinic</a>.git</li><li>credentials : none</li><li>Branch Specifier (blank for ‘any’): <strong>*/main</strong></li><li>Click on the <strong>Build</strong> tab and select ‘Add build step’.</li><li>Select <strong>Invoke top-level Maven targets</strong></li><li>Goals: <strong>compile </strong>and Save</li></ul><p>Next we will kick off a build by clicking on ‘<strong>Build Now</strong>’ this should trigger the Jenkins master to spin up a <strong>workernode</strong>(EC2 instance) to ran the build.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*18xwzVkfPGVvCwv8LBvSuA.png" /></figure><p>Navigate to Dashboard &gt; Manage Jenkins &gt; Manage Nodes and Cloud. You should see something similar to this . Check your instance dashboard on the AWS console and you should see a new instance starting up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HqvuplMROj8qWBQy8k1jqA.png" /></figure><p>Click on <strong>pet_clinic_workernode</strong> at the bottom right corner to follow the Console output of your build process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*7XtIL_j-VU3s_Yqrvfe5rQ.png" /><figcaption>Console Log Output</figcaption></figure><p>Once the build is successful and complete you should see a green checkmark and a message at the end of the log . The log is also helpful in debugging any failed build.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*Kl_63Ss53NN2BpAYqxvlCA.png" /></figure><p><strong>CLEAN UP STEPS</strong></p><p>Final steps, lets clean up the resources we created in AWS to avoid any charges.</p><p>Back to your AWS console</p><ul><li>Go to your EC2 dashboard ,click on instances , select all and terminate instances. This will also terminate your Jenkins master and worker node</li><li>Go to Elastic IP, select your elastic IP &gt; Actions &gt; Release Elastic IP addresses (you may have to wait for instances to terminate before that option becomes available)</li><li>Go to AMIs &gt; select AMI image &gt; Actions &gt; deregister AMI.</li><li>Go to VPC dashboard and select the jenkins-VPC &gt; Action &gt; Delete VPC . Deleting VPC will also delete the security groups we created.</li><li>Go to IAM dashboard, click on Users , select the user we created and delete.</li><li>Click on Policies &gt; Actions &gt; Delete</li></ul><p>Congratulations! You just Integrated Jenkins with AWS and ran a jenkins job on a worker node.</p><p>Thank you for reading this project and feel free to leave me a comment or a feedback, I would love to hear from you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5d91b866fbe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrate Jenkins with AWS — Part III]]></title>
            <link>https://medium.com/@SylvesterYiadom/integrate-jenkins-with-aws-part-iii-c5f8e6c9715e?source=rss-217d7c78489b------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5f8e6c9715e</guid>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[aws-ec2]]></category>
            <dc:creator><![CDATA[Sylvester Yiadom]]></dc:creator>
            <pubDate>Fri, 07 Jan 2022 00:54:58 GMT</pubDate>
            <atom:updated>2022-01-07T03:51:38.465Z</atom:updated>
            <content:encoded><![CDATA[<h3>Integrate Jenkins with AWS — Part III</h3><p>Welcome back!</p><p>In order for our Jenkins master to spin up an EC2 worker nodes, we need to give it the necessary permissions. We will do that by creating an IAM Policy and attaching it to a user account with programmatic access.</p><p>Let’s get started,</p><ul><li>Back on your AWS console, search for ‘IAM’ in the search bar. click on Policies and ‘Create Policy.’</li><li>On the visual editor, create a policy that matches this. IAM and EC2 permissions or copy and past this <a href="https://github.com/sylvesteryiadom/jenkins_on_aws/blob/main/src/jenkinsworker_iam_policy.json">policy</a> into the JSON editor</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*XtOCkJDoLTYBp9ou1Iqc-A.png" /></figure><ul><li>Click on Next, Review and your policy summary should look like this</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rEKjdZ8c4C4ln_M18AVCCQ.png" /></figure><ul><li>Give your policy a name eg: jenkins and a description (Eg: jenkins user permissions in AWS) and create policy.</li><li>Back to the IAM dashboard, click on Users on the left menu, and add user. Enter a name eg: jenkins and select Access Key — Programmatic access.</li><li>Next, select <em>attach an existing policy directly</em>, search for the policy we created in the previous step, select and hit next</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*-8EHWmsu9G7ijRhdS00m_A.png" /></figure><ul><li>Review, create user and <strong>download.csv</strong> file. We will use the Access Key ID and secret to configure our AWS plugin in Jenkins.</li><li>Next, we will create an <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html">AMI</a> (Amazon Machine Image) out of the jenkins master server.</li><li>Go back to the EC2 dashboard and click on instances</li><li>Select the checkbox next to your instance &gt; Actions &gt; Images and templates &gt;Create image</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*c94gjMzmjdXi42-AVYn3fA.png" /></figure><ul><li>Give your image a name , description and <strong>enable</strong> No reboot</li></ul><p>Our worker node will now be created from an AMI that already has Jenkins, Git, Maven and Java pre-installed on it.</p><p>Finally we will allow SSH connection from our Jenkins master EC2 by adding it to the jenkins security group we created earlier.</p><ul><li>To do this, click on instances and copy the elastic IP address of your jenkins ec2 instance.</li><li>Click on Security Groups, locate your Jenkins security group &gt; Edit inbound rules</li><li>Add a new rule with a custom TCP , Port 22 and Source of &lt;<strong>Elastic IP of Jenkins EC2</strong>&gt;<strong>/32 </strong>and save.</li><li>Your security group should now look like this.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*TBEdILZ1WSYcCrlobFdJIA.png" /></figure><p>Well done on getting this far! In the last and final part (<a href="https://medium.com/@SylvesterYiadom/integrate-jenkins-with-aws-part-iv-f5d91b866fbe">Part IV</a>) of this series we will configure our ec2 plugin on jenkins and ran a test job.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5f8e6c9715e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrate Jenkins with AWS — Part II]]></title>
            <link>https://medium.com/@SylvesterYiadom/integrate-jenkins-with-aws-part-ii-7ea0eb23b20?source=rss-217d7c78489b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ea0eb23b20</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[jenkins]]></category>
            <dc:creator><![CDATA[Sylvester Yiadom]]></dc:creator>
            <pubDate>Thu, 06 Jan 2022 20:50:14 GMT</pubDate>
            <atom:updated>2022-01-07T02:43:02.830Z</atom:updated>
            <content:encoded><![CDATA[<h3>Integrate Jenkins with AWS — Part II</h3><p>Let’s pick up where we left off in part 1,</p><p>Step 1 — Connect to EC2 instance via SSH and install Jenkins</p><ul><li>On your AWS console to go the EC2 dashboard, select the checkbox next to your EC2 instance. Scroll down to the instance summary and copy the Public IPv4 address.</li><li>Open a <strong>terminal</strong> on your PC and navigate to the location you save your keypair . If you are on a windows PC use Putty to SSH unto the EC2 instance.</li><li>Ran the follow commands</li></ul><blockquote>chmod 400 &lt;<strong>Keypair_name</strong>&gt;.pem</blockquote><blockquote>ssh -i “&lt;<strong>Keypair_name</strong>&gt;.pem” ec2-user@&lt;<strong>EC2 Public IPv4 address</strong>&gt;</blockquote><p>NB: replace EC2 Public IPv4 address with the Public IPv4 of your EC2 instance.</p><p>Let’s install Jenkins. Ran the following commands to update your ec2 repository and install Java and Jenkins. All commands used in this project can be found on <a href="https://github.com/sylvesteryiadom/jenkins_on_aws">github</a> in the <strong><em>src</em></strong> folder.</p><blockquote>sudo yum update -y #to update linux repository</blockquote><blockquote>sudo wget -O /etc/yum.repos.d/jenkins.repo <a href="https://pkg.jenkins.io/redhat-stable/jenkins.repo">https://pkg.jenkins.io/redhat-stable/jenkins.repo</a></blockquote><blockquote>sudo rpm -- import <a href="https://pkg.jenkins.io/redhat-stable/jenkins.io.key">https://pkg.jenkins.io/redhat-stable/jenkins.io.key</a></blockquote><blockquote>sudo yum install -y java-1.8.0-openjdk-devel</blockquote><blockquote>sudo amazon-linux-extras install epel -y <em># repository that provides ‘daemonize’</em></blockquote><blockquote>sudo yum install jenkins -y</blockquote><blockquote>sudo systemctl enable jenkins</blockquote><blockquote>sudo systemctl start jenkins</blockquote><blockquote>sudo systemctl status jenkins</blockquote><p>Lets also install Git and Maven (our test application is a Java app) by running the following commands</p><p>Steps to install Maven</p><blockquote>sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo</blockquote><blockquote>sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo</blockquote><blockquote>sudo yum install -y apache-maven<br>mvn — version</blockquote><p>Steps to install Git</p><blockquote>sudo yum update -y</blockquote><blockquote>sudo yum install git -y</blockquote><blockquote>git — version</blockquote><ul><li>Back on your ec2 dashboard in AWS, copy the Public IPv4 DNS of your ec2 instance Eg: <em>ec2–1–223–114–39.us-east-2.compute.amazonaws.com</em>:<strong>8080</strong></li><li>Append <strong>:8080</strong> to it since the jenkins server is running on that port.</li><li>Open a browser and go to your ec2 dns url . You should see this page</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*AuEyntQ0CsiO8CcGSSEEQw.png" /></figure><ul><li>back on your ec2 instance terminal ran the command below to get the temporary password for your jenkins server</li></ul><blockquote>sudo cat /var/lib/jenkins/secrets/initialAdminPassword</blockquote><p>Continue to install suggested plugins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*WqIQIO9Zp7wnluCrstuFsA.png" /></figure><p>Finish the Jenkins configuration by creating an admin user.</p><p>Congratulations! You just installed Jenkins on Amazon EC2. In <a href="https://medium.com/@SylvesterYiadom/integrate-jenkins-with-aws-part-iii-c5f8e6c9715e">Part III</a>, we will create an AMI out of the Jenkins master server, create some policies needed to configure the Amazon ec2 jenkins plugin.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ea0eb23b20" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrate Jenkins with AWS — Part I]]></title>
            <link>https://medium.com/@SylvesterYiadom/integrate-jenkins-with-aws-part-i-e51f141b7ec2?source=rss-217d7c78489b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e51f141b7ec2</guid>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[aws-ec2]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Sylvester Yiadom]]></dc:creator>
            <pubDate>Thu, 06 Jan 2022 19:50:38 GMT</pubDate>
            <atom:updated>2022-01-07T02:36:20.386Z</atom:updated>
            <content:encoded><![CDATA[<h3>Integrate Jenkins with AWS — Part I</h3><p>Jenkins is an open source automation server which enables developers, cloud engineers, devops practitioners around the world to reliably build, test, and deploy their software.</p><p>This project will walk you through how to integrate Jenkins with AWS by building a Master/Worker node architecture and running a test job on the worker node.</p><p>Pre-requisites</p><ol><li>We will be using AWS, therefore, you will need an aws account. We will stay within the Free-tier option for this project.</li></ol><p>Let’s dive right in.</p><p>STEP 1 — Create a <a href="https://aws.amazon.com/vpc/">VPC</a></p><ul><li>Login to your aws <a href="https://aws.amazon.com/">console</a>, search for ‘VPC’ and <em>Launch a VPC</em> with a Single Public Subnet</li><li>Change VPC name to <em>Jenkins-VPC</em> (or any name you want)</li><li>Change public subnet name to <em>Jenkins-Public-subnet</em> (or any name you want) and hit ‘Create VPC’</li></ul><p>STEP 2 — Create Security Group and Launch an EC2 instance in the security group</p><ul><li>On the left menu of the AWS console, select Security Group and ‘Create Security Group’</li><li>Give it a name (eg: jenkins-sg) and a description</li><li>Under VPC , select your VPC created in Step 1 and add the following inbound rules (image below). NB: ‘My IP’ should be your IP address/32, selecting ‘My IP’ should automatically populate your IP for you.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*RqX1LcwZxnxZn3wvH9HRvQ.png" /></figure><p>Next, we will create an EC2 instance (Jenkins master) within the VPC we just created and attach the security group to it.</p><ul><li>Navigate to the EC2 dashboard on your AWS console and click on ‘Launch instance’</li><li>Select ‘Amazon Linux 2 free tier’ &gt; t2.micro &gt; Select VPC and the subnet created in step 1 , auto assign Public IP should be <strong>enabled</strong></li><li>Leave the rest as default and move on to step 6 to configure security group</li><li><strong>Select an existing security group</strong> and select the security group we created in step 2 (jenkins-sg)</li><li>Review and create an RSA keypair, download and save it. We will use this keypair to SSH unto the EC2 instance.</li></ul><p>STEP 3 — Create elastic IP and attach it to your EC2 instance.</p><ul><li>On the left menu of your AWS console, select ‘Elastic IPs’ &gt; Allocate Elastic IP address</li><li>Leave everything as default and click ‘<strong>Allocate</strong>’</li><li>Select the checkbox next to your new elastic IP and click on <strong>Actions</strong> on the top right corner. Select ‘<strong>Associate Elastic IP address</strong>’ &gt; choose your instance and Associate.</li></ul><p>In <a href="https://medium.com/@SylvesterYiadom/integrate-jenkins-with-aws-part-ii-7ea0eb23b20">Part II</a>, we will learn how to install and configure Jenkins, Java , Maven and Git on your EC2 instance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e51f141b7ec2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>