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

Celery service #1

Closed
wants to merge 114 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
bd97172
Remove NVIDIA install file from gpu_build_vnfs role to reduce size
jprorama Jun 10, 2019
472ad46
Update running kernel to centos 1902 cloud image
jprorama Jun 10, 2019
ee9c740
Update default cluster users to centos to match cloud image convention
jprorama Jun 10, 2019
e34db64
Assign headnode static IP address to the cluster network
jprorama Jun 10, 2019
5fea39a
Remove static IP assignment for headnode
eesaanatluri Jun 17, 2019
3ff2d36
Use inventory varible instead of static IP.
eesaanatluri Jun 17, 2019
1d7a787
Merge pull request #109 from eesaanatluri/fix-sacctmgr-w/dhcp-openstack
jprorama Jun 19, 2019
ac2d209
Add role compute_build_image
diedpigs Aug 5, 2019
7fec750
Update compute.yaml playbook
diedpigs Aug 5, 2019
a304bc1
Update hosts file
diedpigs Aug 6, 2019
4579bce
Update ohpc private ip
diedpigs Aug 15, 2019
c585ad3
Update ood private ip
diedpigs Aug 15, 2019
ed2ef75
Add autofs into compute node
diedpigs Aug 20, 2019
15759e9
Update ood private ip variable name
diedpigs Aug 20, 2019
bf97930
Merge branch 'feat-update-private-ip' into feat-compute-build-image
diedpigs Aug 20, 2019
5eaf9bc
Update chrony.conf in compute image
diedpigs Aug 22, 2019
d8d3c39
Add install warewulf binary role
diedpigs Aug 23, 2019
f6c46e2
Update task name
diedpigs Aug 23, 2019
85da174
Add warewulf config file template
diedpigs Aug 27, 2019
a538d39
Remove compute.yaml playbook
diedpigs Sep 5, 2019
2009352
Add compute-build.yaml playbook
diedpigs Sep 5, 2019
85b6629
Add two new roles for deploy step.
eesaanatluri Sep 4, 2019
339a923
Create a new playbook to use the new cloud roles
eesaanatluri Sep 4, 2019
02801bb
playbook specifying roles during image build step.
eesaanatluri Sep 4, 2019
1c6253b
Add site-ops following the structure of site.yaml
eesaanatluri Sep 4, 2019
33e84f4
disable firewalld to mount the home dir in OOD.
eesaanatluri Aug 20, 2019
a9f5328
Change existing static IPs to preferred IPs
eesaanatluri Sep 5, 2019
f0a1826
Set node_inventory_auto to false
eesaanatluri Sep 5, 2019
e618dc9
Remove tasks related to PXE boot.
eesaanatluri Sep 5, 2019
e156ad4
Remove wwnodescan and DHCP restart tasks.
eesaanatluri Sep 5, 2019
2e11b56
Add/update nodes in WW DB based on added conditional.
eesaanatluri Sep 5, 2019
f5c8cf2
Remove pause for compute node and slurmd to start.
eesaanatluri Sep 6, 2019
ce95441
These tasks are moved to roles mentioned below.
eesaanatluri Sep 6, 2019
b46e744
Add bootlocal option to avoid file synch issue.
eesaanatluri Sep 13, 2019
b3d7bc7
Add 30s delay to avoid task failure.
eesaanatluri Sep 13, 2019
e9b37d8
Add file imports into WW DB
eesaanatluri Sep 13, 2019
f62e9eb
Add ohpc,ood,compute img build playbooks to site-build.yaml
eesaanatluri Sep 17, 2019
07cdd76
Call ohpc_config_build to get build-specific steps
jprorama Sep 17, 2019
d08e2f3
Remove /etc/hosts from warewulf registration since this is a dynamic …
jprorama Sep 17, 2019
0f288dc
Create ood-build.yml playbook for ood image packer build
krishmoodbidri Sep 6, 2019
ffd1cdf
Add ood_user_reg_cloud role for packer ood build
krishmoodbidri Sep 6, 2019
9016e08
Added ohpc, slurm, and autofs to prep_ood_cloud role
krishmoodbidri Sep 9, 2019
dfbed5c
changed role prep_ood to prep_ood_cloud
krishmoodbidri Sep 10, 2019
febd89e
installed latest version of firewalld
krishmoodbidri Sep 17, 2019
2bf4bf7
Add update apache config task to ood_user_reg_cloud
krishmoodbidri Sep 23, 2019
fcfcd52
modified htpasswd to add centos
krishmoodbidri Oct 8, 2019
60c47e5
Fix CentOS SCLo repo access
jprorama Sep 19, 2019
68a003a
Fix repo path for CentOS SCLo to major release base path
jprorama Oct 16, 2019
c3e4b4f
Enable user reg app and create script install
jprorama Oct 16, 2019
fe19da5
Add ood_user_reg_ops role
krishmoodbidri Sep 24, 2019
2653a66
Fix yaml formatting of ood-ops playbook.
krishmoodbidri Oct 1, 2019
4d06e30
Re-format httpd24 restart task into multi-line entry
krishmoodbidri Oct 2, 2019
c890824
Add warewulf_sync role to ood playbook
krishmoodbidri Oct 8, 2019
544030a
fixed whitespace error in ood-ops playbook.
krishmoodbidri Oct 8, 2019
fa35f2e
Merge branch 'feat-ood-provision-rebase' into devint-ood-compute-build
jprorama Oct 16, 2019
db0538e
Merge pull request #120 from diedpigs/feat-compute-build-image
jprorama Oct 17, 2019
b7a3e1e
Merge pull request #133 from jprorama/devint-ood-compute-build
jprorama Oct 17, 2019
e9ad129
Enable user registration feature
jprorama Sep 23, 2019
64d2fb1
Remove uneeded warewulf tasks for cloud image deploy
jprorama Sep 23, 2019
412f853
Remove stateful node boot task
jprorama Sep 23, 2019
c08f3ba
Remove node set state task because it is not necessary
jprorama Sep 23, 2019
e12ff87
Merge branch 'feat-openstack' into devint-ohpc-build
jprorama Oct 22, 2019
b43de80
Merge pull request #134 from jprorama/devint-ohpc-build
jprorama Oct 22, 2019
bed0aa2
Change the playbook target to the headnode group name
jprorama Oct 24, 2019
aa0d8b8
Merge pull request #135 from jprorama/fix-playbook-group-name
jprorama Oct 24, 2019
ae97b04
Update build image with runtime instance name for slurm controller an…
jprorama Oct 28, 2019
8929777
Merge pull request #136 from jprorama/fix-slurm-ops-config
jprorama Dec 9, 2019
fbc302d
Install wheel to avoid easybuild bootstrap error.
eatluri Dec 19, 2019
b6ad44e
Install python3 and pip3 to avoid easybuild bootstrap error
eatluri Jan 13, 2020
0edd960
Install setuptools using pip3 to avoid deprecation error
eatluri Jan 13, 2020
ac9f0ae
Upgrade pip3 to latest avoid error in the bootstrap step
eatluri Jan 14, 2020
22e3bc5
patch to fix job state directory space in slurm.conf
krishmoodbidri Jan 30, 2020
3a8be06
Add ood_rabbitmq role
diedpigs Feb 5, 2020
057ac3f
Add rabbitmq related variables
diedpigs Feb 5, 2020
98ad12b
Merge pull request #142 from krishmoodbidri/patch-slurm.conf
jprorama Feb 11, 2020
1aa2a71
Rename role ood_rabbitmq to ohpc_rabbitmq
diedpigs Feb 18, 2020
b18b180
Stop firewalld
diedpigs Feb 18, 2020
ff4b9a5
Add ohpc_rabbitmq role in ohpc-build.yaml playbook
diedpigs Feb 18, 2020
9aa597d
Adding rabbitmq variables to group variables
rtripath89 Feb 13, 2020
53e2d53
Adding a role to run rabbitmq agents on ohpc
rtripath89 Feb 13, 2020
560415d
Adding ohpc_add_rabbitmq_agents role to ohpc script
rtripath89 Feb 13, 2020
ff3f38e
Adding role ood_add_rabbitmq_agents to ood script
rtripath89 Feb 13, 2020
5e008ce
Adding a role ood_add_rabbitmq_agents
rtripath89 Feb 13, 2020
525c87f
Specifying the full path for git repo
rtripath89 Feb 13, 2020
12a5fe9
Using shell to run the processes in the background
rtripath89 Feb 13, 2020
f2d3489
Changes in this commit:
rtripath89 Feb 13, 2020
8712c77
Adding service files
rtripath89 Feb 20, 2020
c178342
Copying service files and enabling them
rtripath89 Feb 20, 2020
40f79d6
using environment python rather then python3
rtripath89 Feb 20, 2020
ebf8240
changing the name
rtripath89 Feb 20, 2020
06dc328
Moving roles to -build yaml files
rtripath89 Feb 20, 2020
05edc38
Merge pull request #143 from eesaanatluri/patch-fix-easybuild-error
jprorama Feb 28, 2020
4771134
Add comment about turning off firewall.
jprorama Feb 28, 2020
450d717
Merge pull request #145 from diedpigs/feat-ohpc-rabbitmq
jprorama Feb 28, 2020
7742f11
Merge branch 'feat-openstack' into rmq_agent_service
jprorama Feb 28, 2020
216535e
Merge pull request #146 from rtripath89/rmq_agent_service
jprorama Feb 28, 2020
4d7173d
using python3
krishmoodbidri Mar 3, 2020
8c8e5b5
Merge pull request #148 from krishmoodbidri/feat-openstack
jprorama Mar 3, 2020
36afc48
Add ini file template
diedpigs Mar 5, 2020
626b2c7
Add system serviced file template
diedpigs Mar 5, 2020
5e52041
Update wsgi file template
diedpigs Mar 5, 2020
6931d70
Update wsgi file template
diedpigs Mar 5, 2020
86837ab
Remove enabling Copr repo task
diedpigs Mar 5, 2020
0c3fb41
Remove python2 related tasks
diedpigs Mar 5, 2020
8403fcb
Change ownership of flask app directory
diedpigs Mar 5, 2020
b0cdafc
Add virtualenv_command parameter
diedpigs Mar 5, 2020
e9ded82
Install uwsgi in virtualvenv
diedpigs Mar 5, 2020
7967a12
Put config files in place
diedpigs Mar 5, 2020
fd1330d
Create log file directory
diedpigs Mar 6, 2020
c24ea56
Restart apache
diedpigs Mar 6, 2020
8b63584
Start and enable flask app uwsgi service
diedpigs Mar 6, 2020
6794c56
Modify task name
diedpigs Mar 6, 2020
da7b641
Install python3-devel
diedpigs Mar 10, 2020
beeaeef
added celery as a service
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
5 changes: 5 additions & 0 deletions compute-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- hosts: compute
roles:
- compute_build_image
- install_ww_bin
9 changes: 0 additions & 9 deletions compute.yaml

