-
Notifications
You must be signed in to change notification settings - Fork 1
Developer's Thoughts (SweFreq NG)
- One live (public) web server
- One corresponding database server
- One (semi-public) development web server
- One corresponding database server
- One proxy server
-
There should be no cross-talk between the live system and the development system. The live web server should never talk to the development database. The development web server should never talk to the live database.
-
The development system needs to be accessible though either the proxy (via a public URL) or through private SSH tunnels. A public URL would be preferrable if we want to show off development features to others before they go live.
-
The live web server runs off the "master" branch while the development web server runs off the "develop" branch.
-
There is little or no development happening on either system. Ideally they are just "deployed". Actual development happens elsewhere. This is to avoid either system accumulating changes, fixes or additional code that lives outside of the source code repositories.
An exception will have to be the actual data (VCF files and coverage data files) which will have to be transferred to either system for uploading into the database on the corresponding database server.
-
We would want to avoid having to load data into the database servers too often. The live database server could therefore be a clone of the development database server.
-
Database server life cycle:
- Initial deployment of container
- MongoDB database instance (for swefreq-browser)
- Life as a development database server
- Data gets loaded and tested
- Birth as a live database server
- Development database server gets cloned
- Cloned server instance resurrected as live database server
- Death
- Once the next database server is cloned and is awaiting resurrection, the current live database server is taken off-line
Question: Where does the switchover for the live web server happen?
- As a configuration change on the web server?
- As a DNS change?
Concern: We can not allow data in the databases to deviate from the data loaded form files over time, e.g., by modifying the data in the MongoDB instance.
-
The web servers run the
swefreq-browser
as well as the Tornado server inswefreq
(which includes running a small MySQL database of users). -
Web server life cycle:
- A web server container is deployed with Ansible.
- The web server container hangs around until it's replaced.