Posts

Showing posts with the label Jenkins Master Slave

Jenkins Slave on AWS EC2 instances with SSH configuration

Image
After c onfiguring the  Jenkins Maste r we need to configure the slave or agent on EC2 instance. There are various methods to connect with the Slave node. In this post,  I would like to share the SSH key-based remoting method. Pre-requisites Jenkins Master already Up and Running Java (JDK) installed on the Slave node Here we are in the slave machine and proceed with the following steps for configure a SSH based Jenkins slave. How to create user and generate ssh-key on Slave? Login to slave node terminal using ssh or PuTTY switch to root user.  useradd jenkins_slave mkdir -p /home/jenkins_slave usermod -d /home/jenkins_slave jenkins_slave tail -1 /etc/passwd # To check useradded to userlist Now switch to the newly created user 'jenkins_slave'. sudo su - jenkins_slave SSH Key generate for 'jenkins_slave' user with the following command: cd .ssh ssh-keygen -t rsa -N "" The above command will create two files in /home/jenkins_slave/.ssh folder id_rsa (p...

Jenkins Configure build-server environment on AWS AMI

Image
In this post, I would like to share my experiment with AWS instances using IAM role for authenticating from the remote machine that is Jenkins Master instance. make sure that Jenkins Master should not have any executors on the master so that no job run on the master server, that will be making the Jenkins run in a distributed environment. Jenkins Master-Slave implementation within the AWS instances, and to do this. We need to follow a flow. Jenkins Master -> key pair -> Build server ->IAM->ec2 or EBS or S3 instance Create IAM role for the build server Login to your AWS console, search for IAM on the AWS console In the left pane select 'Roles' menu item. In the right side, click on the "Create role " blue button. select the type of trusted entity as "AWS service" that is default one. Now choose the service that will use this role: click on "EC2" Link. Click on the 'Permissions' bottom right side button, proceed furthe...