Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi pulsar deployment #20

Draft
wants to merge 1 commit into
base: public
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions tf/ansible/group_vars/pulsar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
pulsar_package_name: pulsar-app
pulsar_package_version: 0.15.2.dev1

pulsar_virtualenv_command: "python -m venv"
pulsar_root: /opt/pulsar
# Paths
pulsar_persistence_dir: /data/share/persisted_data
pulsar_staging_dir: /data/share/staging
pulsar_dependencies_dir: /data/share/tools
pulsar_venv_dir: "{{ pulsar_root }}/venv3"
pulsar_config_dir: "{{ pulsar_root }}/config"
pulsar_optional_dependencies:
- pycurl
- kombu
- psutil
pulsar_pycurl_ssl_library: openssl
pulsar_systemd: true
pulsar_systemd_enabled: false
pulsar_systemd_runner: webless


pulsar_separate_privileges: false
pulsar_create_user: true
pulsar_user:
name: pulsar
create_home: false
shell: /bin/bash
home: "{{ pulsar_root }}"

pulsar_yaml_config:
conda_auto_init: true
conda_auto_install: true
assign_ids: none
message_queue_url: REAL_MESSAGE_QUEUE_URL
min_polling_interval: 0.5
persistence_directory: "{{ pulsar_persistence_dir }}"
staging_directory: "{{ pulsar_staging_dir }}"
tool_dependency_dir: "{{ pulsar_dependencies_dir }}"
managers:
production:
submit_universe: vanilla
type: queued_condor
test:
submit_universe: vanilla
type: queued_condor
3 changes: 3 additions & 0 deletions tf/ansible/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,6 @@
notify: restart pulsar
become: yes

- name: Install additional Pulsar services
import_tasks: pulsar.yml
become: yes
28 changes: 28 additions & 0 deletions tf/ansible/pulsar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
- name: Pulsar setup
vars:
role_runs:
- pulsar_systemd_service_name: pulsar_eu
pulsar_config_dir: "{{ pulsar_root }}/config_eu"
message_queue_url: REAL_MESSAGE_QUEUE_URL_EU
pulsar_persistence_dir: /data/share/eu/persisted_data
pulsar_staging_dir: /data/share/eu/staging
- pulsar_systemd_service_name: pulsar_be
pulsar_config_dir: "{{ pulsar_root }}/config_be"
message_queue_url: REAL_MESSAGE_QUEUE_URL_BE
pulsar_persistence_dir: /data/share/be/persisted_data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be configurable?
I could imagine the playbook iterates over a list of dicts which is provided by a terraform variable, if we want to stick to deployment using one single command; similar to this

Copy link
Contributor

@mtangaro mtangaro Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gm-ds is further working on this. We need the list of queues as input for endpoint configuration, with also the “short name” of the endpoint, e.g. it01..., for path configuration.
We can, probably, parse the queue to retrieve the short name. Do you think this can be fine?

pulsar_staging_dir: /data/share/be/staging

tasks:
- name: Execute Pulsar role multiple times with different variables
include_role:
name: galaxyproject.puslar
loop: "{{ role_runs }}"
loop_control:
loop_var: role_vars
vars:
pulsar_systemd_service_name: "{{ role_vars.pulsar_systemd_service_name }}"
pulsar_config_dir: "{{ role_vars.pulsar_config_dir }}"
message_queue_url: "{{ role_vars.message_queue_url }}"
pulsar_persistence_dir: "{{ role_vars.pulsar_persistence_dir }}"
pulsar_staging_dir: "{{ role_vars.pulsar_staging_dir }}"
4 changes: 4 additions & 0 deletions tf/ansible/requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
roles:
- src: galaxyproject.pulsar
version: 1.0.11