From 8059e42880f6e363a2bd9902428cf5a09607b244 Mon Sep 17 00:00:00 2001 From: Miguel Caballer Date: Mon, 23 Sep 2024 10:20:14 +0200 Subject: [PATCH 1/2] Move pulsar recipe to this repo --- artifacts/lrms/pulsar.yml | 30 ++++++++++++++++++++++++++++++ custom_types.yaml | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 artifacts/lrms/pulsar.yml diff --git a/artifacts/lrms/pulsar.yml b/artifacts/lrms/pulsar.yml new file mode 100644 index 0000000..92352a4 --- /dev/null +++ b/artifacts/lrms/pulsar.yml @@ -0,0 +1,30 @@ +--- +- hosts: localhost + connection: local + handlers: + - name: Restart Pulsar + ansible.builtin.service: + name: pulsar.service + state: restarted + enabled: yes + + tasks: + - name: Check whether Pulsar is installed + ansible.builtin.stat: + path: /opt/pulsar/config/app.yml + register: st + + - name: Fail if the file does not exist + ansible.builtin.fail: + msg: "It is a prerequisite to use the VGCN virtual machine image: https://github.com/usegalaxy-eu/vgcn" + when: not st.stat.exists + + - name: Configure message queue in Pulsar + ansible.builtin.lineinfile: + path: /opt/pulsar/config/app.yml + regexp: '^message_queue_url:' + line: 'message_queue_url: pyamqp://{{ pulsar_user }}:{{ pulsar_password }}@mq.galaxyproject.eu:5671//pulsar/{{ pulsar_user }}?ssl=1' + owner: root + group: root + mode: '0644' + notify: Restart Pulsar diff --git a/custom_types.yaml b/custom_types.yaml index f8c9eff..ad25991 100644 --- a/custom_types.yaml +++ b/custom_types.yaml @@ -985,7 +985,7 @@ node_types: interfaces: Standard: configure: - implementation: https://raw.githubusercontent.com/sebastian-luna-valero/tosca/main/artifacts/pulsar.yml + implementation: https://raw.githubusercontent.com/grycap/tosca/main/artifacts/lrms/pulsar.yml inputs: pulsar_user: { get_property: [ SELF, mq_user ] } pulsar_password: { get_property: [ SELF, mq_password ] } From 5d426cec031e5d62c57823dab7fa9dbf291efbfe Mon Sep 17 00:00:00 2001 From: Miguel Caballer Date: Mon, 23 Sep 2024 10:26:17 +0200 Subject: [PATCH 2/2] Move pulsar recipe to this repo --- artifacts/lrms/pulsar.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artifacts/lrms/pulsar.yml b/artifacts/lrms/pulsar.yml index 92352a4..052718f 100644 --- a/artifacts/lrms/pulsar.yml +++ b/artifacts/lrms/pulsar.yml @@ -6,7 +6,7 @@ ansible.builtin.service: name: pulsar.service state: restarted - enabled: yes + enabled: true tasks: - name: Check whether Pulsar is installed