|
@@ -61,6 +61,10 @@ class Release extends Command
|
|
|
* @var array Contiene la configuracion de los modulos.
|
|
|
*/
|
|
|
private $_modules;
|
|
|
+ /**
|
|
|
+ * @var array Contiene los usuarios que van a poder acceder al sistema.
|
|
|
+ */
|
|
|
+ private $_user_system;
|
|
|
|
|
|
/**
|
|
|
* Constructor.
|
|
@@ -77,6 +81,12 @@ class Release extends Command
|
|
|
$this->_mysql_pass = "235r2342gtfsw";
|
|
|
$this->_mysql_root_pass = "235r2342gtfsw";
|
|
|
$this->_docker_restart_default = "on-failure:10";
|
|
|
+ $this->_user_system = ['users' =>
|
|
|
+ [
|
|
|
+ ['user' => 'admin', 'password' => 'admin', 'tenancy' => 1, 'email' => 'soporte@interlink.com.ar', 'extra' => '--super-admin '],
|
|
|
+ ['user' => 'iksop', 'password' => 'gran5pe', 'tenancy' => 2, 'email' => 'admin@interlink.com.ar', 'extra' => ''],
|
|
|
+ ['user' => 'interno', 'password' => 'gran5pe1nterno', 'tenancy' => 2, 'email' => 'admin@interlink.com.ar', 'extra' => '']
|
|
|
+ ]];
|
|
|
$this->_modules = array();
|
|
|
$this->_ansible_vars = array();
|
|
|
$this->_modules_all = array(
|
|
@@ -242,6 +252,8 @@ class Release extends Command
|
|
|
|
|
|
$this->_ansible_vars["DOMAIN"] = $this->_domain;
|
|
|
$this->_ansible_vars["CLIENT"] = $this->_client;
|
|
|
+ $this->_ansible_vars["CMD_USERNAME"] = $this->_user_system['users']['user'];
|
|
|
+ $this->_ansible_vars["CMD_PASSWORD"] = $this->_user_system['users']['password'];
|
|
|
|
|
|
$dObj = new DevOps\FileSystem(realpath($dir));
|
|
|
$dObj->dirExists()->realpath();
|
|
@@ -263,6 +275,8 @@ class Release extends Command
|
|
|
$this->writeOAUTH();
|
|
|
// escribo un archivo con variables para ansible
|
|
|
$this->writeEnvVariables();
|
|
|
+ // escribo un archivo con los usuarios del sistema
|
|
|
+ $this->writeUserSystem();
|
|
|
|
|
|
$dObj->file('install.yml')->content(
|
|
|
yaml::dump(array(
|
|
@@ -748,6 +762,7 @@ class Release extends Command
|
|
|
->addLinks("base")
|
|
|
->addLinks("amqp")
|
|
|
->addLinks("nginx", $this->getDomain("base"))
|
|
|
+ ->addEnv_file("running.env")
|
|
|
->addVolumes("./base/", "/opt/base");
|
|
|
|
|
|
$composer
|
|
@@ -760,6 +775,7 @@ class Release extends Command
|
|
|
->addLinks("base")
|
|
|
->addLinks("amqp")
|
|
|
->addLinks("nginx", $this->getDomain("base"))
|
|
|
+ ->addEnv_file("running.env")
|
|
|
->addVolumes("./ftth/", "/opt/ftth");
|
|
|
|
|
|
$composer
|
|
@@ -772,6 +788,7 @@ class Release extends Command
|
|
|
->addLinks("base")
|
|
|
->addLinks("amqp")
|
|
|
->addLinks("nginx", $this->getDomain("base"))
|
|
|
+ ->addEnv_file("running.env")
|
|
|
->addVolumes("./ftth/", "/opt/ftth");
|
|
|
|
|
|
$composer
|
|
@@ -1048,6 +1065,15 @@ class Release extends Command
|
|
|
->content($tmp);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Crea el archivo con los usuarios del sistema para que lea el ansible.
|
|
|
+ */
|
|
|
+ private function writeUserSystem()
|
|
|
+ {
|
|
|
+ $this->_dObj->file("user_system.json")
|
|
|
+ ->content(json_encode($this->_user_system));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Crea el archivo con las variables para ejecutar el ansible.
|
|
|
*/
|