Rancher Support Matrix CLI Helper

A tool to bring the Rancher Support Matrix info into your CLI.

Update: This project was not completed during hackweek 22, however will still continue development as possible and our team is excited to continue the efforts next year! We did make significant progress on both: a) producing a JSON static API scheme and b) a system to store the Rancher release version support information.

Project Description

The goal of this tool (for V1) is quite simply to pull up the Support Matrix info based on user input.

Project Components

CLI Tool - GoLang

This is the meat and potatoes of the Hackweek project. The other parts are important, but are all a means to this end.

The goal is to build it in Go so as to provide a native binary for each platform. This also keeps things close to K8s and Rancher, as opposed to Rust or other popular CLI languages.

Support Matrix Structured Data/API

This component is the data backing the CLI tool - it will be provided as a blob of structured data hosted on GH pages.

In a strict sense this (mostly) static data will function as if it were an API - however it is not interactive at all. It will simply be a statically rendered blob of data hosted online. So only pure GET requests rather than all the HTTP verbs like a true API. The final Scheme of this "API" has not been decided yet - however it will be informed by the needs of the CLI tool.

Matrix Refresh Tool

This component will be used to keep the publish Support Matrix Structured Data fresh and in sync.

Currently the data is not published in a way that is structured. This means we need to either: a) manually massage the data into the right formats, or b) create a system to sync that information. This tool is currently the furthest developed part of the project - having a mostly working proof of concept completed.

It is unlikely that this tool will be published in the open. It merely exists as an "internal" tool to facilitate publishing the data in a structured way. Similarly, this tool is least likely to need collaboration for Hackweek as the other components are the real goal.

Inspiration

As a Premium Support Engineer focused on Rancher we often need to review the support matrix. This is critical to ensure the Rancher instance is properly configured within the expected versions. While doing this via the webpage is fine, as tech staff we often spend a lot of time in CLIs. To that end bringing this essential tool even closer to our "main workflows" is a no brainer.

Mentioned above, the initial goal of hack week is simply to provide the information via CLI report. While more could potentially be achieved within Hackweek, this conservative goal was selected to allow enough time to organize the data at hand. The project will be in much better footing when this data is organized and refresh methods established.

Down the road it can be expanded to provide more functionality. E.g. Validation mode - enter all the versions in use and it will highlight potential issues, Upgrade Path - input current versions and desired Rancher version.

Goal for this Hackweek

  • Establish a structured data source for Support Matrix,
  • Publish (to GitHub pages) the structured data version of Support Matrix,
  • Create a (golang) CLI tool to provide Support matrix info.

Resources

Looking for hackers with the skills:

rancher cli go golang

This project is part of:

Hack Week 21

