Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9c0712c
feat(ssh_proxy): add server-key option in service
diedpigs Feb 12, 2025
ecd4715
Merge pull request #511 from diedpigs/feat-sshpiper-server-key
diedpigs Feb 12, 2025
af0ed1e
feat: Use upstream repo for sshpiper builds
eesaanatluri Apr 8, 2025
763b75b
Merge pull request #512 from eesaanatluri/feat-use-upstream-sshpiper-…
diedpigs Apr 8, 2025
80ed76b
feat: Add a flag for role that installs account app
eesaanatluri Apr 9, 2025
7a268a8
Merge pull request #513 from eesaanatluri/feat-add-flag-account-app
diedpigs Apr 11, 2025
ed46d02
refactor: change account app repo reference
diedpigs May 19, 2025
11c4e0d
feat: Present the upstream banner only once to user
eesaanatluri May 28, 2025
405c95d
feat: Change version to include upstream banner mode
eesaanatluri May 28, 2025
a90bdbf
Merge pull request #515 from eesaanatluri/feat-sshpiper-banner-mode-d…
diedpigs May 29, 2025
3f46d86
added false flag to login playbook to prevent build and allow develop…
Jun 4, 2025
e5ae930
updating flag to be a variable instead of hard flase status
Jun 4, 2025
f86c821
feat: add sshpiper faintoban whitelist variable
diedpigs Jun 4, 2025
1074a61
feat: add ignore-ip to sshpiper failtoban plugin
diedpigs Jun 4, 2025
82812e5
added variable to groupvars to control login node flag
Jun 6, 2025
7af9447
Merge pull request #518 from dwheel7/disable-login-cod-build
diedpigs Jun 6, 2025
5d8935c
Merge pull request #519 from diedpigs/feat-failtoban-whitelist
diedpigs Jun 6, 2025
da65e85
feat: update group_vars to have variable for centos_repos and update …
Jun 11, 2025
f15fb94
style: correcting typo in group_vars
Jun 11, 2025
2013f3c
feat: update ood role to use new repo variable
Jun 12, 2025
49b26f1
style: removing extra trailing space in variable
Jun 12, 2025
7d89cc2
Merge pull request #521 from dwheel7/feat-paramaterize-centos-repos
diedpigs Jun 13, 2025
bfa379b
docs: change reg user description
diedpigs Jun 18, 2025
19f0612
feat: Profile and format packer ansible provisioner tasks
eesaanatluri Jun 12, 2025
0626249
Colorize packer ansible provisioner tasks
eesaanatluri Jun 14, 2025
9887d67
Merge pull request #523 from eesaanatluri/feat-ansible-cfg-callback-p…
diedpigs Jun 27, 2025
9c7aa35
Merge pull request #514 from diedpigs/update-account-app-ref
diedpigs Jul 9, 2025
fdab5bb
feat: updating naming from old user-reg to new account-app
Jul 16, 2025
80df49c
feat: correcting more instances of old naming scheme
Jul 18, 2025
c99a199
Merge branch 'dev' into feat_rename_user-flask-reg
dwheel7 Jul 18, 2025
6b45ac5
feat: correcting issues caused from bad merge
Jul 21, 2025
6486b5f
feat: updated old naming in config file to match new terms
Jul 24, 2025
a7367a8
Merge pull request #525 from dwheel7/feat_rename_user-flask-reg
diedpigs Jul 25, 2025
76178d8
Merge branch 'dev' into update-uab-prod
diedpigs Jul 28, 2025
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
15 changes: 15 additions & 0 deletions ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,20 @@ private_role_vars = True
retry_files_enabled = False
inventory = ./inventory/headnode

# change the default callback, you can only have one 'stdout' type enabled at a time.
#stdout_callback = skippy
stdout_callback = yaml

## Ansible ships with some plugins that require whitelisting,
## this is done to avoid running all of a type by default.
## These setting lists those that you want enabled for your system.
## Custom plugins should not need this unless plugin author specifies it.

# enable callback plugins, they can output to stdout but cannot be 'stdout' type.
callbacks_enabled = timer, debug, profile_roles, profile_tasks, minimal

# Force color
force_color = true

