Ion (VM)

From Livedoc - The Documentation Repository
Jump to: navigation, search

This page is a stub. Please consider expanding the article so it is complete.

This virtual machine hosts Ion.

The machine originally ran on a Gentoo distribution, but during a complete reinstall in June 2017 it was switched to Ubuntu.

Hosted on Hosted on::Antipodes
Provides service Service provided::Intranet
Contact person 2018nzhou
Criticality Criticality::Mission-critical

Production app info

App logs: /var/log/ion/

  • Access: app_access.log
  • Auth: app_auth.log
  • Nginx:

Database backups: /usr/local/db_backups/

  • File format: YYYY-MM-DD-HHMM.pgdump.xz
  • Hourly backups kept for the past month
  • One backup a day for all previous months

App environment variables: /etc/supervisor/supervisord.conf

  • /etc/supervisor/conf.d/ion.conf

App directory: /usr/local/www/intranet3/

  • App settings: intranet/settings/

Set up environment:

$ ksu
# workon ion
# cd /usr/local/www/intranet3

Update production: (Changes should be tested in Ion-staging before pushing to production)

# fab deploy

Restart Ion worker processes:

# supervisord restart ion_async_workers:*

Restart nginx:

# /etc/init.d/nginx restart

Enable/disable maintenance mode:

# ./ maintenance [on/off]

Restarting Ion

If for any reason the Ion virtual machine has been restarted, you will have to run the following commands to start Ion:

# mkdir -p /var/run/gunicorn/
# chown -R ion-data:ion-data /var/run/gunicorn/
# supervisorctl start ion_async
# supervisorctl start ion_async_workers:*
# supervisorctl status ion

To log everyone out of Ion, run the following command:

# redis-cli flushall

You will want to log everyone out of Ion after a restart, since their Kerberos caches (stored in /tmp) will be cleared, making them unable to access student information from LDAP until they are logged in again.


If you get a zsh error when running

# supervisorctl start ion_async_workers:*

this means zsh is trying to glob. To prevent this and allow supervisord to do the wildcard expansion, use noglob.

# noglob supervisorctl start ion_async_workers:*