forked from isaw/isaw.web
-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.txt
269 lines (175 loc) · 7.57 KB
/
README.txt
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
ISAW Website Buildout
=====================
Includes sources for the following addons:
* isaw.theme - https://github.com/isawnyu/isaw.theme
* isaw.facultycv - https://github.com/isawnyu/isaw.facultycv
* isaw.register - https://github.com/isawnyu/isaw.register
* isaw.exhibitions - https://github.com/isawnyu/isaw.exibitions
Take note that these are kept in their own seperate repositories and pulled
into the src/ directory automatically by the mr.developer buildout extension.
Fugue Icons
-----------
The icons used for the content types are (C) 2013 Yusuke Kamiyamane.
All rights reserved.
<http://p.yusukekamiyamane.com/>
These icons are licensed under a Creative Commons
Attribution 3.0 License.
<http://creativecommons.org/licenses/by/3.0/>
Getting Started
---------------
This buildout runs Plone 4.3.3, and expects Python 2.7 (2.7.8). In order to
get started you must first ensure you have Python version 2.7 installed on
your OS. You can first check your python version to see if it is already
installed before proceeding:
python --version
Or you might have Python 2.7 installed under its own name:
python2.7 --version
And then check if you've got virtualenv installed:
virtualenv --version
Or
virtualenv-2.7 --version
If you've got a Python 2.7 installed and virtualenv installed, you can
safely skip to "Library Dependencies".
On OS X
-------
On Mac OS X, assuming you have a XCode and a 3rd party package manager (either
Homebrew or MacPorts) and are not currently in an active Virtualenv (otherwise
`deactivate`). For Homebrew:
brew install python
for MacPorts
sudo port install python27
Install virtualenv. For Homebrew:
pip install virtualenv
for
sudo port install py27-setuptools py27-virtualenv
This will install a `virtualenv-2.7` command for creating Python 2.7 virtualenvs.
On Ubuntu
---------
You will need to install the python dev packages:
sudo apt-get update
sudo apt-get install python-dev python2.7-setuptools python-pip python-virtualenv
Library Dependencies
--------------------
To ensure all of Plone's functionality works out of the box, you'll want to install a couple support libraries:
With Homebrew:
brew install libxml2 libxslt libjpeg
brew link libxml2 libxslt libjpeg
or MacPorts:
sudo port install libxml2 libxslt libjpeg
or Apt:
sudo apt-get install libxml2-dev libxslt-dev libjpeg-dev
Python Virtualenv Setup
-----------------------
If Python 2.7 is your default python or you have a Python 2.7 specific
virtualenv command, then create your virtualenv:
virtualenv[-2.7] py27-venv
If your Python 2.7 is not the default python in your path, then:
export PATH_TO_PTYHON_27=`which python2.7`
virtualenv --python $PATH_TO_PTYHON_27 py27-venv
Buildout
--------
Activate your new environment and clone the buildout:
cd py27-venv
source bin/activate
git clone [email protected]:isawnyu/isaw.web.git
Then bootstrap and run your buildout:
cd isaw.web
python ./bootstrap.py
bin/buildout -c development.cfg
If this build fails due to a C compiler "unknown arguments" error, you may
have a buggy XCode install. Specifically there is a know issue with XCode
5.1+ running on OS X Mountain Lion (10.8.x). The workaround is to set the
following shell environment variables before running `buildout`:
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
This should pull down additional repositories, install python dependencies,
and in the end create the scripts to run a local development version of the
ISAW site.
Supervisor
----------
The services (ZEO server and clients) for the site are run by a
"supervisor" process. On staging and production, supervisor is installed at
the OS level via Ansible. For local development, it's installed via buildout.
This will affect exactly how supervisorctl and supervisord commands are invoked.
For local development, you will use `bin/supervisord` and `bin/supervisorctl`,
whereas on staging and production you'll invoke the executables from the system
PATH (and use sudo): `sudo supervisord` and `sudo supervisorctl`.
The example below assume you're working locally.
To start supervisor for the first time run:
bin/supervisord
This will start the supervisor and the Zeoserver, but not the zope clients by default
If you need to stop the supervisor, run:
bin/supervisorctl shutdown
Initial Admin User
------------------
You can create and/or set an Admin user password:
bin/client1 adduser <name> <password>
Startup
-------
To run the local zeo client in development mode, you can start it up in
foreground mode:
bin/client1 fg
You can now connect to the site at:
http://127.0.0.1:8081/
Which should show you a button for creating a new Plone site. You'll want to
create a new site and apply the isaw.policy default profile by checking the
corresponding checkbox. Having done so, you'll see the unthemed Plone site.
To see the fully themed site, replace "127.0.0.1" with "localhost" in your
browser's location bar, thus:
http://localhost:8081/
The supervisor can also be used to run the Zeo clients in the background:
bin/supervisorctl start client1
bin/supervisorctl start client2
Development
-----------
You can update project sources by running:
bin/develop up
Each in-development add-on package lives in a directory inside of `src/` and
is its own git repository.
And you can update the buildout itself with:
git pull origin master
bin/buildout -c development.cfg
Branches
--------
The primary buildout branch is currently `master`.
We want to develop all new features on distinct feature branches. These
branches will be merged as needed to a separate `staging` branch for testing.
This process will allow for multiple features at different stages of readiness
to be tested on the staging server, and then deployed individually to
production as they are ready. All feature branches should be branched from
the master branch, and then merged into the `staging` branch when ready for
testing. Once tested and ready for deploy the feature branch should be merged
directly into the master branch.
The `staging` branch would be branched from the master and periodically
updated with merged changes from master. The `staging` branch should – in
general – never be modified directly or merged into other branches. It should
be considered a repository for merges from feature branches and the master.
Small fixes should be made on the master branch or on a separate bugfix
branch, then merged to staging for testing, rather than made directly on
staging.
This strategy applies to the `master` branches of custom add-ons as well.
The following ASCII diagram attempts to illustrate the branching and merging
process::
master
|
|----------------------------> staging
| |
|-------> feature1 |
| | |
|<------------|------------------>|
| |--> deploy
|-------> feature2 |
| | |
| | |
| | |
| | |
| | |
| |------------------>|
| | |--> deploy
| | |
| | |
| | |
|<------------|------------------>|
| |--> deploy
|
|--> deploy