Gear Building Tutorial
Introduction
Welcome to the Flywheel Gear Building Tutorial! This comprehensive guide will walk you through the process of creating, testing, and deploying Flywheel gears from scratch.
Gears are containerized applications that run in the Flywheel platform, enabling automated data processing, analysis, and management. As a developer, you can create custom gears to automate workflows, ensure reproducibility, and share your algorithms with the broader Flywheel community.
What You'll Learn
Throughout this tutorial series, you will:
- Set up a complete gear development environment
- Understand the core components of a Flywheel gear
- Create a functional gear from scratch
- Learn how Flywheel handles inputs, outputs, and configuration
- Test and debug your gear locally
- Upload and run your gear on a Flywheel instance
- Implement best practices for logging and debugging
Tutorial Structure
This tutorial is divided into nine parts, each focusing on a specific aspect of gear development:
- Developing Gears: Setting up your development environment with Docker, Flywheel CLI, and SDK
- Creating Your First Gear: Understanding the main gear files and development workflows
- The Flywheel Environment: Learning about the directory structure and how Flywheel handles inputs and outputs
- The Run Script: Creating the executable code that performs your gear's function
- The Manifest: Defining your gear's metadata, inputs, and configuration
- The Dockerfile: Building the container that houses your gear
- Running a Gear Locally: Testing your gear before uploading it to Flywheel
- Logging: Implementing proper logging for tracking progress and troubleshooting
- Debugging: Techniques for identifying and fixing issues in your gear
Getting Started
Before diving into the tutorial, make sure you have:
- A Flywheel account (or access to a Flywheel instance)
- Basic familiarity with command-line interfaces
- Some programming experience (Python is recommended but not required)
- Basic understanding of containerization concepts
No prior experience with Flywheel or Docker is required—we'll guide you through each step of the process.
Ready to build your first Flywheel gear? Let's get started with Part 1: Developing Gears, where we'll set up your development environment and install all the necessary tools.