Commit 10fa5fbf authored by Alain Takoudjou's avatar Alain Takoudjou

Auto generate mysql password

parent 79937f1a
...@@ -34,9 +34,6 @@ from slapos.recipe.librecipe import filehash ...@@ -34,9 +34,6 @@ from slapos.recipe.librecipe import filehash
class Recipe(GenericBaseRecipe): class Recipe(GenericBaseRecipe):
def _options(self, options):
options['password'] = self.generatePassword()
def install(self): def install(self):
path_list = [] path_list = []
......
...@@ -74,7 +74,7 @@ mode = 0644 ...@@ -74,7 +74,7 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/apache/instance-apache-php.cfg.in url = ${:_profile_base_location_}/apache/instance-apache-php.cfg.in
output = ${buildout:directory}/instance-apache-php.cfg output = ${buildout:directory}/instance-apache-php.cfg
md5sum = 480a7197e679dd06b666c0573211cd40 md5sum = af0d52de4c10d5a3a64f7c92283ad959
mode = 0644 mode = 0644
[instance-apache-import] [instance-apache-import]
...@@ -117,7 +117,7 @@ mode = 0644 ...@@ -117,7 +117,7 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/mariadb/instance-mariadb.cfg.in url = ${:_profile_base_location_}/mariadb/instance-mariadb.cfg.in
output = ${buildout:directory}/instance-mariadb.cfg output = ${buildout:directory}/instance-mariadb.cfg
md5sum = b214f56ede1a9d10f243c245c804d3a5 md5sum = c328d11f76373f8c5928afedf2178afd
mode = 0644 mode = 0644
[instance-mariadb-import] [instance-mariadb-import]
......
...@@ -194,7 +194,8 @@ recipe = slapos.cookbook:mysql ...@@ -194,7 +194,8 @@ recipe = slapos.cookbook:mysql
# Options # Options
recovering = false recovering = false
user = user user = user
port = 3306 password = $${mysql-password:passwd}
port = 33060
ip = $${slap-network-information:local-ipv4} ip = $${slap-network-information:local-ipv4}
database = db database = db
...@@ -216,6 +217,11 @@ mysql-install-binary = ${mariadb:location}/scripts/mysql_install_db ...@@ -216,6 +217,11 @@ mysql-install-binary = ${mariadb:location}/scripts/mysql_install_db
mysql-upgrade-binary = ${mariadb:location}/bin/mysql_upgrade mysql-upgrade-binary = ${mariadb:location}/bin/mysql_upgrade
mysqld-binary = ${mariadb:location}/bin/mysqld mysqld-binary = ${mariadb:location}/bin/mysqld
[mysql-password]
recipe = slapos.cookbook:generate.password
storage-path = $${rootdirectory:etc}/.passwd
bytes = 4
#---------------- #----------------
#-- #--
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment