|
@@ -37,6 +37,8 @@ use FD3\Services\Statsd;
|
|
use FD3\Services\Supervisord;
|
|
use FD3\Services\Supervisord;
|
|
use FD3\Services\Swagger;
|
|
use FD3\Services\Swagger;
|
|
use FD3\Services\Tftp;
|
|
use FD3\Services\Tftp;
|
|
|
|
+use FD3\Services\Minio;
|
|
|
|
+use FD3\Services\Export;
|
|
use Symfony\Component\Console\Command\Command;
|
|
use Symfony\Component\Console\Command\Command;
|
|
use Symfony\Component\Console\Exception\LogicException;
|
|
use Symfony\Component\Console\Exception\LogicException;
|
|
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
|
|
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
|
|
@@ -739,6 +741,27 @@ class ReleaseImages extends Command
|
|
$this->_dObj->file($this->_host_env)->content($env_content);
|
|
$this->_dObj->file($this->_host_env)->content($env_content);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Crea el archivo minio.env
|
|
|
|
+ */
|
|
|
|
+ protected function writeMinioEnv()
|
|
|
|
+ {
|
|
|
|
+ $env_content = "";
|
|
|
|
+ $env_content .= "MINIO_ACCESS_KEY=" . $this->generateRandomString(10) . "\n";
|
|
|
|
+ $env_content .= "MINIO_SECRET_KEY=" . $this->generateRandomString(15) . "\n";
|
|
|
|
+ $this->_dObj->file('minio.env')->content($env_content);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function generateRandomString($length = 10) {
|
|
|
|
+ $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
|
|
+ $charactersLength = strlen($characters);
|
|
|
|
+ $randomString = '';
|
|
|
|
+ for ($i = 0; $i < $length; $i++) {
|
|
|
|
+ $randomString .= $characters[rand(0, $charactersLength - 1)];
|
|
|
|
+ }
|
|
|
|
+ return $randomString;
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Crea el archivo hostsDile
|
|
* Crea el archivo hostsDile
|
|
* @param string $config_ip Contiene la ip.
|
|
* @param string $config_ip Contiene la ip.
|