0% found this document useful (0 votes)
16 views3 pages

MLOps CI/CD Pipeline Assignment

The assignment involves designing and implementing a CI/CD pipeline for a machine learning project, with a deadline of March 07, 2025, and a maximum of two members per group. Required tools include Jenkins, GitHub, Docker, and Python, with specific tasks such as repository setup, code quality checks, feature testing, and deployment. Evaluation will be based on repository structure, code quality enforcement, unit testing, Jenkins and Docker integration, and admin notification setup.

Uploaded by

mexit51030
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views3 pages

MLOps CI/CD Pipeline Assignment

The assignment involves designing and implementing a CI/CD pipeline for a machine learning project, with a deadline of March 07, 2025, and a maximum of two members per group. Required tools include Jenkins, GitHub, Docker, and Python, with specific tasks such as repository setup, code quality checks, feature testing, and deployment. Evaluation will be based on repository structure, code quality enforcement, unit testing, Jenkins and Docker integration, and admin notification setup.

Uploaded by

mexit51030
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CI/CD Pipeline for a Machine Learning Project

Total Marks: 100

Deadline: March 07, 2025

Description:

This assignment aims to provide hands-on experience in designing and implementing a CI/CD
pipeline for a machine learning project. The project will include both a machine-learning
model and a unique dataset for each group.

Group Formation:

●​ This is a group assignment with a maximum of two members per group.


●​ Each group must designate one member as the admin responsible for reviewing and
approving pull requests before merging changes into the repository.

Required Tools:

Students must use the following tools while developing the pipeline:

1.​ Jenkins
2.​ GitHub
3.​ GitHub Actions
4.​ Git
5.​ Docker
6.​ Python
7.​ Flask
Task Breakdown:

1.​ Repository Setup & Branching Strategy


○​ Create a GitHub repository with the following branches:
■​ Dev Branch: For development and feature implementation.
■​ Test Branch: For validating features before production.
■​ Master Branch: For final, production-ready code.
2.​ Code Quality Check (GitHub Actions & Flake8)
○​ Implement a GitHub Actions workflow to enforce code quality checks using
Flake8.
○​ Ensure that any pull request to the dev branch must pass this check before
merging.
3.​ Feature Testing (GitHub Actions)
○​ Once a feature is completed in the dev branch, submit a pull request to merge it
into the test branch.
○​ This should trigger an automated testing workflow, executing unit tests to
validate the feature.
4.​ Deployment with Jenkins & Docker
○​ Upon successful testing, merge the feature into the master branch, triggering a
Jenkins job.
○​ The Jenkins job should:
■​ Containerize the application using Docker.
■​ Push the Docker image to Docker Hub.
5.​ Admin Notification
○​ Once the merge into the master branch is complete, an email notification should
be sent to the admin, confirming the successful deployment via Jenkins.
Evaluation Criteria:

●​ Proper repository structure and branching strategy (20 Marks)


●​ Successful code quality enforcement using Flake8 (20 Marks)
●​ Correct implementation of unit testing workflow (20 Marks)
●​ Functional Jenkins & Docker integration for deployment (30 Marks)
●​ Proper admin notification setup (10 Marks)

Submission Guidelines:

●​ Submit the GitHub repository link along with a short report explaining your
implementation.
●​ Ensure that your pipeline follows the required structure and meets all conditions
mentioned above.

Best of Luck.

Common questions

Powered by AI

Docker is a critical component in the deployment process of the CI/CD pipeline as it facilitates consistent deployment environments. By containerizing the application, Docker ensures that the software runs uniformly across different machines, eliminating issues related to varying environments. This leads to more reliable deployments, as the container encapsulates the application and its dependencies, making it easier to deploy updates and revert changes if necessary. Furthermore, Docker images can be easily managed and distributed via Docker Hub, streamlining deployment workflows and reducing operational overhead .

This assignment provides significant educational value by immersing students in hands-on experience with industry-relevant tools and methodologies such as Jenkins, Docker, GitHub Actions, and Python. It offers practical insights into the complex processes involved in setting up a CI/CD pipeline, a crucial component of modern software development practices. Students learn to implement continuous integration and deployment strategies, enforce coding standards, and manage version control, equipping them with essential skills for software engineering careers .

Each group in the project is required to have a maximum of two members. One member must be designated as the admin, responsible for reviewing and approving pull requests before changes are merged into the repository .

The proposed branching strategy includes dev, test, and master branches, which are essential in a CI/CD pipeline for maintaining code integrity. The dev branch is used for feature development, isolating changes to avoid disrupting the stable code base. The test branch serves as an intermediate verification ground, ensuring features undergo testing before being deemed production-ready. Finally, the master branch holds only vetted, production-ready code. This strategy facilitates systematic integration and prevents potential risk discrepancies between development and deployment stages by maintaining a clear and structured workflow .

The email notification step is necessary to ensure that stakeholders are aware of the successful completion of the deployment process. By automatically notifying the admin after a successful merge into the master branch via Jenkins, the project maintains transparency and accountability. This step allows project managers and team leads to have real-time insights into project status, enabling them to address issues promptly and ensuring that the deployment aligns with project timelines and objectives. Such notifications enhance communication and coordination among team members, facilitating better project management and oversight .

GitHub Actions is leveraged in the project to automate various aspects of the CI/CD pipeline. It facilitates the enforcement of code quality through Flake8 checks, ensures the execution of unit tests when features are merged into the test branch, and helps maintain the continuous integration process. These actions allow for real-time feedback and automated validation, crucial for maintaining high code quality and early detection of issues. By integrating these automated workflows, GitHub Actions ensures that the transitions from development to testing stages are smooth and consistent .

The task breakdown structure supports effective team collaboration by clearly defining specific roles and responsibilities for each step in the CI/CD pipeline, promoting efficient task allocation. By delineating tasks such as repository setup, code quality checks, feature testing, and deployment, team members can focus on their areas of responsibility. This clarity reduces miscommunication and potential conflicts, encourages accountability, and enables parallel work streams, leading to more efficient project execution .

The implementation of Flake8 as a code quality check is integral to the project's goal of maintaining high coding standards. By enforcing Flake8 checks through GitHub Actions, the project ensures that all code adheres to Python coding standards before being merged into the development branch. This process helps identify and rectify errors early in the development pipeline, reducing the likelihood of propagation into the testing or production stages. It ensures consistency and discipline in the coding practices of project participants, thus contributing to overall code quality and maintainability .

Students might face challenges such as setting up Jenkins with Docker, integrating GitHub Actions properly, and managing complex Git workflows. To address these, students can: 1) Utilize online resources and community forums to troubleshoot integration issues with Jenkins and Docker; 2) Follow GitHub documentation and examples to ensure workflows are configured correctly; and 3) Practice using Git to familiarize themselves with branching strategies before implementing them in the project. Collaborative problem-solving within teams can also mitigate challenges, improving their ability to handle real-world CI/CD scenarios .

Jenkins enhances the automation capabilities of the CI/CD pipeline by orchestrating the build, test, and deployment process. When integrated with Docker, Jenkins can automatically build Docker images as part of its jobs, ensuring that every deployment is made consistently from a reproducible state. Jenkins' robust plugin ecosystem, which includes Docker support, allows seamless automation of complex workflows. By automating the containerization process with Jenkins, the team can achieve continuous integration and delivery, reducing manual intervention and increasing deployment frequency, which are key objectives of any successful CI/CD pipeline .

You might also like