Commit 4557f110 authored by dgiannopoulos's avatar dgiannopoulos
Browse files

feat: removed PVs, updated docs

parent 384ca409
Loading
Loading
Loading
Loading
Loading
+8 −20
Original line number Diff line number Diff line
<!-- 
### Additional Configuration

- **Ingress Controller**: An Nginx ingress controller is required. If you use another type of ingress controller, you'll need to modify `[repo-root]/kubernetes/helm/openslice/templates/openslice-ingress.yaml` to conform to your ingress controller's requirements.
  
- **Storage Class**: Define your type of `storageClass` in `[repo-root]/kubernetes/helm/openslice/values.yaml` under `storageClass`. If this is not defined, the PVs (Persistent Volumes) will be created and managed manually by the Helm chart.

- **Domain/IP Address**: You need to have a domain or an IP address to access the application. This should be defined in `[repo-root]/kubernetes/helm/openslice/values.yaml` under `rooturl`.

# Install helm chart
```
helm install myopenslice ./openslice --namespace openslice --create-namespace
```

# Uninstall helm chart
```
helm uninstall myopenslice --namespace openslice
``` -->
# OpenSlice Installation Guide with Kubernetes

## Requirements
@@ -32,6 +14,7 @@ helm uninstall myopenslice --namespace openslice

* **git:** For cloning the project repository.
* **Kubernetes:** A running cluster where OpenSlice will be deployed. 
    * **Disclaimer:** The current manual setup of Persistent Volumes using `hostPath` is designed to operate with **only a single worker node**. This setup will not support data persistence if a pod is rescheduled to another node.
* **Helm:** For managing the deployment of OpenSlice.
* **Ingress Controller:** Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster. Traffic routing is controlled by rules defined on the Ingress resource. An Ingress may be configured to give Services externally-reachable URLs, load balance traffic, terminate SSL / TLS, and offer name-based virtual hosting. An Ingress controller is responsible for fulfilling the Ingress, usually with a load balancer, though it may also configure your edge router or additional frontends to help handle the traffic. You must have an Ingress controller to satisfy an Ingress.
    * An Nginx ingress controller is required, which can be installed using [this guide](https://docs.nginx.com/nginx-ingress-controller/installation/installing-nic/installation-with-helm/). 
@@ -39,6 +22,11 @@ helm uninstall myopenslice --namespace openslice
* **Network Load Balancer:** Required for exposing the service (e.g., GCP, AWS, Azure, MetalLB).
* **Domain/IP Address:** Necessary for accessing the application. This should be configured in `[repo-root]/kubernetes/helm/openslice/values.yaml` under `rooturl`.

### Additional Configuration

* **Storage Class:** In a production environment, specify your `storageClass` in `[repo-root]/kubernetes/helm/openslice/values.yaml` under `storageClass`. If not defined, PVs will be created and managed manually.
    * **Disclaimer:** Before deploying, confirm that your storage system supports claims of one 10G and two 1G volumes.

## Preparing the environment

### 1. Setting Up A Kubernetes Cluster
+0 −39
Original line number Diff line number Diff line
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  namespace: {{ .Release.Namespace }}
  labels:
    app: {{ include "openslice.fullname" . }}
    org.etsi.osl.service: oasapi
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
    {{- include "openslice.labels" . | nindent 4 }}
  name: {{ include "openslice.fullname" . }}-oasapi-claim0
spec:
  storageClassName: {{ .Values.storageClass | default "oasapi-pv-manual" }}
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: "100Mi"
---
{{- if or (not .Values.storageClass) (eq .Values.storageClass "manual") }}
apiVersion: v1
kind: PersistentVolume
metadata:
  namespace: {{ .Release.Namespace }}
  labels:
    app: {{ include "openslice.fullname" . }}
    org.etsi.osl.service: oasapi
    type: local
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
    {{- include "openslice.labels" . | nindent 4 }}
  name: {{ include "openslice.fullname" . }}-oasapi-pv-volume
spec:
  storageClassName: "oasapi-pv-manual"
  capacity:
    storage: "100Mi"
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/dockerdata-nfs/oasapi"
{{- end }}
+0 −7
Original line number Diff line number Diff line
@@ -61,18 +61,11 @@ spec:
            {{- toYaml .Values.resources | nindent 12 }}
          ports:
            - containerPort: 13101
          volumeMounts:
            - mountPath: /root
              name: {{ include "openslice.fullname" . }}-oasapi-claim0
          readinessProbe:
            httpGet:
              path: /oas-api/swagger-ui/index.html
              port: 13101
      restartPolicy: Always
      volumes:
        - name: {{ include "openslice.fullname" . }}-oasapi-claim0
          persistentVolumeClaim:
            claimName: {{ include "openslice.fullname" . }}-oasapi-claim0
---
apiVersion: v1
kind: Service
+0 −39
Original line number Diff line number Diff line
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  namespace: {{ .Release.Namespace }}
  labels:
    app: {{ include "openslice.fullname" . }}
    org.etsi.osl.service: osom
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
    {{- include "openslice.labels" . | nindent 4 }}
  name: {{ include "openslice.fullname" . }}-osom-claim0
spec:
  storageClassName: {{ .Values.storageClass | default "osom-pv-manual" }}
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: "1Gi"
---
{{- if or (not .Values.storageClass) (eq .Values.storageClass "manual") }}
apiVersion: v1
kind: PersistentVolume
metadata:
  namespace: {{ .Release.Namespace }}
  labels:
    app: {{ include "openslice.fullname" . }}
    org.etsi.osl.service: osom
    type: local
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
    {{- include "openslice.labels" . | nindent 4 }}
  name: {{ include "openslice.fullname" . }}-osom-pv-volume
spec:
  storageClassName: "osom-pv-manual"
  capacity:
    storage: "1Gi"
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/dockerdata-nfs/osom"
{{- end }}
+0 −7
Original line number Diff line number Diff line
@@ -42,14 +42,7 @@ spec:
            {{- toYaml .Values.resources | nindent 12 }}
          ports:
            - containerPort: 13100
          volumeMounts:
            - mountPath: /root
              name: {{ include "openslice.fullname" . }}-osom-claim0
      restartPolicy: Always
      volumes:
        - name: {{ include "openslice.fullname" . }}-osom-claim0
          persistentVolumeClaim:
            claimName: {{ include "openslice.fullname" . }}-osom-claim0
---
apiVersion: v1
kind: Service