summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2024-08-25 01:45:02 +0200
committerChristian Pointner <equinox@spreadspace.org>2024-08-25 01:45:02 +0200
commitcbd77cf4f6926ce16f2c2956848787651a2e7526 (patch)
tree48288962b44ff701b97d42a393ba5057f4a5dfb2
parentadd sk-2024 (diff)
remove stale bluespice role
-rw-r--r--inventory/host_vars/sk-cloudio/bluespice.yml20
-rw-r--r--roles/apps/bluespice/defaults/main.yml19
-rw-r--r--roles/apps/bluespice/tasks/main.yml62
-rw-r--r--roles/apps/bluespice/templates/pod-spec.yml.j235
4 files changed, 0 insertions, 136 deletions
diff --git a/inventory/host_vars/sk-cloudio/bluespice.yml b/inventory/host_vars/sk-cloudio/bluespice.yml
deleted file mode 100644
index 30b3f330..00000000
--- a/inventory/host_vars/sk-cloudio/bluespice.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-## bluespice role does not work yet...
-
-# bluespice_zfs:
-# pool: storage
-# name: bluespice
-# properties:
-# compression: lz4
-# quota: 20G
-
-# bluespice_instances:
-# example:
-# version: 4.2.4
-# port: 8000
-# hostname: bs.elev8.at
-# language: en
-# admin:
-# username: admin
-# password: test
-# db_password: secretgeheim
diff --git a/roles/apps/bluespice/defaults/main.yml b/roles/apps/bluespice/defaults/main.yml
deleted file mode 100644
index 23d18724..00000000
--- a/roles/apps/bluespice/defaults/main.yml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-# bluespice_base_path: /srv/bluespice
-
-# bluespice_zfs:
-# pool: storage
-# name: bluespice
-# properties:
-# compression: lz4
-
-# bluespice_instances:
-# example:
-# version: 4.2.4
-# port: 8000
-# hostname: bs.example.com
-# language: en
-# admin:
-# username: admin
-# password: very-secure-password
-# db_password: super-secret
diff --git a/roles/apps/bluespice/tasks/main.yml b/roles/apps/bluespice/tasks/main.yml
deleted file mode 100644
index 49ef2418..00000000
--- a/roles/apps/bluespice/tasks/main.yml
+++ /dev/null
@@ -1,62 +0,0 @@
----
-- name: create zfs datasets
- when: bluespice_zfs is defined
- block:
- - name: create zfs base dataset
- zfs:
- name: "{{ bluespice_zfs.pool }}/{{ bluespice_zfs.name }}"
- state: present
- extra_zfs_properties: "{{ bluespice_zfs.properties | dehumanize_zfs_properties | default(omit) }}"
-
- - name: create zfs volumes for instances
- loop: "{{ bluespice_instances | dict2items }}"
- loop_control:
- label: "{{ item.key }} ({{ (item.value.zfs_properties | default({})).items() | map('join', '=') | join(', ') }})"
- zfs:
- name: "{{ bluespice_zfs.pool }}/{{ bluespice_zfs.name }}/{{ item.key }}"
- state: present
- extra_zfs_properties: "{{ item.value.zfs_properties | dehumanize_zfs_properties | default(omit) }}"
-
- - name: configure bluespice base bath
- set_fact:
- bluespice_base_path: "{{ (zfs_pools[bluespice_zfs.pool].mountpoint, bluespice_zfs.name) | path_join }}"
-
-
-- name: create instance subdirectories
- loop: "{{ bluespice_instances | list }}"
- file:
- path: "{{ bluespice_base_path }}/{{ item }}/data"
- state: directory
-
-
-- name: install pod manifest
- loop: "{{ bluespice_instances | dict2items }}"
- loop_control:
- label: "{{ item.key }}"
- vars:
- kubernetes_standalone_pod:
- name: "bluespice-{{ item.key }}"
- spec: "{{ lookup('template', 'pod-spec.yml.j2') }}"
- mode: "0600"
- include_role:
- name: kubernetes/standalone/pod
-
-- name: configure nginx vhost
- loop: "{{ bluespice_instances | dict2items }}"
- loop_control:
- label: "{{ item.key }}"
- vars:
- nginx_vhost:
- name: "bluespice-{{ item.key }}"
- template: generic
- tls:
- certificate_provider: "{{ acme_client }}"
- hostnames:
- - "{{ item.value.hostname }}"
- locations:
- '/':
- proxy_pass: "http://127.0.0.1:{{ item.value.port }}"
- extra_directives: |-
- client_max_body_size 0;
- include_role:
- name: nginx/vhost
diff --git a/roles/apps/bluespice/templates/pod-spec.yml.j2 b/roles/apps/bluespice/templates/pod-spec.yml.j2
deleted file mode 100644
index 67493dc0..00000000
--- a/roles/apps/bluespice/templates/pod-spec.yml.j2
+++ /dev/null
@@ -1,35 +0,0 @@
-terminationGracePeriodSeconds: 120
-containers:
-- name: bluespice
- image: "bluespice/bluespice-free:{{ item.value.version }}"
- resources:
- limits:
- memory: "4Gi"
- env:
- - name: "BS_NAME"
- value: "{{ item.key }}"
- - name: "BS_URL"
- value: "https://{{ item.value.hostname }}"
- - name: "BS_LANG"
- value: "{{ item.value.language }}"
- - name: "BS_USER"
- value: "{{ item.value.admin.username }}"
- - name: "BS_PASSWORD"
- value: "{{ item.value.admin.password }}"
- - name: "BS_DB_PASSWORD"
- value: "{{ item.value.db_password }}"
- - name: "DISABLE_PINGBACK"
- value: "yes"
- volumeMounts:
- - name: data
- mountPath: /data
- ports:
- - containerPort: 80
- hostPort: {{ item.value.port }}
- hostIP: 127.0.0.1
-
-volumes:
-- name: data
- hostPath:
- path: "{{ bluespice_base_path }}/{{ item.key }}/data"
- type: Directory