diff --git a/deployment/ansible/roles/model-my-watershed.celery-worker/tasks/celery-service.yml b/deployment/ansible/roles/model-my-watershed.celery-worker/tasks/celery-service.yml index 60ca68666..510b65f12 100644 --- a/deployment/ansible/roles/model-my-watershed.celery-worker/tasks/celery-service.yml +++ b/deployment/ansible/roles/model-my-watershed.celery-worker/tasks/celery-service.yml @@ -15,3 +15,8 @@ special_time: daily job: /usr/sbin/service celeryd restart state: present + +- name: Configure Celery log rotation + template: src=celery-logrotate.j2 + dest=/etc/logrotate.d/celery + mode=0755 diff --git a/deployment/ansible/roles/model-my-watershed.celery-worker/templates/celery-logrotate.j2 b/deployment/ansible/roles/model-my-watershed.celery-worker/templates/celery-logrotate.j2 new file mode 100644 index 000000000..0ae479667 --- /dev/null +++ b/deployment/ansible/roles/model-my-watershed.celery-worker/templates/celery-logrotate.j2 @@ -0,0 +1,5 @@ +{{ celery_log_dir }}/* { + rotate 3 + daily + compress +} diff --git a/deployment/packer/mmw.json b/deployment/packer/mmw.json index faf82aa0d..ba668433b 100644 --- a/deployment/packer/mmw.json +++ b/deployment/packer/mmw.json @@ -62,6 +62,12 @@ "ssh_username": "ubuntu", "ami_name": "mmw-worker-{{timestamp}}-{{user `version`}}", "ami_block_device_mappings": [ + { + "device_name": "/dev/sda1", + "volume_type": "gp2", + "volume_size": 12, + "delete_on_termination": true + }, { "device_name": "/dev/sdf", "snapshot_id": "snap-0211cbbff8a81266f",