[ssh_connection]
control_path = ~/.ssh/ansible-%%r@%%h:%%p
2 changes: 1 addition & 1 deletion cod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
- { name: 'enable_lmod', tags: 'enable_lmod_image', vars: [{ enable_lmod_prefix: "{{ cm_def_img_path }}" }] }
- { name: 'cod_rabbitmq_agents_cloud', tags: 'cod_rabbitmq_agents_cloud' }
- { name: 'cod_slurm', tags: 'cod_slurm'}
- { name: 'cod_login_node', tags: 'cod_login_node' }
- { name: 'cod_login_node', tags: 'cod_login_node', when: enable_cod_login_node }
- { name: 'cod_compute_node', tags: 'cod_compute_node' }
- { name: 'job_submit_plugin', tags: 'job_submit_plugin', when: enable_job_submit_plugin}
29 changes: 16 additions & 13 deletions group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -230,20 +230,20 @@
s3_shibboleth_object_name: UAB_SHIB_OBJECT

# User Registration
enable_user_reg: true
user_register_app: "flask_user_reg"
user_register_app_tag: "master"
user_register_app_path: "/var/www/ood/register/{{ user_register_app }}"
user_register_app_key: "1234"
user_register_app_repo: "https://gitlab.rc.uab.edu/rc/self-reg-form.git"
user_register_app_refspec: "{{ gitlab_refspec }}"
user_register_app_port: 8000
user_register_app_host: "login005"
user_register_app_def_groups: []
enable_account_app: true
account_app: "account"
account_app_tag: "master"
account_app_path: "/var/www/ood/register/{{ account_app }}"
account_app_key: "1234"
account_app_repo: "https://gitlab.rc.uab.edu/rc/account-app.git"
account_app_refspec: "{{ gitlab_refspec }}"
account_app_port: 8000
account_app_host: "login005"
account_app_def_groups: []
cors_allowed_origins: "*"
mod_wsgi_pkg_name: "uab-httpd24-mod_wsgi"
RegUser_app_user: "reggie"
RegUser_app_user_full_name: "RegUser of user register app"
RegUser_app_user_full_name: "Service user of account app"
RegUser_app_user_passwd: "qweasd"
# Authorized user group
valid_eppa: ["faculty", "staff", "student", "affiliate"]
Expand Down Expand Up @@ -292,6 +292,8 @@
cod_deploy: true
post_create_script: PostAddUserScript.sh
cm_def_img_path: "/cm/images/default-image"
enable_cod_login_node: false
centos_base_url: "http://vault.centos.org"

# Lmod
lmod_loc: "/usr/share/lmod/lmod"
Expand Down Expand Up @@ -349,12 +351,13 @@
go_download_url: "https://go.dev/dl/go1.22.4.linux-amd64.tar.gz"
go_download_path: "/tmp/go1.22.4.linux-amd64.tar.gz"
go_binary_path: "/usr/local"
sshpiper_git_repo: "https://github.com/eesaanatluri/sshpiper"
sshpiper_version: "feat-routing-by-group"
sshpiper_git_repo: "https://github.com/tg123/sshpiper"
sshpiper_version: "3dda361863e1eb2ceac1a421456b7c2f47987776"
sshpiper_dest_dir: "/opt/sshpiper"
sshpiper_bin_dir: "{{ sshpiper_dest_dir }}/out"
sshpiper_bantime: 1200s
sshpiper_maxfailures: 5
sshpiper_whitelist: "127.0.0.1/8"

# http_proxy
enable_http_proxy: false
Expand Down
6 changes: 3 additions & 3 deletions ohpc-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
- { 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: enable_user_reg }
- { name: 'ohpc_rabbitmq', tags: 'ohpc_rabbitmq', when:enable_account_app }
- { name: 'ohpc_add_rstudio', tags: 'ohpc_add_rstudio', when: rstudio_provision }
- { name: 'ohpc_user_reg', tags: 'ohpc_user_reg', when: enable_user_reg }
- { name: 'ohpc_add_rabbitmq_agents', tags: 'ohpc_add_rabbitmq_agents', when: enable_user_reg }
- { name: 'ohpc_user_reg', tags: 'ohpc_user_reg', when:enable_account_app }
- { name: 'ohpc_add_rabbitmq_agents', tags: 'ohpc_add_rabbitmq_agents', when:enable_account_app }

