diff --git a/CHANGELOG.md b/CHANGELOG.md index c640687..7869166 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### v3.9.x - [Unreleased] +### v3.9.7 - 2019-08-02 + #### Added - MySQL configuration tuning @@ -28,6 +30,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Removed WordOps version from the Nginx header X-Powered-By to avoid possible security issues - Several code quality improvements to speed up WordOps execution - Few adjustements on PHP-FPM configuration (max_input_time,opcache.consistency_checks) +- #### Fixed @@ -35,6 +38,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Fail2ban standalone install - `wo stack purge --all` error due to PHP7.3 check - Nginx helper configuration during plugin install for Nginx fastcgi_cache and redis-cache +- phpRedisAdmin stack installation +- Fixed Travis CI build on pull requests ### v3.9.6.2 - 2019-07-24 diff --git a/install b/install index 83c90a8..204861e 100755 --- a/install +++ b/install @@ -7,10 +7,10 @@ # Copyright (c) 2019 - WordOps # This script is licensed under M.I.T # ------------------------------------------------------------------------- -# Version 3.9.6.3 - 2019-07-29 +# Version 3.9.7 - 2019-08-02 # ------------------------------------------------------------------------- readonly wo_version_old="2.2.3" -readonly wo_version_new="3.9.6.3" +readonly wo_version_new="3.9.7" # CONTENTS # --- # 1. VARIABLES AND DECLARATIONS diff --git a/setup.py b/setup.py index c2b96ff..14a12e6 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ if not os.path.isfile('/root/.gitconfig'): shutil.copy2(os.path.expanduser("~")+'/.gitconfig', '/root/.gitconfig') setup(name='wo', - version='3.9.6.2', + version='3.9.7', description=long_description, long_description=long_description, classifiers=[], diff --git a/wo/cli/plugins/stack.py b/wo/cli/plugins/stack.py index 6d8c898..ef34d53 100644 --- a/wo/cli/plugins/stack.py +++ b/wo/cli/plugins/stack.py @@ -10,6 +10,7 @@ import pwd import random import shutil import string +import re import psutil # from pynginxconfig import NginxConfig @@ -1590,7 +1591,8 @@ class WOStackController(CementBaseController): # PHPREDISADMIN if self.app.pargs.phpredisadmin: - if not os.path.isdir('/var/www/22222/htdocs/cache/redis/phpRedisAdmin'): + if not os.path.isdir('/var/www/22222/htdocs/' + 'cache/redis/phpRedisAdmin'): Log.debug( self, "Setting packages variable for phpRedisAdmin") self.app.pargs.composer = True @@ -1728,38 +1730,53 @@ class WOStackController(CementBaseController): WOShellExec.cmd_exec(self, "systemctl enable redis-server") if os.path.isfile("/etc/redis/redis.conf"): wo_ram = psutil.virtual_memory().total / (1024 * 1024) - if wo_ram < 512: + if wo_ram < 1024: Log.debug(self, "Setting maxmemory variable to " "{0} in redis.conf" .format(int(wo_ram*1024*1024*0.1))) - WOShellExec.cmd_exec(self, "sed -i 's/# maxmemory" - " /maxmemory {0}/'" - " /etc/redis/redis.conf" - .format(int(wo_ram*1024*1024*0.1))) + WOFileUtils.searchreplace(self, + "/etc/redis/redis.conf", + "# maxmemory ", + "maxmemory {0}" + .format + (int(wo_ram*1024*1024*0.1))) Log.debug( self, "Setting maxmemory-policy variable to " "allkeys-lru in redis.conf") - WOShellExec.cmd_exec(self, "sed -i 's/# maxmemory-" - "policy.*/maxmemory-policy " - "allkeys-lru/' " - "/etc/redis/redis.conf") + WOFileUtils.searchreplace(self, + "/etc/redis/redis.conf", + "# maxmemory-policy " + "noeviction", + "maxmemory-policy " + "allkeys-lru") + Log.debug( + self, "Setting tcp-backlog variable to " + "in redis.conf") + WOFileUtils.searchreplace(self, + "/etc/redis/redis.conf", + "tcp-backlog 511", + "tcp-backlog 32768") WOService.restart_service(self, 'redis-server') else: Log.debug(self, "Setting maxmemory variable to {0} " "in redis.conf" .format(int(wo_ram*1024*1024*0.2))) - WOShellExec.cmd_exec(self, "sed -i 's/# maxmemory " - "/maxmemory {0}/' " - "/etc/redis/redis.conf" - .format(int(wo_ram*1024*1024*0.2))) + WOFileUtils.searchreplace(self, + "/etc/redis/redis.conf", + "# maxmemory ", + "maxmemory {0}" + .format + (int(wo_ram*1024*1024*0.1))) Log.debug( self, "Setting maxmemory-policy variable " "to allkeys-lru in redis.conf") - WOShellExec.cmd_exec(self, "sed -i 's/# maxmemory-" - "policy.*/maxmemory-policy " - "allkeys-lru/' " - "/etc/redis/redis.conf") + WOFileUtils.searchreplace(self, + "/etc/redis/redis.conf", + "# maxmemory-policy " + "noeviction", + "maxmemory-policy " + "allkeys-lru") WOService.restart_service(self, 'redis-server') if 'mariadb-server' in apt_packages: # setting innodb memory usage diff --git a/wo/core/variables.py b/wo/core/variables.py index d553aef..4e1ba54 100644 --- a/wo/core/variables.py +++ b/wo/core/variables.py @@ -10,7 +10,7 @@ class WOVariables(): """Intialization of core variables""" # WordOps version - wo_version = "3.9.6.3" + wo_version = "3.9.7" # WordOps packages versions wo_wp_cli = "2.2.0" wo_adminer = "4.7.2"