-
-
Notifications
You must be signed in to change notification settings - Fork 8
Project Ideas
- Documentation: https://osl-incubator.github.io/sugar
- License: BSD 3 Clause: https://github.com/osl-incubator/sugar/blob/main/LICENSE
- Code of Conduct: https://github.com/osl-incubator/sugar/blob/main/CODE_OF_CONDUCT.md
The goal of this project is to develop a Terminal User Interface (TUI) for Sugar, a tool that simplifies container management. This TUI will provide a visual and interactive way to access all functionalities of Sugar directly from the terminal, akin to the user experience offered by k9s for Kubernetes.
The Sugar TUI aims to enhance the user experience by providing a graphical
interface within the terminal, allowing users to interact with Sugar's features
more intuitively. The interface will be accessible via the command sugar tui
and will be developed using the Textual library in Python, known for its
capabilities in building modern, interactive TUIs.
Key Features:
- Group Selection: Users can select which group of services they want to interact with.
- Service Management: Functionalities to start, restart, and stop services within the chosen group.
- Logs and Stats Viewing: Capability to view logs and check statistics for individual services.
- Service Details: Display detailed information about services, such as IP addresses, volumes, and configuration settings.
Technical Approach:
- Utilize the Textual library to create a rich, interactive TUI. Textual's modern design and integration capabilities make it an ideal choice for developing a user-friendly interface.
- Design the interface to reflect the hierarchical structure of Sugar's configuration, allowing users to navigate between different groups and services effortlessly.
- Implement command handling in the TUI to perform actions such as starting, stopping, and restarting services.
- Fetch and display real-time data from Sugar, such as service logs, stats, and configuration details.
Development Plan:
- Initial Setup: Setting up the project structure and integrating the Textual library.
- Interface Design: Designing the layout and navigation of the TUI, including menus and panels.
- Feature Implementation: Developing the core functionalities - group selection, service management, log viewing, and displaying service details.
- Testing and Refinement: Testing of the TUI for usability, performance, and compatibility with existing Sugar functionalities.
- Documentation and Examples: Creating comprehensive documentation and usage examples to assist users in leveraging the new TUI.
Sugar is already published on pypi and conda-forge, and currently works on top of docker compose v2.
- Sugar TUI working from the CLI
sugar tui
- Documentation should be updated in order to include this new feature
- The creation of a blog post that explains this new implementation
- Add tests on CI for TUI (as much as possible)
- Prerequisites:
-
Hard Skills:
- Python (intermediate to advanced level)
- Docker (basic level)
- Command-line interface development (basic level)
- JSON schema understanding
-
Soft Skills:
- Problem-solving
- Code documentation
- Collaboration through GitHub
-
Hard Skills:
- Duration: 350 hours
- Complexity: Medium
- Potential Mentor(s): Ivan Ogasawara, Luis Casas, Sandro Loch, Felipe Paes
The goal of this project is to extend the Sugar library with Docker Swarm support. This enhancement will enable Sugar users to manage Docker Swarm clusters directly through Sugar’s command-line interface (CLI). By adding commands for initializing, joining, creating, scaling, updating, and inspecting Swarm services, the project aims to streamline container orchestration workflows for developers.
- Sugar currently provides functionalities for Docker Compose, but it lacks support for Docker Swarm. The CLI is modular, making it a good foundation for adding Swarm-specific commands. The existing
compose_ext.py
module can serve as a reference for implementing the new Swarm extension.
- Implementation of new Sugar commands for Docker Swarm:
-
sugar swarm init
- Initialize a swarm -
sugar swarm join
- Join a swarm as a node and/or manager -
sugar swarm create
- Create a new service -
sugar swarm inspect
- Display detailed information on one or more services -
sugar swarm logs
- Fetch logs of a service or task -
sugar swarm ls
- List services -
sugar swarm ps
- List the tasks of one or more services -
sugar swarm rm
- Remove one or more services -
sugar swarm rollback
- Revert changes to a service's configuration -
sugar swarm scale
- Scale one or multiple replicated services -
sugar swarm update
- Update a service
-
- Updates to the following files:
src/sugar/cli.py
src/sugar/schema.json
src/sugar/core.py
- Creation of a new extension file:
src/sugar/extensions/swarm.py
- Comprehensive documentation and tests for all new commands.
- Prerequisites:
-
Hard Skills:
- Python (intermediate to advanced level)
- Docker and Docker Swarm (basic level)
- Command-line interface development (basic level)
- JSON schema understanding
-
Soft Skills:
- Problem-solving
- Code documentation
- Collaboration through GitHub
-
Hard Skills:
- Duration: 350 hours
- Complexity: Medium
- Potential Mentor(s): Ivan Ogasawara, Luis Casas, Sandro Loch, Felipe Paes