-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Alpha
131 lines (96 loc) · 3.88 KB
/
README.Alpha
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
Finals Club Services Deployment Documentation V. 0.8a
=============================================
I. Introduction
II. Basic Model
III. Deployment
a. Finals Club
b. Karma Notes
IV. Backup / Management
I. Introduction
--------------------------------------
The Finals Club Foundation has been providing free and
open education resources to students since 2008. As of
2011, FCF has made all services and tools free and open
to those who would like to re-deploy services offered by
FCF. This document shows how all services are deployed
in production and what is used for best practice in a
real world environment.
II. Basic Model
--------------------------------------
All services deployed by the Finals Club Foundation are
based upon the following stack:
________________________________________________
| | | |
| App.(n) | App.(n) | etc.. |
| | | |
------------------------------------------------
| | |
| Node.Js | django / python |
| | |
------------------------------------------------
| |
| GNU/Linux (ubuntu / Debian ) |
| |
|________________________________________________|
Base: GNU/Linux:
--------------------------------------
All servers that run services for the Finals Club Foundation
start off with a generic GNU/Linux stack with:
* Ubuntu-Server 11.10+
* Mongodb-server
* Node.Js V.0.6.13+
* npm current
* Monit (optional, but recommended for basic monitoring).
* Dev. Tools: gcc, git, curl, make
* Node Modules for each app. / service
* Nginx 1.18 Web Server
* Django-1.4
* PostgreSQL-1.9+
While the previous is an extensive list, it is not everything. See
what is included with ubuntu-server 11.10+ for other tools are
on our servers.
Middle Node.js:
--------------------------------------
Node.js is a new system for writing and deploying web applications
that are able to scale and update user information in real time. We
used Node.js because it is a new technology that is in its infancy, but
is becoming commonly used in the development of new web applications and tools.
Etherpad-lite (Collaborative editor used in Finalsclub.org) is one of the many
components in our many services that are written in Node.Js.
Middle Django / Python:
--------------------------------------
Karma Notes http://karmanotes.org is written using the django web framework
and uses uWSGI + Nginx to provide resources. Nginx was used instead of Apache
because of Apache's age and security shortcomings.
Top: App.(n)...
--------------------------------------
Some of our apps / services are written for node.js
* Finals Club.org
* Node HTTP proxy (for routing traffic around the server).
III. Deployment:
--------------------------------------
a. Finals Club
----------------------
Deployment is fairly straight forward.
1. install git, curl, npm, node.js, mongodb-server, gcc, g++
2. git clone https://github.com/FinalsClub/FinalsClub.git
Please put this in a common Dir. In production we use:
/var/www/$(Service)
If the server is shared with users you do not directly know, then
you should create a "system user" and home for your web services.
Creating a special user and home for services allows server admins.
to track the activity of services and can prevent damage to the system
if the App. / service is compromised.
3. git checkout devel # In FinalsClub src. Root.
4. git submodule init && git submodule update
5. Move "setup.sh" to another location and update to
reflect the configuration of your environment.
6. if everything is deployed and setup properly (including sys. user
account), you should be able to run "sudo start&" as the user that
was created.
b. Karma Notes
----------------------
If the previous documentation seems off or out of date, please email:
IV. Backup / Management
--------------------------------------
[email protected] FCF System Administrator.