The document is a DevOps lab manual for B-TECH CSE (AIML) students, detailing various experiments related to user registration forms, Git and GitHub commands, Jenkins setup, Docker commands, and Kubernetes integration. Each experiment includes aims, descriptions, and steps to complete tasks such as building applications, managing source code, and automating deployments. Additionally, it includes viva questions to assess understanding of the concepts covered.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0 ratings0% found this document useful (0 votes)
26 views23 pages
Devops Lab Manual
The document is a DevOps lab manual for B-TECH CSE (AIML) students, detailing various experiments related to user registration forms, Git and GitHub commands, Jenkins setup, Docker commands, and Kubernetes integration. Each experiment includes aims, descriptions, and steps to complete tasks such as building applications, managing source code, and automating deployments. Additionally, it includes viva questions to assess understanding of the concepts covered.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 23
IlI-Il B-TECH CSE (AIML)
DEVOPS LAB MANUAL
DEVOPS LAB MANUAL
EXPERIMENT NO; 1, Write code for a simple user registration form
for an event.
Aim: Write code for a simple user registration form for an event.
DESCRIPTIO!
Here's an example of a simple user registration form using Flask and Docker
in DevOps:
* Create a Docker file with the following content to create a Docker
image for your Flask application:
FROM python:3.8
WORKDIR /app
COPY..
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 5000
CMD ["python", "app.py"]
* Create a requirements.txt file with the following content to list the
dependencies of your Flask application: Flask—=I.1.2
* Create a app.py file with the following code for a simple user
registration form in Flask:
from flask import Flask, request, render_template
app = Flask(_name_)
@app-route(‘/register’, methods=['GET’, 'POST"])
def register():
if request.method == 'POST":
name = request.form[name']
email = request. form['email']
password = request.form['password']
# Store the user data in a database or file
return render_template('success.htm|')
—_————————<$<__ _ _ _
MRITS Page 1
@ scanned with OKEN ScannerIII-I] B-TECH CSE (AIML)
DEVOPS LAB MANUAL
return render_template('register: html)
if _name_ main_':
app.run(host="0.0.0.0')
* Create an templates folder and add the following two files:
register:html and success.html.
register.html
success.html