Skip to content

Opensource (premised) development lab for AI-ML-HPC-Blockchain & Emergent Technologies

License

Notifications You must be signed in to change notification settings

dev2deploy/OPENLABB

Repository files navigation

OPENLABB

@@An opensource (premised) development lab for localized testing of modernizing, emergent technologies.@@

xxx The repository is mostly focused on a modest kubernetes cluster with one control plane/node running all of our self hosted services and storage, but it also serves as the Infrastructure-as-Code (IaC) for an entire homelab network and devices, to include: a VyOS gateway/firewall, a couple of workstations, wireless devices, and a Ubiquiti Unifi switch. Ultimately, this will include all applications for managing home IT systems.

devlab build deets

dev2deploy-cover-1500x500

This OPENLABB Repository contains devlab documentation files: notes, setups, and configurations for infrastructure, applications, networking, +more.

⚠️ Be aware, products can change over time. We do our best to keep up with the latest changes and releases, but please understand that this won’t always be the case.

Info is created as free resources to be used in your own specific use cases. If you're searching for detailed, in-depth tutorials on some tools or technologies, check out our YouTube Channel or BLOG.

devlab Features

Primary deployments and features within the devlab:

  • OpenStack and Red Hat OpenShift as bare-metal hypervisors for AI-ML-HPC, blockchain and container development and testing
  • VyOS implemented as a firewall with Bitdefender Gravity Zone for security are deployed via Proxmox-Ceph ha-clusters
  • TrueNas Scale cluster has also been implemented as NAS
  • Kubernetes cluster deployment using kubeadm
  • Infrastructure Automation with Ansible to provision hosts, clusters, devices, etc.
  • Offline Root CA / Scripted PKI management using openssl(1)
  • Manage cluster state and apps using GitOps and ArgoCD
  • FreeIPA server
  • RADIUS server
  • Remote access via VPN

devlab Getting Started

python3 -m venv .venv
source .venv/bin/activate
pip install -U -r requirements.txt
ansible-galaxy collection install -U -r requirements.yaml
ansible-playbook homelab.yml

devlab Tech Stack

Click Here

Contribution

As this is our personal devlab documentation, we do not accept any contributions. Feel free to fork the repository and use it for your own documentation.

Other Resources

  • Dotfiles - Our config files on macOS
  • Boilerplates - Templates for various projects like Docker, K8S, Ansible, etc
  • Cheat-Sheets - Command Reference for various tools and technologies
  • Videos - Documentation and project files for all our video tutorials on YouTube

Support Us

Creating high-quality videos and valuable resources that are accessible to everyone, free of charge, is a huge challenge. With your contribution, we can dedicate more time and effort into the creation process, which ultimately enhances the quality of the content. So, all your support, by becoming a member, truly makes a significant impact on what we do. And you’ll also get some cool benefits and perks in return, as a recognition of your support.

Remember, supporting us is entirely optional. Your choice to become a member or not won't change your access to my videos and resources. You are also welcome to reach out to us on Discord, if you have any questions or feedback.

https://www.patreon.com/dev2deploy

Homelab

K8S cluster built with Ansible and managed using ArgoCD for GitOps

Discord    k8s    debian    GitHub last commit

WTFPL    Linters    Libraries.io dependency status for GitHub repo


🍇 Cluster

Infrastructure Automation

Host buildout is handled by [Ansible][ansible-uri] automation. The whole lab is built out from a top level playbook, with segment specific playbooks under the playbooks/ directory. (As a convention, all Ansible yaml files are suffixed .yml to allow VSCode to distinguish between those and all other yaml files.) The full task list can be found in the infrastructure folder, but as an overview, it will:

  • Install system packages and any other necessary system related setup
  • Pull down cluster images and binaries
  • Install container runtime and start kubelet
  • Run kubeadm to setup to create cluster
  • Creates a separate user to continue setting up the cluster with to get away from using the admin credentials
  • Applies CNI configuration
  • Generates Application files for every cluster app and drops them into cluster/bootstrap and Kustomization files intocluster/apps for the respective apps
  • Bootstraps the cluster by starting ArgoCD and then applying cluster/cluster.yaml

GitOps

[ArgoCD][argocd-uri] watches all subfolders under the cluster folder (see Directories below) and makes the changes to my cluster based on the YAML manifests.

The way Argo works for me here is (almost) every file in the cluster/bootstrap directory will define an argoproj.io/v1alpha1/Application that points to a corresponding folder under cluster/apps. The Application will apply any manifest files it finds in that directory, in addition to any Helm Charts or Kustomizations that may also be defined within the Application's spec. One or more Helm values.yaml files are in each directory and each helm definition in the Application refers to the specific values file to apply to that chart.

Directories

This Git repository contains the following top level directories.

📁 cluster         # Kubernetes cluster defined in code
├─📁 apps          # Apps deployed into my cluster grouped by namespace
├─📁 argocd        # Main Argo configuration of repository
└─📁 bootstrap     # Cluster initialization flies (Argo Applications) also grouped by namespace
📁 infrastructure  # Ansible files
├─📁 inventory     # Defines Host configurations and widest scoped variables
├─📁 pki           # Self-signed CA and subordinate CA certs for whole house and cluster
├─📁 roles         # Ansible roles that define the actual steps to accomplish these tasks
└─📁 terraform     # Terraform config for building VM hosts
📁 playbooks       # Ansible playbooks

🎩 Tip of the Cap: