Browse Source

Merge branch 'release/v3.3.10'

hotfix/v3.3.14 v3.3.10
Prabuddha Chakraborty 9 years ago
parent
commit
018ba8a8ef
  1. 5
      .travis.yml
  2. 5
      CHANGELOG.txt
  3. 16
      ee/cli/plugins/site.py
  4. 11
      ee/cli/plugins/site_functions.py
  5. 28
      ee/cli/plugins/stack.py
  6. 6
      ee/core/variables.py
  7. 2
      install
  8. 2
      setup.py

5
.travis.yml

@ -83,6 +83,10 @@ script:
- sudo ee site create site3.localtest.me --php --html
- sudo ee site create site4.localtest.me --wp --wpsubdomain
- sudo ee site create site5.localtest.me --wp --wpsubdir --wpfc
- yes | sudo ee site create site6.localtest.me --wpredis
- yes | sudo ee site create site7.localtest.me --wpsubdomain --wpredis
- yes | sudo ee site create site8.localtest.me --wpsubdir --wpredis
- sudo ee debug --all
- sudo ee debug --all=off
@ -99,6 +103,7 @@ script:
- sudo ee site update site1.com --wp --wpfc
- sudo ee site update site1.com --wp --w3tc
- sudo ee site update site1.com --wp --wpsc
- yes | sudo ee site update site1.com --wpredis
- sudo ee site update site5.com --wpsubdir --wpfc
- sudo ee site update site5.com --wpsubdir --w3tc

5
CHANGELOG.txt

@ -1,3 +1,8 @@
v 3.3.10 - Oct 19, 2015
- Fix #630
- Fix #631
- Updated wp-cli version
v 3.3.9 - Oct 9, 2015
- Fix #625
- Fix #627

16
ee/cli/plugins/site.py

@ -1307,12 +1307,22 @@ class EESiteUpdateController(CementBaseController):
if oldcachetype != 'wpredis' and data['wpredis']:
try:
if installwp_plugin(self, 'redis-cache', data):
if EEShellExec.cmd_exec(self, "grep -q \"WP_CACHE_KEY_SALT\" {0}/wp-config.php"
.format(ee_site_webroot)):
#search for wp-config.php
if EEFileUtils.isexist(self,"{0}/wp-config.php".format(ee_site_webroot)):
config_path = '{0}/wp-config.php'.format(ee_site_webroot)
elif EEFileUtils.isexist(self,"{0}/htdocs/wp-config.php".format(ee_site_webroot)):
config_path = '{0}/htdocs/wp-config.php'.format(ee_site_webroot)
else:
Log.debug(self, "Updating wp-config.php failed. File could not be located.")
Log.error(self,"wp-config.php could not be located !!")
raise SiteError
if EEShellExec.cmd_exec(self, "grep -q \"WP_CACHE_KEY_SALT\" {0}"
.format(config_path)):
pass
else:
try:
wpconfig = open("{0}/wp-config.php".format(ee_site_webroot),
wpconfig = open("{0}".format(config_path),
encoding='utf-8', mode='a')
wpconfig.write("\n\ndefine( \'WP_CACHE_KEY_SALT\', \'{0}:\' );"
.format(ee_domain))

11
ee/cli/plugins/site_functions.py

@ -623,6 +623,17 @@ def sitebackup(self, data):
Log.info(self, "[" + Log.ENDC + "Done" + Log.OKBLUE + "]")
configfiles = glob.glob(ee_site_webroot + '/*-config.php')
if not configfiles:
#search for wp-config.php inside htdocs/
Log.debug(self, "Config files not found in {0}/ "
.format(ee_site_webroot))
if data['currsitetype'] in ['mysql']:
pass
else:
Log.debug(self, "Searching wp-config.php in {0}/htdocs/ "
.format(ee_site_webroot))
configfiles = glob.glob(ee_site_webroot + '/htdocs/wp-config.php')
# if configfiles and EEFileUtils.isexist(self, configfiles[0]):
# ee_db_name = (EEFileUtils.grep(self, configfiles[0],
# 'DB_NAME').split(',')[1]

28
ee/cli/plugins/stack.py

@ -1641,6 +1641,7 @@ class EEStackController(CementBaseController):
if self.app.pargs.redis:
if not EEAptGet.is_installed(self, 'redis-server'):
apt_packages = apt_packages + EEVariables.ee_redis
self.app.pargs.php = True
else:
Log.info(self, "Redis already installed")
@ -1808,6 +1809,33 @@ class EEStackController(CementBaseController):
EEDownload.download(self, packages)
Log.debug(self, "Calling post_pref")
self.post_pref(apt_packages, packages)
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
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)))
EEFileUtils.searchreplace(self, "/etc/redis/redis.conf",
"# maxmemory <bytes>",
"maxmemory {0}".format(int(EEVariables.ee_ram*1024*1024*0.1)))
Log.debug(self, "Setting maxmemory-policy variable to volatile-lru in redis.conf")
EEFileUtils.searchreplace(self, "/etc/redis/redis.conf",
"# maxmemory-policy volatile-lru",
"maxmemory-policy volatile-lru")
EEService.restart_service(self, 'redis-server')
else:
Log.debug(self, "Setting maxmemory variable to {0} in redis.conf"
.format(int(EEVariables.ee_ram*1024*1024*0.2)))
EEFileUtils.searchreplace(self, "/etc/redis/redis.conf",
"# maxmemory <bytes>",
"maxmemory {0}".format(int(EEVariables.ee_ram*1024*1024*0.2)))
Log.debug(self, "Setting maxmemory-policy variable to volatile-lru in redis.conf")
EEFileUtils.searchreplace(self, "/etc/redis/redis.conf",
"# maxmemory-policy volatile-lru",
"maxmemory-policy volatile-lru")
EEService.restart_service(self, 'redis-server')
if disp_msg:
if len(self.msg):
for msg in self.msg:

6
ee/core/variables.py

@ -12,13 +12,13 @@ class EEVariables():
"""Intialization of core variables"""
# EasyEngine version
ee_version = "3.3.9"
ee_version = "3.3.10"
# EasyEngine packages versions
ee_wp_cli = "0.19.2"
ee_wp_cli = "0.20.2"
ee_adminer = "4.2.1"
ee_roundcube = "1.1.2"
ee_roundcube = "1.1.3"
ee_vimbadmin = "3.0.12"
# Get WPCLI path

2
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.3.9"
readonly ee_version_new="3.3.10"
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}')

2
setup.py

@ -54,7 +54,7 @@ except Exception as e:
os.system("git config --global user.email {0}".format(ee_email))
setup(name='ee',
version='3.3.9',
version='3.3.10',
description=long_description,
long_description=long_description,
classifiers=[],

Loading…
Cancel
Save