Professional Documents
Culture Documents
Worksheet -1.1
Subject code: 22CAP-745
Date of Performance:
Aim: Installation of Git and introduce them to some of the common Git commands.
Objective: To familiarize with the installation process of Git We are going to use
the following essential commands in Git.
a) git init f) git branch
b) git add g) git checkout
c) git commit h) git merge
d) git status i) git clone
e) git log j) git push
Verify Installation:
• Open the Command Prompt and type the following command. git --version
Here are explanations and examples of 10 common Git commands:
1. git init: Initializes a new Git repository in the current directory. Example:
2. git add: Stages changes for commit. It adds modified files to the staging area.
Example:
3. git commit: Creates a new commit with the changes that are staged in the
repository. Example:
4. git status: Displays the current status of your working directory and staging
area. Example:
3
DEVOPS PROCESS AUTOMATION LAB
Worksheet -1.2
Subject code: 22CAP-745
Here are commands for visualizing branches and adopting a branch naming convention:
4. git merge: Integrates changes from one branch into another. Example:
Aim: Installation and configuration of the JDK (Java Development Kit) and Apache Maven.
Objective: To familiarize with the installation and configuration process of JDK and Apache
Maven We are going to use the following essential steps.
On Windows:
1
• Right-click on "This PC" or "Computer" and select "Properties."
• Click on "Advanced system settings" on the left.
• In the System Properties window, click the "Environment Variables" button.
• Under "System variables," click "New."
• Enter ‘JAVA_HOME’ as the variable name.
• Enter the path to your JDK installation directory (e.g., ‘C:\Program Files\Java\jdk-19’) as
the variable value.
• Click "OK" to save.
To install and configure Apache Maven on Windows system, follow these steps:
• Download the latest version of Apache Maven (a ‘.zip’ or ‘.tar.gz’ archive) from the
"Files" column.
2. Extract Maven:
• Locate the downloaded archive on your system and extract it to a directory of the
program file folder in C: drive. This directory will be referred to as the "Maven Home."
On Windows:
• Right-click on "This PC" and select "Properties."
• Click on "Advanced system settings" on the left.
• Click on the "Environment Variables" button.
• Under "System variables," find and select the "Path" variable, then click "Edit."
• Add a new entry with the path to your Maven bin directory (e.g., ‘C:\Program
Files\apache-maven-3.9.4-bin\apache-maven-3.9.4\bin’).
2
• To add a new variable, select either "System variables" or "User variables" (based on
your preference). • Click the "New" button.
• Enter the variable name in the "Variable name" field (e.g., ‘MAVEN_HOME’).
• Enter the variable value in the "Variable value" field (e.g., ‘C:\Program
Files\apachemaven-3.9.4-bin\apache-maven-3.9.4’).
• Click "OK" to close the dialog.
Verify your Maven installation by this command in the Command Prompt:
Example of creating a simple Java project using Maven commands and testing it:
3
3. Clean and Build the Project:
The ‘clean’ goal removes the target directory containing compiled classes and artifacts from
previous builds. The ‘install’ goal compiles and packages your project.
5. Run Tests:
The ‘test’ goal runs the tests in the project.
5
DEVOPS PROCESS AUTOMATION LAB
Worksheet -2.1
Subject code: 22CAP-745
Aim: Write the steps and considerations to install Jenkins for software development projects and
should be kept in mind during the installation process.
Objective: To familiarize myself with the installation process of Jenkins Server. We are going
to use the following essential steps.
5. Configure Port:
• Configure the port for Jenkins. The default port is 8080, but you can change it if needed.
6. Plugin Selection:
• Choose whether to install suggested plugins or select custom plugins. For most users,
installing the suggested plugins is a good choice.
• Click "Next" to proceed.
7. Create Admin User:
2
• Create an admin user for Jenkins and specify a password. Make sure to remember
this password, as you'll need it to unlock Jenkins.
• Click "Next" to continue.
8. Installation:
• Click "Install" to begin the installation.
9. Installation Complete:
• The installer will complete the installation, and you'll see a message indicating the success
of the installation.
• Click "Finish" to close the installer.
Step 4: Start Jenkins
• Jenkins will start automatically as a Windows service. There's no need to manually start it.
3
Learning outcomes (What I have learnt):
• Learn about the installation of Jenkins on their systems.
• Understand the need for Java and install it.
• Learn about configuring Jenkins as a service.
• Learn to create an admin user during the initial setup.
• Learn about the installation and management of Jenkins plugins.
4
DEVOPS PROCESS AUTOMATION LAB
Worksheet -2.2
Subject code: 22CAP-745
Aim: What are the key components and steps involved in setting up a delivery pipeline using
Jenkins for continuous integration and continuous delivery (CI/CD), and how can it be used to
automate and streamline the software development and deployment process?
Objective: To familiarize myself with the installation process of Jenkins Server. We are going
to use the following essential steps.
Key Components:
1
Step 1: Create a Jenkins Pipeline
1. Open the Jenkins web interface.
2. Click "New Item" to create a new Jenkins job.
3. Choose "Pipeline" and give it a name (e.g., "Node.js Pipeline").
4. Click "OK."
2
Step 2: Write the Jenkinsfile Script
Step 5: Output
4
DEVOPS PROCESS AUTOMATION LAB
Worksheet -2.3
Subject code: 22CAP-745
Aim: Write the steps involved in the scripted pipeline in a Jenkinsfile, and when should we
choose scripted over declarative for defining CI/CD pipelines in Jenkins?
Objective: To create a Jenkinsfile in our GitHub repository for build a CI/CD Pipeline in
Jenkins.
1
Step 2: Configure Your Pipeline in Jenkins:
• In the Jenkins web interface, create a new "Pipeline" job.
• In the job configuration, specify the location of your Jenkinsfile in your source
code repository.
2
• Create a Jenkinsfile in our repository.
• Click commit changes option for save this file.
Step 5: Output
3
4
DEVOPS PROCESS AUTOMATION LAB
Worksheet -3.1
Subject code: 22CAP-745
Aim:
a) Install and configure TeamCity Server.
b) Build a CI/CD pipeline in the TeamCity Server.
Objective: To familiarize myself with the installation process of TeamCity Server. We are
going to use the following essential steps and build a CI/CD pipeline with Maven.
2
Step 3: Set Up Build Steps:
1. In the build configuration settings, go to the "Build Steps" section.
2. Add a new build step with the following settings:
• Runner Type: Maven
• Step Name: Build and Test
• Goals: ‘clean install’ (This will clean, compile, run tests, and package your Maven
project)
3
• Maven version: Use the default version.
4
Learning outcomes (What I have learnt):
5
DEVOPS PROCESS AUTOMATION LAB
Worksheet -3.2
Subject code: 22CAP-745
Aim: Write the steps involved in Configuration Management using Puppet (AWS), mange the
complete process using EC2 install and Putty Terminal.
1
Step 2: Configure Security Groups:
• Ensure that the security groups associated with your EC2 instances allow communication on
any other ports you intend to use for SSH, etc. Step 3: SSH Access and Key Pairs:
• Generate a key pair when launching your EC2 instances and download the “.ppk” private
key file.
2
Instances dashboard
•
3
Step 5: Install and Configure Puppet Master:
• Update the package repository:
“sudo apt update”
• Download and Install the Puppet repository package:
4
• Check the policy for Puppet master:
• Modify the Puppet master default configuration and add the following line in text editor:
“sudo vim /etc/default/puppet-master”
5
JAVA_ARGS=" -Xms512m -Xmx512m"
6
• Edit the host file and add the following line:
“sudo nano /etc/hosts” and “MASTER_IP_ADDRESS puppet”
7
• Restart Puppet Master:
“sudo systemctl restart puppet-master”
8
DEVOPS PROCESS AUTOMATION LAB
Worksheet -3.3
Subject code: 22CAP-745
Aim: Write the steps involved in Configuration Management using Chef (AWS), mange the
complete process using EC2 instance.
1
Step 2: Install Chef Development Kit (Chef DK):
Download and install the Chef DK on your local machine. This includes tools like knife for
managing Chef resources.
2
“chef generate cookbooks sample”
3
Step 5: Create a Chef Server
• Set up a Chef Server based on your requirements.
• Follow the installation instructions provided by Chef for your chosen Chef Server.
4
Step 7: Bootstrap EC2 Instances
• Launch EC2 instances in your AWS account using the AWS Management Console or AWS
CLI.
5
Step 10: Output