Docker Project - Part 2
Docker Project - Part 2
Operating Systems
Student Name:
Student ID:
Date:
This page was intentionally left blank.
Table of Contents
Extending RESTful API, CPU Scheduling, and Docker Deployment with Azure ..........................2
Introduction ............................................................................................................................ 2
Procedure............................................................................................................................... 2
You should include the following items in a single ZIP folder: ................................................. 4
Procedure
• Code content: Provide the updated RESTful API code, including the new PUT endpoint
and any modifications to the Dockerfile.
• Compilation and execution: Describe how to compile and run the updated code and
include screenshots showing successful compilation and execution.
• Docker deployment: Document the steps for building the Docker image and deploying
the container locally. Commands (docker build -t …, docker run -p …, …) and
include screenshots of the build process and the containers running.
• Database container connection: Explain how to connect to the database container.
Commands (docker network inspect …, docker exec -it …, …) and provide
screenshots demonstrating a successful connection to the database and interaction with
the database interface.
• Database record selection: Describe how to query and retrieve records from the
database. Commands (SELECT * FROM …) and include screenshots showing the queries
and the results.
• Postman screenshots (PUT and POST requests) and include screenshots of POST
and PUT requests with request bodies and responses as well as screenshots of
successful POST and PUT requests and a PUT request with a non-existent student ID.
• CPU scheduling management: Document the CPU scheduling management steps for
both Windows 10 and Ubuntu. Windows 10 Commands (open Task Manager, locate the
Docker container processes, right-click the process, select Set Priority, and adjust the
CPU priority). Ubuntu Commands (use htop or top to monitor processes, renice -n
<priority_value> -p <process_id> to adjust CPU priority) and provide screenshots
showcasing CPU scheduling adjustments for both operating systems.
Extension Tasks
Task 1: Implement PUT endpoint (20 Marks)
• Add a PUT endpoint to update student records and test the endpoint using Postman and
provide screenshots of successful updates (HTTP 200) and failed updates with a non-
existent student ID (HTTP 404). Verify and provide a screenshot of the updated
database record.
Task 2: Deploy two Docker containers (20 Marks)
• Build and run two instances of the RESTful API on separate ports. Command (docker
run -d -p …). Include screenshots showing both containers running, along with the
Docker commands used.
Task 3: CPU scheduling on Windows 10 (25 Marks)
• Create two Docker containers running on different ports. Use the Task Manager to
locate the container processes and adjust their CPU priorities (e.g., "High", "Normal", or
"Low") and provide screenshots of the priority changes and CPU usage.
• Write a brief analysis (2+ lines) on the performance impact.
Task 4: CPU scheduling on Ubuntu (25 Marks)
• Create two Docker containers running on different ports and use tools like top or htop to
monitor the containers and adjust CPU priorities using commands like renice (lower
niceness values mean higher priority) and then provide screenshots of process priorities
before and after changes.
Task 5: Deploy Docker image to Azure (optional)
Marking Criteria
Item Marks
Implementation of PUT method (correctness, testing, documentation) /20
Deployment of two Docker containers (successful deployment and /20
documentation)
CPU scheduling on Windows 10 (priority adjustment and impact analysis) /25
CPU scheduling on Ubuntu (priority adjustment and outcome /25
documentation)
A short video /5
References /5
Total Marks /100