Skip to content

Commit

Permalink
Add initial support for a test CAS server
Browse files Browse the repository at this point in the history
We are using https://github.com/django-cas-ng/demo-cas-server

By default, settings are hardcoded, so it will listen on port 8100 of
localhost.

In order to install it, ansible variable archivematica_src_install_cas
needs to be se to true
  • Loading branch information
scollazo committed Apr 29, 2020
1 parent 195fe0a commit 6b76eed
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tasks/configure-cas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---

# Install django cas auth server

- name: "Clone CAS server code"
git:
repo: "https://github.com/django-cas-ng/demo-cas-server"
dest: "{{ archivematica_src_dir }}/demo-cas-server"
version: "master"
accept_hostkey: "yes"

- name: "Create virtualenv and install requirements"
pip:
requirements: "{{ archivematica_src_dir }}/demo-cas-server/requirements.txt"
virtualenv: "/usr/share/archivematica/virtualenvs/demo-cas-server"
virtualenv_python: python3.6

- name: "Create systemd template"
template:
src: etc/systemd/system/demo-cas-server.service
dest: "/etc/systemd/system/demo-cas-server.service"

- name: "Start/Restart CAS server"
service:
name: "demo-cas-server"
state: "restarted"
enabled: "yes"
daemon_reload: "yes"
10 changes: 10 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,15 @@
tags:
- "amsrc-fixity"
when: "archivematica_src_install_fixity|bool"

# Configure local CAS server
#

- include: "configure-cas.yml"
tags:
- "amsrc-configure-cas"
when:
- "archivematica_src_install_cas is defined"

#
# Configure pipeline and SS
Expand All @@ -276,6 +285,7 @@
- "amsrc-configure"
when: "archivematica_src_configure_ss|bool or archivematica_src_configure_dashboard|bool"


#
# Configure GPG locations
#
Expand Down

0 comments on commit 6b76eed

Please sign in to comment.