Skip to content

Commit 612cef3

Browse files
authored
Merge pull request opencloud-eu#1 from ferenc-hechler/main
2 parents 5010fd7 + 87a7862 commit 612cef3

File tree

9 files changed

+219
-0
lines changed

9 files changed

+219
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.project

README.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,85 @@ This repository is created to **welcome contributions from the community**. It d
1212

1313
(please add)
1414

15+
## 📦 Installing the DEV Helm Charts
16+
17+
Spin up a temporary local instance of OpenCloud using a single Docker image.
18+
19+
**Note:** This chart is primarily intended for Kubernetes deployment development and testing environments,
20+
not for production use. It provides a simplified setup with minimal configuration.
21+
22+
This version deploys opencloud as a single Docker image as described here:
23+
https://docs.opencloud.eu/docs/admin/getting-started/docker/docker
24+
25+
Deployment from the file system:
26+
27+
```
28+
$ helm install opencloud -n opencloud --create-namespace ./charts/opencloud-dev --set=adminPassword="<MY-SECURE-PASSWORD>" --set=url="<PUBLIC-URL>"
29+
```
30+
31+
It is important that the public-url is reachable, and forwarded to the backend-service opencloud-service:443,
32+
otherwise login will not be possible or the message "missing or invalid config" is shown.
33+
34+
For testing with the default settings port-forwarding from localhost can be used:
35+
36+
```
37+
$ helm install opencloud -n opencloud --create-namespace ./charts/opencloud-dev
38+
39+
Release "opencloud" does not exist. Installing it now.
40+
NAME: opencloud
41+
LAST DEPLOYED: Wed Apr 2 01:16:19 2025
42+
NAMESPACE: opencloud
43+
STATUS: deployed
44+
REVISION: 1
45+
TEST SUITE: None
46+
```
47+
48+
Establish a port-forwarding from localhost
49+
50+
```
51+
$ kubectl port-forward -n opencloud svc/opencloud-service 9200:443
52+
53+
Forwarding from 127.0.0.1:9200 -> 9200
54+
Forwarding from [::1]:9200 -> 9200
55+
...
56+
```
57+
58+
Now open in a browser the url: [https://localhost:9200](https://localhost:9200) while
59+
the port forwarding is active.
60+
61+
You need to accept the risc of a self signed certificate.
62+
(see [Common Issues & Help](https://docs.opencloud.eu/docs/admin/getting-started/docker/#troubleshooting)) in
63+
the getting started with Docker documentation.
64+
65+
Now you can login with the default admin / admin
66+
67+
If you want to change the public URL you can upgrade the deployment with the following command:
68+
69+
```
70+
$ helm upgrade opencloud -n opencloud ./charts/opencloud-dev --set=url="<NEW-PUBLIC-URL>"
71+
72+
Release "opencloud" has been upgraded. Happy Helming!
73+
NAME: opencloud
74+
LAST DEPLOYED: Wed Apr 2 01:42:51 2025
75+
NAMESPACE: opencloud
76+
STATUS: deployed
77+
REVISION: 2
78+
TEST SUITE: None
79+
```
80+
81+
The opencloud deployment will be restarted and is availble after a few seconds configured for the new url.
82+
83+
If you want to uninstall opencloud this can be done with
84+
85+
```
86+
$ helm uninstall -n opencloud opencloud
87+
88+
release "opencloud" uninstalled
89+
```
90+
91+
The data PVC is configured to be kept, so it will survive uninstall and install of opencloud-dev
92+
93+
1594
## 💡 Contributing
1695

1796
We encourage contributions from the community! If you'd like to contribute:

charts/opencloud-dev/Chart.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: v2
2+
type: application
3+
name: opencloud-dev
4+
version: 0.1.0
5+
description: "DEV Deployment of the OpenCloud dockerfile. The DEV Helm chart follows the description given for starting a docker instance: https://docs.opencloud.eu/docs/admin/getting-started/docker. It is not thought for productive use"
6+
home: https://github.com/opencloud-eu/helm
7+
image: https://raw.githubusercontent.com/opencloud-eu/opencloud/refs/heads/main/opencloud_logo.png
8+
sources:
9+
- https://github.com/opencloud-eu/helm
10+
appVersion: 2.0.0
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# TODO: move to ConfigMap
2+
apiVersion: v1
3+
kind: PersistentVolumeClaim
4+
metadata:
5+
name: opencloud-config-pvc
6+
labels:
7+
app: opencloud
8+
spec:
9+
accessModes:
10+
- ReadWriteOnce
11+
resources:
12+
requests:
13+
storage: 10Mi
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: PersistentVolumeClaim
3+
metadata:
4+
name: opencloud-data-pvc
5+
annotations:
6+
# prevent data pvc from being uninstalled
7+
helm.sh/resource-policy: "keep"
8+
labels:
9+
app: opencloud
10+
spec:
11+
accessModes:
12+
- ReadWriteOnce
13+
resources:
14+
requests:
15+
storage: {{ .Values.pvcSize }}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: opencloud
5+
labels:
6+
app: opencloud
7+
spec:
8+
selector:
9+
matchLabels:
10+
app: opencloud
11+
replicas: 1
12+
template:
13+
metadata:
14+
labels:
15+
app: opencloud
16+
spec:
17+
containers:
18+
- name: opencloud
19+
image: "{{ .Values.image }}:{{ .Values.tag}}"
20+
env:
21+
- name: OC_INSECURE
22+
value: "{{ .Values.insecure }}"
23+
- name: PROXY_HTTP_ADDR
24+
value: "{{ .Values.proxyHttpAddr }}"
25+
- name: OC_URL
26+
value: "{{ .Values.url }}"
27+
volumeMounts:
28+
- name: opencloud-config
29+
mountPath: /etc/opencloud
30+
- name: opencloud-data
31+
mountPath: /var/lib/opencloud
32+
volumes:
33+
- name: opencloud-config
34+
persistentVolumeClaim:
35+
claimName: opencloud-config-pvc
36+
- name: opencloud-data
37+
persistentVolumeClaim:
38+
claimName: opencloud-data-pvc
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
apiVersion: batch/v1
2+
kind: Job
3+
metadata:
4+
name: opencloud-init
5+
annotations:
6+
# This is what defines this resource as a hook. Without this line, the
7+
# job is considered part of the release.
8+
"helm.sh/hook": post-install
9+
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
10+
spec:
11+
template:
12+
spec:
13+
containers:
14+
- name: opencloud
15+
image: "{{ .Values.image }}:{{ .Values.tag}}"
16+
env:
17+
- name: IDM_ADMIN_PASSWORD
18+
value: {{ .Values.adminPassword }}
19+
- name: OC_INSECURE
20+
value: "{{ .Values.insecure }}"
21+
volumeMounts:
22+
- name: opencloud-config
23+
mountPath: /etc/opencloud
24+
- name: opencloud-data
25+
mountPath: /var/lib/opencloud
26+
# command: ["/usr/bin/opencloud"]
27+
args: ["init"]
28+
volumes:
29+
- name: opencloud-config
30+
persistentVolumeClaim:
31+
claimName: opencloud-config-pvc
32+
- name: opencloud-data
33+
persistentVolumeClaim:
34+
claimName: opencloud-data-pvc
35+
restartPolicy: Never
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: opencloud-service
5+
labels:
6+
app: opencloud
7+
spec:
8+
selector:
9+
app: opencloud
10+
ports:
11+
- name: https
12+
port: 443
13+
protocol: TCP
14+
targetPort: 9200

charts/opencloud-dev/values.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# follow the description given for starting a docker instance
2+
# https://docs.opencloud.eu/docs/admin/getting-started/docker
3+
4+
image: opencloudeu/opencloud-rolling
5+
tag: 2.0.0
6+
7+
adminPassword: admin
8+
insecure: true
9+
proxyHttpAddr: 0.0.0.0:9200
10+
url: https://localhost:9200
11+
12+
pvcSize: 10Gi
13+
14+

0 commit comments

Comments
 (0)