Domain Switch and Redirects - Orodan/Hilary GitHub Wiki

Procedure for switching to *Unity in production.

NOTE* This will make unity.ac the default domain for the site, although none of the tenancies will have moved yet the global admin url would change to the unity.ac domain.

On puppetmaster ensure correct puppet content;

  • cd /etc/puppet/puppet-hilary/environments/production/hiera/
  • vi common.json Change web_domain to unity.ac. Add "*.oaeproject.org" to web_domains_external.
  • cd /etc/puppet/puppet-hilary/environments/production/modules/localconfig/files/ssl/
  • mv default '*.oaeproject.org'
  • mkdir default
  • cp shib-sp.unity.ac/* default/

On web class;

  • cd /etc/nginx ; rm -rf ssl/ oae.conf.d/ # this removes conf files we don't need and puppet won't auto-remove.
  • puppet agent --onetime --no-daemonize --verbose # regenerates the removed files.
  • If puppet didn't do it restart nginx service nginx restart There should be no downtime except for the fraction of a second that nginx is restarting.

On all Hilary servers run puppet to pick up change of web_domain so admin interface functions correctly;

Procedure for moving a tenancy to unity.

On puppetmaster alter puppet config;

  • cd /etc/puppet/puppet-hilary/environments/production/hiera/
  • vi common.json Add tenancy's name to web_domains_redirect. DO NOT include oaeproject.org, eg to move research.oaeproject.org use "web_domains_redirect": [ "research" ]
  • Then on the admin interface, change the tenancy's "Host" swapping oaeproject.org to unity.ac.

On web class run puppet;

  • puppet agent --onetime --no-daemonize --verbose

The last 2 steps can be done in any order however as soon as one of the steps is applied the tenancy will not function until the other step is complete.