This file was deleted.

18 changes: 11 additions & 7 deletions group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Headnode Info
public_interface: "eth0" # NIC that allows access to the public internet
private_interface: "eth1" #NIC that allows access to compute nodes
headnode_private_ip: "10.1.1.1"
build_kernel_ver: '3.10.0-957.1.3.el7.x86_64' # `uname -r` at build time... for wwbootstrap
headnode_private_ip: "10.1.1.10"
build_kernel_ver: '3.10.0-957.12.2.el7.x86_64' # `uname -r` at build time... for wwbootstrap

#Private network Info
private_network: "10.1.1.0"
Expand All @@ -24,7 +24,7 @@

# sacct user list
cluster_users:
- vagrant # include each username on separate line as a list
- centos # include each username on separate line as a list

#Stateful compute or not?
stateful_nodes: false
Expand Down Expand Up @@ -56,7 +56,7 @@
login_chroot: centos7-login

# Node Inventory method - automatic, or manual
node_inventory_auto: true
node_inventory_auto: false

#Node naming variables - no need to change
compute_node_prefix: "c"
Expand All @@ -69,7 +69,7 @@
#OpenOnDemand
ood_nodename: "ood"
ood_version: 1.5
ood_ip_addr: 10.1.1.254
ood_private_ip: "10.1.1.11"
ood_rpm_repo: "https://yum.osc.edu/ondemand/{{ ood_version }}/ondemand-release-web-{{ ood_version }}-1.el7.noarch.rpm"

