diff --git a/ohpc-build.yaml b/ohpc-build.yaml index 70de735e..e8a889d6 100644 --- a/ohpc-build.yaml +++ b/ohpc-build.yaml @@ -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 } diff --git a/roles/ohpc_add_rabbitmq_agents/files/ohpc_account.service b/roles/ohpc_add_rabbitmq_agents/files/ohpc_account.service index 3bf9568b..b7d35aad 100644 --- a/roles/ohpc_add_rabbitmq_agents/files/ohpc_account.service +++ b/roles/ohpc_add_rabbitmq_agents/files/ohpc_account.service @@ -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 \ No newline at end of file +WantedBy=multi-user.target diff --git a/roles/ohpc_add_rabbitmq_agents/files/slurm_account.service b/roles/ohpc_add_rabbitmq_agents/files/slurm_account.service index 43ea81eb..3e50fde8 100644 --- a/roles/ohpc_add_rabbitmq_agents/files/slurm_account.service +++ b/roles/ohpc_add_rabbitmq_agents/files/slurm_account.service @@ -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 \ No newline at end of file +WantedBy=multi-user.target diff --git a/roles/ohpc_add_rabbitmq_agents/tasks/main.yaml b/roles/ohpc_add_rabbitmq_agents/tasks/main.yaml index 0abad5dd..7185753b 100644 --- a/roles/ohpc_add_rabbitmq_agents/tasks/main.yaml +++ b/roles/ohpc_add_rabbitmq_agents/tasks/main.yaml @@ -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 2>&1 & @@ -46,4 +47,4 @@ service: name: slurm_account.service state: started - enabled: yes \ No newline at end of file + enabled: yes diff --git a/roles/ohpc_config_build/tasks/main.yml b/roles/ohpc_config_build/tasks/main.yml index 6c0e304b..0b956bca 100644 --- a/roles/ohpc_config_build/tasks/main.yml +++ b/roles/ohpc_config_build/tasks/main.yml @@ -77,7 +77,6 @@ - name: import files into WW database command: wwsh file import "{{ item }}" - become: true with_items: - /etc/passwd - /etc/group diff --git a/roles/ood_add_rabbitmq_agents/files/ood_account.service b/roles/ood_add_rabbitmq_agents/files/ood_account.service index 37aee679..5e398f35 100644 --- a/roles/ood_add_rabbitmq_agents/files/ood_account.service +++ b/roles/ood_add_rabbitmq_agents/files/ood_account.service @@ -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 \ No newline at end of file +WantedBy=multi-user.target diff --git a/roles/ood_add_rabbitmq_agents/tasks/main.yaml b/roles/ood_add_rabbitmq_agents/tasks/main.yaml index 6451befa..2a9b87f9 100644 --- a/roles/ood_add_rabbitmq_agents/tasks/main.yaml +++ b/roles/ood_add_rabbitmq_agents/tasks/main.yaml @@ -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 2>&1 & diff --git a/roles/ood_user_reg_cloud/tasks/main.yml b/roles/ood_user_reg_cloud/tasks/main.yml index 31c26d5b..ba8a6b9d 100644 --- a/roles/ood_user_reg_cloud/tasks/main.yml +++ b/roles/ood_user_reg_cloud/tasks/main.yml @@ -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 diff --git a/roles/ood_user_reg_cloud/templates/celery.service b/roles/ood_user_reg_cloud/templates/celery.service new file mode 100644 index 00000000..a687b6d2 --- /dev/null +++ b/roles/ood_user_reg_cloud/templates/celery.service @@ -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 diff --git a/roles/pre_ohpc/tasks/main.yml b/roles/pre_ohpc/tasks/main.yml index 4eb604e2..daa7bf94 100644 --- a/roles/pre_ohpc/tasks/main.yml +++ b/roles/pre_ohpc/tasks/main.yml @@ -16,6 +16,7 @@ yum: state: latest name: + - "python3" - "MySQL-python" - "epel-release" - "wget" diff --git a/roles/prep_ood/tasks/main.yaml b/roles/prep_ood/tasks/main.yaml index 5c6f8c26..21edfc86 100644 --- a/roles/prep_ood/tasks/main.yaml +++ b/roles/prep_ood/tasks/main.yaml @@ -16,6 +16,7 @@ state: installed update_cache: true name: + - python3 - nfs-utils - ohpc-base-compute - slurm-ohpc @@ -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" }