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

added celery as a service #2

Open
wants to merge 26 commits into
base: feat-add-uwsgi
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f15e3f7
added warewulf role roles/install_ww_bin/tasks/main.yaml and roles/in…
krishmoodbidri Sep 6, 2019
9c173fe
modified ood_user_reg role for packer ood build. Moved the deleted ta…
krishmoodbidri Sep 6, 2019
edae355
added autofs to prep_ood the ood packer image build
krishmoodbidri Sep 9, 2019
07adbf9
changed role prep_ood to prep_ood_cloud
krishmoodbidri Sep 10, 2019
22e441e
Use ohpc_config_build role in img build playbook.
eesaanatluri Sep 17, 2019
0baf5c8
Remove hosts file from imports. It exists by default
eesaanatluri Sep 17, 2019
7aaae96
Remove become privilege escalation as we run as root
eesaanatluri Sep 17, 2019
869a12c
removed mount home task
krishmoodbidri Sep 17, 2019
419387a
installed latest version of firewalld
krishmoodbidri Sep 17, 2019
74de518
Merge branch 'feat-ood-build-image' into devint-all-ops
jprorama Sep 19, 2019
e9f30d8
Enable user registration feature
jprorama Sep 23, 2019
0a8c74d
Remove uneeded warewulf tasks for cloud image deploy
jprorama Sep 23, 2019
da62789
Remove stateful node boot task
jprorama Sep 23, 2019
132d835
Remove node set state task because it is not necessary
jprorama Sep 23, 2019
d80a97b
Merge branch 'feat-openstack' of https://github.com/jprorama/CRI_XCBC…
krishmoodbidri Feb 18, 2020
feeb774
Update ohpc agent to run in python3
diedpigs Mar 2, 2020
a908dd3
Update ood agent to run in python3
diedpigs Mar 2, 2020
b247e79
Instal python3 on ohpc via role pre_ohpc
diedpigs Mar 3, 2020
62fc156
Install python3 on ood via role prep_ood
diedpigs Mar 3, 2020
beeaeef
added celery as a service
krishmoodbidri Mar 13, 2020
c8e6271
Merge pull request #147 from diedpigs/rmq-agent-update-python3
jprorama Mar 13, 2020
0acd266
Merge pull request #149 from diedpigs/feat-add-uwsgi
jprorama Mar 13, 2020
8264bd3
changed print statement to start celery.service
krishmoodbidri Mar 13, 2020
6f2a2d7
Merge branch 'origin/feat-openstack' into celery-service
krishmoodbidri Mar 13, 2020
5eb7dcd
Merge branch 'feat-openstack' of https://github.com/jprorama/CRI_XCBC…
krishmoodbidri Mar 13, 2020
32b1404
Merge branch 'celery-service' of https://github.com/krishmoodbidri/CR…
krishmoodbidri Mar 13, 2020
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
2 changes: 1 addition & 1 deletion ohpc-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
roles:
- { name: 'pre_ohpc', tags: 'pre_ohpc' }
- { name: 'ohpc_install', tags: 'ohpc_install' }
- { name: 'ohpc_config_build', tags: 'ohpc_config' }
- { name: 'ohpc_config_build', tags: 'ohpc_config_build' }
- { name: 'ohpc_add_easybuild', tags: 'ohpc_add_easybuild' }
- { name: 'ohpc_jupyter', tags: 'ohpc_jupyter', when: jupyter_provision}
- { name: 'ohpc_matlab', tags: 'ohpc_matlab', when: matlab_provision }
Expand Down
4 changes: 2 additions & 2 deletions roles/ohpc_add_rabbitmq_agents/files/ohpc_account.service
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Type=simple
Restart=always
RestartSec=1
User=centos
ExecStart=/usr/bin/env python /opt/rabbitmq_agents/ohpc_account_create.py
ExecStart=/usr/bin/env python3 /opt/rabbitmq_agents/ohpc_account_create.py

[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target
4 changes: 2 additions & 2 deletions roles/ohpc_add_rabbitmq_agents/files/slurm_account.service
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Type=simple
Restart=always
RestartSec=1
User=centos
ExecStart=/usr/bin/env python /opt/rabbitmq_agents/slurm_agent.py
ExecStart=/usr/bin/env python3 /opt/rabbitmq_agents/slurm_agent.py

[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target
3 changes: 2 additions & 1 deletion roles/ohpc_add_rabbitmq_agents/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- name: Check if environment is properly setup, and install python packages if not
pip:
requirements: /opt/rabbitmq_agents/requirements.txt
executable: pip3

- name: Run the ohpc_account_create agent in the background
shell: cd /opt/rabbitmq_agents; nohup python ohpc_account_create.py </dev/null >/dev/null 2>&1 &
Expand All @@ -46,4 +47,4 @@
service:
name: slurm_account.service
state: started
enabled: yes
enabled: yes
1 change: 0 additions & 1 deletion roles/ohpc_config_build/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@

- name: import files into WW database
command: wwsh file import "{{ item }}"
become: true
with_items:
- /etc/passwd
- /etc/group
Expand Down
4 changes: 2 additions & 2 deletions roles/ood_add_rabbitmq_agents/files/ood_account.service
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Type=simple
Restart=always
RestartSec=1
User=centos
ExecStart=/usr/bin/env python /opt/rabbitmq_agents/ood_account_create.py
ExecStart=/usr/bin/env python3 /opt/rabbitmq_agents/ood_account_create.py

[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target
1 change: 1 addition & 0 deletions roles/ood_add_rabbitmq_agents/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- name: Check if environment is properly setup, and install python packages if not
pip:
requirements: /opt/rabbitmq_agents/requirements.txt
executable: pip3

#- name: Run the ood_account_create agent in the background
# shell: cd /opt/rabbitmq_agents; nohup python ood_account_create.py </dev/null >/dev/null 2>&1 &
Expand Down
13 changes: 13 additions & 0 deletions roles/ood_user_reg_cloud/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,19 @@
group: apache
state: directory

- name: Copy Celery service template
template:
src: "{{ item }}"
dest: "/etc/systemd/system/{{ item }}"
with_items:
- celery.service

- name: Start celery.service
service:
name: celery.service
state: started
enabled: yes

- name: Put apache config file in place
template:
src: user-reg_conf.j2
Expand Down
13 changes: 13 additions & 0 deletions roles/ood_user_reg_cloud/templates/celery.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Service to start celery process.
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=centos
WorkingDirectory={{ user_register_app_path }}
ExecStart=/usr/bin/env celery -A tasks worker --loglevel=info --concurrency=4
[Install]
WantedBy=multi-user.target
1 change: 1 addition & 0 deletions roles/pre_ohpc/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
yum:
state: latest
name:
- "python3"
- "MySQL-python"
- "epel-release"
- "wget"
Expand Down
11 changes: 1 addition & 10 deletions roles/prep_ood/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
state: installed
update_cache: true
name:
- python3
- nfs-utils
- ohpc-base-compute
- slurm-ohpc
Expand All @@ -25,13 +26,3 @@
- tmux
- ruby

- name: Mount /home, /opt/ohpc/pub from OHPC node
mount:
path: "{{ item.path }}"
src: "{{ item.src }}"
fstype: nfs
opts: nfsvers=3,nodev,noatime
state: mounted
with_items:
- { path: "/home", src: "{{ headnode_private_ip }}:/home" }
- { path: "/opt/ohpc/pub", src: "{{ headnode_private_ip }}:/opt/ohpc/pub" }