Browse Source

Some more tweaks to installation

bugfixes
gau1991 10 years ago
parent
commit
7b34466226
  1. 12
      ee/cli/plugins/stack.py
  2. 5
      ee/core/variables.py

12
ee/cli/plugins/stack.py

@ -74,7 +74,7 @@ class EEStackController(CementBaseController):
"$(hostname -f)\" | debconf-set-selections") "$(hostname -f)\" | debconf-set-selections")
if set(EEVariables.ee_mysql).issubset(set(apt_packages)): if set(EEVariables.ee_mysql).issubset(set(apt_packages)):
print("Adding repository for mysql ... ") print("Adding repository for mysql ... ")
EERepo.add(ppa=EEVariables.ee_mysql_repo) EERepo.add(repo_url=EEVariables.ee_mysql_repo)
EERepo.add_key('1C4CBDCDCD2EFD2A') EERepo.add_key('1C4CBDCDCD2EFD2A')
chars = ''.join(random.sample(string.ascii_letters, 8)) chars = ''.join(random.sample(string.ascii_letters, 8))
print("Pre-seeding mysql variables ... ") print("Pre-seeding mysql variables ... ")
@ -86,6 +86,16 @@ class EEStackController(CementBaseController):
"percona-server-server/root_password_again " "percona-server-server/root_password_again "
"password {chars}\" | " "password {chars}\" | "
"debconf-set-selections".format(chars=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)): if set(EEVariables.ee_nginx).issubset(set(apt_packages)):
print("Adding repository for nginx ... ") print("Adding repository for nginx ... ")
if EEVariables.ee_platform_distro == 'Debian': if EEVariables.ee_platform_distro == 'Debian':

5
ee/core/variables.py

@ -1,7 +1,7 @@
"""EasyEngine core variable module""" """EasyEngine core variable module"""
import platform import platform
import socket import socket
import confiparser import configparser
import os import os
@ -44,7 +44,8 @@ class EEVariables():
"php5-mcrypt", "php5-xdebug"] "php5-mcrypt", "php5-xdebug"]
# MySQL repo and packages # 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"] ee_mysql = ["percona-server-server-5.6"]
# Postfix repo and packages # Postfix repo and packages

Loading…
Cancel
Save