AuburnACM / auacm

The Auburn ACM Website
Apache License 2.0
15 stars 3 forks source link

Simplify installation #101

Open BrandonLMorris opened 8 years ago

BrandonLMorris commented 8 years ago

Installing the project is a pain. This should be simplified as much as possible. A good Makefile will help a great deal, may need to look to another management tool (Ansible, Puppet, or Chef). Since it's still a single-node app, that may be overkill.

AC

Mac-Genius commented 8 years ago

I'm working on a Chef cookbook for this. It currently uses Vagrant with the VirtualBox driver. It will install all the dependencies based on the Linux distro, and configure the MySQL database automatically. Overkill? Probably, but definitely worth it.

BrandonLMorris commented 8 years ago

I'm not going to stop you, but that's a lot.

I will say production will be using a VMWare, thought that might be an option for a development environment. I've never used Vagrant before.

Mac-Genius commented 8 years ago

For VMWare, you don't need to use vagrant. All you would have to do is create the VM, bootstrap the VM (which adds it to a Chef server), and run the cookbook on it. It shouldn't take more than 5 minutes to do that. Vagrant is just an easy way to test the cookbook on different distros of Linux.

Mac-Genius commented 7 years ago

So I would like to talk about this issue, along with issues #47 (deployment scheme) and #42 (better setup documentation). I currently have a Chef cookbook that can take a blank Ubuntu 16.04 or Centos 7 all the way to production with every dependency and language that we use installed, including making the server a proper system service instead of running run.py every time. The command is systemctl start/stop auacm. I'm planning on adding an option to deploy a nginx server as well. The cookbook also can update the DNS automatically as well to point at the new instance of the site.

Currently, the server is running on a VM. It sits behind a nginx server that handles HTTPS for the server, and routes different subdomains to different instances of the server (auacm.com -> main site, google.auacm.com -> google's instance.) This allowed us to not have to change the site to support HTTPS.

We also use Let'sEncrypt to obtain our HTTPS certificates for the site. These are good for 3 months before we need to manually renew them. There is a plugin for nginx that could do this for us automatically.

I have also setup an instance of Rundeck, a useful tool for running tasks with a click of a button. It currently can restart the server and update the server by pulling the latest changes of the server and restarting it. Some features I'm planning on adding are the ability to deploy a new instance of the site and update nginx with new configuration files and backup the server data.

We also need to update the acm.sql script and the data.zip files to reflect the current data that is on the production server. It should NOT include any user information other than the user table scheme and a default user account for development. We should also consider having a sql script that only has the database scheme, but no data other than a default user. This would be useful when we need to deploy a blank site for external competitions such as Google and the Iron Bowl of Programming. I also will include the configuration files for nginx.

Lastly we need to update the scripts for deploying test instances of the server. I think we should use the Chef cookbook for production installation, but the install scripts are useful when a user needs to deploy the site on his/her own machine. They don't need to install the languages, but at least install the site.

I will create a wiki page on the repo explaining the layout of the server, dependencies needed, and other information pertinent to deploying both prod and test instances of the site. If anyone has any thoughts on the topic, let me know!