From 9fed5bd0b7467700b8cdc88fad3825ff5c2dffbb Mon Sep 17 00:00:00 2001 From: Barb Cutler Date: Mon, 20 May 2019 22:45:49 -0400 Subject: [PATCH 1/2] document email configuration --- _data/links.yml | 2 + _docs/sysadmin/email_configuration.md | 105 ++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 _docs/sysadmin/email_configuration.md diff --git a/_data/links.yml b/_data/links.yml index f7ee1947..77ea52a9 100644 --- a/_data/links.yml +++ b/_data/links.yml @@ -77,6 +77,8 @@ link: git - name: System Customization Checklist link: system_customization + - name: Email Configuration + link: email_configuration - name: Student Auto Feed - name: Developer diff --git a/_docs/sysadmin/email_configuration.md b/_docs/sysadmin/email_configuration.md new file mode 100644 index 00000000..070c78bd --- /dev/null +++ b/_docs/sysadmin/email_configuration.md @@ -0,0 +1,105 @@ +--- +title: Email Configuration +category: System Administrator +--- + + +Submitty can be configured to send instructor announcements by email +and send email (customizable -- *work in progress*) notifications to +users. + + +1. Obtain an email address that will be the sender for all email. + + This should probably not be an actual user nor a mailing list used + for any other purpose. It is probable that students who receive + these emails may `reply-to` the sender without realizing they are + sending it to a Submitty user rather than their instructor or + teaching assistant. Decide what you will do with these mistakenly + sent emails. + + Learn what rate limits are configured for this email address. + E.g., number of total emails sent per minute and/or number of + emails sent per hour to external (non-university) email addresses. + These limits may require adjustment of the `send_email.py` script. + + +2. Edit this configuration file: `/usr/local/submitty/config/email.json` + + + Add the following fields to the file (edit as appropriate): + + ``` + { + "email_user": "", + "email_password": "", + "email_sender": "submitty@myuniversity.edu" + "email_reply_to": "submitty_do_not_reply@myuniversity.edu" + "email_server_hostname": "mail.myuniversity.edu", + "email_server_port": 587, + "email_logs_path": "/var/local/submitty/logs/emails" + } + ``` + + *NOTE:* The user (login name) and sender (appears on the + `From:` line of the emails) might not be exactly the same. + + +3. Ensure the permissions of this file allow read access by the +`submitty_daemon` user: + + ``` + -r--r----- 1 root submitty_daemonphp email.json + ``` + + +## Troubleshooting + + +If you've done an action that should result in an email being sent and +it's not working: + + +1. Check the `emails` table in the master database. First connect to the database: + + ``` + sudo su postgres + psql + \c submitty + ``` + + Then search for a specific target recipient that hasn't received email. For example: + + ``` + select id,recipient,subject,created,sent from emails where recipient='myuser@university.edu' order by created; + ``` + + Verify that recent emails have been inserted into the table for the + user (created column should have today's date & time). Once the email + is successfully sent, the sent column will be filled with that date + & time. + + +2. Check the Submitty email error log: + + ``` + /var/local/submitty/logs/emails/.txt + ``` + + +3. Attempt to manually run the script to send emails from the database: + + ``` + sudo su + su submitty_daemon + /usr/local/submitty/sbin/send_email.py + ``` + + *NOTE:* This script is configured to run once per minute by the + `submitty_daemon` user. Ensure that `submitty_daemon`'s crontab + file is in order, for example: + + ``` + * * * * python3 /usr/local/submitty/sbin/send_email.py + ``` + From fc462784a298dfbdc93a261cc822815e15596a5a Mon Sep 17 00:00:00 2001 From: Barb Cutler Date: Thu, 30 May 2019 17:37:41 -0400 Subject: [PATCH 2/2] instructions for graphics worker --- _data/links.yml | 4 ++++ _docs/sysadmin/worker_installation.md | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/_data/links.yml b/_data/links.yml index 77ea52a9..4523fd90 100644 --- a/_data/links.yml +++ b/_data/links.yml @@ -75,11 +75,15 @@ - name: Course Creation - name: Setting up Internal Git link: git + - name: Worker Installation + link: worker_installation - name: System Customization Checklist link: system_customization - name: Email Configuration link: email_configuration - name: Student Auto Feed + - name: Course Archiving + link: course_archiving - name: Developer children: diff --git a/_docs/sysadmin/worker_installation.md b/_docs/sysadmin/worker_installation.md index a00b2018..b9e5fba2 100644 --- a/_docs/sysadmin/worker_installation.md +++ b/_docs/sysadmin/worker_installation.md @@ -1,7 +1,6 @@ --- title: Worker Installation category: System Administrator -order: 2 --- A Submitty instance is capable of leveraging additional machines to distribute @@ -87,3 +86,16 @@ The user should only be used for submitty related activities. required_capabilities : 'CAPABILITY' ``` to ship your jobs to a worker with the capability CAPABILITY. + + +# Additional Instructions for Graphics Application Workers + +1. Make sure the display will not go to sleep + + __FIXME: add instructions__ + +2. Give the untrusted user access to the Xserver + + ``` + xhost + SI:localuser:untrusted00 + ```