Skip to content

Commit

Permalink
[orangelight] Add sidekiq (#5712)
Browse files Browse the repository at this point in the history
* Start adding sidekiq to orangelight

Co-authored-by: Max Kadel <[email protected]>

* [orangelight] Move roles into playbook instead of meta/main.yml

- This reduces duplication of running roles when running the playbook, and fixes a bug with the deploy_user role when we run the sidekiq role on a subset of boxes

Co-authored-by: Jane Sandberg <[email protected]>

---------

Co-authored-by: Jane Sandberg <[email protected]>
Co-authored-by: Max Kadel <[email protected]>
Co-authored-by: Jane Sandberg <[email protected]>
  • Loading branch information
4 people authored Jan 9, 2025
1 parent 9be07d8 commit a43d16b
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 10 deletions.
1 change: 1 addition & 0 deletions group_vars/orangelight/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,4 @@ rails_app_vars:
value: "{{ vault_ol_libanswers_client_secret }}"
sneakers_worker_name: orangelight-sneakers
sneakers_workers: EventHandler
sidekiq_worker_name: sidekiq
17 changes: 14 additions & 3 deletions playbooks/orangelight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,21 @@
- ../group_vars/orangelight/{{ runtime_env | default('staging') }}_solr.yml
- ../group_vars/orangelight/vault.yml
roles:
- role: deploy_user
- role: bind9
- role: ruby_s
- role: passenger
- role: postgresql
- role: nodejs
- role: sidekiq_worker
when: "'indexer' in inventory_hostname"
- role: rails_app
- role: sneakers_worker
- role: redis
- role: extra_path
- role: mailcatcher
- role: roles/postgresql
- role: roles/orangelight
- role: roles/datadog
- role: orangelight
- role: datadog
when: runtime_env | default('staging') == "production"

post_tasks:
Expand Down
1 change: 1 addition & 0 deletions roles/deploy_user/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
run_once: true
tags: update_keys


- name: deploy_user | create the .ssh directory
ansible.builtin.file:
path: "/home/{{ deploy_user }}/.ssh/"
Expand Down
9 changes: 2 additions & 7 deletions roles/orangelight/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,9 @@ galaxy_info:

license: MIT

min_ansible_version: 2.2
min_ansible_version: '2.2'

platforms:
- name: Ubuntu
versions:
- 18.04
dependencies:
- role: 'redis'
- role: 'sneakers_worker'
- role: 'extra_path'
- role: 'rails_app'
- jammy
11 changes: 11 additions & 0 deletions roles/orangelight/molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@
apt:
update_cache: true
cache_valid_time: 600
roles:
- role: deploy_user
- role: bind9
- role: ruby_s
- role: passenger
- role: postgresql
- role: nodejs
- role: rails_app
- role: sneakers_worker
- role: redis
- role: extra_path
tasks:
- name: "Include orangelight"
include_role:
Expand Down

0 comments on commit a43d16b

Please sign in to comment.