From 8efec7971e3ac71f2a173316a960bc1379713134 Mon Sep 17 00:00:00 2001 From: Dmitry Ozerov Date: Fri, 23 Apr 2021 19:53:51 +0200 Subject: [PATCH] blessed configuration for some detector configuration on daq3 --- operation-tools/00README | 27 ++++++++++++--- operation-tools/clean_receiver_daq.config.yml | 4 +-- operation-tools/daq3.JF01_JF03_JF07.yml | 33 +++++++++++++++++-- operation-tools/daq3.JF14.yml | 17 +++++++++- 4 files changed, 71 insertions(+), 10 deletions(-) diff --git a/operation-tools/00README b/operation-tools/00README index d240d52..2781d3c 100644 --- a/operation-tools/00README +++ b/operation-tools/00README @@ -1,3 +1,25 @@ +Following pre-defined configuration exists (to apply it: +ansible-playbook ..yml + +Machine detector_configuration +daq9 JF15 +daq4 JF02_JF06 +daq4 JF06_4M +daq3 JF14 +daq3 +... ... + +Example: +ansible-playbook daq4.JF02_JF06.yml + +To switch machine to another configuration without replacing installed software: +ansible-playbook --extra-vars "host=sf_daq_alvra" clean_receiver_daq.config.yml + +To clean completely machine from daq software: +ansible-playbook --extra-vars "host=sf_daq_alvra" clean_receiver_daq.all.yml + +Some of the steps can be made separately, namely: + 1. clean daq machine from not proper services: ansible-playbook --extra-vars "host=sf_daq_maloja" clean_old_services.yml @@ -7,9 +29,4 @@ ansible-playbook --extra-vars "host=sf_daq_alvra" install_sf_daq_buffer.yml 3. install streamvis in receiver machines ansible-playbook --extra-vars "host=sf_daq_alvra" install_streamvis.yml -4. configure daq machine -ansible-playbook daq4.JF02_JF06.yml - -5. clean daq receiver machine from all services, files, installation -ansible-playbook --extra-vars "host=sf_daq_alvra" clean_receiver_daq.yml diff --git a/operation-tools/clean_receiver_daq.config.yml b/operation-tools/clean_receiver_daq.config.yml index 1ddc68b..9fda079 100644 --- a/operation-tools/clean_receiver_daq.config.yml +++ b/operation-tools/clean_receiver_daq.config.yml @@ -2,14 +2,14 @@ hosts: '{{ host }}' become: true tasks: - - name: stop, disable and remove services + - name: stop, disable and remove services (leave software) shell: | systemctl stop JF* rm -rf /etc/systemd/system/multi-user.target.wants/JF* rm -rf /etc/systemd/system/JF* - rm -rf /home/dbe/git /home/dbe/miniconda3 /home/dbe/service_scripts /home/dbe/bin rm -rf /etc/telegraf/telegraf.d/JF* systemctl restart telegraf + rm -rf /home/dbe/service_scripts/JF* diff --git a/operation-tools/daq3.JF01_JF03_JF07.yml b/operation-tools/daq3.JF01_JF03_JF07.yml index 448a9e9..57abb0b 100644 --- a/operation-tools/daq3.JF01_JF03_JF07.yml +++ b/operation-tools/daq3.JF01_JF03_JF07.yml @@ -1,3 +1,10 @@ +- import_playbook: install_sf_daq_buffer.yml + vars: + host: sf_daq_bernina + +- import_playbook: install_streamvis.yml + vars: + host: sf_daq_bernina - name: install receiver services on daq3 for JF07 hosts: sf_daq_bernina @@ -21,6 +28,12 @@ cores_udp_recv_receivers: 36 36 36 36 36 36 36 36 37 37 37 37 37 37 37 37 38 38 38 38 38 38 38 38 39 39 39 39 39 39 39 39 cores_assembler: 9 + handlers: + - name: restart_telegraf + service: + name: telegraf + state: restarted + tasks: - name: install execution scripts become_user: dbe @@ -65,7 +78,8 @@ template: src: templates/telegraph_detector.conf dest: /etc/telegraf/telegraf.d/{{ detector }}_daq.conf - + notify: + - restart_telegraf - name: install receiver services on daq3 for JF01 hosts: sf_daq_bernina @@ -89,6 +103,12 @@ cores_udp_recv_receivers: 16 16 16 cores_assembler: 10 + handlers: + - name: restart_telegraf + service: + name: telegraf + state: restarted + tasks: - name: install execution scripts become_user: dbe @@ -133,7 +153,8 @@ template: src: templates/telegraph_detector.conf dest: /etc/telegraf/telegraf.d/{{ detector }}_daq.conf - + notify: + - restart_telegraf - name: install receiver services on daq3 for JF03 hosts: sf_daq_bernina @@ -157,6 +178,12 @@ cores_udp_recv_receivers: 12 cores_assembler: 11 + handlers: + - name: restart_telegraf + service: + name: telegraf + state: restarted + tasks: - name: install execution scripts become_user: dbe @@ -201,5 +228,7 @@ template: src: templates/telegraph_detector.conf dest: /etc/telegraf/telegraf.d/{{ detector }}_daq.conf + notify: + - restart_telegraf diff --git a/operation-tools/daq3.JF14.yml b/operation-tools/daq3.JF14.yml index 3656e7d..a892778 100644 --- a/operation-tools/daq3.JF14.yml +++ b/operation-tools/daq3.JF14.yml @@ -1,3 +1,11 @@ +- import_playbook: install_sf_daq_buffer.yml + vars: + host: sf_daq_bernina + +- import_playbook: install_streamvis.yml + vars: + host: sf_daq_bernina + - name: install receiver services on daq3 for JF14 hosts: sf_daq_bernina @@ -21,6 +29,12 @@ cores_udp_recv_receivers: 12 cores_assembler: 11 + handlers: + - name: restart_telegraf + service: + name: telegraf + state: restarted + tasks: - name: install execution scripts become_user: dbe @@ -65,5 +79,6 @@ template: src: templates/telegraph_detector.conf dest: /etc/telegraf/telegraf.d/{{ detector }}_daq.conf - + notify: + - restart_telegraf