From 81b98c08aea18ba8cbae0f7a1e25eb819c5a5d09 Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Fri, 27 Feb 2015 14:06:04 +0530 Subject: [PATCH 1/5] added some test cases --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index d2171f4c..60399471 100644 --- a/.travis.yml +++ b/.travis.yml @@ -88,6 +88,11 @@ script: - sudo ee site update site9.com --wpsubdomain --w3tc - sudo ee site update site9.com --wpsubdomain --wpsc + - sudo ee site create www.site-1.com --wp + - sudo ee site create www.subsite.site-1.com --wpfc + - sudo ee site update www.subsite.site-1.com --wp + - sudo ee site delete www.subsite.site-1.com --all --no-prompt + - sudo ee site delete site12.in --all --no-prompt - sudo ee site delete site12.net --no-prompt - sudo ee site delete site12.org --no-prompt From 0e570cbf9def0e457afab0f3f4a49e874cd7dd07 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Fri, 27 Feb 2015 15:07:54 +0530 Subject: [PATCH 2/5] Removed Percona 5.6,Added MariaDB 10.0 --- ee/cli/plugins/stack.py | 18 +++++++++--------- ee/core/variables.py | 15 +++++++++------ 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 95347ec7..a889ee14 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -90,25 +90,25 @@ class EEStackController(CementBaseController): EERepo.add(self, repo_url=EEVariables.ee_mysql_repo) Log.debug(self, 'Adding key for {0}' .format(EEVariables.ee_mysql_repo)) - EERepo.add_key(self, '1C4CBDCDCD2EFD2A', + EERepo.add_key(self, '0xcbcb082a1bb943db', keyserver="keyserver.ubuntu.com") chars = ''.join(random.sample(string.ascii_letters, 8)) Log.debug(self, "Pre-seeding MySQL") - Log.debug(self, "echo \"percona-server-server-5.6 " - "percona-server-server/root_password " + Log.debug(self, "echo \"mariadb-server-10.0 " + "mysql-server/root_password " "password \" | " "debconf-set-selections") - EEShellExec.cmd_exec(self, "echo \"percona-server-server-5.6 " - "percona-server-server/root_password " + EEShellExec.cmd_exec(self, "echo \"mariadb-server-10.0 " + "mysql-server/root_password " "password {chars}\" | " "debconf-set-selections".format(chars=chars), log=False) - Log.debug(self, "echo \"percona-server-server-5.6 " - "percona-server-server/root_password_again " + Log.debug(self, "echo \"mariadb-server-10.0 " + "mysql-server/root_password_again " "password \" | " "debconf-set-selections") - EEShellExec.cmd_exec(self, "echo \"percona-server-server-5.6 " - "percona-server-server/root_password_again " + EEShellExec.cmd_exec(self, "echo \"mariadb-server-10.0 " + "mysql-server/root_password_again " "password {chars}\" | " "debconf-set-selections".format(chars=chars), log=False) diff --git a/ee/core/variables.py b/ee/core/variables.py index 6df38377..53689112 100644 --- a/ee/core/variables.py +++ b/ee/core/variables.py @@ -78,9 +78,6 @@ class EEVariables(): # PHP repo and packages if ee_platform_distro == 'Ubuntu': ee_php_repo = "ppa:ondrej/php5" - elif ee_platform_codename == 'squeeze': - ee_php_repo = ("deb http://packages.dotdeb.org {codename}-php54 all" - .format(codename=ee_platform_codename)) elif ee_platform_codename == 'wheezy': ee_php_repo = ("deb http://packages.dotdeb.org {codename}-php55 all" .format(codename=ee_platform_codename)) @@ -90,9 +87,15 @@ class EEVariables(): "graphviz"] # MySQL repo and packages - ee_mysql_repo = ("deb http://repo.percona.com/apt {codename} main" - .format(codename=ee_platform_codename)) - ee_mysql = ["percona-server-server-5.6", "mysqltuner", "percona-toolkit"] + if ee_platform_distro == 'Ubuntu': + ee_mysql_repo = ("deb http://mirror.aarnet.edu.au/pub/MariaDB/repo/" + "10.0/ubuntu {codename} main" + .format(codename=ee_platform_codename)) + elif ee_platform_distro == 'debian': + ee_mysql_repo = ("deb http://mirror.aarnet.edu.au/pub/MariaDB/repo/" + "10.0/debian {codename} main" + .format(codename=ee_platform_codename)) + ee_mysql = ["mariadb-server", "mysqltuner", "percona-toolkit"] # Postfix repo and packages ee_postfix_repo = "" From 918de10bd2746162f8aee07dc282568bc3bacead Mon Sep 17 00:00:00 2001 From: "shital.rtcamp" Date: Fri, 27 Feb 2015 19:10:46 +0530 Subject: [PATCH 3/5] Added nginx reload code secure.py --- ee/cli/plugins/secure.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ee/cli/plugins/secure.py b/ee/cli/plugins/secure.py index c7007bb9..09df15f2 100644 --- a/ee/cli/plugins/secure.py +++ b/ee/cli/plugins/secure.py @@ -4,6 +4,7 @@ from ee.core.shellexec import EEShellExec from ee.core.variables import EEVariables from ee.core.logging import Log from ee.core.git import EEGit +from ee.core.services import EEService import string import random import sys @@ -103,7 +104,7 @@ class EESecureController(CementBaseController): .format(port=self.app.pargs.user_input)) EEGit.add(self, ["/etc/nginx"], msg="Adding changed secure port into Git") - + EEService.reload_service(self, 'nginx') Log.info(self, "Successfully port changed {port}" .format(port=self.app.pargs.user_input)) From abe0b784f4edc9eb4a407e6cd74e0e454650869b Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Mon, 2 Mar 2015 09:40:58 +0530 Subject: [PATCH 4/5] updated domain iname to be entered in databse while site create --- ee/cli/plugins/site.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee/cli/plugins/site.py b/ee/cli/plugins/site.py index 1d3cbaa5..04c6f166 100644 --- a/ee/cli/plugins/site.py +++ b/ee/cli/plugins/site.py @@ -982,7 +982,7 @@ class EESiteUpdateController(CementBaseController): " {0}".format(ee_wp_creds['wp_user'])) Log.info(self, Log.ENDC + "WordPress admin password : {0}" .format(ee_wp_creds['wp_pass']) + "\n\n") - updateSiteInfo(self, ee_www_domain, stype=stype, cache=cache) + updateSiteInfo(self, ee_domain, stype=stype, cache=cache) Log.info(self, "Successfully updated site" " http://{0}".format(ee_domain)) From d9abe95a22fd2423ec6e2f13a026760dd57cd0f1 Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Mon, 2 Mar 2015 11:45:20 +0530 Subject: [PATCH 5/5] Fixed #444 --- ee/cli/plugins/site.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ee/cli/plugins/site.py b/ee/cli/plugins/site.py index 04c6f166..8e86dfb6 100644 --- a/ee/cli/plugins/site.py +++ b/ee/cli/plugins/site.py @@ -522,7 +522,7 @@ class EESiteCreateController(CementBaseController): .format(ee_wp_creds['wp_pass']), log=False) display_cache_settings(self, data) - addNewSite(self, ee_www_domain, stype, cache, ee_site_webroot) + addNewSite(self, ee_domain, stype, cache, ee_site_webroot) Log.info(self, "Successfully created site" " http://{0}".format(ee_domain)) @@ -1071,6 +1071,8 @@ class EESiteDeleteController(CementBaseController): if (ee_nginx_prompt == 'Y' or ee_nginx_prompt == 'y'): Log.debug(self, "Removing Nginx configuration") + EEFileUtils.rm(self, '/etc/nginx/sites-enabled/{0}' + .format(ee_domain)) EEFileUtils.rm(self, '/etc/nginx/sites-available/{0}' .format(ee_domain)) EEGit.add(self, ["/etc/nginx"],