Commit 11769061585327b0359fba98c7ff3fcb30ac2481
Exists in
master
and in
39 other branches
Merge branch 'master' into bootstrap
Conflicts: src/colab/deprecated/templates/base.html
Showing
10 changed files
with
63 additions
and
10 deletions
Show diff stats
.gitignore
Vagrantfile
@@ -21,6 +21,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | @@ -21,6 +21,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | ||
21 | # accessing "localhost:8080" will access port 80 on the guest machine. | 21 | # accessing "localhost:8080" will access port 80 on the guest machine. |
22 | config.vm.network :forwarded_port, guest: 80, host: 8080 | 22 | config.vm.network :forwarded_port, guest: 80, host: 8080 |
23 | config.vm.network :forwarded_port, guest: 7000, host: 8000 | 23 | config.vm.network :forwarded_port, guest: 7000, host: 8000 |
24 | + config.vm.network :forwarded_port, guest: 5280, host: 5280 | ||
25 | + config.vm.network :forwarded_port, guest: 8080, host: 8081 | ||
24 | 26 | ||
25 | # Create a private network, which allows host-only access to the machine | 27 | # Create a private network, which allows host-only access to the machine |
26 | # using a specific IP. | 28 | # using a specific IP. |
fabfile.py
@@ -60,11 +60,14 @@ def update_requirements(): | @@ -60,11 +60,14 @@ def update_requirements(): | ||
60 | 60 | ||
61 | 61 | ||
62 | def deploy(update=False): | 62 | def deploy(update=False): |
63 | + | ||
64 | + with cd('~/colab/src/'), prefix(WORKON_COLAB): | ||
65 | + run('git pull') | ||
66 | + | ||
63 | if update: | 67 | if update: |
64 | update_requirements() | 68 | update_requirements() |
65 | 69 | ||
66 | with cd('~/colab/src/'), prefix(WORKON_COLAB): | 70 | with cd('~/colab/src/'), prefix(WORKON_COLAB): |
67 | - run('git pull') | ||
68 | run('python manage.py syncdb') | 71 | run('python manage.py syncdb') |
69 | run('python manage.py migrate') | 72 | run('python manage.py migrate') |
70 | run('python manage.py collectstatic --noinput') | 73 | run('python manage.py collectstatic --noinput') |
puppet/modules/colab/manifests/init.pp
@@ -44,6 +44,12 @@ class colab { | @@ -44,6 +44,12 @@ class colab { | ||
44 | user => 'colab', | 44 | user => 'colab', |
45 | } | 45 | } |
46 | 46 | ||
47 | + supervisor::app { 'punjab': | ||
48 | + command => 'twistd --nodaemon punjab', | ||
49 | + directory => '/home/colab/', | ||
50 | + user => 'colab', | ||
51 | + } | ||
52 | + | ||
47 | nginx::config { 'nginx': | 53 | nginx::config { 'nginx': |
48 | content => template('colab/nginx/extra_conf.erb'), | 54 | content => template('colab/nginx/extra_conf.erb'), |
49 | } | 55 | } |
@@ -51,4 +57,4 @@ class colab { | @@ -51,4 +57,4 @@ class colab { | ||
51 | nginx::site { '000-colab': | 57 | nginx::site { '000-colab': |
52 | content => template('colab/nginx/site_default.erb'), | 58 | content => template('colab/nginx/site_default.erb'), |
53 | } | 59 | } |
54 | -} | ||
55 | \ No newline at end of file | 60 | \ No newline at end of file |
61 | +} |
puppet/modules/colab/manifests/requirements.pp
@@ -17,6 +17,27 @@ class colab::requirements { | @@ -17,6 +17,27 @@ class colab::requirements { | ||
17 | provider => pip, | 17 | provider => pip, |
18 | require => Package['python-pip'], | 18 | require => Package['python-pip'], |
19 | } | 19 | } |
20 | + | ||
21 | + # XMPP connection manager | ||
22 | + package { 'git+https://github.com/twonds/punjab@c96ffe4': | ||
23 | + ensure => installed, | ||
24 | + provider => pip, | ||
25 | + require => Package['python-pip'], | ||
26 | + } | ||
27 | + | ||
28 | + # Punjab dep | ||
29 | + package { 'Twisted': | ||
30 | + ensure => installed, | ||
31 | + provider => pip, | ||
32 | + require => Package['python-pip'], | ||
33 | + } | ||
34 | + | ||
35 | + # Punjab dep | ||
36 | + package { 'pyOpenSSL': | ||
37 | + ensure => installed, | ||
38 | + provider => pip, | ||
39 | + require => Package['python-pip'], | ||
40 | + } | ||
20 | 41 | ||
21 | # links virtualenvwrapper to load automaticaly | 42 | # links virtualenvwrapper to load automaticaly |
22 | file { '/etc/bash_completion.d/virtualenvwrapper.sh': | 43 | file { '/etc/bash_completion.d/virtualenvwrapper.sh': |
@@ -53,4 +74,4 @@ class colab::requirements { | @@ -53,4 +74,4 @@ class colab::requirements { | ||
53 | package { 'libxslt1-dev': | 74 | package { 'libxslt1-dev': |
54 | ensure => installed, | 75 | ensure => installed, |
55 | } | 76 | } |
56 | -} | ||
57 | \ No newline at end of file | 77 | \ No newline at end of file |
78 | +} |
requirements.txt
1 | #https://www.djangoproject.com/download/1.6b1/tarball/ | 1 | #https://www.djangoproject.com/download/1.6b1/tarball/ |
2 | -Django==1.5 | 2 | +Django==1.5.2 |
3 | South==0.8.1 | 3 | South==0.8.1 |
4 | psycopg2==2.5.1 | 4 | psycopg2==2.5.1 |
5 | django-piston==0.2.3 | 5 | django-piston==0.2.3 |
@@ -20,7 +20,7 @@ django-browserid | @@ -20,7 +20,7 @@ django-browserid | ||
20 | git+https://github.com/TracyWebTech/django-revproxy/ | 20 | git+https://github.com/TracyWebTech/django-revproxy/ |
21 | 21 | ||
22 | # Converse.js (XMPP client) | 22 | # Converse.js (XMPP client) |
23 | -git+https://github.com/TracyWebTech/django-conversejs | 23 | +django-conversejs==0.2.2 |
24 | 24 | ||
25 | # Feedzilla (planet) and deps | 25 | # Feedzilla (planet) and deps |
26 | https://bitbucket.org/lorien/feedzilla/get/tip.tar.gz # Temporarily work around | 26 | https://bitbucket.org/lorien/feedzilla/get/tip.tar.gz # Temporarily work around |
src/colab/custom_settings.py
@@ -98,7 +98,7 @@ LOGGING = { | @@ -98,7 +98,7 @@ LOGGING = { | ||
98 | 'handlers': ['sentry', 'console'], | 98 | 'handlers': ['sentry', 'console'], |
99 | 'level': 'DEBUG', | 99 | 'level': 'DEBUG', |
100 | }, | 100 | }, |
101 | - 'boshclient': { | 101 | + 'conversejs': { |
102 | 'handlers': ['console'], | 102 | 'handlers': ['console'], |
103 | 'level': 'DEBUG', | 103 | 'level': 'DEBUG', |
104 | }, | 104 | }, |
@@ -156,7 +156,7 @@ FEEDZILLA_SITE_DESCRIPTION = gettext(u'Colab blog aggregator') | @@ -156,7 +156,7 @@ FEEDZILLA_SITE_DESCRIPTION = gettext(u'Colab blog aggregator') | ||
156 | 156 | ||
157 | 157 | ||
158 | ### BrowserID / Persona | 158 | ### BrowserID / Persona |
159 | -SITE_URL = 'http://colab.interlegis.leg.br' | 159 | +SITE_URL = 'https://colab.interlegis.leg.br' |
160 | 160 | ||
161 | LOGIN_REDIRECT_URL = '/' | 161 | LOGIN_REDIRECT_URL = '/' |
162 | LOGIN_REDIRECT_URL_FAILURE = '/' | 162 | LOGIN_REDIRECT_URL_FAILURE = '/' |
@@ -176,11 +176,15 @@ SOLR_BASE_QUERY = """ | @@ -176,11 +176,15 @@ SOLR_BASE_QUERY = """ | ||
176 | """ | 176 | """ |
177 | 177 | ||
178 | COLAB_TRAC_URL = 'http://colab-backend.interlegis.leg.br/' | 178 | COLAB_TRAC_URL = 'http://colab-backend.interlegis.leg.br/' |
179 | - | ||
180 | -CONVERSEJS_BOSH_SERVICE_URL = 'https://bind.opkode.im' | 179 | +COLAB_CI_URL = 'http://jenkins.interlegis.leg.br:8080/ci/' |
181 | 180 | ||
182 | REVPROXY_ADD_REMOTE_USER = True | 181 | REVPROXY_ADD_REMOTE_USER = True |
183 | 182 | ||
183 | +# This URL must use SSL in order to keep chat sessions secure | ||
184 | +CONVERSEJS_BOSH_SERVICE_URL = SITE_URL + '/http-bind' | ||
185 | + | ||
186 | +CONVERSEJS_AUTO_REGISTER = 'mensageiro.interlegis.gov.br' | ||
187 | + | ||
184 | try: | 188 | try: |
185 | from local_settings import * | 189 | from local_settings import * |
186 | except ImportError: | 190 | except ImportError: |
src/colab/deprecated/templates/base.html
@@ -50,10 +50,17 @@ | @@ -50,10 +50,17 @@ | ||
50 | {% browserid_login text='Login' next=request.path %} | 50 | {% browserid_login text='Login' next=request.path %} |
51 | </div> | 51 | </div> |
52 | {% else %} | 52 | {% else %} |
53 | +<<<<<<< HEAD | ||
53 | <div class="col-sm-1 text-right"> | 54 | <div class="col-sm-1 text-right"> |
54 | {% trans "authenticated as" %} <b>{{ user.email }}</b> | 55 | {% trans "authenticated as" %} <b>{{ user.email }}</b> |
55 | </div> | 56 | </div> |
56 | <div class="col-sm-1 text-center"> | 57 | <div class="col-sm-1 text-center"> |
58 | +======= | ||
59 | + <span class="colborder"> | ||
60 | + {% trans "authenticated as" %} <b>{{ user.username }}</b> | ||
61 | + </span> | ||
62 | + <span class="colborder"> | ||
63 | +>>>>>>> master | ||
57 | <a href="{% url 'user_profile' user.username %}"> | 64 | <a href="{% url 'user_profile' user.username %}"> |
58 | {% trans "My Profile" %} | 65 | {% trans "My Profile" %} |
59 | </a> | 66 | </a> |
src/colab/local_settings-dev.py
@@ -21,3 +21,8 @@ SECRET_KEY = ')(jksdfhsjkadfhjkh234ns!8fqu-1186h$vuj' | @@ -21,3 +21,8 @@ SECRET_KEY = ')(jksdfhsjkadfhjkh234ns!8fqu-1186h$vuj' | ||
21 | #SOCKS_PORT = 9050 | 21 | #SOCKS_PORT = 9050 |
22 | 22 | ||
23 | SITE_URL = 'http://localhost:8000' | 23 | SITE_URL = 'http://localhost:8000' |
24 | + | ||
25 | +INTERNAL_IPS = ('127.0.0.1', ) | ||
26 | + | ||
27 | +CONVERSEJS_BOSH_SERVICE_URL = 'http://localhost:5280/http-bind' | ||
28 | + |
src/colab/urls.py
@@ -34,5 +34,8 @@ urlpatterns = patterns('', | @@ -34,5 +34,8 @@ urlpatterns = patterns('', | ||
34 | 34 | ||
35 | # Trac URLs | 35 | # Trac URLs |
36 | url(u'^(?P<path>(?:admin|wiki|changeset|newticket|ticket|chrome|timeline|roadmap|browser|report|tags|query|about|prefs|log|attachment|raw-attachment).*)$', | 36 | url(u'^(?P<path>(?:admin|wiki|changeset|newticket|ticket|chrome|timeline|roadmap|browser|report|tags|query|about|prefs|log|attachment|raw-attachment).*)$', |
37 | - 'revproxy.views.proxy', {'base_url': settings.COLAB_TRAC_URL}) | 37 | + 'revproxy.views.proxy', {'base_url': settings.COLAB_TRAC_URL}), |
38 | + | ||
39 | + # Jenkins URLs | ||
40 | + url(u'^ci/(?P<path>.*)$', 'revproxy.views.proxy', {'base_url': settings.COLAB_CI_URL}), | ||
38 | ) | 41 | ) |