Browse Source

Merge branch 'python'

bugfixes
harshadyeola 10 years ago
parent
commit
6cb5ea3bc6
  1. 5
      .travis.yml
  2. 3
      ee/cli/plugins/secure.py
  3. 6
      ee/cli/plugins/site.py
  4. 18
      ee/cli/plugins/stack.py
  5. 15
      ee/core/variables.py

5
.travis.yml

@ -88,6 +88,11 @@ script:
- sudo ee site update site9.com --wpsubdomain --w3tc - sudo ee site update site9.com --wpsubdomain --w3tc
- sudo ee site update site9.com --wpsubdomain --wpsc - 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.in --all --no-prompt
- sudo ee site delete site12.net --no-prompt - sudo ee site delete site12.net --no-prompt
- sudo ee site delete site12.org --no-prompt - sudo ee site delete site12.org --no-prompt

3
ee/cli/plugins/secure.py

@ -4,6 +4,7 @@ from ee.core.shellexec import EEShellExec
from ee.core.variables import EEVariables from ee.core.variables import EEVariables
from ee.core.logging import Log from ee.core.logging import Log
from ee.core.git import EEGit from ee.core.git import EEGit
from ee.core.services import EEService
import string import string
import random import random
import sys import sys
@ -103,7 +104,7 @@ class EESecureController(CementBaseController):
.format(port=self.app.pargs.user_input)) .format(port=self.app.pargs.user_input))
EEGit.add(self, ["/etc/nginx"], EEGit.add(self, ["/etc/nginx"],
msg="Adding changed secure port into Git") msg="Adding changed secure port into Git")
EEService.reload_service(self, 'nginx')
Log.info(self, "Successfully port changed {port}" Log.info(self, "Successfully port changed {port}"
.format(port=self.app.pargs.user_input)) .format(port=self.app.pargs.user_input))

6
ee/cli/plugins/site.py

@ -522,7 +522,7 @@ class EESiteCreateController(CementBaseController):
.format(ee_wp_creds['wp_pass']), log=False) .format(ee_wp_creds['wp_pass']), log=False)
display_cache_settings(self, data) 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" Log.info(self, "Successfully created site"
" http://{0}".format(ee_domain)) " http://{0}".format(ee_domain))
@ -982,7 +982,7 @@ class EESiteUpdateController(CementBaseController):
" {0}".format(ee_wp_creds['wp_user'])) " {0}".format(ee_wp_creds['wp_user']))
Log.info(self, Log.ENDC + "WordPress admin password : {0}" Log.info(self, Log.ENDC + "WordPress admin password : {0}"
.format(ee_wp_creds['wp_pass']) + "\n\n") .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" Log.info(self, "Successfully updated site"
" http://{0}".format(ee_domain)) " http://{0}".format(ee_domain))
@ -1071,6 +1071,8 @@ class EESiteDeleteController(CementBaseController):
if (ee_nginx_prompt == 'Y' or ee_nginx_prompt == 'y'): if (ee_nginx_prompt == 'Y' or ee_nginx_prompt == 'y'):
Log.debug(self, "Removing Nginx configuration") 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}' EEFileUtils.rm(self, '/etc/nginx/sites-available/{0}'
.format(ee_domain)) .format(ee_domain))
EEGit.add(self, ["/etc/nginx"], EEGit.add(self, ["/etc/nginx"],

18
ee/cli/plugins/stack.py

@ -90,25 +90,25 @@ class EEStackController(CementBaseController):
EERepo.add(self, repo_url=EEVariables.ee_mysql_repo) EERepo.add(self, repo_url=EEVariables.ee_mysql_repo)
Log.debug(self, 'Adding key for {0}' Log.debug(self, 'Adding key for {0}'
.format(EEVariables.ee_mysql_repo)) .format(EEVariables.ee_mysql_repo))
EERepo.add_key(self, '1C4CBDCDCD2EFD2A', EERepo.add_key(self, '0xcbcb082a1bb943db',
keyserver="keyserver.ubuntu.com") keyserver="keyserver.ubuntu.com")
chars = ''.join(random.sample(string.ascii_letters, 8)) chars = ''.join(random.sample(string.ascii_letters, 8))
Log.debug(self, "Pre-seeding MySQL") Log.debug(self, "Pre-seeding MySQL")
Log.debug(self, "echo \"percona-server-server-5.6 " Log.debug(self, "echo \"mariadb-server-10.0 "
"percona-server-server/root_password " "mysql-server/root_password "
"password \" | " "password \" | "
"debconf-set-selections") "debconf-set-selections")
EEShellExec.cmd_exec(self, "echo \"percona-server-server-5.6 " EEShellExec.cmd_exec(self, "echo \"mariadb-server-10.0 "
"percona-server-server/root_password " "mysql-server/root_password "
"password {chars}\" | " "password {chars}\" | "
"debconf-set-selections".format(chars=chars), "debconf-set-selections".format(chars=chars),
log=False) log=False)
Log.debug(self, "echo \"percona-server-server-5.6 " Log.debug(self, "echo \"mariadb-server-10.0 "
"percona-server-server/root_password_again " "mysql-server/root_password_again "
"password \" | " "password \" | "
"debconf-set-selections") "debconf-set-selections")
EEShellExec.cmd_exec(self, "echo \"percona-server-server-5.6 " EEShellExec.cmd_exec(self, "echo \"mariadb-server-10.0 "
"percona-server-server/root_password_again " "mysql-server/root_password_again "
"password {chars}\" | " "password {chars}\" | "
"debconf-set-selections".format(chars=chars), "debconf-set-selections".format(chars=chars),
log=False) log=False)

15
ee/core/variables.py

@ -78,9 +78,6 @@ class EEVariables():
# PHP repo and packages # PHP repo and packages
if ee_platform_distro == 'Ubuntu': if ee_platform_distro == 'Ubuntu':
ee_php_repo = "ppa:ondrej/php5" 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': elif ee_platform_codename == 'wheezy':
ee_php_repo = ("deb http://packages.dotdeb.org {codename}-php55 all" ee_php_repo = ("deb http://packages.dotdeb.org {codename}-php55 all"
.format(codename=ee_platform_codename)) .format(codename=ee_platform_codename))
@ -90,9 +87,15 @@ class EEVariables():
"graphviz"] "graphviz"]
# MySQL repo and packages # MySQL repo and packages
ee_mysql_repo = ("deb http://repo.percona.com/apt {codename} main" if ee_platform_distro == 'Ubuntu':
.format(codename=ee_platform_codename)) ee_mysql_repo = ("deb http://mirror.aarnet.edu.au/pub/MariaDB/repo/"
ee_mysql = ["percona-server-server-5.6", "mysqltuner", "percona-toolkit"] "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 # Postfix repo and packages
ee_postfix_repo = "" ee_postfix_repo = ""

Loading…
Cancel
Save