Commit 73f57c97cdeab1995f4e40027fe99bdab2522879
Committed by
Melissa Wen
1 parent
76ab812b
Exists in
master
and in
22 other branches
Adding tutorial for environment with noosfero+colab - #413
Signed-off-by: Álvaro Fernando <alvarofernandoms@gmail.com>
Showing
1 changed file
with
151 additions
and
1 deletions
Show diff stats
src/noosfero-spb/noosfero-spb-theme/README.md
... | ... | @@ -3,4 +3,154 @@ PSB Theme for Noosfero |
3 | 3 | |
4 | 4 | Noosfero theme for the _Portal do Software Público_ project. |
5 | 5 | |
6 | -Install on /public/designs/themes/noosfero-spb-theme | |
7 | 6 | \ No newline at end of file |
7 | +Install on /public/designs/themes/noosfero-spb-theme | |
8 | + | |
9 | +================================ | |
10 | + | |
11 | +# Passos para configurar o tema a partir do spb/spb | |
12 | + | |
13 | +## Considerando que o clone do noosfero está na pasta home | |
14 | + | |
15 | +```bash | |
16 | +rm -r ~/noosfero/public/design/theme/noosfero-spb-theme | |
17 | +cd ~ | |
18 | +git clone git@softwarepublico.gov.br:softwarepublico/softwarepublico.git | |
19 | +cd softwarepublico/src/noosfero-spb/ | |
20 | +ln -sr noosfero-spb-theme/ ~/noosfero/public/designs/themes/ | |
21 | +ln -sr software_communities ~/noosfero/plugins/ | |
22 | +ln -sr gov_user ~/noosfero/plugins/ | |
23 | +git remote add theme git@softwarepublico.gov.br:softwarepublico/noosfero-spb-theme.git | |
24 | +``` | |
25 | + | |
26 | +# Para instalar o Colab | |
27 | + | |
28 | +```bash | |
29 | +cd ~ | |
30 | +git clone https://github.com/colab/colab | |
31 | +``` | |
32 | + | |
33 | +## Configuração | |
34 | + | |
35 | +Seguir [tutorial](https://github.com/colab/colab/blob/master/README.rst) do próprio Colab | |
36 | + | |
37 | +## Arquivos de configuração Colab | |
38 | + | |
39 | +Estando com o ambiente do vagrant levantado `(vagrant up && vagrant ssh)`, | |
40 | +e "trabalhando" com o colab `(workon colab)`: | |
41 | + | |
42 | +## Clone os repositórios: | |
43 | + | |
44 | +```bash | |
45 | +cd ~ | |
46 | +git clone git@softwarepublico.gov.br:softwarepublico/softwarepublico.git | |
47 | +git clone https://github.com/colab/colab-gitlab-plugin | |
48 | +git clone https://github.com/colab/colab-noosfero-plugin | |
49 | +``` | |
50 | + | |
51 | +## Criando diretórios - Plugins do Colab | |
52 | + | |
53 | +```bash | |
54 | +mkdir /etc/colab/plugins.d/ | |
55 | +cd plugins.d | |
56 | +``` | |
57 | + | |
58 | +## Crie os arquivos | |
59 | + | |
60 | +### gitlab.py | |
61 | + | |
62 | +```bash | |
63 | +vim gitlab.py | |
64 | +``` | |
65 | + | |
66 | +#### Conteúdo do gitlab.py | |
67 | + | |
68 | +```python | |
69 | +from django.utils.translation import ugettext_lazy as _ | |
70 | +from colab.plugins.utils.menu import colab_url_factory | |
71 | + | |
72 | +name = "colab_gitlab" | |
73 | +verbose_name = "Gitlab" | |
74 | + | |
75 | +upstream = '' | |
76 | +private_token = '' | |
77 | + | |
78 | +urls = { | |
79 | + "include":"colab_gitlab.urls", | |
80 | + "prefix": 'gitlab/', | |
81 | + "namespace":"gitlab" | |
82 | + } | |
83 | + | |
84 | +url = colab_url_factory('gitlab') | |
85 | +``` | |
86 | + | |
87 | +### noosfero.py | |
88 | + | |
89 | +```bash | |
90 | +vim noosfero.py | |
91 | +``` | |
92 | + | |
93 | +#### Conteúdo do noosfero.py | |
94 | + | |
95 | +```python | |
96 | +from django.utils.translation import ugettext_lazy as _ | |
97 | +from colab.plugins.utils.menu import colab_url_factory | |
98 | + | |
99 | +name = "colab_noosfero" | |
100 | +verbose_name = "Noosfero" | |
101 | +private_token = "" | |
102 | + | |
103 | +upstream = 'http://<IP DA SUA MÁQUINA AQUI>:8080/social' | |
104 | + | |
105 | +urls = { | |
106 | + "include":"colab_noosfero.urls", | |
107 | + "prefix": '^social/', | |
108 | + "namespace":"social" | |
109 | + } | |
110 | + | |
111 | +url = colab_url_factory('social') | |
112 | +``` | |
113 | + | |
114 | +### spb.py | |
115 | + | |
116 | +```bash | |
117 | +vim spb.py | |
118 | +``` | |
119 | + | |
120 | +#### Conteúdo do spb.py | |
121 | + | |
122 | +```python | |
123 | +from django.utils.translation import ugettext_lazy as _ | |
124 | +from colab.plugins.utils.menu import colab_url_factory | |
125 | + | |
126 | +name = "colab_spb" | |
127 | +verbose_name = "SPB Plugin" | |
128 | +urls = { | |
129 | + "include":"colab_spb.urls", | |
130 | + "prefix": '^spb/', | |
131 | + "namespace":"colab_spb" | |
132 | + } | |
133 | + | |
134 | +url = colab_url_factory('colab_spb') | |
135 | +``` | |
136 | +### Execuntando scripts de instalação | |
137 | + | |
138 | +```bash | |
139 | +cd ~/softwarepublico/config/ | |
140 | +pip install -e . | |
141 | +cd ~/softwarepublico/src/colab-spb-plugin/ | |
142 | +pip install -e . | |
143 | +colab-admin migrate | |
144 | +colab-admin migrate colab_spb | |
145 | +cd ~/colab-gitlab-plugin/ | |
146 | +pip install -e . | |
147 | +cd ~/softwarepublico/src/colab-spb-plugin/ | |
148 | +pip install -e . | |
149 | +colab-admin migrate | |
150 | +``` | |
151 | + | |
152 | +## Finalizando | |
153 | + | |
154 | +Execute o noosfero seja no ambiente local, ou schroot, | |
155 | +com o comando `RAILS_RELATIVE_URL_ROOT=/social unicorn` | |
156 | + | |
157 | +No vagrant, execute `colab-admin runserver 0.0.0.0:8000` | ... | ... |