diff --git a/artifacts/lrms/pulsar.yml b/artifacts/lrms/pulsar.yml new file mode 100644 index 0000000..052718f --- /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: true + + 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 ] }