Front Page
Front Page
This is to certify that ARRURI MADHU of B. TECH III year I Semester bearing Hall-
ticket number 22011A0512 has fulfilled her DEVOPS LAB record for the academic year
2024-2025.
Date of Examination
INDEX
ANNAMNENI PRAMOD
22011A0503
3
22011A0503
1. Write code for a simple user registration form for an event.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Registration Form</title>
</head>
<body>
<form id="registrationForm">
<label for="fullName">Full Name:</label><br>
<input type="text" id="fullName" name="fullName" required><br>
<label for="email">Email:</label><br>
<input type="email" id="email" name="email" required><br>
<label for="password">password:</label><br>
<input type="password" id="password" name="password" required><br>
<br>
<input type="submit" value="Register">
</form>
<div id="successMessage" style="display: none;">
<p>Registration Successful!</p>
</div>
<script>
document.getElementById("registrationForm").addEventListener("submit",
function(event) {
event.preventDefault();
document.getElementById("successMessage").style.display = "block";
document.getElementById("registrationForm").reset();
});
</script>
Creating a pull request on GitHub: Go to the repository on GitHub, select the branch you
want to merge and click the "New pull request" button.
4:whatever the files that we created for simple user registration form add them to your git
repository
5:after adding open terminal and type git clone
https://github.com/madhuarruri/userregistation
Here after git clone it should be ur link
Advanced->use custom workspace->enter the path where your python file has saved eg: C:\
Users\allek\Downloads\jenkins programs
Go to build steps ->execute windows batch command (you can get get this path from
environment variables)
1. Docker run
Description: Runs a command in a new container. It’s one of the most used Docker
commands because it creates and starts a new container.
Syntax: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Example: $ docker run --name mycontainer -it ubuntu:16.04 /bin/bash
o Explanation:
--name mycontainer: Assigns the name "mycontainer" to the container.
-it: Combines -i (interactive) and -t (pseudo-TTY) options to keep the
container running interactively.
2. Docker start
Description: Starts one or more stopped containers. It does not create a new container
but starts an existing one.
Syntax: docker start [OPTIONS] CONTAINER [CONTAINER...]
Example: $ docker start mycontainer
3. Docker stop
Description: Stops one or more running containers. It sends a SIGTERM signal to the
main process inside the container, allowing it to exit gracefully.
Syntax: docker stop [OPTIONS] CONTAINER [CONTAINER...]
Example: $ docker stop mycontainer
o Explanation: Stops the container named "mycontainer".
4. Docker rm
Description: Removes one or more containers. The container must be stopped before
it can be removed.
Syntax: docker rm [OPTIONS] CONTAINER [CONTAINER...]
Example: $ docker rm mycontainer
o Explanation: Removes the container named "mycontainer".
5. Docker ps
6. Docker images
Description: Lists images. It shows all the Docker images available on the local host.
Syntax: docker images [OPTIONS] [REPOSITORY[:TAG]]
Example: $ docker images
o Explanation: Lists all images stored locally on the host.
7. Docker pull
8. Docker push
Build the Docker image: Run the following command to build the Docker image: $ docker
build -t myfirstprogram .
This command builds a new Docker image using the Dockerfile and tags the image with the
name "myfirstprogram".
Run the Docker container: Run the following command to start a new container based on the
image: $ docker run – myfirstprogram
This is a simple example of how you can use Docker to containerize an application. In a real-
world scenario, you would likely have more complex requirements, such as running multiple
containers, managing network connections, and persisting data. However, this example
should give you a good starting point for using Docker to containerize your applications.
Prerequired:
Download and install Node.js
Download and install vs code
Install selenium-webdriver and install mocha
https://storage.googleapis.com/chrome-for-testing-public/125.0.6422.141/win64/chrome-
win64.zip
->for installing selenium web driver go to any web browser->selenium web driver install -
>Download selenium->javascript stable 4.21->chromedriver.exe->win64
Steps:
Create a folder called newfolder in your downloads /or any other main folder
Open this folder in vs code and go to termina->new terminal then type the below command
i.e npm init where it atomatically creates package.json file
{
(async () => {
const driver = await new Builder()
.forBrowser('chrome')
.setChromeOptions(new chrome.Options())
.build();
try {
await driver.get('https://www.google.com');
await driver.findElement(By.name('q')).sendKeys('Selenium', Key.RETURN);
await driver.wait(until.titleContains('Selenium'), 100000000000);
} catch (error) {
console.error('Test failed:', error);
} finally {
await driver.quit();
}
})();
Output:
(async () => {
try {
// Test Case 1: Navigate to Google and verify title
await driver.get('https://www.google.com');
await driver.wait(until.titleContains('Google'), 10000);
console.log('Test Case 1 Passed: Title contains "Google"');
} catch (error) {
console.error('One or more test cases failed:', error);
} finally {
await driver.quit();
}