[[PageOutline]] [[Image(Extension-School.png,100%)]] These are the systems involved in the website: = dex-db1 = This physical machine holds the master database-server == MySQL master == The master database is installed directly on dex-db1. Configuration is done by the ICT department's database support. = dex-app1 = This physical machine runs the front-end webserver, one application server, and a slave-database server. All these component are run from docker. Full docker-configurations (using fig) can be found here: [source:services/trunk/production/dex-app1] == MySQL-Slave == MySQL-Slave provides a read-only database on each application server. This database is only present for performance reasons. Slave mysql-servers are run as docker instances. Slaves need to be configured for first time use using the script [source:services/trunk/production/dex-app1/mysql/etc/initialcopy.sh]. This script is available from within the docker instance through /etc/mysql/initialcopy.sh Input for this script is the hostname for the master-server, and passwords for an admin user to retrieve the full database from the master and a replication user to replicate the database. [[IncludeSource(services/trunk/production/dex-app1/mysql/etc/initialcopy.sh,start=3,end=8)]] The script [source:services/trunk/production/dex-app1/mysql/etc/renewcopy.sh] does almost the same as initialcopy, it only uses authentication in a different fashion. This script can be used when a slave-database has lost synchronization with the master for whatever reason. == NGINX == Nginx provides a web-server that is used to serve static content and forward requests to the uwsgi servers running the actual website application Full nginx configuration can be found in [source:services/trunk/production/dex-app1/nginx] == UWSGI == This container runs the actual website code. The current website code needs to be installed in /var/o2eappserver/fig/website. This directory is available as /code inside the docker image. (Further paths in this section will be specific to the docker instance) The website as checked out from svn will not work properly due to missing settings. In order to create a working setup a settings_local.py file needs to be installed in /code/website/conf. The file [source:website/trunk/website/conf/production/settings_live.py] provides a template for this file === Migration === When migration's are run (using Django south) the system will mess up in a master-slave configuration. This is due to bugs in the south multi-db implementation. In order to circumvent these problems a number of temporary changes need to made in the /code/website/conf/settings_local.py. Specifically, the following entries need to be commented out: [[IncludeSource(website/trunk/website/conf/production/settings_live.py,start=10,end=10)]] [[IncludeSource(website/trunk/website/conf/production/settings_live.py,start=25,end=35)]] [[IncludeSource(website/trunk/website/conf/production/settings_live.py,start=38,end=40)]]