Skip to content
Snippets Groups Projects
Commit cb60b201 authored by ngyimesi's avatar ngyimesi
Browse files

Linstor controller HA

parent 0e6b9d4b
No related branches found
No related tags found
1 merge request!1Ne w salgo
[global]
controllers=10.0.42.101,10.0.42.102,10.0.42.103
[[promoter]]
id = "linstor_db"
[promoter.resources.linstor_db]
start = ["var-lib-linstor.mount", "linstor-controller.service"]
[Service]
Environment=LS_KEEP_RES=linstor_db
Type=notify
TimeoutStartSec=infinity
[Unit]
Description=Filesystem for the LINSTOR controller
[Mount]
# you can use the minor like /dev/drbdX or the udev symlink
What=/dev/drbd/by-res/linstor_db/0
Where=/var/lib/linstor
\ No newline at end of file
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
- linstor-satellite - linstor-satellite
- linstor-client - linstor-client
- linstor-proxmox - linstor-proxmox
- drbd-reactor
state: present state: present
- name: Enable linstor-satellite - name: Enable linstor-satellite
...@@ -28,5 +29,65 @@ ...@@ -28,5 +29,65 @@
- name: Disable linstor-controller - name: Disable linstor-controller
systemd: systemd:
service: linstor-controller service: linstor-controller
state: stopped
enabled: no enabled: no
- name: copy latest binary of linstor-defaults
get_url:
url: https://git.sch.bme.hu/kszk/sysadmin/memory-storage-defaults/-/jobs/artifacts/master/raw/memory-defaults?job=build
dest: /usr/local/bin/memory-defaults
mode: 0755
- name: copy linstor-defaults config
copy:
dest: /etc/memory-defaults.yaml
src: memory-defaults.yaml
- name: add systemd unit 1
get_url:
url: https://git.sch.bme.hu/kszk/sysadmin/memory-storage-defaults/-/raw/master/systemd/memory-defaults.service
dest: /etc/systemd/system/memory-defaults.service
- name: add systemd unit 2 (timer)
get_url:
url: https://git.sch.bme.hu/kszk/sysadmin/memory-storage-defaults/-/raw/master/systemd/memory-defaults.timer
dest: /etc/systemd/system/memory-defaults.timer
- name: start systemd timer (unit 2)
systemd:
state: started
enabled: yes
name: memory-defaults.timer
- name: create var-lib-linstor.mount
copy:
src: var-lib-linstor.mount
dest: /etc/systemd/system/var-lib-linstor.mount
- name: copy linstor_db.toml
copy:
src: linstor_db.toml
dest: /etc/drbd-reactor.d/linstor_db.toml
- name: create directory for override config so that the next task won't complain...
file:
path: /etc/systemd/system/linstor-satellite.service.d/
state: directory
- name: copy systemd override for linstor-satellite
copy:
src: override.conf
dest: /etc/systemd/system/linstor-satellite.service.d/override.conf
- name: Reload systemd daemon
systemd:
daemon_reload: yes
- name: Enable and restart drbd-reactor
systemd:
name: drbd-reactor
state: restarted
enabled: yes
- name: create linstor client config
copy:
src: linstor-client.conf
dest: /etc/linstor/linstor-client.conf
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment