Merge lp:~ricardokirkner/locolander/fix-deploy into lp:locolander

Proposed by Ricardo Kirkner
Status: Needs review
Proposed branch: lp:~ricardokirkner/locolander/fix-deploy
Merge into: lp:locolander
Prerequisite: lp:~ricardokirkner/locolander/django-supervisor
Diff against target: 93 lines (+13/-10) (has conflicts)
4 files modified
docker/scripts/locolander (+4/-0)
fabfile.py (+1/-1)
locolander/locolanderweb/tasks.py (+5/-5)
locolander/supervisord.conf (+3/-4)
Text conflict in locolander/locolanderweb/tasks.py
To merge this branch: bzr merge lp:~ricardokirkner/locolander/fix-deploy
Reviewer Review Type Date Requested Status
LocoLanderos Pending
Review via email: mp+180669@code.launchpad.net

Commit message

various fixes for real deployment issues

To post a comment you must log in.

Unmerged revisions

37. By Ricardo Kirkner

fixes to supervisor config

36. By Ricardo Kirkner

use proper path to locolander script

35. By Ricardo Kirkner

avoid bzr diff aborting locolander script

34. By Ricardo Kirkner

better output from script

33. By Ricardo Kirkner

replace subprocess with envoy

use envoy instead of subprocess, because the latter fails to run properly
when celeryd is started under supervisor.

32. By Ricardo Kirkner

customized model repr strings

31. By Ricardo Kirkner

use absolute path for database file

30. By Ricardo Kirkner

better output handling

29. By Ricardo Kirkner

disable autoreload

28. By Ricardo Kirkner

added envoy and django-supervisor as dependencies

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'docker/scripts/locolander'
--- docker/scripts/locolander 2013-08-16 23:23:30 +0000
+++ docker/scripts/locolander 2013-08-16 23:23:30 +0000
@@ -33,6 +33,9 @@
33cd target33cd target
34OUTPUT=$(bzr merge $SOURCE 2>&1)34OUTPUT=$(bzr merge $SOURCE 2>&1)
3535
36# ignore any errors here as bzr diff will exit with code 1
37# if the diff is not empty
38set +e
36# figure out if there are any changes39# figure out if there are any changes
37DIFF=$(bzr diff)40DIFF=$(bzr diff)
38CONFLICTS=$(bzr conflicts)41CONFLICTS=$(bzr conflicts)
@@ -47,6 +50,7 @@
47 echo "SUCCESS - Nothing to do."50 echo "SUCCESS - Nothing to do."
48 exit 051 exit 0
49fi52fi
53set -e
5054
51# 3. build image using config file55# 3. build image using config file
52echo "Building project image..."56echo "Building project image..."
5357
=== modified file 'fabfile.py'
--- fabfile.py 2013-08-16 23:23:30 +0000
+++ fabfile.py 2013-08-16 23:23:30 +0000
@@ -24,7 +24,7 @@
2424
25@virtualenv25@virtualenv
26def run():26def run():
27 manage('supervisor')27 manage('supervisor -d')
2828
2929
30@virtualenv30@virtualenv
3131
=== modified file 'locolander/locolanderweb/tasks.py'
--- locolander/locolanderweb/tasks.py 2013-08-16 23:23:30 +0000
+++ locolander/locolanderweb/tasks.py 2013-08-16 23:23:30 +0000
@@ -3,7 +3,6 @@
3import subprocess3import subprocess
4from datetime import datetime4from datetime import datetime
5=======5=======
6from datetime import datetime
7>>>>>>> MERGE-SOURCE6>>>>>>> MERGE-SOURCE
87
9import envoy8import envoy
@@ -26,11 +25,12 @@
26 author = request.author25 author = request.author
27 message = request.commit_message26 message = request.commit_message
2827
28 cwd = os.path.dirname(os.path.abspath(__file__))
29 script = os.path.abspath(os.path.join(cwd, '..', '..',
30 'docker', 'scripts', 'locolander'))
29 cmd = '{script} {project} {source} {target} "{message}" "{author}"'.format(31 cmd = '{script} {project} {source} {target} "{message}" "{author}"'.format(
30 script=os.path.join(os.path.abspath(os.curdir),32 script=script, project=project.name, source=source, target=target,
31 'docker', 'scripts', 'locolander'),33 message=message, author=author)
32 project=project.name, source=source, target=target, message=message,
33 author=author)
3434
35 r = envoy.run(cmd)35 r = envoy.run(cmd)
36 output = r.std_out36 output = r.std_out
3737
=== modified file 'locolander/supervisord.conf'
--- locolander/supervisord.conf 2013-08-16 23:23:30 +0000
+++ locolander/supervisord.conf 2013-08-16 23:23:30 +0000
@@ -1,6 +1,5 @@
1[program:gunicorn]1[program:gunicorn]
2command = gunicorn -b 0.0.0.0:8000 locolander.wsgi:application2command = gunicorn locolander.wsgi:application
3directory = {{ PROJECT_DIR }}
4autostart = true3autostart = true
5autorestart = true4autorestart = true
6stdout_logfile = supervisord.log5stdout_logfile = supervisord.log
@@ -8,7 +7,7 @@
87
9[program:redis]8[program:redis]
10command = redis-server9command = redis-server
11autostart = true10autostart = false
12autorestart = true11autorestart = true
13stdout_logfile = supervisord.log12stdout_logfile = supervisord.log
14redirect_stderr = true13redirect_stderr = true
@@ -22,7 +21,7 @@
2221
23[program:flower]22[program:flower]
24command = {{ PYTHON }} {{ PROJECT_DIR }}/manage.py celery flower23command = {{ PYTHON }} {{ PROJECT_DIR }}/manage.py celery flower
25autostart = true24autostart = false
26autorestart = true25autorestart = true
27stdout_logfile = supervisord.log26stdout_logfile = supervisord.log
28redirect_stderr = true27redirect_stderr = true

Subscribers

People subscribed via source and target branches

to all changes: