From 71778937c74e18f731761910311f0594cc9188f7 Mon Sep 17 00:00:00 2001 From: Simon Kelly Date: Fri, 22 Sep 2023 13:39:15 +0200 Subject: [PATCH] remove beanstalk config --- .ebextensions/00-install-packages.config | 3 -- .ebextensions/01-celery.config | 48 ------------------- .ebextensions/django.config | 3 -- .ebextensions/logging.config | 12 ----- .ebextensions/pre-deploy.config | 18 ------- .platform/hooks/postdeploy/01-celery-start.sh | 5 -- 6 files changed, 89 deletions(-) delete mode 100644 .ebextensions/00-install-packages.config delete mode 100644 .ebextensions/01-celery.config delete mode 100644 .ebextensions/django.config delete mode 100644 .ebextensions/logging.config delete mode 100644 .ebextensions/pre-deploy.config delete mode 100644 .platform/hooks/postdeploy/01-celery-start.sh diff --git a/.ebextensions/00-install-packages.config b/.ebextensions/00-install-packages.config deleted file mode 100644 index 5679c61e..00000000 --- a/.ebextensions/00-install-packages.config +++ /dev/null @@ -1,3 +0,0 @@ -packages: - yum: - libpq-devel: [] diff --git a/.ebextensions/01-celery.config b/.ebextensions/01-celery.config deleted file mode 100644 index 8eca3648..00000000 --- a/.ebextensions/01-celery.config +++ /dev/null @@ -1,48 +0,0 @@ -users: - celery: - homeDir: /var/app - -files: - "/etc/systemd/system/celery.service": - mode: "000644" - owner: celery - group: celery - content: | - [Unit] - Description=Celery Service - After=network.target - StartLimitInterval=0 - - [Service] - Type=forking - Restart=on-failure - RestartSec=10 - User=celery - Group=celery - EnvironmentFile=/opt/elasticbeanstalk/deployment/env - WorkingDirectory=/var/app/current - ExecStart=/bin/sh -c '${PYTHONPATH}/celery multi start worker \ - -A ${CELERY_APP} --loglevel=INFO --time-limit=300 --concurrency=2' - ExecStop=/bin/sh -c '${PYTHONPATH}/celery multi stopwait worker' - ExecReload=/bin/sh -c '${PYTHONPATH}/celery multi restart worker \ - -A ${CELERY_APP} --loglevel=INFO --time-limit=300 --concurrency=2' - - [Install] - WantedBy=multi-user.target - "/etc/tmpfiles.d/celery.conf": - mode: "000755" - owner: celery - group: celery - content: | - d /var/run/celery 0755 celery celery - - d /var/log/celery 0755 celery celery - - -container_commands: - 01_create_celery_log_file_directories: - command: mkdir -p /var/log/celery /var/run/celery - 02_give_celery_user_ownership_of_directories: - command: chown -R celery:celery /var/log/celery /var/run/celery - 03_change_mode_of_celery_directories: - command: chmod -R 755 /var/log/celery /var/run/celery - 04_reload_settings: - command: systemctl daemon-reload diff --git a/.ebextensions/django.config b/.ebextensions/django.config deleted file mode 100644 index f4582a06..00000000 --- a/.ebextensions/django.config +++ /dev/null @@ -1,3 +0,0 @@ -option_settings: - aws:elasticbeanstalk:container:python: - WSGIPath: config.wsgi:application diff --git a/.ebextensions/logging.config b/.ebextensions/logging.config deleted file mode 100644 index af88a01e..00000000 --- a/.ebextensions/logging.config +++ /dev/null @@ -1,12 +0,0 @@ -files: - "/opt/elasticbeanstalk/tasks/taillogs.d/extra-logs.conf" : - mode: "000755" - owner: root - group: root - content: | - /var/log/cfn-init-cmd.log -option_settings: - aws:elasticbeanstalk:cloudwatch:logs: - StreamLogs: true - DeleteOnTerminate: false - RetentionInDays: 180 diff --git a/.ebextensions/pre-deploy.config b/.ebextensions/pre-deploy.config deleted file mode 100644 index a8c5f525..00000000 --- a/.ebextensions/pre-deploy.config +++ /dev/null @@ -1,18 +0,0 @@ -container_commands: - 01_install_node: - test: "[ ! -f /usr/bin/node ] && echo 'node not installed'" - command: | - curl -sL https://rpm.nodesource.com/setup_18.x | sudo bash - - yum install -y nodejs - 02_npm_install: - command: npm ci - 03_build_static: - command: npm run build - 04_migrate: - command: "source /var/app/venv/*/bin/activate && python3 manage.py migrate" - leader_only: true - 05_collectstatic: - command: "source /var/app/venv/*/bin/activate && python3 manage.py collectstatic --no-input" -option_settings: - aws:elasticbeanstalk:application:environment: - DJANGO_SETTINGS_MODULE: config.settings.staging diff --git a/.platform/hooks/postdeploy/01-celery-start.sh b/.platform/hooks/postdeploy/01-celery-start.sh deleted file mode 100644 index b6455d55..00000000 --- a/.platform/hooks/postdeploy/01-celery-start.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -(cd /var/app/current; systemctl stop celery) -(cd /var/app/current; systemctl start celery) -(cd /var/app/current; systemctl enable celery.service)