Skip to content
Open
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
5 changes: 5 additions & 0 deletions tf/ansible/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
hosts: all

pre_tasks:
- name: Install pip dependency
package:
name: python3.11-packaging
become: yes

- name: Install or upgrade Pulsar package
ansible.builtin.pip:
name: pulsar-app
Expand Down
18 changes: 9 additions & 9 deletions tf/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,19 @@ variable "ssh-port" {
default = "22"
}

// Set these variables during execution terraform apply -var "pvt_key=<~/.ssh/my_private_key>"
// -var "condor_pass=<MyCondorPassword>"
// -var "condor_pass=pyamqp://<your-rabbit-mq-user>:<the-password-we-provided-to-you>@mq.galaxyproject.eu:5671//pulsar/<your-rabbit-mq-vhost>?ssl=1"
// Set these variables during execution terraform apply -var "pvt_key=<~/.ssh/my_private_key>"
// -var "condor_pass=<MyCondorPassword>"
// -var "mq_string=pyamqp://<your-rabbit-mq-user>:<the-password-we-provided-to-you>@mq.galaxyproject.eu:5671//pulsar/<your-rabbit-mq-vhost>?ssl=1"
variable "pvt_key" {}

variable "condor_pass" {}

variable "mq_string" {}

// Set the extra_mq_urls variable to deploy multiple pulsar services. Leave unedited otherwise
// Example: terraform apply -var "pvt_key=<~/.ssh/my_private_key>"
// -var "condor_pass=<MyCondorPassword>"
// -var "condor_pass=pyamqp://<your-rabbit-mq-user>:<the-password-we-provided-to-you>@mq.galaxyproject.eu:5671//pulsar/<your-rabbit-mq-vhost>?ssl=1"
// Example: terraform apply -var "pvt_key=<~/.ssh/my_private_key>"
// -var "condor_pass=<MyCondorPassword>"
// -var "mq_string=pyamqp://<your-rabbit-mq-user>:<the-password-we-provided-to-you>@mq.galaxyproject.eu:5671//pulsar/<your-rabbit-mq-vhost>?ssl=1"
// -var 'extra_mq_urls={it="pyamqp_url0", be="pyamqp_url1"}'

variable "extra_mq_urls" {
Expand All @@ -132,11 +132,11 @@ variable "extra_mq_urls" {
)
error_message = "Extra message queues must not contain mq_string and values must be unique."
}
}
}

// Pass an empty map if extra_mq_urls is unedited, otherwise wraps the map with the ansible dictionary name
locals {
norm_ex_mqs = (
tomap({"name" = "value"}) == var.extra_mq_urls
norm_ex_mqs = (
tomap({"name" = "value"}) == var.extra_mq_urls
) ? tomap({}) : merge(tomap({"ex_mqs_dict" = var.extra_mq_urls}))
}