Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 5

New Item:-

-------------
1) in jenkins we are creating jenkins jobs. that jobs are different types sometimes
i can create build job, sometimes i will create deployment job, sometimes will
create pipelines job.
to create the jenkins job we require new item option
Manage jenkins:
-----------
here any configurations setup will do it from manage jenkins. here we will install
the plugins, will create the credentials, will add the users.
Job:-
----------
In jenkins to perform any task we are creating the job. In job we have two types,
1. build job
2. deployment job
in job we have two stages
1. prebuild
2. postbuild

Prebuild:
-----------
Prebuild is nothing but before package is creating here we have below stages,
1. Git
2. Maven
3. Sonarqube
4. docker

Postbuild:
------------
In postbuild once the package is created we can use that package to deployment. we
have below stages for post build,
1. artifactory (Nexus) or registry
2. ansible
3. Kubernetes

Global tool configurations:-


-------------------------------
It help you to declare the number of tools, when you are performing the jenkins job
based on the requirement you can utilise the tools. one time if we specify the
global tool configuration entire jenkins you can utilise.

Jenkins job configuration:-


----------------------------
default location of package in jenkins server
-->/var/lib/jenkins/workspace/ci-test-build-job/target
**/*. syntax
default location of .m2 repositoryin jenkins server:
/var/lib/jenkins/.m2/repository

How many ways you have to automate the build process in jenkins server?
in jenkins we have 3ways to automate the build process
1. pollscm
2. build periodically
3. git webhook

Git webhook: when the new commit happened into github repository automatically
build will be execute in jenkins.
the main difference between pollscm and git webhook is pollscm will work using the
timer but interms of git webhook by the time new commit happen git will be
executing the code.
The main difference between pollscm and git webhook is in pollscm we have waiting
period, but interms of git webhook there is no waiting period by the time when the
new commit happen immediately build will be triggered thats why most of the cases
developer will enable git webhook option.

Jenkins Plugins or have you installed any plugins for your current project. If yes
can you please tell me what are the list of plugins which you have installed?
---------------
1. version number plugin
*2. job import plugin
3. ansible plugin
*4. thin backup plugin
5. ssh plugin
*6. Role-based authorization strategy plugin
*7. kubernetes plugin
*8. job import plugin
*9. SonarQube scanner plugin
*10. Terraform plugin
11. Docker build and publish plugin
12. copy artifact plugin

Plugin:-
-----
In jenkins plugins we are using for adding the new functionality into existing
dashboard. In jenkin when ever we want to add new feature then will install the
plugin.

Plugin installation steps in project:


1. In my current project we are using Jira ticketing system tool or Azure boards.
everytime when devloper required new plugin they use to write the request in
ticketing system tool.
2. in the ticket they will specify which plugin needs to be installed.
3. once we received the request from devloper we need to start installing the
plugin in testing jenkins server. in my current project we have testing jenkins
server if any testing related activities related to jenkins we will perform in the
test jenkins server.
4. usually we are going to perform this activity on weekend that is non business
hours.
5. Before we are installing the plugin we will send one outage email, in that email
we will specify from what time to what time jenkins is not available. based on this
outage notice developer will come to now jenkins server having the downtime.
6. if we are not sending the outage email to devloper the build will fail or build
will be killed. which means devloper already using the jenkins server the build is
inprogress with out intimation if we restart the jenkins server the job will goto
offline that time build will fail.
7. once we sent the outage notice to devloper then we will start installing the
plugin. once plugin installation is completed then we will send the release notice
email to the devlopment team. in the release notice email we will specify plugin
installation activity is completed we have tested the jenkins server and we have
tested the jenkins job everything is working as expected.
8. Once devloper see this release notice then they come to know activity is
completed status.
Nexus integration with Jenkins:-
--------------------------------

Ansible:
----------
configuration management tools:

1. In current market we have different types of configuration management tools


(1)Puppet
(2)Chef
(3)Ansible
(4)Rundeck

What is the difference between puppet, chef, Ansible?


What is the difference between infratsructure as a code, configuration management
tools?
What is the difference between ansible, terraform ?

Puppet workflow:-
----------------

In Ansible we have host server. In host server we have to install the ansible
packages. once we install the ansible packages we will get default location on
ansible host server.
The default location of ansible is /etc/ansible. In default location we have
hostsfile, roles, ansible.cfg .

Ansible host server


Ansible remote server

Note-1:- when i want to install package in ansible host server below is the syntax

---
- hosts:

Ansible Modules:
-----------------
In ansible when we writing the task we require ansible modules. using the ansible
modules we are performing the task. each module have seperate functionality.
list of modules
yum
shell
copy
move
pip
helm
pip3
boto
boto3
linenin file
block
with_items
url_get
Ansible playbook structure:-
------------------------------

---
hosts:localhost
remote_user:centos
tasks:
-name:install the java package
yum:
-java

-name:install the maven package


yum:
-Maven

-name:install the Nodejs package


yum:
-Nodejs

-name:install the jenkins package


yum:
-jenkins

-name:install the Git package


yum:
-Git

Playbook:-
------------
Playbook is nothing but collection of tasks. Here we are going to create multiple
tasks. each task having different different modules using the module we are going
to deploy the package

1)Write Ansible playbookk for install java package on centos server?


-> os type
-> package Name
-> where to install [ In ansible Host server or remote server, If remote server
then we meed to ask the developer about remote serverlist.
-> If possible we need to install package on testing server{ for ex: my task is to
install java on centos I need create on tetsing ansbile package install server in
that server I need to need java package and neeed to list commands}

You might also like