#Node Inventory - not in the Ansible inventory sense! Just for WW and Slurm config.
Expand Down Expand Up @@ -153,7 +153,7 @@
enable_shib: false

# User Registration
enable_user_reg: false
enable_user_reg: true
user_register_app: "flask_user_reg"
user_register_app_path: "/var/www/ood/register/{{ user_register_app }}"
user_register_app_repo: "https://gitlab.rc.uab.edu/mmoo97/flask_user_reg.git"
Expand All @@ -163,8 +163,12 @@
RegUser_app_user_passwd: "qweasd"

# User Create Scripts
enable_user_create_scripts: false
enable_user_create_scripts: true
user_create_scripts: "ohpc_user_create"
user_create_scripts_path: "/opt/{{ user_create_scripts }}"
user_create_script_repo: "https://gitlab.rc.uab.edu/tr27p/ohpc_user_create.git"

# RabbitMQ
rabbitmq_provision: false
rabbitmq_user: "reggie"
rabbitmq_user_password: ""
2 changes: 1 addition & 1 deletion hosts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ood
sshgroup=ood

[compute]
c1
c[0:9]

[compute:vars]
sshgroup=compute
15 changes: 15 additions & 0 deletions ohpc-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
- hosts: headnode
roles:
- { name: 'pre_ohpc', tags: 'pre_ohpc' }
- { name: 'ohpc_install', tags: 'ohpc_install' }
- { name: 'ohpc_config_build', tags: 'ohpc_config' }
- { 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 }
- { name: 'ohpc_sas', tags: 'ohpc_sas', when: sas_provision }
- { name: 'ohpc_rabbitmq', tags: 'ohpc_rabbitmq', when: rabbitmq_provision }
- { name: 'ohpc_add_rstudio', tags: 'ohpc_add_rstudio', when: rstudio_provision }
- { name: 'ohpc_user_reg', tags: 'ohpc_user_reg', when: enable_user_reg }
- { name: 'reg_user_create_scripts', tags: 'reg_user_create_scripts', when: enable_user_create_scripts }
- { name: 'ohpc_add_rabbitmq_agents', tags: 'ohpc_add_rabbitmq_agents', when: rabbitmq_provision }
6 changes: 6 additions & 0 deletions ohpc-ops.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- hosts: headnode
roles:
- { name: 'ohpc_install_cloud'}
- { name: 'compute_build_nodes_cloud', tags: 'compute_build_nodes_cloud' }
- { name: 'nodes_vivify_cloud', tags: 'nodes_vivify_cloud' }
2 changes: 1 addition & 1 deletion ohpc.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- hosts: ohpc
- hosts: headnode
roles:
- { name: 'pre_ohpc', tags: 'pre_ohpc' }
- { name: 'ohpc_install', tags: 'ohpc_install' }
Expand Down
16 changes: 16 additions & 0 deletions ood-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
- hosts: ood
roles:
- { name: 'prep_ood_cloud', tags: 'prep_ood' }
- { name: 'ood', tags: 'ood' }
- { name: 'ood_jupyter', tags: 'ood_jupyter', when: jupyter_provision}
- { name: 'ood_vnc_form', tags: 'ood_vnc_form' }
- { name: 'ood_add_rstudio', tags: 'ood_add_rstudio', when: rstudio_provision }
- { name: 'ood_matlab', tags: 'ood_matlab', when: matlab_provision }
- { name: 'ood_sas', tags: 'ood_sas', when: sas_provision }
- { name: 'install_ww_bin', tags: 'install_ww_bin' }
- { name: 'ood_firewall_and_services', tags: 'ood_firewall_and_services' }
- { name: 'ohpc_firewall_and_services', tags: 'ohpc_firewall_and_services' }
- { name: 'ood_user_reg_cloud', tags: 'ood_user_reg_cloud' }
- { name: 'reg_user_create_scripts', tags: 'reg_user_create_scripts', when: enable_user_create_scripts }
- { name: 'ood_add_rabbitmq_agents', tags: 'ood_add_rabbitmq_agents', when: rabbitmq_provision }
4 changes: 4 additions & 0 deletions ood-ops.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
- hosts: ood
roles:
- { name: 'ood_user_reg_ops', tags: 'ood_user_reg_ops' }
1 change: 1 addition & 0 deletions ood.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
- { name: 'ohpc_firewall_and_services', tags: 'ohpc_firewall_and_services' }
- { name: 'ood_shib_sso', tags: 'ood_shib_sso', when: enable_shib }
- { name: 'ood_user_reg', tags: 'ood_user_reg', when: enable_user_reg }
- { name: 'warewulf_sync', tags: 'warewulf_sync' }
- { name: 'reg_user_create_scripts', tags: 'reg_user_create_scripts', when: enable_user_create_scripts }
106 changes: 106 additions & 0 deletions roles/compute_build_image/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
- name: Get OpenHPC Repo
yum:
name: https://github.com/openhpc/ohpc/releases/download/v1.3.GA/ohpc-release-1.3-1.el7.x86_64.rpm
state: present

