Skip to content

Commit

Permalink
Remove Longhorn installation documentation and update README to inclu…
Browse files Browse the repository at this point in the history
…de new setup guide
  • Loading branch information
EliasDeHondt committed Dec 22, 2024
1 parent 6fb5cd6 commit 8e3de3e
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 117 deletions.
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
![logo](https://eliasdh.com/assets/media/images/logo-github.png)
# 💙🤍Install Longhorn🤍💙
# 💙🤍Setup Longhorn🤍💙

## 📘Table of Contents

1. [📘Table of Contents](#📘table-of-contents)
2. [🖖Introduction](#🖖introduction)
3. [✨Steps](#✨steps)
1. [👉Step 1: Set up environment](#👉step-1-set-up-environment)
1. [👉Step 1: Test if the system is ready for Longhorn](#👉step-1-test-if-the-system-is-ready-for-longhorn)
2. [👉Step 2: Install Longhorn](#👉step-2-install-longhorn)
3. [👉Step 3: Access the Longhorn UI](#👉step-3-access-the-longhorn-ui)
3. [👉Step 3: Check the status of the pods](#👉step-3-check-the-status-of-the-pods)
4. [👉Step 4: Check the status of the Longhorn system](#👉step-4-check-the-status-of-the-longhorn-system)
5. [👉Step 5: Get the storage class](#👉step-5-get-the-storage-class)
6. [👉Step 6: Create a basic authentication file](#👉step-6-create-a-basic-authentication-file)
7. [👉Step 7: Create a secret](#👉step-7-create-a-secret)
8. [👉Step 8: Set up a ingress controller](#👉step-8-set-up-a-ingress-controller)
9. [👉Step 9: Access the Longhorn UI](#👉step-9-access-the-longhorn-ui)
4. [🔗Links](#🔗links)

---

## 🖖Introduction

This guide will help you install Longhorn on a Kubernetes cluster. Longhorn is a distributed block storage system for Kubernetes. It is built using containers and microservices. Longhorn creates a dedicated storage controller for each block device volume and synchronously replicates the volume across multiple replicas stored on multiple nodes. The storage controller and replicas are themselves orchestrated using Kubernetes. Longhorn is lightweight, reliable, and easy to use.
This document provides a step-by-step guide to installing `Longhorn` on the servers (nodes) in the supercluster. The steps outlined in this document are essential for ensuring the proper functioning of the servers (nodes) and the supercluster.

## ✨Steps

### 👉Step 1: Set up environment
### 👉Step 1: Test if the system is ready for Longhorn

- Update and upgrade the system.
```bash
sudo apt-get update && sudo apt-get upgrade -y
```

- Test if the system is ready for Longhorn.
```bash
bash <(curl -s https://raw.githubusercontent.com/longhorn/longhorn/refs/tags/v1.7.2/scripts/environment_check.sh)
```
Expand Down Expand Up @@ -57,7 +57,6 @@ dpkg -l | grep nfs-common # Check if the nfs-common pa

### 👉Step 2: Install Longhorn

- Install Longhorn.
```bash
kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v1.7.2/deploy/longhorn.yaml
# kubectl delete -f https://raw.githubusercontent.com/longhorn/longhorn/v1.7.2/deploy/longhorn.yaml
Expand All @@ -67,51 +66,51 @@ kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v1.7.2/depl
# kubectl replace --raw "/api/v1/namespaces/longhorn-system/finalize" -f longhorn-system.json
```

- Check the status of the pods.
### 👉Step 3: Check the status of the pods

```bash
kubectl get pods --namespace longhorn-system --watch
kubectl get pods --namespace longhorn-system --watch # OPTIONAL
```

- Check the status of the Longhorn system.
### 👉Step 4: Check the status of the Longhorn system

```bash
kubectl -n longhorn-system get pods
kubectl -n longhorn-system get pods # OPTIONAL
```

- Get the storage class.
### 👉Step 5: Get the storage class

```bash
kubectl get storageclass
kubectl get storageclass # OPTIONAL
```

### 👉Step 3: Access the Longhorn UI
### 👉Step 6: Create a basic authentication file

- Create a basic authentication file.
```bash
USER=<USERNAME_HERE>; PASSWORD=<PASSWORD_HERE>; echo "${USER}:$(openssl passwd -stdin -apr1 <<< ${PASSWORD})" >> auth
```

- Create a secret.
### 👉Step 7: Create a secret

```bash
kubectl create secret generic basic-auth -n longhorn-system --from-file=auth
rm auth
# kubectl delete secret basic-auth -n longhorn-system
```

- Set up a ingress controller.
### 👉Step 8: Set up a ingress controller

```bash
kubectl apply -f Ingress.yaml
# Service name: longhorn-frontend
# Namespace: longhorn-system
# Port: 8080
```

- Access the Longhorn UI.
```bash
kubectl get ingress -A
```
### 👉Step 9: Access the Longhorn UI

- Test the Longhorn UI.
```bash
curl http://<EXTERNAL_IP> # <EXTERNAL_IP> is the IP address of the ingress controller
kubectl get ingress -A
```

## 🔗Links
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Please also see following documents:
1. [Setup Cert Manager](Documentation/Setup-CertManager.md).
2. [Setup Metallb](Documentation/Setup-Metallb.md).
3. [Setup Nginx Ingress](Documentation/Setup-NginxIngress.md).
4. [Setup Longhorn](Documentation/Setup-Longhorn.md).

## 🌌Supercluster Design

Expand Down
18 changes: 9 additions & 9 deletions Supercluster/Cluster01/Metallb/IPAddressPool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ spec:
- 192.168.1.200-192.168.1.250 # 50 addresses.
---
# This is a static IP address for the proxy that is used for accessing the master nodes.
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: static-ip-2
namespace: metallb-system
spec:
addresses:
- 192.168.1.170/32 # 1 address.
---
# apiVersion: metallb.io/v1beta1
# kind: IPAddressPool
# metadata:
# name: static-ip-1
# namespace: metallb-system
# spec:
# addresses:
# - 192.168.1.170/32 # 1 address.
# ---
3 changes: 1 addition & 2 deletions Supercluster/Cluster01/Metallb/L2Advertisement.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ metadata:
spec:
ipAddressPools:
- address-pool-1
- static-ip-1
- static-ip-2
# - static-ip-1
---
45 changes: 0 additions & 45 deletions Supercluster/Cluster01/ProxyServer1/Keepalived/ConfigMap.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions Supercluster/Cluster01/ProxyServer1/Keepalived/Deployment.yaml

This file was deleted.

0 comments on commit 8e3de3e

Please sign in to comment.