Activity

  • almost 2 years ago: kmaneshni joined this project.
  • almost 2 years ago: kmaneshni liked this project.
  • almost 2 years ago: mrussell liked this project.
  • almost 2 years ago: nyounker joined this project.
  • almost 2 years ago: nyounker liked this project.
  • almost 2 years ago: dpock joined this project.
  • almost 2 years ago: inichols liked this project.
  • almost 2 years ago: dpock added keyword "cli" to this project.
  • almost 2 years ago: dpock added keyword "go" to this project.
  • almost 2 years ago: dpock added keyword "golang" to this project.
  • almost 2 years ago: inichols started this project.
  • almost 2 years ago: dpock added keyword "rancher" to this project.
  • almost 2 years ago: dpock originated this project.

  • Comments

    • dpock
      almost 2 years ago by dpock | Reply

      Just wanted to give a brief update on the progress as it's mid-week already.

      Ian and Myself have been working together on the design for the "structured data" version of the matrix. Our hope is that we will be able to land on a good format to export that as and publish a few versions worth of the data. Then start working on the golang CLI client that is the "real end goal".

      Even though these parts I've been working on are just "bootstrap" work to get the CLI project started it's been great learning. I've updated the project info a bit to reflect some changes. I also published a mermaidjs diagram of the DB design being used for the CLI import tool here - https://gist.github.com/mallardduck/6bc19ed05029132370b8dda6b603f99e.

    • dpock
      almost 2 years ago by dpock | Reply

      Here is an example of the API we created for the "index":

      ○ → curl http://rancher-support-matrix-full.test/ |jq
      {
        "about": "This is a static API that contains the Support information for Rancher releases!",
        "base_url": "http://rancher-support-matrix-full.test",
        "routes": {
          "api.rancherRelease": "api/release/{rancherRelease}.json",
          "api.rancherRelease.rkeK8sRuntimes": "api/release/{rancherRelease}/RkeK8sRuntimes.json",
          "api.rancherRelease.rkeK8sRuntimePair": "api/release/{rancherRelease}/RkeK8sRuntimePair.json",
          "api.rancherRelease.rkeDistroVersionDockerPair": "api/release/{rancherRelease}/RkeDistroVersionDockerPair.json",
          "api.rancherRelease.hostedRuntimes": "api/release/{rancherRelease}/HostedRuntimeVersions.json"
        },
        "rancherReleases": [
          {
            "data": {
              "version": "2.6.3"
            },
            "links": {
              "self": "http://rancher-support-matrix-full.test/api/release/2.6.3.json"
            }
          }
        ]
      }
      

    • dpock
      almost 2 years ago by dpock | Reply

      And here is one for the 2.6.3 release -note it's not complete and only includes RKE and hosted runtime info:

      ○ → curl http://rancher-support-matrix-full.test/api/release/2.6.3.json |jq
      {
        "data": {
          "version": "2.6.3"
        },
        "relationships": {
          "rkeK8sRuntimes": {
            "data": [
              {
                "version": "v1.21.7"
              },
              {
                "version": "v1.20.13"
              },
              {
                "version": "v1.19.16"
              },
              {
                "version": "v1.18.20"
              }
            ],
            "links": {
              "self": "http://rancher-support-matrix-full.test/api/release/2.6.3/RkeK8sRuntimes.json"
            }
          },
          "rkeCliRuntimePairs": [
            {
              "data": {
                "cli": "v1.3.3",
                "k8sRuntime": "v1.21.7"
              }
            },
            {
              "data": {
                "cli": "v1.3.3",
                "k8sRuntime": "v1.20.13"
              }
            },
            {
              "data": {
                "cli": "v1.3.3",
                "k8sRuntime": "v1.19.16"
              }
            },
            {
              "data": {
                "cli": "v1.3.3",
                "k8sRuntime": "v1.18.20"
              }
            }
          ],
          "rkeDistroVersionDockerPair": [
            {
              "data": {
                "distro": "centos",
                "version": "7.7",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "centos",
                "version": "7.7",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "centos",
                "version": "7.8",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "centos",
                "version": "7.8",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "centos",
                "version": "7.9",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "centos",
                "version": "7.9",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "centos",
                "version": "8.3",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "centos",
                "version": "8.3",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "centos",
                "version": "8.4",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "centos",
                "version": "8.4",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "rocky-linux",
                "version": "8.4",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "rocky-linux",
                "version": "8.4",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "oracle-linux",
                "version": "7.7",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "oracle-linux",
                "version": "7.7",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "oracle-linux",
                "version": "7.9",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "oracle-linux",
                "version": "7.9",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "oracle-linux",
                "version": "8.2",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "oracle-linux",
                "version": "8.2",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "oracle-linux",
                "version": "8.3",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "oracle-linux",
                "version": "8.3",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "oracle-linux",
                "version": "8.4",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "oracle-linux",
                "version": "8.4",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "rhel",
                "version": "7.7",
                "docker": "1.13.x"
              }
            },
            {
              "data": {
                "distro": "rhel",
                "version": "7.7",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "rhel",
                "version": "7.7",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "rhel",
                "version": "7.8",
                "docker": "1.13.x"
              }
            },
            {
              "data": {
                "distro": "rhel",
                "version": "7.8",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "rhel",
                "version": "7.8",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "rhel",
                "version": "7.9",
                "docker": "1.13.x"
              }
            },
            {
              "data": {
                "distro": "rhel",
                "version": "7.9",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "rhel",
                "version": "7.9",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "rhel",
                "version": "8.2",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "rhel",
                "version": "8.2",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "rhel",
                "version": "8.3",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "rhel",
                "version": "8.3",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "rhel",
                "version": "8.4",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "rhel",
                "version": "8.4",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "sles",
                "version": "12 SP5",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "sles",
                "version": "12 SP5",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "sles",
                "version": "15SP1",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "sles",
                "version": "15SP1",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "sles",
                "version": "15SP2",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "sles",
                "version": "15SP2",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "sles",
                "version": "15SP3",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "sles",
                "version": "15SP3",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "opensuse-leap",
                "version": "15.3",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "opensuse-leap",
                "version": "15.3",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "ubuntu",
                "version": "18.04",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "ubuntu",
                "version": "18.04",
                "docker": "20.10.x"
              }
            },
            {
              "data": {
                "distro": "ubuntu",
                "version": "20.04",
                "docker": "19.03.x"
              }
            },
            {
              "data": {
                "distro": "ubuntu",
                "version": "20.04",
                "docker": "20.10.x"
              }
            }
          ],
          "hostedRuntimeVersions": {
            "data": [
              {
                "provider": "aks",
                "version": "v1.20.9"
              },
              {
                "provider": "eks",
                "version": "v1.20.x"
              },
              {
                "provider": "gke",
                "version": "v1.21.5-gke.1302"
              }
            ],
            "links": {
              "self": "http://rancher-support-matrix-full.test/api/release/2.6.3/HostedRuntimeVersions.json"
            }
          }
        },
        "links": {
          "self": "http://rancher-support-matrix-full.test/api/release/2.6.3.json"
        }
      }
      

    Similar Projects

    Rancher Upgrader - Upgrades your rancher install via helm, and communicates critical changes from release A to B. by rweir

    [comment]: # (Please use the project descriptio...


    A CLI for Harvester by mohamed.belgaied

    [comment]: # Harvester does not officially come...


    Hangar: tool for mirror container images & generate rancher image lists. by StarryWang

    Project Description

    Hangar is a tool for ...


    HAKube UI plugin for Rancher by epenchev

    [comment]: # (Please use the project descriptio...


    Rancher Upgrader - Upgrades your rancher install via helm, and communicates critical changes from release A to B. by rweir

    [comment]: # (Please use the project descriptio...


    A CLI for Harvester by mohamed.belgaied

    [comment]: # Harvester does not officially come...


    (Rust) Manage systems in NetBox using NetBox-Sync by chock

    [comment]: # (Please use the project descriptio...


    WebUI for your data by avicenzi

    [comment]: # (Please use the project descriptio...


    Learn Golang contribuing to opensource projects by mbussolotto

    Project Description

    Get practice in Golan...


    Rancher Upgrader - Upgrades your rancher install via helm, and communicates critical changes from release A to B. by rweir

    [comment]: # (Please use the project descriptio...


    A CLI for Harvester by mohamed.belgaied

    [comment]: # Harvester does not officially come...


    Cluster API Provider for Harvester by rcase

    [comment]: # (Please use the project descriptio...


    A CLI for Harvester by mohamed.belgaied

    [comment]: # Harvester does not officially come...


    Gameboy emulator written in Go by mikeletux

    [comment]: # (Please use the project descriptio...


    terraform-provider-feilong by e_bischoff

    Project Description

    People need to test o...


    WebUI for your data by avicenzi

    [comment]: # (Please use the project descriptio...


    Rancher Upgrader - Upgrades your rancher install via helm, and communicates critical changes from release A to B. by rweir

    [comment]: # (Please use the project descriptio...