Browse Source

Merge branch 'python' of https://github.com/rtCamp/easyengine into python

bugfixes
shital.rtcamp 10 years ago
parent
commit
d2b38d75c3
  1. 7
      .travis.yml
  2. 32
      ee/cli/plugins/stack.py
  3. 2
      ee/core/domainvalidate.py
  4. 13
      ee/core/variables.py

7
.travis.yml

@ -25,7 +25,7 @@ script:
- sudo echo -e "[user]\n\tname = abc\n\temail = root@localhost.com" > ~/.gitconfig
- sudo echo "Travis Banch = $TRAVIS_BRANCH"
- sudo apt-get install -y --force-yes git python3-setuptools python3-dev python3-apt
- sudo python3 setup.py install
- sudo bash install $TRAVIS_BRANCH
- sudo ee --help
- sudo ee stack install
- sudo ee stack install --web
@ -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

32
ee/cli/plugins/stack.py

@ -86,29 +86,29 @@ class EEStackController(CementBaseController):
" $(hostname -f)\" | debconf-set-selections")
if set(EEVariables.ee_mysql).issubset(set(apt_packages)):
Log.info(self, "Adding repository for MySQL")
Log.info(self, "Adding repository for MySQL, please wait ...")
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)
@ -125,7 +125,7 @@ class EEStackController(CementBaseController):
config.write(configfile)
if set(EEVariables.ee_nginx).issubset(set(apt_packages)):
Log.info(self, "Adding repository for Nginx")
Log.info(self, "Adding repository for NGINX, please wait ...")
if EEVariables.ee_platform_distro == 'debian':
Log.debug(self, 'Adding Dotdeb/nginx GPG key')
EERepo.add(self, repo_url=EEVariables.ee_nginx_repo)
@ -134,7 +134,7 @@ class EEStackController(CementBaseController):
Log.debug(self, 'Adding ppa of Nginx')
if set(EEVariables.ee_php).issubset(set(apt_packages)):
Log.info(self, "Adding repository for PHP")
Log.info(self, "Adding repository for PHP, please wait ...")
if EEVariables.ee_platform_distro == 'debian':
Log.debug(self, 'Adding repo_url of php for debian')
EERepo.add(self, repo_url=EEVariables.ee_php_repo)
@ -146,7 +146,8 @@ class EEStackController(CementBaseController):
if set(EEVariables.ee_mail).issubset(set(apt_packages)):
if EEVariables.ee_platform_codename == 'squeeze':
Log.info(self, "Adding repository for dovecot ")
Log.info(self, "Adding repository for dovecot, "
"please wait ...")
EERepo.add(self, repo_url=EEVariables.ee_dovecot_repo)
Log.debug(self, 'Executing the command debconf-set-selections.')
EEShellExec.cmd_exec(self, "echo \"dovecot-core dovecot-core/"
@ -1308,8 +1309,9 @@ class EEStackController(CementBaseController):
self.pre_pref(apt_packages)
if len(apt_packages):
EESwap.add(self)
Log.info(self, "Updating apt-cache")
Log.info(self, "Updating apt-cache, please wait ...")
EEAptGet.update(self)
Log.info(self, "Installing packages, please wait ...")
EEAptGet.install(self, apt_packages)
if len(packages):
Log.debug(self, "Downloading following: {0}".format(packages))
@ -1412,6 +1414,7 @@ class EEStackController(CementBaseController):
if len(apt_packages):
Log.debug(self, "Removing apt_packages")
Log.info(self, "Uninstalling packages, please wait ...")
EEAptGet.remove(self, apt_packages)
EEAptGet.auto_remove(self)
if len(packages):
@ -1507,6 +1510,7 @@ class EEStackController(CementBaseController):
]
if len(apt_packages):
Log.info(self, "Uninstalling packages, please wait ...")
EEAptGet.remove(self, apt_packages, purge=True)
EEAptGet.auto_remove(self)
if len(packages):

2
ee/core/domainvalidate.py

@ -18,7 +18,7 @@ def ValidateDomain(url):
final_domain = ''
if www_domain_name[0] == 'www':
final_domain = '.'.join(www_domain_name[1:])
return final_domain
else:
final_domain = domain_name
return (final_domain, domain_name)

13
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"
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 = ["percona-server-server-5.6", "mysqltuner", "percona-toolkit"]
ee_mysql = ["mariadb-server", "mysqltuner", "percona-toolkit"]
# Postfix repo and packages
ee_postfix_repo = ""

Loading…
Cancel
Save