From e768478f7de8e4b7b8aab781a37353353c8be4eb Mon Sep 17 00:00:00 2001 From: zorrobyte Date: Thu, 3 Mar 2016 09:43:14 -0500 Subject: [PATCH 1/6] Switch Redis Config volatile-lru to allkeys-lru https://github.com/EasyEngine/easyengine/issues/677 volatile-lru is a poor choice as it depends on the keys stored to be explicitly marked as purgable, something that the WordPress Redis plugin DOES NOT do. This means that an EE server running Redis will fill the cache, never to clean it unless it's purged via the Nginx plugin. Setting it to allkeys-lru ensures that the oldest used keys are always purged if out of RAM instead of segfaulting and massively slowing down a WordPress site. --- ee/cli/plugins/stack.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index cf360e4d..65e45284 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -1907,15 +1907,15 @@ class EEStackController(CementBaseController): if 'redis-server' in apt_packages: # set redis.conf parameter # set maxmemory 10% for ram below 512MB and 20% for others - # set maxmemory-policy volatile-lru + # set maxmemory-policy allkeys-lru if os.path.isfile("/etc/redis/redis.conf"): if EEVariables.ee_ram < 512: Log.debug(self, "Setting maxmemory variable to {0} in redis.conf" .format(int(EEVariables.ee_ram*1024*1024*0.1))) EEShellExec.cmd_exec(self, "sed -i 's/# maxmemory /maxmemory {0}/' /etc/redis/redis.conf" .format(int(EEVariables.ee_ram*1024*1024*0.1))) - Log.debug(self, "Setting maxmemory-policy variable to volatile-lru in redis.conf") - EEShellExec.cmd_exec(self, "sed -i 's/# maxmemory-policy.*/maxmemory-policy volatile-lru/' " + Log.debug(self, "Setting maxmemory-policy variable to allkeys-lru in redis.conf") + EEShellExec.cmd_exec(self, "sed -i 's/# maxmemory-policy.*/maxmemory-policy allkeys-lru/' " "/etc/redis/redis.conf") EEService.restart_service(self, 'redis-server') else: @@ -1923,8 +1923,8 @@ class EEStackController(CementBaseController): .format(int(EEVariables.ee_ram*1024*1024*0.2))) EEShellExec.cmd_exec(self, "sed -i 's/# maxmemory /maxmemory {0}/' /etc/redis/redis.conf" .format(int(EEVariables.ee_ram*1024*1024*0.2))) - Log.debug(self, "Setting maxmemory-policy variable to volatile-lru in redis.conf") - EEShellExec.cmd_exec(self, "sed -i 's/# maxmemory-policy.*/maxmemory-policy volatile-lru/' " + Log.debug(self, "Setting maxmemory-policy variable to allkeys-lru in redis.conf") + EEShellExec.cmd_exec(self, "sed -i 's/# maxmemory-policy.*/maxmemory-policy allkeys-lru/' " "/etc/redis/redis.conf") EEService.restart_service(self, 'redis-server') if disp_msg: From 4cebd2bdc31c3cde1293bbc948b4769a9259a367 Mon Sep 17 00:00:00 2001 From: Prabuddha Chakraborty Date: Wed, 13 Apr 2016 16:31:49 +0530 Subject: [PATCH 2/6] Fix lets encrypt renew issue. Fix #702 --- ee/cli/plugins/site_functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ee/cli/plugins/site_functions.py b/ee/cli/plugins/site_functions.py index 5af99f7b..342a8db6 100644 --- a/ee/cli/plugins/site_functions.py +++ b/ee/cli/plugins/site_functions.py @@ -1417,7 +1417,7 @@ def renewLetsEncrypt(self, ee_domain_name): Log.info(self, "Renewing SSl cert for https://{0}".format(ee_domain_name)) - ssl = EEShellExec.cmd_exec(self, "./letsencrypt-auto --renew certonly --webroot -w /var/www/{0}/htdocs/ -d {0} -d www.{0} " + ssl = EEShellExec.cmd_exec(self, "./letsencrypt-auto --renew-by-default certonly --webroot -w /var/www/{0}/htdocs/ -d {0} -d www.{0} " .format(ee_domain_name) + "--email {0} --text --agree-tos".format(ee_wp_email)) mail_list = '' @@ -1508,7 +1508,7 @@ def archivedCertificateHandle(self,domain,ee_wp_email): elif check_prompt == "3": Log.info(self,"Please Wait while we renew SSL Certificate for your site.\nIt may take time depending upon network.") - ssl = EEShellExec.cmd_exec(self, "./letsencrypt-auto --renew certonly --webroot -w /var/www/{0}/htdocs/ -d {0} -d www.{0} " + ssl = EEShellExec.cmd_exec(self, "./letsencrypt-auto --renew-by-default certonly --webroot -w /var/www/{0}/htdocs/ -d {0} -d www.{0} " .format(domain) + "--email {0} --text --agree-tos".format(ee_wp_email)) else: From e735b0ca00bd6e0cd3bfa9d204dc8071359e188c Mon Sep 17 00:00:00 2001 From: Prabuddha Chakraborty Date: Wed, 13 Apr 2016 17:24:03 +0530 Subject: [PATCH 3/6] Update changelog --- CHANGELOG.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 76f79c3f..209f4a2e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,8 @@ +v3.5.5 - Apr 13, 2016 +- WP-CLI support for wordpress v4.5, PR #701 +- PR #686 +- Fix #702 + v3.5.4 - Mar 15, 2016 - Fixed Vimbadmin installation issue - PR #684 From 524fb46161727ffd687f60520b8948e20bed6e75 Mon Sep 17 00:00:00 2001 From: Prabuddha Chakraborty Date: Wed, 13 Apr 2016 17:24:40 +0530 Subject: [PATCH 4/6] Update version --- ee/core/variables.py | 2 +- install | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ee/core/variables.py b/ee/core/variables.py index 623cda31..089aaeeb 100644 --- a/ee/core/variables.py +++ b/ee/core/variables.py @@ -12,7 +12,7 @@ class EEVariables(): """Intialization of core variables""" # EasyEngine version - ee_version = "3.5.4" + ee_version = "3.5.5" # EasyEngine packages versions diff --git a/install b/install index 80a0f990..4e83d490 100644 --- a/install +++ b/install @@ -48,7 +48,7 @@ fi # Define variables for later use ee_branch=$1 readonly ee_version_old="2.2.3" -readonly ee_version_new="3.5.4" +readonly ee_version_new="3.5.5" readonly ee_log_dir=/var/log/ee/ readonly ee_install_log=/var/log/ee/install.log readonly ee_linux_distro=$(lsb_release -i | awk '{print $3}') diff --git a/setup.py b/setup.py index 8201b41b..e1634882 100644 --- a/setup.py +++ b/setup.py @@ -58,7 +58,7 @@ if not os.path.isfile('/root/.gitconfig'): shutil.copy2(os.path.expanduser("~")+'/.gitconfig', '/root/.gitconfig') setup(name='ee', - version='3.5.4', + version='3.5.5', description=long_description, long_description=long_description, classifiers=[], From 274833208da4db42bd685c02e5648115865366ae Mon Sep 17 00:00:00 2001 From: Prabuddha Chakraborty Date: Wed, 13 Apr 2016 17:52:14 +0530 Subject: [PATCH 5/6] Fix letsencrypt=off with --all --- ee/cli/plugins/site.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ee/cli/plugins/site.py b/ee/cli/plugins/site.py index c96fd26a..cb491c98 100644 --- a/ee/cli/plugins/site.py +++ b/ee/cli/plugins/site.py @@ -1213,6 +1213,13 @@ class EESiteUpdateController(CementBaseController): Log.info(self,"SSL not configured for site http://{0}".format(ee_domain)) return 0 + if pargs.all and pargs.letsencrypt == "off": + if letsencrypt is check_ssl: + if letsencrypt is False: + Log.error(self, "SSl is not configured for given " + "site",False) + return 0 + if pargs.letsencrypt: if pargs.letsencrypt == 'on': data['letsencrypt'] = True From 6474aa89a7e83daf37bb590d379e439da28149af Mon Sep 17 00:00:00 2001 From: Prabuddha Chakraborty Date: Wed, 13 Apr 2016 18:05:09 +0530 Subject: [PATCH 6/6] update changelo --- CHANGELOG.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 209f4a2e..5a81c6a0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,7 @@ v3.5.5 - Apr 13, 2016 - WP-CLI support for wordpress v4.5, PR #701 - PR #686 - Fix #702 +- Minor Fixes v3.5.4 - Mar 15, 2016 - Fixed Vimbadmin installation issue