Install Jenkins on AWS EC2 Instance | Jenkins CICD | Jenkins on EC2 Instance | Jenkins | AWS Demo

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
foreign welcome back to my channel a monk in cloud in this video I'm going to show you how to install Jenkins on your AWS ec2 instance okay so for this one you will have to create an Ubuntu ec2 instance so I am preferring Ubuntu you can actually go with other flavors of Linux also okay so what I've done is I've created my ec2 instance okay so this is my ec2 instance so it is straightforward so if you do not know how to create ec2 instance I have created a separate video on that I'll make sure to drop the link to that in the description box below you can go and check that out okay so this is my Jenkins server okay so if you see these are the details related to that okay so if you want to just check the platform it is Ubuntu right if you see here Linux and it is Ubuntu okay so this is my public IP so what I have to do is I will have to log into this machine you can use multiple ways but I'll go with easy to instance connect method so if you want to go with the if you want to use public IP and then use putty or if you want to go with mob extreme you can also do that right so I'm going with ec2 instance connect so I've already connected to my ec2 instance so if you see here this is my ec2 instance if you just want to verify the private IPS ending with 91 and 6 okay let me check here if you see private IP addresses is 91 and 6 right so I'm logged into this Mission okay first let us check if we have Jenkins installed already okay let me type in Jenkins hyphen hyphen version okay if you see Jenkins command not found that means we do not have any Jenkins installed right now okay so for installation what I've done I've documented all the commands that you need so over the period of years so when I was working previously I did not know how to install Jenkins I went through a lot of documentations so in official documentation itself I have picked this one and I've made it available on my GitHub repository so what I'll do is I will make sure to add the link to the GitHub repository in my description box below in this video you can go and install from that commands Okay so I'll open my GitHub document so this is my GitHub document so if first if you see here first update the default Ubuntu packages list for up upgrades with the following commands you need to use this following command to update your Linux you know Ubuntu packages okay I'll just copy that and I'll paste it here sudo apt get update so it is going to update your packages in in your Ubuntu machine okay so this takes couple of seconds so wait for that it's done right if you see it says done let me clear the screen to clear the screen you just have to type in control at the same time Ctrl and L okay let me go back to my documentation let me zoom in a bit okay next thing is to run the following command to install jdk 11. so if we need to install Java jdk open jdk for this particular Jenkins because Jenkins is an application a Java application basically okay so I need to install that first open jdk 11 okay it is pretty straightforward sudo apt get install open jdk 11 jdk okay I'll just copy this command and I'll paste it in my ec2 instance okay let me paste that it'll ask for the confirmation whether you want to continue I'll just say y that means yes okay so why let me hit enter so now it is installing Java jdk for me okay so let's wait for that to complete it takes couple of minutes because Java is a huge application right so it needs to install all the packages and everything so if you see here it is unpacking selecting some things unpacking something so it will take some time please bear with me okay now if you see it is done okay so let me clear my screen once again okay so now we have installed Java jdk the next thing is to install Jenkins itself with these commands so I've taken these commands from the Jenkins documentation itself you can directly copy and paste all these four commands at the same time okay so I'll just do that I'll just copy all of them and I'll paste it here okay I'll hit enter it is going to install everything in a single term okay I'll just say why just to continue it is installing all those packages and everything it takes some time [Music] foreign [Music] Jenkins on our system okay let me clear my screen now let me go back and check what is the next thing that we have if you see here we have installed Jenkins next thing is to check if this Jenkins server is there an uh if you want you can start it okay so the command to start is this one let me copy that pseudo system CTL start Jenkins dot service okay let me go back and paste it in my ec2 I'll hit enter so that basically started my Jenkins so if you want to verify if it is running or not you can check the status so instead of start here you can mention status okay let me copy this one and go back here once again and I'll paste it here if it is active and running that means it is running the Jenkins application is running already if you see here since Sunday 57 56 seconds ago it's it is running okay let me hit Ctrl C and come out of it let me clear the screen now okay so which confirms that the Jenkins is already running okay with Jenkins installed we can proceed with adjusting the firewall settings by default your Jenkins application will run on port 8080 right in order to ensure that this port is accessible we need to configure the built-in Ubuntu firewall that is ufw right Ubuntu firewall to open the port 8080 and enable the firewall so you need to use a following two commands these are the commands to enable that uh to allow this Ubuntu firewall to access okay so let me copy this command first basically it is allowing the firewall so to open the sport 8080 okay so let me paste that here okay so if you see rules updated next let me check what is the next command I need to update I mean I need to enable that one let me copy that and I'll paste it here again I'll hit enter so it is asking command will disrupt existing SSH connections so I'm okay with that because I have not connected to any any other machines here so I'm good with that so if you see here it confirms firewall is active and enabled on the system startup okay so we are done here next after completing that step you will have to check if if you you will have to test whether the firewall is active and running right so for that you will have to run this command sudo ufw right Ubuntu firewall and the status let me copy that and I'll paste it here if you see we added port 8080 and we are allowing anywhere right basically we are allowing from anywhere okay so that is done now if you want to check your instance I mean the Jenkins is installed on your system already right so we check the status and we are also allowing in the port also right now let us go back and copy our public IP address of your AWS ec2 and paste it in the browser so this application is running on port 8080 so along with your public IEP append it with the colon and 8080 so check if your Jenkins is installed or not okay let me go back to my ec2 console and I'll copy my public IP so just copy your public IP here paste it in the browser and add a colon with 8080 okay hit enter so Jenkins is installed so check if it is installed already right if you do not get this screen this is actually the start getting started page of your Jenkins and if you see here Jenkins icon is also there right if you do not get this page so make sure to add a entry in your Security Group also so we added entry in the Ubuntu firewall if you missed to add an entry for 8080 in your Security Group it will not work right so let us check our security group here once so if you see this is the security group that I have attached if you see I have allowed SSH connection HTTP and https and along with that I'm also allowing port 8080 so that is why I'm able to get this one so don't comment comment in the comment box saying that you are not able to access so go ahead and check your Security Group first okay so that is important okay now so if you see here unlock getting started the first thing that is saying is unlock Jenkins to ensure Jenkins is securely set up by administrator a password has been written to log and this file is in the server so where is that password in this location okay you will have to go to this location and get the password and paste it here okay for that also I've already created that command here sudo cat with the same with the same path whatever you path you saw there the same path I've pasted here okay pseudo cat and this path so inside that you will have your password and you can make use of that okay let me paste it in my uh ec2 okay so here if you see this is our administrator password so let me copy that make sure you don't show this to anyone okay because that will be a security risk okay let me come back to my Jenkins and I'll paste my administrator password here and I'll click on continue so by default it will ask you for installing the suggested plugins so Jenkins has some suggested plugins so if you want to install that you can go ahead and click on this one if you do not want you can also go ahead and select your own plugin switch if you want okay I'll go ahead and install selected I mean suggested plugins okay so there are pretty much you know for you know 10 to 15 plugins if you see here these are the suggested plugins it is installing one by one so it is really quick right if you see here if your internet connection is very good it is going to you know download all of the plugins really quick right so let's wait for that to be completed okay we have only few of them left I think we are we are almost done right so let's wait for that to complete it okay so installation of plugins selected plugins or the recommended plugins is done now we want to create our first admin user okay so always uh you know you can create your own admin user so I'll just say admin my first admin would be admin and I'll also provide a password to him okay I'll confirm the password here and full name I'll just say admin and whatever the uh you know whatever the company that you are you you can provide that email address here I'll just say a monk in Cloud at gmail.com okay so if you do not want to provide an email address just say test at gmail.com so it is not mandatory but you have to provide an email address even if you provide a you know different one or invalid email address that is fine right I'll just say test gmail.com and I'll click on Save and continue okay so here it will ask the Jenkins URL if you note here our public IP address is there here right with the colon 8080 Port right so if you see here 54.54.89.104.105 with colon 8080 so and along with that it is working on HTTP right if you want to provide your own custom domain name you can add it here and make some changes also right so that is also important okay I'm good with this one and I'll say save and finish okay so it confirms saying Jenkins is ready now let's say start using Jenkins okay so this is the dashboard of your gen kids so this is how you install your Jenkins and configure it all right so that's it for today's video if you're liking the content that I'm creating please consider subscribing and share it among your friends and I've also noticed that 80 of my channel viewers haven't subscribed to the Channel please please consider subscribing and love you all thank you and I'll see you in the next one foreign [Music]
Info
Channel: A Monk in Cloud ☁️
Views: 22,819
Rating: undefined out of 5
Keywords: #AWS, #LearnAWSforFree, #Free, #FreeResources, #2022, #AWSCommunityBuilderProgram, #Community, #Server, #EC2, #Instance, #EC2_Instance, #Demo, #Commands, #LearnAWS, #AWSCommunityBuilder, #AWSCertified, #Automation, #SnapshotCreation, #AWSEC2Instance, #CompleteTutorial, #LiveDemo, #ProjectBasedLearning, #ClearAWSInterview, #InterviewPreparation, #OnlineLearning, #SelfThoughtLearner, #Opportunity, #DevOps, #ITCareer, #DevOpsRoles, #Jobs, #India, #AWSDevops, #Happy, #AWSAccount, #TrainingOnAWS, #CloudComputing, #Tutorial, #AWSDemo
Id: ahEdad8fdi8
Channel Id: undefined
Length: 15min 19sec (919 seconds)
Published: Tue Oct 25 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.