- name: yum install
yum:
state: present
name:
- autofs
- chrony
- lmod-ohpc
- grub2
- freeipmi
- ipmitool
- ohpc-slurm-client
- ohpc-base-compute
- tmux
- ruby
- turbojpeg
- nc
- '@X Window System'
- '@Xfce'

- name: Install TurboVNC via rpm
yum:
name: https://sourceforge.net/projects/turbovnc/files/2.2/turbovnc-2.2.x86_64.rpm
state: present

- name: Download and extract Websockify source code
unarchive:
src: https://github.com/novnc/websockify/archive/v0.8.0.tar.gz
dest: /tmp
remote_src: yes

- name: Install Websockify
command: python setup.py install
args:
chdir: /tmp/websockify-0.8.0

# Change to autofs
- name: add autofs maps
lineinfile:
path: "/etc/auto.master.d/uab-dev.autofs"
line: "{{ item.path }} /etc/auto.{{ item.name }}"
create: yes
with_items:
- { name: "home", path: "/home"}
- { name: "opt-ohpc-pub", path: "/opt/ohpc/pub"}
- { name: "export", path: "/export"}

- lineinfile:
path: "/etc/auto.{{ item.name }}"
line: "* -{{ item.opt }} {{ headnode_private_ip }}:{{ item.path }}/&"
create: yes
with_items:
- { name: "home", opt: "rw,soft,intr,_netdev", path: "/home"}
- { name: "opt-ohpc-pub", opt: "ro", path: "/opt/ohpc/pub"}
- { name: "export", opt: "ro", path: "/export"}

