Skip to content
Snippets Groups Projects
Commit 4557f110 authored by dgiannopoulos's avatar dgiannopoulos
Browse files

feat: removed PVs, updated docs

parent 384ca409
No related branches found
No related tags found
3 merge requests!34Merging develop (merged from 2024Q2_RC) into main creating for 2024Q2 Release,!33Merging 2024Q2_RC into main creating for 2024Q2 Release,!32Merging 2024Q2_RC into develop
Pipeline #7030 passed
<!--
### 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 # OpenSlice Installation Guide with Kubernetes
## Requirements ## Requirements
...@@ -31,14 +13,20 @@ helm uninstall myopenslice --namespace openslice ...@@ -31,14 +13,20 @@ helm uninstall myopenslice --namespace openslice
### Software Requirements: ### Software Requirements:
* **git:** For cloning the project repository. * **git:** For cloning the project repository.
* **Kubernetes:** A running cluster where OpenSlice will be deployed. * **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. * **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. * **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/). * 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/).
* 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. * 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.
* **Network Load Balancer:** Required for exposing the service (e.g., GCP, AWS, Azure, MetalLB). * **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`. * **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 ## Preparing the environment
### 1. Setting Up A Kubernetes Cluster ### 1. Setting Up A Kubernetes Cluster
......
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 }}
...@@ -61,18 +61,11 @@ spec: ...@@ -61,18 +61,11 @@ spec:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
ports: ports:
- containerPort: 13101 - containerPort: 13101
volumeMounts:
- mountPath: /root
name: {{ include "openslice.fullname" . }}-oasapi-claim0
readinessProbe: readinessProbe:
httpGet: httpGet:
path: /oas-api/swagger-ui/index.html path: /oas-api/swagger-ui/index.html
port: 13101 port: 13101
restartPolicy: Always restartPolicy: Always
volumes:
- name: {{ include "openslice.fullname" . }}-oasapi-claim0
persistentVolumeClaim:
claimName: {{ include "openslice.fullname" . }}-oasapi-claim0
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
......
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 }}
...@@ -42,14 +42,7 @@ spec: ...@@ -42,14 +42,7 @@ spec:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
ports: ports:
- containerPort: 13100 - containerPort: 13100
volumeMounts:
- mountPath: /root
name: {{ include "openslice.fullname" . }}-osom-claim0
restartPolicy: Always restartPolicy: Always
volumes:
- name: {{ include "openslice.fullname" . }}-osom-claim0
persistentVolumeClaim:
claimName: {{ include "openslice.fullname" . }}-osom-claim0
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment