Enhance ansible usage in orthos

What is this about

ansible is an interesting approach to manage machines inside a network, cluster, data center,... If you already have some background, great! If you want to learn more about what this new technology is..., even better. Come in, join and play with it.

Orthos already makes use of ansible to scan machine inventory, but it's not implemented well:

  • Some data (json based result file) is mapped wrongly (e.g. cpu core count on ARM)
  • Some is missing, e.g. which distro got installed is still done by old scripts
  • A not well implemented inventory.yml creation should get replaced by using mainline dynamic ansible inventory plugin: cobbler.py
  • Ideally the inventory.yml could get kind of exported, so that the ordinary users can make use of it and by that have all ansible scripts/plugins available to users to configure, connect, monitor via ansible roles and scripts our machines.

Related github projects:

  • https://github.com/openSUSE/orthos2
  • https://github.com/ansible-collections/community.general/blob/main/plugins/inventory/cobbler.py
  • https://github.com/cobbler/cobbler

Alternative/Additionals:

I can help and point to where one could enhance our installations by:

  • Ubuntu/Centos/Windows/others
  • Fiddle out cobbler/orthos into separate services and try to package them into containers

Resources

This is about #installation #ansible #cobbler #orthos #django #python #fun

Looking for hackers with the skills:

python3 django installation ansible

This project is part of:

Hack Week 22

Activity

  • almost 2 years ago: trenn added keyword "python3" to this project.
  • almost 2 years ago: trenn added keyword "django" to this project.
  • almost 2 years ago: trenn added keyword "installation" to this project.
  • almost 2 years ago: trenn added keyword "ansible" to this project.
  • almost 2 years ago: trenn originated this project.

  • Comments

    • pgarciaq
      almost 2 years ago by pgarciaq | Reply

      Are you aware of Beaker? That's the Red Hat equivalent to Orthos, and it's already Ansible-aware.

      https://beaker-project.org/ https://doc.distributed-ci.io/ansible-playbook-dci-beaker/

    Similar Projects

    Symbol Relations by hli

    Description

    There are tools to build function call graphs based on parsing source code, for example, cscope.

    This project aims to achieve a similar goal by directly parsing the disasembly (i.e. objdump) of a compiled binary. The assembly code is what the CPU sees, therefore more "direct". This may be useful in certain scenarios, such as gdb/crash debugging.

    Detailed description and Demos can be found in the README file:

    Supports x86 for now (because my customers only use x86 machines), but support for other architectures can be added easily.

    Tested with python3.6

    Goals

    Any comments are welcome.

    Resources

    https://github.com/lhb-cafe/SymbolRelations

    symrellib.py: mplements the symbol relation graph and the disassembly parser

    symrel_tracer*.py: implements tracing (-t option)

    symrel.py: "cli parser"


    Selenium with Python by xguo

    Description

    Try to create test case about Selenium base on Python

    Goals

    • Knowledge about Selenium with Python
    • Create new test case about Selenium

    Resources

    https://selenium-python.readthedocs.io/ https://www.selenium.dev/


    Small healthcheck tool for Longhorn by mbrookhuis

    Project Description

    We have often problems (e.g. pods not starting) that are related to PVCs not running, cluster (nodes) not all up or deployments not running or completely running. This all prevents administration activities. Having something that can regular be run to validate the status of the cluster would be helpful, and not as of today do a lot of manual tasks.

    As addition (read enough time), we could add changing reservation, adding new disks, etc. --> This didn't made it. But the scripts can easily be adopted.

    This tool would decrease troubleshooting time, giving admins rights to the rancher GUI and could be used in automation.

    Goal for this Hackweek

    At the end we should have a small python tool that is doing a (very) basic health check on nodes, deployments and PVCs. First attempt was to make it in golang, but that was taking to much time.

    Overview

    This tool will run a simple healthcheck on a kubernetes cluster. It will perform the following actions:

    • node check: This will check all nodes, and display the status and the k3s version. If the status of the nodes is not "Ready" (this should be only reported), the cluster will be reported as having problems

    • deployment check: This check will list all deployments, and display the number of expected replicas and the used replica. If there are unused replicas this will be displayed. The cluster will be reported as having problems.

    • pvc check: This check will list of all pvc's, and display the status and the robustness. If the robustness is not "Healthy", the cluster will be reported as having problems.

    If there is a problem registered in the checks, there will be a warning that the cluster is not healthy and the program will exit with 1.

    The script has 1 mandatory parameter and that is the kubeconf of the cluster or of a node off the cluster.

    The code is writen for Python 3.11, but will also work on 3.6 (the default with SLES15.x). There is a venv present that will contain all needed packages. Also, the script can be run on the cluster itself or any other linux server.

    Installation

    To install this project, perform the following steps:

    • Create the directory /opt/k8s-check

    mkdir /opt/k8s-check

    • Copy all the file to this directory and make the following changes:

    chmod +x k8s-check.py


    Ansible for add-on management by lmanfredi

    Description

    Machines can contains various combinations of add-ons and are often modified during the time.

    The list of repos can change so I would like to create an automation able to reset the status to a given state, based on metadata available for these machines

    Goals

    Create an Ansible automation able to take care of add-on (repo list) configuration using metadata as reference

    Resources

    Results

    Created WIP project Ansible-add-on-openSUSE