Jag An Report
Jag An Report
JAGANNATH H
H00453021
Abstract
This report presents an overview of my placement experience as a DevOps
Engineer at Touchlab Limited. It outlines the key projects undertaken during the
period, focusing on the development, automation, and deployment of workflows,
testing strategies, and hardware integration. The primary objectives included
setting up CI/CD pipelines, ensuring code quality through branch protection
rules, and enabling automated testing with hardware-in-the-loop methods. The
impacts of these contributions included improved efficiency, enhanced code
reliability, and structured development processes.
Project Overview
During my placement, I worked on several projects aimed at improving the
development and deployment processes within Touchlab Limited. The primary
focus areas included:
1. Establishing efficient GitHub workflows and maintaining repositories.
2. Developing and integrating automated testing mechanisms.
3. Implementing hardware-in-the-loop (HIL) testing to ensure software-
hardware integration.
4. Streamlining the management of repositories and branch rules to support
team collaboration and maintain code quality.
Main Activities
1. GitHub CI Workflow and Cleanup
Branch Cleanup
Objective: Remove redundancy from the repository.
README Updates
This section focuses on making a disciplined workflow and ensuring that best
practices are consistently followed.
Approach:
o Implemented mandatory status checks for branches, ensuring that all
tests and checks pass before changes can be merged.
o Required pull request reviews before merging, maintaining a layer of
quality workflow.
Team Communication
Objective: Ensure that all team members are aware of and follow the
established rules.
Approach:
o Detailed the rules in internal documentation using tools like wikis.
o Organized regular team discussions to clarify rules, gather feedback.
o Provided examples and practical demonstrations for better
understanding.
Testing Framework:
o Leveraged colcon tools, a powerful build system designed for ROS,
to compile and test the touchlab_sensor_driver package.
o Ensured that test execution produced logs, capturing key details to
aid in troubleshooting and debugging during failures.
o Established procedures to maintain a high degree of test coverage,
implementing the identification of regressions.
This section describes the implementation of automated testing workflows for the
tl_startup repository. The purpose of these workflows was to ensure the quality
and reliability of the code through continuous integration (CI) processes.
Key Features:
1. Workflow Setup:
a. I gained an understanding of how to configure GitHub Actions
specifically for ROS environments. This involves crafting workflows to
automate key tasks, such as building software, running tests, and
ensuring that the code integrates well with the ROS framework. The
workflows likely included triggers (like code pushes or pull requests)
and specific job definitions to carry out ROS-compatible actions.
2. Practical Implementation:
a. Beyond theoretical learning, I applied this knowledge to actual ROS
repositories, reinforcing my understanding with hands-on experience.
This step is crucial as it bridges the gap between academic
understanding and real-world application.
Documentation:
o Recorded and maintained repository structures in a guide for easy
reference.
o Ensured every repository included a comprehensive README file
detailing the project’s purpose, usage instructions, and contribution
guidelines.
Implementation Details
1. Tool Selection:
a. Utilized tools such as ament_cpplint for C++ repositories and flake8
for Python-based repositories.
b. These tools were chosen for their compatibility with the respective
codebases and their ability to enforce robust coding standards.
2. CI Integration:
a. Incorporated linter tools into existing CI pipelines using GitHub
Actions.
b. Configured workflows to automatically run linting checks on code
pushes, pull requests, and manual triggers.
1. Self-Hosted Runners:
a. These are custom GitHub runners hosted on infrastructure
maintained by the organization (in this case, Touchlab Limited)
instead of relying on GitHub's cloud-hosted runners.
2. Environment Isolation:
i. Security: Each build and test is performed in an isolated
environment, protecting sensitive data and ensuring that
different jobs don't interfere with each other.
ii. Consistency: Using containers ensures that builds are
reproducible across different systems, as the environment
remains consistent.
3. Advantages of This Approach:
a. The use of self-hosted runners is particularly beneficial in scenarios
requiring custom hardware or software dependencies.
b. It provides flexibility to scale infrastructure based on project demands
and enables better control over the CI/CD processes.
This section involves outlining steps and best practices to ensure secure access
and operation within Continuous Integration and Continuous Deployment (CI/CD)
workflows. Specifically, it addresses the following key areas:
1. Authentication Mechanisms:
a. GitHub Tokens: The usage of Personal Access Tokens (PATs) or
GitHub-provided tokens ensures that pipelines can securely access
private repositories and fetch dependencies. This reduces the risk of
unauthorized access while maintaining operational integrity.
b. Scoped Tokens: Tokens are configured with minimal necessary
permissions, adhering to the principle of least privilege to limit
potential damage in case of a security breach.
2. Container Registry Access:
a. Procedures for authenticating CI/CD workflows with the GitHub
Container Registry are detailed. This includes steps to configure
pipeline access and pull necessary Docker images required for builds
or deployment.
3. Documentation:
a. Clear, centralized documentation on setting up and managing these
credentials ensures that team members can easily replicate or
troubleshoot the authentication process in their own workflows.
Build Process:
A fully automated build process was established using Continuous
Integration (CI) workflows, ensuring consistency across all development
stages.
Dockerized environments were leveraged to replicate uniform build
conditions across different machines. This approach minimized
discrepancies due to environmental variations, ensuring consistent results.
The CI workflow was configured to trigger builds on multiple events,
including code commits, pull requests, and scheduled intervals. This
ensured timely validation of new changes and early detection of issues.
Automated Validation:
The CI pipeline not only executed builds but also ran all relevant GTests
automatically, with results being logged and reported. Any failures were
flagged, and detailed logs were generated to aid in quick debugging.
Test artifacts, including logs and performance reports, were stored as CI
outputs for future reference and analysis.
Results / Impacts
1. Improved Efficiency: CI/CD pipelines reduced manual efforts in testing
and deployment, enabling faster development cycles.
2. Enhanced Code Quality: Branch protection rules, automated linting, and
testing ensured robust codebases.
3. Streamlined Collaboration: Consistent commit practices and detailed PR
templates facilitated better team collaboration.
4. Effective Hardware Integration: HIL testing enabled seamless
interaction between software and hardware components.
Conclusion
My placement at Touchlab Limited as a DevOps Engineer provided invaluable
learning opportunities. By implementing scalable CI/CD pipelines, automating
testing workflows, and integrating hardware-in-the-loop systems, I contributed
significantly to the organization’s development practices. This experience
enhanced my technical expertise and understanding of DevOps principles,
preparing me for future challenges in the field.