summaryrefslogtreecommitdiff
path: root/gemfeed/examples/conf/f3s/registry
diff options
context:
space:
mode:
Diffstat (limited to 'gemfeed/examples/conf/f3s/registry')
-rw-r--r--gemfeed/examples/conf/f3s/registry/Justfile12
-rw-r--r--gemfeed/examples/conf/f3s/registry/README.md69
-rw-r--r--gemfeed/examples/conf/f3s/registry/helm-chart/Chart.yaml5
-rw-r--r--gemfeed/examples/conf/f3s/registry/helm-chart/README.md11
-rw-r--r--gemfeed/examples/conf/f3s/registry/helm-chart/templates/deployment.yaml29
-rw-r--r--gemfeed/examples/conf/f3s/registry/helm-chart/templates/pv.yaml14
-rw-r--r--gemfeed/examples/conf/f3s/registry/helm-chart/templates/pvc.yaml12
-rw-r--r--gemfeed/examples/conf/f3s/registry/helm-chart/templates/service.yaml14
8 files changed, 0 insertions, 166 deletions
diff --git a/gemfeed/examples/conf/f3s/registry/Justfile b/gemfeed/examples/conf/f3s/registry/Justfile
deleted file mode 100644
index 297d95a7..00000000
--- a/gemfeed/examples/conf/f3s/registry/Justfile
+++ /dev/null
@@ -1,12 +0,0 @@
-NAMESPACE := "infra"
-RELEASE_NAME := "registry"
-CHART_PATH := "./helm-chart"
-
-install:
- helm install {{RELEASE_NAME}} {{CHART_PATH}} --namespace {{NAMESPACE}} --create-namespace
-
-upgrade:
- helm upgrade {{RELEASE_NAME}} {{CHART_PATH}} --namespace {{NAMESPACE}}
-
-delete:
- helm uninstall {{RELEASE_NAME}} --namespace {{NAMESPACE}}
diff --git a/gemfeed/examples/conf/f3s/registry/README.md b/gemfeed/examples/conf/f3s/registry/README.md
deleted file mode 100644
index bcf30a3a..00000000
--- a/gemfeed/examples/conf/f3s/registry/README.md
+++ /dev/null
@@ -1,69 +0,0 @@
-# Private Docker Registry
-
-This document describes how to push Docker images to the private registry deployed in your Kubernetes cluster.
-
-## Prerequisites
-
-* A running Kubernetes cluster.
-* `kubectl` configured to connect to your cluster.
-* Docker installed and running on your local machine.
-
-## Steps
-
-0. **Create the registry directory in the NFS share**
-
-1. **Tag your Docker image:**
-
- Replace `<your-image>` with the name of your local Docker image and `<node-ip>` with the IP address of any node in your Kubernetes cluster. The registry is available on NodePort `30001`.
-
- ```bash
- docker tag <your-image> <node-ip>:30001/<your-image>
- ```
-
-2. **Push the image to the registry:**
-
- ```bash
- docker push <node-ip>:30001/<your-image>
- ```
-
-3. **Pull the image from the registry (from a Kubernetes pod):**
-
- You can now use the image in your Kubernetes deployments by referencing it as `docker-registry-service:5000/<your-image>`.
-
-## Communication
-
-The Docker registry is exposed via a static NodePort (`30001`) and uses plain HTTP. It is not configured for TLS.
-
-
- First, run this command to create or update the configuration file. This command will overwrite the file if it exists.
-
- 1 sudo bash -c 'echo "{ \\"insecure-registries\\": [\\"r0.lan.buetow.org:30001\\",\\"r1.lan.buetow.org:30001\\",\\"r2.lan.buetow.org:30001\\"] }" > /etc/docker/daemon.json'
-
- After running that command, you need to restart your Docker daemon for the changes to take effect.
-
- 1 sudo systemctl restart docker
-
-
-And afterwards I could push the anky-sync-server image.
-
-## K3s Configuration
-
-To use the private registry from within the k3s cluster, you need to configure each k3s node.
-
-### 1. Update /etc/hosts
-On each k3s node, you must ensure that `registry.lan.buetow.org` resolves to the node's loopback address. You can do this by adding an entry to the `/etc/hosts` file.
-
-Run the following command, which will add the entry to `r0`, `r1`, and `r2`:
-```bash
-for node in r0 r1 r2; do ssh root@$node "echo '127.0.0.1 registry.lan.buetow.org' >> /etc/hosts"; done
-```
-
-### 2. Configure K3s to trust the insecure registry
-You need to configure each k3s node to trust the insecure registry. This is done by creating a `registries.yaml` file in `/etc/rancher/k3s/` on each node.
-
-The following command will create the file and restart the k3s service. You will need to run this for each node (`r0`, `r1`, `r2`):
-
-```bash
-ssh root@<node> "echo -e 'mirrors:\n "registry.lan.buetow.org:30001":\n endpoint:\n - "http://localhost:30001"' > /etc/rancher/k3s/registries.yaml && systemctl restart k3s"
-```
-
diff --git a/gemfeed/examples/conf/f3s/registry/helm-chart/Chart.yaml b/gemfeed/examples/conf/f3s/registry/helm-chart/Chart.yaml
deleted file mode 100644
index 0f7d68fa..00000000
--- a/gemfeed/examples/conf/f3s/registry/helm-chart/Chart.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-apiVersion: v2
-name: registry
-description: A Helm chart for deploying a private Docker registry.
-version: 0.1.0
-appVersion: "2.0"
diff --git a/gemfeed/examples/conf/f3s/registry/helm-chart/README.md b/gemfeed/examples/conf/f3s/registry/helm-chart/README.md
deleted file mode 100644
index 42694360..00000000
--- a/gemfeed/examples/conf/f3s/registry/helm-chart/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# Docker Registry Helm Chart
-
-This chart deploys a simple Docker registry.
-
-## Installing the Chart
-
-To install the chart with the release name `my-release`, run the following command:
-
-```bash
-helm install registry .
-```
diff --git a/gemfeed/examples/conf/f3s/registry/helm-chart/templates/deployment.yaml b/gemfeed/examples/conf/f3s/registry/helm-chart/templates/deployment.yaml
deleted file mode 100644
index 70522f8d..00000000
--- a/gemfeed/examples/conf/f3s/registry/helm-chart/templates/deployment.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: docker-registry
- namespace: infra
- labels:
- app: docker-registry
-spec:
- replicas: 1
- selector:
- matchLabels:
- app: docker-registry
- template:
- metadata:
- labels:
- app: docker-registry
- spec:
- containers:
- - name: registry
- image: registry:2
- ports:
- - containerPort: 5000
- volumeMounts:
- - name: registry-storage
- mountPath: /var/lib/registry
- volumes:
- - name: registry-storage
- persistentVolumeClaim:
- claimName: docker-registry-pvc
diff --git a/gemfeed/examples/conf/f3s/registry/helm-chart/templates/pv.yaml b/gemfeed/examples/conf/f3s/registry/helm-chart/templates/pv.yaml
deleted file mode 100644
index fb747ca0..00000000
--- a/gemfeed/examples/conf/f3s/registry/helm-chart/templates/pv.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-apiVersion: v1
-kind: PersistentVolume
-metadata:
- name: docker-registry-pv
-spec:
- capacity:
- storage: 5Gi
- volumeMode: Filesystem
- accessModes:
- - ReadWriteOnce
- persistentVolumeReclaimPolicy: Retain
- hostPath:
- path: /data/nfs/k3svolumes/registry
- type: Directory
diff --git a/gemfeed/examples/conf/f3s/registry/helm-chart/templates/pvc.yaml b/gemfeed/examples/conf/f3s/registry/helm-chart/templates/pvc.yaml
deleted file mode 100644
index e769c893..00000000
--- a/gemfeed/examples/conf/f3s/registry/helm-chart/templates/pvc.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
- name: docker-registry-pvc
- namespace: infra
-spec:
- storageClassName: ""
- accessModes:
- - ReadWriteOnce
- resources:
- requests:
- storage: 5Gi
diff --git a/gemfeed/examples/conf/f3s/registry/helm-chart/templates/service.yaml b/gemfeed/examples/conf/f3s/registry/helm-chart/templates/service.yaml
deleted file mode 100644
index a97f14e0..00000000
--- a/gemfeed/examples/conf/f3s/registry/helm-chart/templates/service.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
- name: docker-registry-service
- namespace: infra
-spec:
- selector:
- app: docker-registry
- ports:
- - protocol: TCP
- port: 5000
- targetPort: 5000
- nodePort: 30001
- type: NodePort