Commit 7fac5932b20487bbb752911d81850a3eab6e4c10

Authored by Sergio Oliveira
1 parent db80437a

Update README.rst

Showing 1 changed file with 21 additions and 116 deletions   Show diff stats
@@ -8,6 +8,8 @@ @@ -8,6 +8,8 @@
8 Colab, a Software for Communities 8 Colab, a Software for Communities
9 ================================= 9 =================================
10 10
  11 +
  12 +
11 What is Colab? 13 What is Colab?
12 ============== 14 ==============
13 15
@@ -21,149 +23,52 @@ Application that integrates existing systems to represent the contributions of t @@ -21,149 +23,52 @@ Application that integrates existing systems to represent the contributions of t
21 23
22 * And other systems in the community. 24 * And other systems in the community.
23 25
  26 +
  27 +
24 Features 28 Features
25 ======== 29 ========
26 30
27 * Developed by Interlegis Communities http://colab.interlegis.leg.br/ 31 * Developed by Interlegis Communities http://colab.interlegis.leg.br/
28 32
29 -* Written with Python http://python.org/ 33 +* Written in Python http://python.org/
30 34
31 -* Built in Django Web Framework https://www.djangoproject.com/ 35 +* Built with Django Web Framework https://www.djangoproject.com/
32 36
33 * Search engine with Solr https://lucene.apache.org/solr/ 37 * Search engine with Solr https://lucene.apache.org/solr/
34 38
35 -Colab and Solr  
36 -==============  
37 -  
38 -This software uses Apache Solr as search platform based on Apache Lucene.  
39 -  
40 -With Solr generates the REST style API with which you can make HTTP requests  
41 -to get results: natively in XML or JSON, PHP, Ruby and Python and then treatment.  
42 -  
43 -Installation (Development Environment)  
44 -==========================================  
45 -  
46 -A detailed installation steps can be found in:  
47 -  
48 -`Detailed full environment installation <install.rst>`_  
49 -  
50 -Here we'll cover how to setup a development environment using a Vagrant  
51 -virtual machine.  
52 -  
53 -Before getting started you should install the following softwares:  
54 -  
55 -* Vagrant (tested with version 1.2.7)  
56 39
57 -* Virtualbox (version >= 4.0)  
58 40
59 -* fabric (tested with version 1.7.0) 41 +Installation
  42 +============
60 43
61 -* Git  
62 -  
63 -  
64 -Getting started with the Virtual Machine  
65 -------------------------------------------  
66 -  
67 -First you will need to clone the repository: 44 +First install the dependencies and than the project it self:
68 45
69 .. code-block:: 46 .. code-block::
70 47
71 - git clone git@github.com:colab-community/colab.git  
72 -  
73 -  
74 -*NOTE:*  
75 -  
76 - Here we are assuming you have ssh permissions to clone the repo using ssh. If not  
77 - fork it and clone your own fork (or use https instead of ssh).  
78 - 48 + pip install -r requirements.txt
  49 + pip install .
79 50
80 -Enter in the repository you've just cloned.  
81 -To start working all you need is to turn the virtual machine on with the command:  
82 51
83 -.. code-block::  
84 -  
85 - vagrant up  
86 -  
87 -  
88 -*NOTE:*  
89 -  
90 - BE PATIENT!  
91 -  
92 - This will take a while. The `vagrant up` will download a full vm (virtualbox)  
93 - running a Ubuntu 12.04 64bits. After the vm is up and running the command  
94 - will also configure it (using puppet) and that will also take a bit.  
95 -  
96 52
97 Running Colab 53 Running Colab
98 --------------- 54 +=============
99 55
100 -Now that you have a vm running we have two options to run Colab: 56 +To run Colab with development server you will have to:
101 57
102 -* Django development server (runserver)  
103 -  
104 -* Gunicorn + supervisor + Nginx  
105 -  
106 -  
107 -Django development server (runserver)  
108 -++++++++++++++++++++++++++++++++++++++  
109 -  
110 -This option is advised for developers working in new features for Colab.  
111 -The code used to run Colab will be the same code placed on your machine,  
112 -that means that if you change the code in your own computer the code on  
113 -the vm will also change.  
114 -  
115 -Make sure you have a ``local_settings.py`` file placed in your repository. It  
116 -should be located in ``src/colab/``.  
117 -  
118 -To get started you can copy the example file as follow: 58 +1- Create the example configuration file:
119 59
120 .. code-block:: 60 .. code-block::
121 61
122 - cp src/colab/local_settings-dev.py src/colab/local_settings.py  
123 -  
124 -  
125 -Now we are ready to run:  
126 -  
127 -.. code-block::  
128 -  
129 - fab runserver 62 + colab-init-config > /etc/colab/settings.yaml
130 63
131 -  
132 -*Note*  
133 -  
134 - As this is the first time you run this command it will install all  
135 - requirements from ``requirements.txt`` into a virtualenv. To update  
136 - those requirements you should run ``fab runserver:update``.  
137 -  
138 -  
139 -The ``fab runserver`` command will open the django builtin development  
140 -server on the port 7000 but due to vagrant magic you will be able to  
141 -access it on ``http://localhost:8000/``.  
142 -  
143 -  
144 -Gunicorn + supervisor + Nginx  
145 -++++++++++++++++++++++++++++++  
146 -  
147 -This option will run Colab in a way very similar to the production  
148 -environment. This should be used to test puppet manifests and also  
149 -the configuration of each one of the services running.  
150 -  
151 -First of all we need to clone the repo and configure your ``local_settings.py``.  
152 -That is done by calling the command:  
153 -  
154 -.. code-block::  
155 -  
156 - fab install:path/to/your/local_settings.py  
157 -  
158 -  
159 -Now you need to deploy the code using the command: 64 +2- Edit the configuration file. Make sure you set everything you need including **database** credentials.
  65 +
  66 +3- Run the development server:
160 67
161 .. code-block:: 68 .. code-block::
162 69
163 - fab deploy  
164 - 70 + colab-admin runserver 0.0.0.0:8000
165 71
166 -For the next deploy you can just run ``fab deploy`` and in case your  
167 -``requirements.txt`` changes ``fab deploy:update``.  
168 72
169 -The deployed code will be accessible on ``http://localhost:8080``. 73 +**NOTE**: In case you want to keep the configuration file else where just set the
  74 +desired location in environment variable **COLAB_SETTINGS**.