diff --git a/manifest.yml b/manifest.yml index af6eb09..6870906 100755 --- a/manifest.yml +++ b/manifest.yml @@ -103,12 +103,13 @@ onInstall: actions: setupDB: - cmd[sqldb]: |- - #jem passwd set -p wow #use if need to reset DB password + ADMIN_PASSWORD=`pwgen 10 1` + jem passwd set -p $ADMIN_PASSWORD #use if need to reset DB password USER=${DB_USER} PASSWORD=${DB_PASS} MYSQL=`which mysql` cmd="CREATE USER '$USER'@'localhost' IDENTIFIED BY '$PASSWORD'; CREATE USER '$USER'@'%' IDENTIFIED BY '$PASSWORD'; GRANT ALL PRIVILEGES ON *.* TO '$USER'@'localhost' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO '$USER'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES;" - $MYSQL -uroot -p${nodes.sqldb.password} --execute="$cmd" + $MYSQL -uroot -p$ADMIN_PASSWORD --execute="$cmd" user: root addLimits: #what does this do? diff --git a/scripts/beforeInstall.js b/scripts/beforeInstall.js index 8f268c5..1eccd94 100755 --- a/scripts/beforeInstall.js +++ b/scripts/beforeInstall.js @@ -32,23 +32,23 @@ resp.nodes.push({ nodeGroup: "sqldb", //restartDelay: 10, skipNodeEmails: true, - validation: { - minCount: db_count, - maxCount: db_count - }, - cluster: { - scheme: db_cluster, - db_user: "${globals.DB_USER}", - db_pass: "${globals.DB_PASS}", - is_proxysql: false, - custom_conf: "${baseUrl}/configs/sqldb/wordpress.cnf" - }, - env: { - SCHEME: db_cluster, - DB_USER: "${globals.DB_USER}", - DB_PASS: "${globals.DB_PASS}", - IS_PROXYSQL: false - } + // validation: { + // minCount: db_count, + // maxCount: db_count + // }, + // cluster: { + // scheme: db_cluster, + // db_user: "${globals.DB_USER}", + // db_pass: "${globals.DB_PASS}", + // is_proxysql: false, + // custom_conf: "${baseUrl}/configs/sqldb/wordpress.cnf" + // }, + // env: { + // SCHEME: db_cluster, + // DB_USER: "${globals.DB_USER}", + // DB_PASS: "${globals.DB_PASS}", + // IS_PROXYSQL: false + // } }); resp.nodes.push({