From 7b344662269d0a3d0c97bdefa89027cc4189c624 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Tue, 23 Dec 2014 15:01:45 +0530 Subject: [PATCH] Some more tweaks to installation --- ee/cli/plugins/stack.py | 12 +++++++++++- ee/core/variables.py | 5 +++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 014a2d60..82f27dee 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -74,7 +74,7 @@ class EEStackController(CementBaseController): "$(hostname -f)\" | debconf-set-selections") if set(EEVariables.ee_mysql).issubset(set(apt_packages)): print("Adding repository for mysql ... ") - EERepo.add(ppa=EEVariables.ee_mysql_repo) + EERepo.add(repo_url=EEVariables.ee_mysql_repo) EERepo.add_key('1C4CBDCDCD2EFD2A') chars = ''.join(random.sample(string.ascii_letters, 8)) print("Pre-seeding mysql variables ... ") @@ -86,6 +86,16 @@ class EEStackController(CementBaseController): "percona-server-server/root_password_again " "password {chars}\" | " "debconf-set-selections".format(chars=chars)) + mysql_config = """ + [mysqld] + user = root + password = {chars} + """.format(chars=chars) + config = configparser.ConfigParser() + config.read_string(mysql_config) + with open(os.path.expanduser("~")+'/.my.cnf', 'w') as configfile: + config.write(configfile) + if set(EEVariables.ee_nginx).issubset(set(apt_packages)): print("Adding repository for nginx ... ") if EEVariables.ee_platform_distro == 'Debian': diff --git a/ee/core/variables.py b/ee/core/variables.py index 71bb0072..d67f4028 100644 --- a/ee/core/variables.py +++ b/ee/core/variables.py @@ -1,7 +1,7 @@ """EasyEngine core variable module""" import platform import socket -import confiparser +import configparser import os @@ -44,7 +44,8 @@ class EEVariables(): "php5-mcrypt", "php5-xdebug"] # MySQL repo and packages - ee_mysql_repo = "" + ee_mysql_repo = ("deb http://repo.percona.com/apt {codename} main" + .format(codename=ee_platform_codename)) ee_mysql = ["percona-server-server-5.6"] # Postfix repo and packages