2 changes: 1 addition & 1 deletion ohpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
- { name: 'ohpc_igv', tags: 'ohpc_igv', when: igv_provision }
- { name: 'ohpc_ansys', tags: 'ohpc_ansys', when: ansys_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: 'ohpc_user_reg', tags: 'ohpc_user_reg', when: enable_account_app }
2 changes: 1 addition & 1 deletion ood-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
- { name: 'ood_shib_install', tags: 'ood_shib_install', when: install_shib }
- { name: 'ood_shib_config', tags: 'ood_shib_config', when: configure_shib }
- { name: 'ood_user_reg_cloud', tags: 'ood_user_reg_cloud' }
- { name: 'ood_add_rabbitmq_agents', tags: 'ood_add_rabbitmq_agents', when: enable_user_reg }
- { name: 'ood_add_rabbitmq_agents', tags: 'ood_add_rabbitmq_agents', when: enable_account_app }
- { name: 'ood_polling', tags: 'ood_polling'}
4 changes: 2 additions & 2 deletions ood-packer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
- { name: 'ood_shib_config', tags: 'ood_shib_config', when: configure_shib }
- { name: 'ood_enable_ssl', tags: 'ood_enable_ssl' }
- { name: 'enable_lmod', tags: 'enable_lmod' }
- { name: 'ood_user_reg_ops', tags: 'ood_user_reg_cloud' }
- { name: 'ood_user_reg_cloud', tags: 'ood_user_reg_cloud' }
- { name: 'ood_user_reg_ops', tags: 'ood_user_reg_cloud', when: enable_account_app }
- { name: 'ood_user_reg_cloud', tags: 'ood_user_reg_cloud', when: enable_account_app }
- { name: 'ood_vnc_form', tags: 'ood_vnc_form' }
- { name: 'ood_jupyter', tags: 'ood_jupyter', when: jupyter_provision}
- { name: 'ood_jupyterlab', tags: 'ood_jupyterlab', when: jupyterlab_provision}
Expand Down
2 changes: 1 addition & 1 deletion ood.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- { name: 'ood_easter_egg', tags: 'ood_easter_egg' }
- { name: 'ood_static_user_reg', tags: 'ood_static_user_reg', when: enable_user_reg == false }
- { name: 'ood_shib_sso', tags: 'ood_shib_sso', when: enable_shib }
- { name: 'ood_user_reg', tags: 'ood_user_reg', when: enable_user_reg }
- { name: 'ood_user_reg', tags: 'ood_user_reg', when: enable_account_app }
- { name: 'warewulf_sync', tags: 'warewulf_sync' }
- { name: 'ood_enable_sandbox', tags: 'ood_enable_sandbox', when: enable_sandbox }
- { name: 'ood_jupyter_lab', tags: 'ood_jupyter_lab', when: jupyter_provision}
2 changes: 1 addition & 1 deletion roles/cod_fix_centos_yum/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
ansible.builtin.replace:
path: "{{ item }}"
regexp: '^#baseurl=http://mirror.centos.org'
replace: 'baseurl=http://vault.centos.org'
replace: 'baseurl={{ centos_base_url }}'
backup: yes
with_items: "{{ repo_files }}"
4 changes: 2 additions & 2 deletions roles/cod_split_fs/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
dest: "/cm/images/login-image/opt/rh/httpd24/root/etc/httpd/conf.d/{{ item }}"
state: absent
loop:
- "user-reg-{{ user_register_app }}.conf"
- "user-reg-{{ account_app }}.conf"
- "user-reg.conf"

- name: Replace account app conf
ansible.builtin.template:
src: user-reg-account_conf.j2
dest: "/cm/images/login-image/opt/rh/httpd24/root/etc/httpd/conf.d/user-reg-{{ user_register_app }}.conf"
dest: "/cm/images/login-image/opt/rh/httpd24/root/etc/httpd/conf.d/user-reg-{{ account_app }}.conf"

- name: Create ood app folders
ansible.builtin.file:
Expand Down
2 changes: 1 addition & 1 deletion roles/ohpc_add_rabbitmq_agents/templates/config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ state_groups = {
{% endfor %}
}

default_groups = {{ user_register_app_def_groups }}
default_groups = {{ account_app_def_groups }}

# Default function timeout
Function_timeout = {{ function_timeout }}
Expand Down
2 changes: 1 addition & 1 deletion roles/ood/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
path: "/etc/yum.repos.d/{{ item.filename }}"
section: "{{ item.section }}"
option: baseurl
value: "http://vault.centos.org/centos/7/sclo/$basearch/{{ item.subfolder }}/"
value: "{{ centos_base_url }}/centos/7/sclo/$basearch/{{ item.subfolder }}/"
backup: yes
loop:
- {"filename": "CentOS-SCLo-scl-rh.repo", "section": "centos-sclo-rh", "subfolder": "rh"}
Expand Down
20 changes: 10 additions & 10 deletions roles/ood_user_reg/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,26 @@

- name: Remove existing user register app install
file:
path: "{{ user_register_app_path }}"
path: "{{ account_app_path }}"
state: absent

- name: Creates directory to clone the user register app
file:
path: "{{ user_register_app_path }}"
path: "{{ account_app_path }}"
state: directory

- name: Clone user register app form from gitlab
git:
repo: "{{ user_register_app_repo }}"
dest: "{{ user_register_app_path }}"
refspec: "{{ user_register_app_refspec }}"
version: "{{ user_register_app_tag }}"
repo: "{{ account_app_repo }}"
dest: "{{ account_app_path }}"
refspec: "{{ account_app_refspec }}"
version: "{{ account_app_tag }}"

- name: Install requirements in virtualenv
pip:
requirements: requirements.txt
virtualenv: venv
chdir: "{{ user_register_app_path }}"
chdir: "{{ account_app_path }}"

- name: Put apache config file in place
template:
Expand All @@ -44,7 +44,7 @@
- name: Put wsgi config file in place
template:
src: wsgi.j2
dest: "{{ user_register_app_path }}/{{ user_register_app }}.wsgi"
dest: "{{ account_app_path }}/{{ account_app }}.wsgi"

- name: Enable user registration redirect
replace:
Expand All @@ -54,8 +54,8 @@
backup: yes
with_items:
- { regexp: "^#?(user_map_cmd:).*", replace: "\\1 '/opt/ood/ood_auth_map/bin/uab_ood_auth.regex'" }
- { regexp: "^#?(map_fail_uri:).*", replace: "\\1 '/{{ user_register_app }}'" }
- { regexp: "^#?(register_uri:).*", replace: "\\1 '/{{ user_register_app }}'" }
- { regexp: "^#?(map_fail_uri:).*", replace: "\\1 '/{{ account_app }}'" }
- { regexp: "^#?(register_uri:).*", replace: "\\1 '/{{ account_app }}'" }

- name: Stage regex file for ood
copy:
Expand Down
12 changes: 6 additions & 6 deletions roles/ood_user_reg/templates/user-reg_conf.j2
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
WSGIDaemonProcess "{{ user_register_app }}" user={{ RegUser_app_user }} group={{ RegUser_app_user }} threads=5
WSGIProcessGroup "{{ user_register_app }}"
WSGIScriptAlias /{{ user_register_app }} "{{ user_register_app_path}}/{{ user_register_app }}.wsgi"
<Location /{{ user_register_app }}>
WSGIDaemonProcess "{{ account_app }}" user={{ account_app_user }} group={{ account_app_user }} threads=5
WSGIProcessGroup "{{ account_app }}"
WSGIScriptAlias /{{ account_app }} "{{ account_app_path}}/{{ account_app }}.wsgi"
<Location /{{ account_app }}>
AuthType Basic
AuthName "Private"
AuthUserFile "/opt/rh/httpd24/root/etc/httpd/.htpasswd"
RequestHeader unset Authorization
Require valid-user
</Location>
<Directory {{ user_register_app_path }}>
WSGIProcessGroup {{ user_register_app }}
<Directory {{ account_app_path }}>
WSGIProcessGroup {{ account_app }}
WSGIApplicationGroup %{GLOBAL}
Require all granted
</Directory>
4 changes: 2 additions & 2 deletions roles/ood_user_reg/templates/wsgi.j2
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/python

# Activate virtualenv
activate_this = '{{ user_register_app_path }}/venv/bin/activate_this.py'
activate_this = '{{ account_app_path }}/venv/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))

import sys
import os
sys.path.append("{{ user_register_app_path }}")
sys.path.append("{{ account_app_path }}")
os.environ['FLASK_CONFIG'] = 'production'

from run import app as application
Loading