diff --git a/.gitignore b/.gitignore index 94fa525..66d2119 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ fabulaws.egg-info/ *~ docs/_build/ .tox +.python-version +.vscode diff --git a/docs/releases.rst b/docs/releases.rst index b8ef55d..97d6dd3 100644 --- a/docs/releases.rst +++ b/docs/releases.rst @@ -1,7 +1,17 @@ Release History =============== -* v1.0.5, August 27, 2020 +* v1.0.8, October 26, 2020 + + * Fix bug where users with periods in their usernames were ignored + * Pass ``--yes`` to ``gpg`` to auto-confirm removal of private key from key ring during dbrestore process + * Set ``autostart=true`` for celerybeat and celerycam supervisor processes on worker + +* v1.0.7, August 27, 2020 + + * Fix bug introduced in 1.0.6 with pre/post tasks running on more hosts than intended + +* v1.0.6, August 27, 2020 * Add hooks to fix pre/post commands for ``bootstrap``, ``reload_production_db``, and ``install_rsyslog`` diff --git a/fabulaws/__init__.py b/fabulaws/__init__.py index 382021f..e13bd59 100644 --- a/fabulaws/__init__.py +++ b/fabulaws/__init__.py @@ -1 +1 @@ -__version__ = "1.0.6" +__version__ = "1.0.8" diff --git a/fabulaws/library/wsgiautoscale/api.py b/fabulaws/library/wsgiautoscale/api.py index d3eae4c..9e06e75 100644 --- a/fabulaws/library/wsgiautoscale/api.py +++ b/fabulaws/library/wsgiautoscale/api.py @@ -1087,7 +1087,7 @@ def bootstrap(purge=False): # Run a "post_bootstrap" task, if it's defined. available_commands = list_commands("", "short") if "post_bootstrap" in available_commands: - executel("post_bootstrap") + executel("post_bootstrap", hosts=[env.host]) # CODE DEPLOYMENT @@ -1215,7 +1215,7 @@ def dbrestore(filepath): put(private_key, dest) with settings(warn_only=True): sudo( - 'gpg --homedir {0} --batch --delete-secret-keys "{1}"'.format( + 'gpg --homedir {0} --batch --yes --delete-secret-keys "{1}"'.format( env.gpg_dir, env.backup_key_fingerprint ), user=env.webserver_user, @@ -1248,7 +1248,7 @@ def dbrestore(filepath): finally: with settings(warn_only=True): sudo( - 'gpg --homedir {0} --batch --delete-secret-keys "{1}"'.format( + 'gpg --homedir {0} --batch --yes --delete-secret-keys "{1}"'.format( env.gpg_dir, env.backup_key_fingerprint ), user=env.webserver_user, @@ -1472,7 +1472,7 @@ def reload_production_db(prod_env=env.default_deployment, src_env="production"): # Run a "post_reload_production_db" task, if it's defined. available_commands = list_commands("", "short") if "post_reload_production_db" in available_commands: - executel("post_reload_production_db") + executel("post_reload_production_db", hosts=[env.host]) @task @@ -1959,7 +1959,7 @@ def install_rsyslog(): # Run a "pre_install_rsyslog" task, if it's defined. available_commands = list_commands("", "short") if "pre_install_rsyslog" in available_commands: - executel("pre_install_rsyslog") + executel("pre_install_rsyslog", hosts=[env.host]) require("environment", provided_by=env.environments) context = dict(env) diff --git a/fabulaws/library/wsgiautoscale/servers.py b/fabulaws/library/wsgiautoscale/servers.py index a71bafc..2704167 100644 --- a/fabulaws/library/wsgiautoscale/servers.py +++ b/fabulaws/library/wsgiautoscale/servers.py @@ -68,8 +68,8 @@ def _get_users(self): users = [ (n, os.path.join(users_dir, n)) for n in os.listdir(users_dir) - if "." not in n - ] # skip files ending in '.gecos' or other suffixes + if not n.endswith(".gecos") + ] # skip files ending in '.gecos' return users def _add_swap(self, path): diff --git a/fabulaws/library/wsgiautoscale/templates/supervisor.conf b/fabulaws/library/wsgiautoscale/templates/supervisor.conf index 9a39ac9..332898c 100644 --- a/fabulaws/library/wsgiautoscale/templates/supervisor.conf +++ b/fabulaws/library/wsgiautoscale/templates/supervisor.conf @@ -43,7 +43,7 @@ command={{ virtualenv_root }}/bin/celery beat --app={{ celery_application }} --s directory={{ code_root }} user={{ webserver_user }} numprocs=1 -autostart=false +autostart=true autorestart=true stdout_logfile={{ log_dir }}/celerybeat.log redirect_stderr=true @@ -58,7 +58,7 @@ command={{ virtualenv_root }}/bin/celery events --app={{ celery_application }} - directory={{ code_root }} user={{ webserver_user }} numprocs=1 -autostart=false +autostart=true autorestart=true stdout_logfile={{ log_dir }}/celerycam.log redirect_stderr=true