From 94ac032c8ac262bcc25163edad71a78ae204918f Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 31 Mar 2023 19:46:04 -0400 Subject: [PATCH] remove old nextcloud glusterfs volumes and mounts --- .idea/dataSources.xml | 18 +++++++++++- .../roles/glusterfs-server/defaults/main.yaml | 15 +++++----- ansible-5/roles/prod.k3s/defaults/main.yml | 6 ++-- .../prod.k3s/files/funkwhale/values.yaml | 28 ++++++++++++++----- .../prod.k3s/tasks/deployments/funkwhale.yaml | 2 +- ansible-5/roles/prod.k3s/tasks/main.yml | 4 +++ .../templates/funkwhale/pv-claim.yaml | 13 +++++++++ .../prod.k3s/templates/funkwhale/pv.yaml | 17 +++++++++++ 8 files changed, 84 insertions(+), 19 deletions(-) create mode 100644 ansible-5/roles/prod.k3s/templates/funkwhale/pv-claim.yaml create mode 100644 ansible-5/roles/prod.k3s/templates/funkwhale/pv.yaml diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml index b925a85..6bf45e1 100644 --- a/.idea/dataSources.xml +++ b/.idea/dataSources.xml @@ -65,7 +65,7 @@ - + postgresql true forwarded connection to postgres @@ -73,5 +73,21 @@ jdbc:postgresql://localhost:5432/postgres $ProjectFileDir$ + + postgresql + true + forwarded connection to postgres + org.postgresql.Driver + jdbc:postgresql://localhost:5432/test + $ProjectFileDir$ + + + postgresql + true + forwarded connection to postgres + org.postgresql.Driver + jdbc:postgresql://localhost:5432/funkwhale + $ProjectFileDir$ + \ No newline at end of file diff --git a/ansible-5/roles/glusterfs-server/defaults/main.yaml b/ansible-5/roles/glusterfs-server/defaults/main.yaml index 12a9bcd..9f4216e 100644 --- a/ansible-5/roles/glusterfs-server/defaults/main.yaml +++ b/ansible-5/roles/glusterfs-server/defaults/main.yaml @@ -27,8 +27,8 @@ volumes: - name: mariadb - name: plex - name: plex-data - - name: nextcloud - - name: nextcloud2 +# - name: nextcloud +# - name: nextcloud2 # - name: prometheus # - name: tmp @@ -37,8 +37,9 @@ volumes: removed: - name: jenkins2 -# - name: nextcloud - name: postgres + - name: nextcloud + - name: nextcloud2 mounts: paths: @@ -46,7 +47,7 @@ mounts: jenkins: /data/glusterfs/jenkins/brick1 jenkins2: /data/glusterfs/jenkins2/brick1 # dead mariadb: /data/glusterfs/mariadb/brick1 - nextcloud: /data/glusterfs/nextcloud/brick1 + nextcloud: /data/glusterfs/nextcloud/brick1 # dead nextcloud2: /data/glusterfs/nextcloud2/brick1 # dead plex: /data/glusterfs/plex/brick1 plex-data: /data/glusterfs/plex-data/brick1 @@ -68,8 +69,8 @@ mounts: - name: tmp status: mounted src: "UUID=cc7588cc-1d39-4f09-baac-234f8c081443" - - name: nextcloud - status: mounted + - name: nextcloud # dead + status: absent src: "UUID=617b4eee-7c60-4506-b2c1-7768900482e9" - name: prometheus status: mounted @@ -84,7 +85,7 @@ mounts: status: mounted src: "UUID=cdff8026-1d56-4cee-8c12-8c61dc587850" - name: nextcloud2 # dead - status: mounted + status: absent src: "UUID=ced31b8e-8404-4bff-b428-6411c54451a4" home: [] diff --git a/ansible-5/roles/prod.k3s/defaults/main.yml b/ansible-5/roles/prod.k3s/defaults/main.yml index d491614..af3dbeb 100644 --- a/ansible-5/roles/prod.k3s/defaults/main.yml +++ b/ansible-5/roles/prod.k3s/defaults/main.yml @@ -81,7 +81,7 @@ apps: state: present nextcloud: - enabled: true + enabled: false namespace: nextcloud hello_world: @@ -90,9 +90,9 @@ apps: state: present funkwhale: - enabled: false + enabled: true namespace: funkwhale - state: present + state: absent redis: enabled: false diff --git a/ansible-5/roles/prod.k3s/files/funkwhale/values.yaml b/ansible-5/roles/prod.k3s/files/funkwhale/values.yaml index 9d2f81f..53ef692 100644 --- a/ansible-5/roles/prod.k3s/files/funkwhale/values.yaml +++ b/ansible-5/roles/prod.k3s/files/funkwhale/values.yaml @@ -10,6 +10,7 @@ ingress: tls: # < placing a host in the TLS config will determine what ends up in the cert's subjectAltNames - secretName: xai-corp-production-tls +replicaCount: 1 postgresql: ## If you already have a Postgresql service you'd like to use, set @@ -17,26 +18,39 @@ postgresql: enabled: true ## External Postgresql hostname or IP - # host: postgresql.example.com +# host: postgresql.postgres auth: ## Database user username: funkwhale ## Database password - password: funkwhale + password: 18hbc3u19dhqahgoh910y - ## Database password + ## Database name database: funkwhale ## Database port - service: - port: 5432 +# service: +# port: 5432 redis: ## If you already have a Redis service you'd like to use, set ## this to false and adjust the host to use your existing service. - enabled: false + enabled: true ## External Redis hostname or IP - host: redis.redis +# host: redis-master.redis + +persistence: + enabled: false +# existingClaim: data-funkwhale-0 + # storageClass: "-" + + ## Note; Using ReadWriteOnce for persistence will require the addition of + ## a required affinity for the celery worker, as well as the use of only a + ## single api replica. + ## + ## An example is provided for the worker affinity + accessMode: ReadWriteMany + size: 1Gi diff --git a/ansible-5/roles/prod.k3s/tasks/deployments/funkwhale.yaml b/ansible-5/roles/prod.k3s/tasks/deployments/funkwhale.yaml index 168ba52..43831d8 100644 --- a/ansible-5/roles/prod.k3s/tasks/deployments/funkwhale.yaml +++ b/ansible-5/roles/prod.k3s/tasks/deployments/funkwhale.yaml @@ -38,7 +38,7 @@ local_action: module: kubernetes.core.helm release_state: "{{apps.funkwhale.state}}" - name: gitea + name: funkwhale namespace: "{{apps.funkwhale.namespace}}" create_namespace: yes update_repo_cache: True diff --git a/ansible-5/roles/prod.k3s/tasks/main.yml b/ansible-5/roles/prod.k3s/tasks/main.yml index 3e6ed39..cb6197f 100644 --- a/ansible-5/roles/prod.k3s/tasks/main.yml +++ b/ansible-5/roles/prod.k3s/tasks/main.yml @@ -42,6 +42,10 @@ include_tasks: deployments/redis.yaml when: apps.redis.enabled +- name: deploy funkwhale + include_tasks: deployments/funkwhale.yaml + when: apps.funkwhale.enabled + #----------------------------------------------------- #- include_tasks: mariadb.yaml # diff --git a/ansible-5/roles/prod.k3s/templates/funkwhale/pv-claim.yaml b/ansible-5/roles/prod.k3s/templates/funkwhale/pv-claim.yaml new file mode 100644 index 0000000..bddcd6b --- /dev/null +++ b/ansible-5/roles/prod.k3s/templates/funkwhale/pv-claim.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: data-funkwhale-0 + namespace: "{{apps.funkwhale.namespace}}" +spec: + storageClassName: manual + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi diff --git a/ansible-5/roles/prod.k3s/templates/funkwhale/pv.yaml b/ansible-5/roles/prod.k3s/templates/funkwhale/pv.yaml new file mode 100644 index 0000000..ffae676 --- /dev/null +++ b/ansible-5/roles/prod.k3s/templates/funkwhale/pv.yaml @@ -0,0 +1,17 @@ +--- +# persistent volume +apiVersion: v1 +kind: PersistentVolume +metadata: + name: funkwhale-pv-local + labels: + type: local +spec: + storageClassName: manual + capacity: + storage: 100Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/opt/data/T2/funkwhale" +