Website & Domain
In January of 2020, the website was moved away from Squarespace to be hosted on Github pages for free. This was done primarily as a cost-savings effort, in turn saving the team $144 per year. The website repository is found on the OEM Github here. It is hosted in the standard way according to Github Pages as outlined here. The custom domain (olineletricmotorsports.com) is purchased and maintained through Google Domains. Just login with the olinformula gmail account credentials and you should be able to manage it.
Warning: don't mess with the settings on Google Domains unless you really know what you're doing!
The domain costs $12+tax per year and expires on December 4th each year. Look out for renewal emails about a month in advance of that date. From the Google Domains dashboard, you have full control over the Domain Name System (DNS) settings including the resource records and registered hosts. This domain is also currently setup to map Confluence's "docs." subdomain to the IP address of the server hosting the service.
Both the website and domain shouldn't need much maintenance besides updating each year with relevant content. The website is just regular 'ol HTML which pretty much anyone should be able to edit maybe with the help of some Google searches.
- A user navigates to docs.olinelectricmotorsports.com
- A DNS lookup reveals our Google Domain record where we route taffic to our server’s IP address, 126.96.36.199.
- Traffic hits our server’s IP but gets intercepted by NGINX which listens on ports 80 (HTTP) and 443 (HTTPS). It’s currently configured to reject unencrypted traffic (HTTP), and will automatically redirect to use HTTPS.
- NGINX then performs a reverse proxy to our Confluence server running at
- Traffic reaches the confluence server!
Confluence home directory:
NGIX Config File:
Each year the confluence license needs to be renewed. Log into https://my.atlassian.com/products/index and renew the license tilted “Confluence (Server) Unlimited Users: Community License”
At least every year (ideally more like every 1-2 months), the server instance will need to get its packages updated and upgraded. These updates include security fixes, performance upgrades, and such. This does, however require a server restart. The whole process should be done in ~30 minutes.
- Connect to the instance
- Stop confluence
- Stop NGINX
- Update packages
sudo apt update
- Upgrade packages
sudo apt upgrade
- Stop server instance from the gCloud console
- Restart server instance from the gCloud console
- Connect to the instance
- Start confluence
- Start NGINX
Starting & Stopping Confluence
Sometimes when you attempt to start confluence you might run into a Tomcat Catalina error along the lines of `Existing PID file found during start. Tomcat appears to still be running with PID 1574. Start aborted.` This can be solved by stopping confluence and starting it again. You might have to try this a few times. It seems to be a well known issue with catalina, so there are lots of Stackoverflow articles on it as well.
$ sudo /etc/init.d/confluence start $ sudo /etc/init.d/confluence stop $ sudo /etc/init.d/confluence restart
Starting and Stopping NGINX
When you restart Confluence, NGINX will often get confused and will need a restart. Additionally, you’ll need to stop and start NGINX when updating.
sudo systemctl start nginx sudo systemctl stop nginx
You can check the status of NGINX by running this command. Check for a “Active: active (running)” line near the top of the response.
systemctl status nginx
If you are having trouble loading Confluence these tips might help you.
- 504 NGIX error
- This means that NGINX is working correctly, however what it has in its registry for the route isn’t returning a valid server call. This could be because confluence is off or has crashed.
- How can I tell if confluence is working?
- You can connect to the server instance and can run `curl localhost:8090` and after a few seconds should receive a massive HTML file response. Try to parse this response and see if it looks like the confluence homepage. It it doesn’t, it will probably explain the error. If you get a valid response, but still can’t see confluence from the web, you might have a problem with NGINX. Try restarting NGINX and see if that solves it.
[DEPRECATED] New Confluence Architecture
We decided not to move forward with moving our Confluence to a local server. These resources can be used if this decision is changed later.
For this new architecture, a server will be built and hosted on the Olin network. It will be independently managed by the team and will just be a linux box with the server running. A few scripts will be created to ensure the server safely shuts down in case of power outages and will automatically start up again when power is regained. It will be on an uninterruptible power supply (UPS) to ensure that this power down process can be carried out safely.
The process for moving the confluence server will be split into three stages:
Test the environment
- A trial version of confluence will be installed on a spare Olin laptop which should have pretty similar hardware to the final server.
- The trial version will not contain any OEM specific install of confluence, but will rather be used to stress test the capabilities of the hardware and the Olin network.
- An alpha test will take place with ~10 people simultaneously using the trial version to edit a document and find any failure points.
- If these tests are successful, we will move on.
Test the hardware
- We will then purchase and build the server hardware.
- We will once again install a trial version of confluence using this tutorial. This will later be thrown away.
- We will write and test the necessary scripts for startup and shutdown of the server.
- We will write the scripts necessary to maintain automated backups of the server to a remote destination using Backblaze.
- We will simulate power outages and potential failure modes to ensure sufficient coverage has been achieved.
- Once we are confident in our setup, we will remove the confluence trial using this tutorial.
Complete the move
- For this stage, the current confluence traffic will need to temporarily halted for about 1 day.
- The first step will be to dump the current database schema and data using this tutorial.
- Then the data will need to be transferred from GCP to the new server using this tutorial.
- Once the data has been transferred, we will test to make sure it was successful.
- Once deemed a success, the necessary scripts will be started and tested.
- The server will then be moved to its final location and started.
- The server will then get assigned a static IP address using this tutorial.
- An SSH server will be established on the machine using this tutorial.
- Finally, the subdomain DNS will be updated to reflect the server's IP address.