diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml new file mode 100644 index 0000000..0a853ee --- /dev/null +++ b/.github/workflows/site.yml @@ -0,0 +1,36 @@ +--- +name: site + +on: + push: + branches: [main] + paths: ["docs/**", "mkdocs.yml", "flake.*"] + pull_request: + branches: [main] + paths: ["docs/**", "mkdocs.yml", "flake.*"] + +jobs: + site: + name: Build Site + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + + - name: "Install Nix ❄️" + uses: cachix/install-nix-action@6a9a9e84a173d90b3ffb42c5ddaf9ea033fad011 # v23 + + - name: "Build 🛠️" + run: "nix build .#site" + + - name: "Deploy 🚀" + if: ${{ github.ref == 'refs/heads/main' }} + uses: crazy-max/ghaction-github-pages@v3.2.0 + with: + target_branch: gh-pages + build_dir: result + follow_symlinks: true + keep_history: false + fqdn: jesusmtnez.es + jekyll: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update-flakes.yml b/.github/workflows/update-flakes.yml index 75c00bb..c49271c 100644 --- a/.github/workflows/update-flakes.yml +++ b/.github/workflows/update-flakes.yml @@ -4,7 +4,7 @@ name: update-flake on: workflow_dispatch: # allows manual triggering schedule: - - cron: '0 4 * * 1' # runs weekly on Monday at 04:00 UTC + - cron: "0 4 * * 1" # runs weekly on Monday at 04:00 UTC jobs: lockfile: diff --git a/.gitignore b/.gitignore index 58115b1..f9ba3ba 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ kubeconfig # project **/env.secrets + +# mkdocs +site/ diff --git a/LICENSE b/LICENSE index 65cc775..7d270a6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 JesusMtnez +Copyright (c) 2021-2023 JesusMtnez Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/README.md b/README.md index 8894aca..d537d6b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -# Homelab +# [Homelab][homelab] _my home infrastructure and Kubernetes cluster_ @@ -18,50 +18,6 @@ _my home infrastructure and Kubernetes cluster_ [NIX-link]: https://builtwithnix.org [K3S-badge]: https://img.shields.io/badge/k3s-v1.28-blue?style=flat-square&logo=k3s&logoColor=yellow [K3S-link]: https://k3s.io + [homelab]: https://jesusmtnez.es/homelab -## 💻 Hardware - -| Device | Count | RAM | Disks | OS | Arch | Purpose | -| ---------------- | ----- | ------ | ------------------- | ------ | ----- | ------------ | -| Synology DS216j | 1 | 512 MB | WD Red Nas 4TB (x2) | DSM 7 | armv7 | NFS + NAS | -| Raspberry Pi 1B | 1 | 512 MB | SD 32GB | DietPi | armv6 | DNS (PiHole) | -| Raspberry Pi 3 | 5 | 1 GB | SD 32GB | DietPi | armv7 | Kubernetes | - -## 📂 Repository structure - -The Git repository contains the following directories: - -```sh -📁 ansible # Ansible playbooks / roles to setup all the infrastructure -📁 archive # unused / old applications -📁 kubernetes # Kubernetes cluster defined as code -├─📁 apps # Apps deployed into the cluster grouped by namespace -└─📁 bootstrap # not used yet -``` - -## Playbooks - -### `entware-install` playbook - -Install and configure [Entware][entware] for Synology DSM following [this instructions][entware-dsm]. - - [entware]: https://github.com/Entware/Entware/ - [entware-dsm]: https://github.com/Entware/Entware/wiki/Install-on-Synology-NAS - -### `k3s-install` playbook - -Install or upgrade k3s cluster deployment using k3sup. - -### `upgrade` playbook - -Upgrade DietPi systems using `apt` and `dietpi` upgrader. Upgrade DSM python installatio in Synology. - -## Credits to: - -- [k3s](https://k3s.io) by [Rancher](https://rancher.com/) -- [alexellis/k3sup](https://github.com/alexellis/k3sup) -- [OmegaSquad82/ansible-k3sup](https://github.com/OmegaSquad82/ansible-k3sup) -- [k3s-io/k3s-ansible](https://github.com/k3s-io/k3s-ansible) -- [k8s-at-home/template-cluster-k3s](https://github.com/k8s-at-home/template-cluster-k3s/) -- [onedr0p/home-ops](https://github.com/onedr0p/home-ops) -- [onedr0p/flux-cluster-template](https://github.com/onedr0p/flux-cluster-template) +**Find all the information at**: https://jesusmtnez.es/homelab diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..fc009e1 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,67 @@ +