Netbox-Sync

Imagine this, you are managing your infrastructure for your lab or server farm using the popular NetBox tool. Everytime you install a new machine you connect to it and collect all the system's information to enter into NetBox. Including stuff like system resources, architecture, vendor, type and all the network interfaces. Tedious isn't it?

Well, this is where NetBox-Sync comes in (name subject to change). NetBox-Sync is going to be a CLI application, written in Rust, that will automatically collect your machine's details and send them to your NetBox instance. This will make it easier for you to install and update your inventory.

If you want to learn Rust and help me build this project please reach out to me through the public channels linked in my GitHub Profile, your help is greatly appreciated!

Goal for this Hackweek

There are multiple goals for this Hackweek. Split into the main focus and nice-to-have goals.

Main Focus

  • [x] Get a working API client for Netbox-Sync so it can communicate with a Netbox instance
  • [ ] Implement functions to create machines/VMs and get a list of existing ones.
  • [ ] Implement a "publisher" module to "steer" API calls.

Acceptance criteria for this goal

  • [x] NetBox-Sync is correctly addressing the right NetBox URI from config file or CLI according to set hierarchy.
  • [ ] The payload data is in the correct format

Nice-To-Have

  • [x] Error Handling PR is done and documented correctly.

Resources

NetBox-Sync Repository: https://github.com/ByteOtter/netbox-sync

API-Client PR: https://github.com/ByteOtter/netbox-sync/pull/36

Netbox Documentation: https://docs.netbox.dev/en/stable/

Who I need

People with some Rust knowledge and familiarity with OpenAPI stuff would be a huge help I think. But anyone is welcome! :)

Looking for hackers with the skills:

rust netbox cli systemsmanagement

This project is part of:

Hack Week 23

Activity

  • over 1 year ago: smflood liked this project.
  • over 1 year ago: renxt0310 liked this project.
  • over 1 year ago: jzerebecki liked this project.
  • over 1 year ago: digitaltomm liked this project.
  • over 1 year ago: chock added keyword "systemsmanagement" to this project.
  • over 1 year ago: chock joined this project.
  • over 1 year ago: mfriedrich started this project.
  • over 1 year ago: c-hagenest liked this project.
  • over 1 year ago: chock added keyword "rust" to this project.
  • over 1 year ago: chock removed keyword systemsmanagement from this project.
  • over 1 year ago: chock added keyword "rust" to this project.
  • over 1 year ago: chock added keyword "netbox" to this project.
  • over 1 year ago: chock added keyword "cli" to this project.
  • over 1 year ago: chock added keyword "systemsmanagement" to this project.
  • over 1 year ago: chock originated this project.

  • Comments

    Be the first to comment!

    Similar Projects

    Kanidm: A safe and modern IDM system by firstyear

    Kanidm is an IDM system written in Rust for modern systems authentication. The github repo has a detailed "getting started" on the readme.

    Kanidm Github

    In addition Kanidm has spawn a number of adjacent projects in the Rust ecosystem such as LDAP, Kerberos, Webauthn, and cryptography libraries.

    In this hack week, we'll be working on Quokca, a certificate authority that supports PKCS11/TPM storage of keys, issuance of PIV certificates, and ACME without the feature gatekeeping implemented by other CA's like smallstep.

    For anyone who wants to participate in Kanidm, we have documentation and developer guides which can help.

    I'm happy to help and share more, so please get in touch!


    Write an url shortener in Rust (And learn in the way) by szarate

    So I have 469.icu :), it's currently doing nothing... (and for sale) but in the meantime, I'd like to write an url shortener from scratch and deploy it on my own server

    https://github.com/foursixnine/url-manager-rs/tree/main


    Better diff'ing experience by MSirringhaus

    Description

    For diff-ing directories, I usually like to use meld, but it struggles a lot with large trees. Experiment with writing a TUI meld-clone for diffing directories and files

    Goals

    Get first prototype going of a TUI that can show

    • diffs of text-files
    • diffs of directories.

    Stretch goals

    • Themes
    • Filters (no whitespace, etc.)
    • Live config changes (Show/hide line numbers, etc.)


    Implement a CLI tool for Trento - trentoctl by nkopliku

    Description

    Implement a trentoctl CLI for interacting with a trento installation

    Goals

    • learn rust
    • implement an initial trentoctl tool to enhance trento automation
    • have fun

    Resources

    trento rust. TUIs listed on this other hackweek project Hack on rich terminal user interfaces


    Hacking on sched_ext by flonnegren

    Description

    Sched_ext upstream has some interesting issues open for grabs:

    Goals

    Send patches to sched_ext upstream

    Also set up perfetto to trace some of the example schedulers.

    Resources

    https://github.com/sched-ext/scx


    Dartboard TUI by IValentin

    Description

    Our scalability and performance testing swiss-army knife tool Dartboard is a major WIP so why not add more scope creep? Dartboard is a cli tool which enables users to:

    • Define a "Dart" config file as YAML which defines the various components to be created/setup when Dartboard runs its commands
    • Spin up infrastructure utilizing opentofu/terraform providers
    • Setup K3s or RKE2 clusters on the newly created infrastructure
    • Deploy Rancher (with or without downstream cluster), rancher-monitoring (Grafana + Prometheus)
    • Create resources in-bulk within the newly created Rancher cluster (ConfigMaps, Secrets, Users, Roles, etc.)
    • Run various performance and scalability tests via k6
    • Export/Import various tracked metrics (WIP)

    Given all these features (and the features to come), it can be difficult to onboard and transfer knowledge of the tool. With a TUI, Dartboard's usage complexity can be greatly reduced!

    Goals

    • Create a TUI for Dartboard's "subcommands"
    • Gain more familiarity with Dartboard and create a more user-friendly interface to enable others to use it
    • Stretch Create a TUI workflow for generating a Dart file

    Resources

    https://github.com/charmbracelet/bubbletea


    Resurrect NWS CLI project by seanmarlow

    Project Description

    Many years back I created a simple python based CLI package that wrapped the NWS API to get weather forecasts, discussions and current conditions. Meanwhile I have not had time to keep it up-to-date so many pieces are broken or using deprecated features of the REST API. The package is useful to get weather information much quicker from CLI than clicking through the NWS website.

    Goal for this Hackweek

    The goal for this project is update and fix the package as well as add new features. Also, the documentation can be updated to be more thorough and useful.

    Project URL: https://github.com/smarlowucf/wxcast

    Tasks

    • [x] Use Github actions instead of travis
    • [x] Move metar to nws api
    • [x] Convert string formatting to use F strings
    • [x] Add get WFO info
    • [x] Get a list of stations for wfo
    • [x] Get station info
    • [x] Fix 7 day forecast
    • [x] Add temp unit option to metar
    • [x] Add alias to metar for decoded version with conditions
    • [x] Add/update documentation
    • [x] Release new major version


    suse-rancher-supportconfig by eminguez

    Description

    Update: Live at https://github.com/e-minguez/suse-rancher-supportconfig I finally didn't used golang but used gum instead add-emoji

    SUSE's supportconfig support tool collects data from the SUSE Operating system. Rancher's rancher2_logs_collector.sh support tool does the same for RKE2/K3s.

    Wouldn't be nice to have a way to run both and collect all data for SUSE based RKE2/K3s clusters? Wouldn't be even better with a fancy TUI tool like bubbletea?

    Ideally the output should be an html page where you can see the logs/data directly from the browser.

    Goals

    • Familiarize myself with both supportconfig and rancher2_logs_collector.sh tools
    • Refresh my golang knowledge
    • Have something that works at the end of the hackweek ("works" may vary add-emoji )
    • Be better in naming things

    Resources

    All links provided above as well as huh


    file-organizer: A CLI Tool for Efficient File Management by okhatavkar

    Description

    Create a Go-based CLI tool that helps organize files in a specified folder by sorting them into subdirectories based on defined criteria, such as file type or creation date. Users will pass a folder path as an argument, and the tool will process and organize the files within it.

    Goals

    • Develop Go skills by building a practical command-line application.
    • Learn to manage and manipulate files and directories in Go using standard libraries.
    • Create a tool that simplifies file management, making it easier to organize and maintain directories.

    Resources

    • Go Standard Libraries: Utilize os, filepath, and time for file operations.
    • CLI Development: Use flag for basic argument parsing or consider cobra for enhanced functionality.
    • Go Learning Material: Go by Example and The Go Programming Language Documentation.

    Features

    • File Type Sorting: Automatically move files into subdirectories based on their extensions (e.g., documents, images, videos).
    • Date-Based Organization: Add an option to organize files by creation date into year/month folders.
    • User-Friendly CLI: Build intuitive commands and clear outputs for ease of use. This version maintains the core idea of organizing files efficiently while focusing on Go development and practical file management.


    A CLI for Harvester by mohamed.belgaied

    [comment]: # Harvester does not officially come with a CLI tool, the user is supposed to interact with Harvester mostly through the UI [comment]: # Though it is theoretically possible to use kubectl to interact with Harvester, the manipulation of Kubevirt YAML objects is absolutely not user friendly. [comment]: # Inspired by tools like multipass from Canonical to easily and rapidly create one of multiple VMs, I began the development of Harvester CLI. Currently, it works but Harvester CLI needs some love to be up-to-date with Harvester v1.0.2 and needs some bug fixes and improvements as well.

    Project Description

    Harvester CLI is a command line interface tool written in Go, designed to simplify interfacing with a Harvester cluster as a user. It is especially useful for testing purposes as you can easily and rapidly create VMs in Harvester by providing a simple command such as: harvester vm create my-vm --count 5 to create 5 VMs named my-vm-01 to my-vm-05.

    asciicast

    Harvester CLI is functional but needs a number of improvements: up-to-date functionality with Harvester v1.0.2 (some minor issues right now), modifying the default behaviour to create an opensuse VM instead of an ubuntu VM, solve some bugs, etc.

    Github Repo for Harvester CLI: https://github.com/belgaied2/harvester-cli

    Done in previous Hackweeks

    • Create a Github actions pipeline to automatically integrate Harvester CLI to Homebrew repositories: DONE
    • Automatically package Harvester CLI for OpenSUSE / Redhat RPMs or DEBs: DONE

    Goal for this Hackweek

    The goal for this Hackweek is to bring Harvester CLI up-to-speed with latest Harvester versions (v1.3.X and v1.4.X), and improve the code quality as well as implement some simple features and bug fixes.

    Some nice additions might be: * Improve handling of namespaced objects * Add features, such as network management or Load Balancer creation ? * Add more unit tests and, why not, e2e tests * Improve CI * Improve the overall code quality * Test the program and create issues for it

    Issue list is here: https://github.com/belgaied2/harvester-cli/issues

    Resources

    The project is written in Go, and using client-go the Kubernetes Go Client libraries to communicate with the Harvester API (which is Kubernetes in fact). Welcome contributions are:

    • Testing it and creating issues
    • Documentation
    • Go code improvement

    What you might learn

    Harvester CLI might be interesting to you if you want to learn more about:

    • GitHub Actions
    • Harvester as a SUSE Product
    • Go programming language
    • Kubernetes API