summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inventory/host_vars/sk-cloudio/nextcloud.yml24
-rw-r--r--inventory/host_vars/sk-cloudio/vars.yml2
-rw-r--r--inventory/host_vars/sk-tomnext-nc.yml8
-rw-r--r--roles/apps/nextcloud/defaults/main.yml3
-rw-r--r--roles/apps/nextcloud/tasks/main.yml35
-rw-r--r--roles/apps/nextcloud/templates/pod-spec-with-mariadb.yml.j217
6 files changed, 70 insertions, 19 deletions
diff --git a/inventory/host_vars/sk-cloudio/nextcloud.yml b/inventory/host_vars/sk-cloudio/nextcloud.yml
index 1dbea1b0..8ea0fa53 100644
--- a/inventory/host_vars/sk-cloudio/nextcloud.yml
+++ b/inventory/host_vars/sk-cloudio/nextcloud.yml
@@ -8,51 +8,59 @@ nextcloud_zfs:
nextcloud_instances:
luzesombra.skillz.biz:
# new: true
- version: 27.1.1
+ version: 27.1.2
port: 8100
hostnames:
- luzesombra.skillz.biz
zfs_properties:
quota: 200G
+ redis:
+ version: 7.2.1
database:
type: mariadb
version: 11.1.2
password: "{{ vault_nextcloud_database_passwords['luzesombra.skillz.biz'] }}"
insomnia.skillz.biz:
# new: true
- version: 27.0.2
+ version: 27.1.2
port: 8101
hostnames:
- insomnia.skillz.biz
zfs_properties:
quota: 300G
+ redis:
+ version: 7.2.1
database:
type: mariadb
- version: 10.11.4
+ version: 10.11.5
password: "{{ vault_nextcloud_database_passwords['insomnia.skillz.biz'] }}"
nc.skillz.biz:
# new: true
- version: 27.1.1
+ version: 27.1.2
port: 8102
hostnames:
- nc.skillz.biz
zfs_properties:
quota: 200G
+ redis:
+ version: 7.2.1
database:
type: mariadb
- version: 10.11.4
+ version: 10.11.5
password: "{{ vault_nextcloud_database_passwords['nc.skillz.biz'] }}"
wae.elevate.at:
# new: true
- version: 27.0.2
+ version: 27.1.2
port: 8104
hostnames:
- wae.elevate.at
zfs_properties:
quota: 100G
+ redis:
+ version: 7.2.1
database:
type: mariadb
- version: 10.11.4
+ version: 10.11.5
password: "{{ vault_nextcloud_database_passwords['wae.elevate.at'] }}"
wolke.elev8.at:
# new: true
@@ -62,6 +70,8 @@ nextcloud_instances:
- wolke.elev8.at
zfs_properties:
quota: 10G
+ redis:
+ version: 7.2.1
database:
type: mariadb
version: 10.5.13
diff --git a/inventory/host_vars/sk-cloudio/vars.yml b/inventory/host_vars/sk-cloudio/vars.yml
index f0826cc7..fc6dc3ad 100644
--- a/inventory/host_vars/sk-cloudio/vars.yml
+++ b/inventory/host_vars/sk-cloudio/vars.yml
@@ -70,7 +70,7 @@ kubelet_storage:
properties:
quota: 20G
-kubernetes_version: 1.27.3
+kubernetes_version: 1.28.2
kubernetes_cri_tools_pkg_version: 1.26.0-00
kubernetes_container_runtime: docker
kubernetes_standalone_max_pods: 100
diff --git a/inventory/host_vars/sk-tomnext-nc.yml b/inventory/host_vars/sk-tomnext-nc.yml
index f8af167f..0ea6e0a1 100644
--- a/inventory/host_vars/sk-tomnext-nc.yml
+++ b/inventory/host_vars/sk-tomnext-nc.yml
@@ -88,7 +88,7 @@ kubelet_storage:
properties:
quota: 15G
-kubernetes_version: 1.27.3
+kubernetes_version: 1.28.2
kubernetes_cri_tools_pkg_version: 1.26.0-00
kubernetes_container_runtime: docker
kubernetes_standalone_max_pods: 15
@@ -118,15 +118,17 @@ nextcloud_zfs:
nextcloud_instances:
team.tomwaitz.eu:
# new: true
- version: 27.0.2
+ version: 27.1.1
port: 8100
hostnames:
- team.tomwaitz.eu
zfs_properties:
quota: 780G
+ redis:
+ version: 7.2.1
database:
type: mariadb
- version: 10.11.4
+ version: 10.11.5
password: "{{ vault_nextcloud_database_passwords['team.tomwaitz.eu'] }}"
custom_image:
dockerfile: |
diff --git a/roles/apps/nextcloud/defaults/main.yml b/roles/apps/nextcloud/defaults/main.yml
index db186b53..f194a6f9 100644
--- a/roles/apps/nextcloud/defaults/main.yml
+++ b/roles/apps/nextcloud/defaults/main.yml
@@ -5,6 +5,9 @@ nextcloud_app_gid: "950"
nextcloud_db_uid: "951"
nextcloud_db_gid: "951"
+nextcloud_redis_uid: "952"
+nextcloud_redis_gid: "952"
+
# nextcloud_base_path: /srv/nextcloud
# nextcloud_zfs:
diff --git a/roles/apps/nextcloud/tasks/main.yml b/roles/apps/nextcloud/tasks/main.yml
index c9a9061c..12b15abc 100644
--- a/roles/apps/nextcloud/tasks/main.yml
+++ b/roles/apps/nextcloud/tasks/main.yml
@@ -65,7 +65,7 @@
password: "!"
- name: create nextcloud database subdirectory
- loop: "{{ nextcloud_instances | dict2items}}"
+ loop: "{{ nextcloud_instances | dict2items }}"
loop_control:
label: "{{ item.key }} ({{ item.value.database.type }})"
file:
@@ -75,6 +75,27 @@
state: directory
+- name: add group for nextcloud redis
+ group:
+ name: nc-redis
+ gid: "{{ nextcloud_redis_gid }}"
+
+- name: add user for nextcloud redis
+ user:
+ name: nc-redis
+ uid: "{{ nextcloud_redis_uid }}"
+ group: nc-redis
+ password: "!"
+
+- name: create nextcloud database subdirectory
+ loop: "{{ nextcloud_instances | list }}"
+ file:
+ path: "{{ nextcloud_base_path }}/{{ item }}/redis"
+ owner: "{{ nextcloud_redis_uid }}"
+ group: "{{ nextcloud_redis_gid }}"
+ state: directory
+
+
- name: create auxiliary config directory
loop: "{{ nextcloud_instances | list }}"
file:
@@ -204,12 +225,10 @@
** Go to https://{{ item.value.hostnames[0] }} and finalize the
** installation. After that run the following commands:
**
- ** $ nextcloud-occ {{ item.key }} app:disable richdocumentscode
- ** $ nextcloud-occ {{ item.key }} app:remove richdocumentscode
- **
- ** Also please add the following option to the file
- ** "{{ nextcloud_base_path }}/{{ item.key }}/nextcloud/config/config.php"
- **
- ** 'default_phone_region' => 'at',
+ ** $ nextcloud-occ {{ item.key }} config:system:set default_phone_region --value='at'
+ ** $ nextcloud-occ {{ item.key }} config:system:set redis host --value '127.0.0.1'
+ ** $ nextcloud-occ {{ item.key }} config:system:set redis port --type integer --value 6379
+ ** $ nextcloud-occ {{ item.key }} config:system:set redis timeout --type float --value 0.0
+ ** $ nextcloud-occ {{ item.key }} config:system:set redis password
**
****************************************
diff --git a/roles/apps/nextcloud/templates/pod-spec-with-mariadb.yml.j2 b/roles/apps/nextcloud/templates/pod-spec-with-mariadb.yml.j2
index 725f84d9..983f363a 100644
--- a/roles/apps/nextcloud/templates/pod-spec-with-mariadb.yml.j2
+++ b/roles/apps/nextcloud/templates/pod-spec-with-mariadb.yml.j2
@@ -40,6 +40,19 @@ containers:
- containerPort: 8080
hostPort: {{ item.value.port }}
hostIP: 127.0.0.1
+- name: redis
+ image: "redis:{{ item.value.redis.version }}"
+ args:
+ - --bind 127.0.0.1
+ securityContext:
+ runAsUser: {{ nextcloud_redis_uid }}
+ runAsGroup: {{ nextcloud_redis_gid }}
+ resources:
+ limits:
+ memory: "512Mi"
+ volumeMounts:
+ - name: redis
+ mountPath: /data
- name: database
image: "mariadb:{{ item.value.database.version }}"
args:
@@ -75,6 +88,10 @@ volumes:
hostPath:
path: "{{ nextcloud_base_path }}/{{ item.key }}/nextcloud"
type: Directory
+- name: redis
+ hostPath:
+ path: "{{ nextcloud_base_path }}/{{ item.key }}/redis"
+ type: Directory
- name: database
hostPath:
path: "{{ nextcloud_base_path }}/{{ item.key }}/{{ item.value.database.type }}"