Skip to content

Commit 9a6bea7

Browse files
Merge pull request #482 from flibbertigibbet/feature/fix-deploy
Feature/fix deploy
2 parents 0ae2376 + 2e499ca commit 9a6bea7

File tree

6 files changed

+16
-10
lines changed

6 files changed

+16
-10
lines changed

deployment/ansible/roles.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
azavea.git,0.1.0
22
azavea.java,0.2.6
3-
azavea.opentripplanner,1.0.0
3+
azavea.opentripplanner,1.0.1
44
azavea.nginx,0.2.1
55
azavea.nodejs,0.4.0
66
azavea.packer,0.2.0

deployment/ansible/roles/cac-tripplanner.app/templates/cac_secrets.j2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
allowed_hosts: {{ allowed_hosts }}
21
internal_ips: {{ internal_ips }}
32
postgis_version: {{ postgis_version }}
43
aws_storage_bucket_name: '{{ aws_storage_bucket_name }}'

deployment/ansible/roles/cac-tripplanner.otp-data/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
when: test
2424

2525
- name: Copy OTP Data (test/develop)
26-
copy: src=./otp_data/ dest="{{ otp_data_dir }}/" owner={{ansible_ssh_user}} group={{ansible_ssh_user}} mode=0664
26+
copy: src=./otp_data/ dest="{{ otp_data_dir }}/" owner={{ansible_user_id}} group={{ansible_user_id}} mode=0664
2727
when: develop or test
2828

2929
- name: Build OTP Graph (test/develop)
@@ -45,5 +45,5 @@
4545
when: develop or test
4646

4747
- name: Copy Local Graph to Graph Directory (production)
48-
copy: src=./otp_data/Graph.obj dest="{{ otp_data_dir }}/{{ otp_router }}/Graph.obj" owner={{ansible_ssh_user}} group={{ansible_ssh_user}} mode=0664
48+
copy: src=./otp_data/Graph.obj dest="{{ otp_data_dir }}/{{ otp_router }}/Graph.obj" owner={{ansible_user_id}} group={{ansible_user_id}} mode=0664
4949
when: production

deployment/packer/cac.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,8 @@
7777
"sudo apt-get update",
7878
"mkdir -p {{user `ansible_staging_directory`}}",
7979
"mkdir -p {{user `intermediate_directory`}}",
80-
"sudo apt-get -y install build-essential python-dev python-pip git",
81-
"sudo pip install paramiko==1.16.0",
82-
"sudo pip install ansible==1.8.4"
80+
"sudo apt-get -y install build-essential python-dev python-pip git libssl-dev libffi-dev",
81+
"sudo pip install --upgrade ansible setuptools"
8382
]
8483
},
8584
{
@@ -105,13 +104,19 @@
105104
"playbook_file": "{{user `local_project_directory`}}/deployment/ansible/app.yml",
106105
"inventory_file": "{{user `local_project_directory`}}/deployment/ansible/hosts/hosts.app",
107106
"group_vars": "{{user `local_project_directory`}}/deployment/ansible/group_vars/",
107+
"extra_arguments": [
108+
"--user 'ubuntu'"
109+
],
108110
"only": ["app"]
109111
},
110112
{
111113
"type": "ansible-local",
112114
"playbook_file": "{{user `local_project_directory`}}/deployment/ansible/otp.yml",
113115
"inventory_file": "{{user `local_project_directory`}}/deployment/ansible/hosts/hosts.otp",
114116
"group_vars": "{{user `local_project_directory`}}/deployment/ansible/group_vars/",
117+
"extra_arguments": [
118+
"--user 'ubuntu'"
119+
],
115120
"only": ["otp"]
116121
}
117122
]

python/cac_tripplanner/cac_tripplanner/settings.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
# overridden via the secrets file. This can't be automatically set
3535
# to the host machine's DNS here, because this code runs in a VM.
3636
'otp_url': 'http://192.168.8.26/otp/routers/{router}/',
37-
'allowed_hosts': ['127.0.0.1', 'localhost'],
3837
'internal_ips': ['0.0.0.0', '127.0.0.1'],
3938
'postgis_version': [2, 1, 5],
4039
'build_dir': '/opt/app/src',
@@ -63,7 +62,7 @@
6362
# SECURITY WARNING: don't run with debug turned on in production!
6463
DEBUG = not secrets['production']
6564

66-
ALLOWED_HOSTS = secrets['allowed_hosts']
65+
ALLOWED_HOSTS = ['*']
6766

6867
INTERNAL_IPS = tuple(secrets['internal_ips'])
6968

src/gulpfile.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,11 @@ var copyBowerFiles = function(filter, extraFiles) {
6464
.pipe(addsrc(extraFiles));
6565
};
6666

67+
// silence the collectstatic output
68+
// gulp-run hangs if the output is too large:
69+
// https://github.com/MrBoolean/gulp-run/issues/34
6770
gulp.task('collectstatic', function () {
68-
return run('python ' + pythonRoot + '/manage.py collectstatic --noinput').exec();
71+
return run('python ' + pythonRoot + '/manage.py collectstatic --noinput -v0').exec();
6972
});
7073

7174
gulp.task('clean', function() {

0 commit comments

Comments
 (0)