- name: Put SELinux in permissive mode, logging actions that would be blocked.
selinux:
policy: targeted
state: permissive

- name: Create folder for mounting
file:
state: directory
path: /export
owner: root
group: root
mode: 0777

- name: Enable autofs on compute image
service:
name: autofs
enabled: yes

# After we installed Xfce, the compute node is set to bootup in graphical mode.
# This task is to unset that back to multi-user mode.
- name: Set compute node to boot with multi-user mode
command: systemctl set-default multi-user.target

- name: Disable firewalld on compute image
service:
name: firewalld
state: stopped
enabled: no

- name: add headnode to compute chrony.conf
lineinfile:
line: "server {{ headnode_private_ip }}"
dest: /etc/chrony.conf
state: present

- name: Enable chronyd on compute image
service:
name: chronyd
enabled: yes

- name: Enable slurmd on compute image
service:
name: slurmd
enabled: yes

66 changes: 66 additions & 0 deletions roles/compute_build_nodes_cloud/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---

# - name: print single node info
# debug:
# var: item.mac
# with_items: "{{ compute_nodes }}"
# - name: print single node info
# debug:
# var: item.vnfs
# with_items: "{{ compute_nodes }}"
#
# - fail:
# msg: "Quick fail for test!"

- block:

- name: Check if node is already in warewulf database
command: sudo wwsh node list
register: wwsh_node_list
ignore_errors: yes

- name: Add node(s) into warewulf database
command: wwsh -y node new {{ item.name }} --ipaddr={{ item.ip }} --hwaddr={{ item.mac }} -D {{ compute_private_nic }}
when: "'{{ item.name }}' not in wwsh_node_list.stdout"
with_items: "{{ compute_nodes }}"

- name: Register node IP and MAC address in warewulf database
command: sudo wwsh node set {{ item.name }} -y -I {{ item.ip }} --hwadd {{ item.mac }}
when: "'{{ item.name }}' in wwsh_node_list.stdout"
with_items: "{{ compute_nodes }}"

- name: set files to provision
command: wwsh -y provision set {{ item.name }} --vnfs={{ item.vnfs }} --bootstrap={{ build_kernel_ver }} --files=passwd,group,shadow,munge.key,slurm.conf,dynamic_hosts,network --bootlocal=exit
with_items: "{{ compute_nodes }}"

- name: remove node from slurm.conf if it exists already # to avoid duplication!
lineinfile:
dest: /etc/slurm/slurm.conf
regexp: "^NodeName={{ item.name }}"
state: absent
with_items: "{{ compute_nodes }}"

- name: add node to slurm.conf
lineinfile:
dest: /etc/slurm/slurm.conf
line: "NodeName={{ item.name }} Sockets={{ item.sockets }} CoresPerSocket={{ item.corespersocket }} State=UNKNOWN"
insertbefore: "^# PARTITIONS"
state: present
with_items: "{{ compute_nodes }}"

when: node_inventory_auto == false

- name: sync files #also generates dynamic hosts on headnode!
command: wwsh file sync

# - name: add compute nodes to ansible inventory for wait
# add_host: name={{ node_glob }} group="compute nodes"

# - name: wait for compute nodes to boot
# local_action: wait_for host={{ last_node }} state=started delay=30 timeout=600


# vars:
# - compute_node_glob: "{{ compute_node_prefix }}[0-{{ num_compute_nodes|int - 1}}]"
# - node_glob_bash: "{{ compute_node_prefix }}{0..{{ num_compute_nodes|int - 1}}}"
# - last_node: "{{ node_prefix }}{{ num_nodes|int - 1 }}"
Loading