|
@@ -15,7 +15,7 @@ class Release extends Command
|
|
{
|
|
{
|
|
protected function configure()
|
|
protected function configure()
|
|
{
|
|
{
|
|
- $this
|
|
|
|
|
|
+ $this
|
|
->setName('make:install')
|
|
->setName('make:install')
|
|
|
|
|
|
->setDescription('Create a new install.')
|
|
->setDescription('Create a new install.')
|
|
@@ -38,6 +38,9 @@ class Release extends Command
|
|
->addOption('extra-repo',null, InputOption::VALUE_REQUIRED, 'Git clone Url fot the app Base', "git@bitbucket.org:ikflowdat/extra.git")
|
|
->addOption('extra-repo',null, InputOption::VALUE_REQUIRED, 'Git clone Url fot the app Base', "git@bitbucket.org:ikflowdat/extra.git")
|
|
->addOption('extra-ref', null, InputOption::VALUE_REQUIRED, 'Git reference (branch or tag) to clone the Extra files and apps', "master")
|
|
->addOption('extra-ref', null, InputOption::VALUE_REQUIRED, 'Git reference (branch or tag) to clone the Extra files and apps', "master")
|
|
|
|
|
|
|
|
+ ->addOption('cablemodem-repo',null, InputOption::VALUE_REQUIRED, 'Git clone Url for the app Cablemodem', "git@bitbucket.org:ikflowdat/cablemodem.git")
|
|
|
|
+ ->addOption('cablemodem-ref', null, InputOption::VALUE_REQUIRED, 'Git reference (branch or tag) to clone the Cablemodem files and apps', "master")
|
|
|
|
+
|
|
->addOption('host-ip', null, InputOption::VALUE_REQUIRED, 'Ip of the runnning host to be added to the /etc/hosts file, eventually', "127.0.1.1")
|
|
->addOption('host-ip', null, InputOption::VALUE_REQUIRED, 'Ip of the runnning host to be added to the /etc/hosts file, eventually', "127.0.1.1")
|
|
|
|
|
|
->addOption('domain', null, InputOption::VALUE_REQUIRED, 'Domain where the flowdat will be installed', "fd3.flowdat.com")
|
|
->addOption('domain', null, InputOption::VALUE_REQUIRED, 'Domain where the flowdat will be installed', "fd3.flowdat.com")
|
|
@@ -78,6 +81,10 @@ class Release extends Command
|
|
'url' => $input->getOption("extra-repo"),
|
|
'url' => $input->getOption("extra-repo"),
|
|
'branch' => $input->getOption("extra-ref"),
|
|
'branch' => $input->getOption("extra-ref"),
|
|
),
|
|
),
|
|
|
|
+ "cablemodem" => array(
|
|
|
|
+ 'url' => $input->getOption("cablemodem-repo"),
|
|
|
|
+ 'branch' => $input->getOption("cablemodem-ref"),
|
|
|
|
+ ),
|
|
);
|
|
);
|
|
|
|
|
|
$dObj->file("git.ini")->writeIniConfig($install_config);
|
|
$dObj->file("git.ini")->writeIniConfig($install_config);
|
|
@@ -102,14 +109,14 @@ class Release extends Command
|
|
|
|
|
|
$dObj->file('host.env')->content($env_content);
|
|
$dObj->file('host.env')->content($env_content);
|
|
|
|
|
|
- foreach(array("ftth", "mapas", "stats") as $app){
|
|
|
|
|
|
+ foreach(array("ftth", "mapas", "stats", 'cablemodem') as $app){
|
|
$dObj->file($app.'.oauth.env')->content("");
|
|
$dObj->file($app.'.oauth.env')->content("");
|
|
}
|
|
}
|
|
|
|
|
|
$dObj->file('install.yml')->content(
|
|
$dObj->file('install.yml')->content(
|
|
yaml::dump(array(
|
|
yaml::dump(array(
|
|
"install_dir" => realpath($dir),
|
|
"install_dir" => realpath($dir),
|
|
- 'docker_apps' => array('base', 'stats', 'ftth', 'mapas'),
|
|
|
|
|
|
+ 'docker_apps' => array('base', 'stats', 'ftth', 'mapas', 'cablemodem'),
|
|
'domain' => $domain,
|
|
'domain' => $domain,
|
|
)
|
|
)
|
|
)
|
|
)
|
|
@@ -121,7 +128,7 @@ inventory=inventory.ini
|
|
"
|
|
"
|
|
);
|
|
);
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
function getHostEnv($fd_domain = "fd3.flowdat.com"){
|
|
function getHostEnv($fd_domain = "fd3.flowdat.com"){
|
|
@@ -130,6 +137,7 @@ inventory=inventory.ini
|
|
"HOST_FTTH" => "ftth.". $fd_domain,
|
|
"HOST_FTTH" => "ftth.". $fd_domain,
|
|
"HOST_MAPAS" => "mapas.".$fd_domain,
|
|
"HOST_MAPAS" => "mapas.".$fd_domain,
|
|
"HOST_STATS" => "stats.".$fd_domain,
|
|
"HOST_STATS" => "stats.".$fd_domain,
|
|
|
|
+ "HOST_CABLEMODEM" => "cablemodem.".$fd_domain,
|
|
"HOST_GRAFANA" => "grafana.".$fd_domain,
|
|
"HOST_GRAFANA" => "grafana.".$fd_domain,
|
|
"HOST_PMA" => "pma.".$fd_domain,
|
|
"HOST_PMA" => "pma.".$fd_domain,
|
|
);
|
|
);
|
|
@@ -141,6 +149,7 @@ inventory=inventory.ini
|
|
"ftth.". $fd_domain => $config_ip,
|
|
"ftth.". $fd_domain => $config_ip,
|
|
"mapas.". $fd_domain => $config_ip,
|
|
"mapas.". $fd_domain => $config_ip,
|
|
"stats.". $fd_domain => $config_ip,
|
|
"stats.". $fd_domain => $config_ip,
|
|
|
|
+ "cablemodem.". $fd_domain => $config_ip,
|
|
"grafana.". $fd_domain => $config_ip,
|
|
"grafana.". $fd_domain => $config_ip,
|
|
"pma.". $fd_domain => $config_ip,
|
|
"pma.". $fd_domain => $config_ip,
|
|
);
|
|
);
|
|
@@ -170,6 +179,7 @@ $oauth_client_secret = "5w7gx6ptdoo4g8cwwo88o8gowosgco84sso08ssow0osg88g8k";
|
|
->addEnviroment("HOST_STATS", "stats.".$fd_domain)
|
|
->addEnviroment("HOST_STATS", "stats.".$fd_domain)
|
|
->addEnviroment("HOST_MAPAS", "mapas.".$fd_domain)
|
|
->addEnviroment("HOST_MAPAS", "mapas.".$fd_domain)
|
|
->addEnviroment("HOST_BASE", "base." .$fd_domain)
|
|
->addEnviroment("HOST_BASE", "base." .$fd_domain)
|
|
|
|
+ ->addEnviroment("HOST_CABLEMODEM", "cablemodem." .$fd_domain)
|
|
->addVolumes("./base/", "/opt/base")
|
|
->addVolumes("./base/", "/opt/base")
|
|
;
|
|
;
|
|
|
|
|
|
@@ -188,6 +198,7 @@ $oauth_client_secret = "5w7gx6ptdoo4g8cwwo88o8gowosgco84sso08ssow0osg88g8k";
|
|
->addEnviroment("HOST_STATS", "stats.".$fd_domain)
|
|
->addEnviroment("HOST_STATS", "stats.".$fd_domain)
|
|
->addEnviroment("HOST_MAPAS", "mapas.".$fd_domain)
|
|
->addEnviroment("HOST_MAPAS", "mapas.".$fd_domain)
|
|
->addEnviroment("HOST_BASE", "base.".$fd_domain)
|
|
->addEnviroment("HOST_BASE", "base.".$fd_domain)
|
|
|
|
+ ->addEnviroment("HOST_CABLEMODEM", "cablemodem." .$fd_domain)
|
|
//->addEnviroment("OAUTH_CLIENT_ID", $oauth_client)
|
|
//->addEnviroment("OAUTH_CLIENT_ID", $oauth_client)
|
|
//->addEnviroment("OAUTH_CLIENT_SECRET", $oauth_client_secret)
|
|
//->addEnviroment("OAUTH_CLIENT_SECRET", $oauth_client_secret)
|
|
//->addEnviroment("HTTPS_METHOD", "nohttps")
|
|
//->addEnviroment("HTTPS_METHOD", "nohttps")
|
|
@@ -209,6 +220,7 @@ $oauth_client_secret = "5w7gx6ptdoo4g8cwwo88o8gowosgco84sso08ssow0osg88g8k";
|
|
->addEnviroment("HOST_STATS", "stats.".$fd_domain)
|
|
->addEnviroment("HOST_STATS", "stats.".$fd_domain)
|
|
->addEnviroment("HOST_MAPAS", "mapas.".$fd_domain)
|
|
->addEnviroment("HOST_MAPAS", "mapas.".$fd_domain)
|
|
->addEnviroment("HOST_BASE", "base.".$fd_domain)
|
|
->addEnviroment("HOST_BASE", "base.".$fd_domain)
|
|
|
|
+ ->addEnviroment("HOST_CABLEMODEM", "cablemodem." .$fd_domain)
|
|
//->addEnviroment("OAUTH_CLIENT_ID", $oauth_client)
|
|
//->addEnviroment("OAUTH_CLIENT_ID", $oauth_client)
|
|
//->addEnviroment("OAUTH_CLIENT_SECRET", $oauth_client_secret)
|
|
//->addEnviroment("OAUTH_CLIENT_SECRET", $oauth_client_secret)
|
|
//->addEnviroment("HTTPS_METHOD", "nohttps")
|
|
//->addEnviroment("HTTPS_METHOD", "nohttps")
|
|
@@ -235,12 +247,31 @@ $oauth_client_secret = "5w7gx6ptdoo4g8cwwo88o8gowosgco84sso08ssow0osg88g8k";
|
|
->addEnviroment("HOST_STATS", "stats.".$fd_domain)
|
|
->addEnviroment("HOST_STATS", "stats.".$fd_domain)
|
|
->addEnviroment("HOST_MAPAS", "mapas.".$fd_domain)
|
|
->addEnviroment("HOST_MAPAS", "mapas.".$fd_domain)
|
|
->addEnviroment("HOST_BASE", "base.".$fd_domain)
|
|
->addEnviroment("HOST_BASE", "base.".$fd_domain)
|
|
|
|
+ ->addEnviroment("HOST_CABLEMODEM", "cablemodem." .$fd_domain)
|
|
//->addEnviroment("OAUTH_CLIENT_ID", $oauth_client)
|
|
//->addEnviroment("OAUTH_CLIENT_ID", $oauth_client)
|
|
//->addEnviroment("OAUTH_CLIENT_SECRET", $oauth_client_secret)
|
|
//->addEnviroment("OAUTH_CLIENT_SECRET", $oauth_client_secret)
|
|
//->addEnviroment("HTTPS_METHOD", "nohttps")
|
|
//->addEnviroment("HTTPS_METHOD", "nohttps")
|
|
|
|
|
|
;
|
|
;
|
|
|
|
|
|
|
|
+ $composer->addService("cablemodem")
|
|
|
|
+ ->image($registry."fd3/cablemodem:" . $v)
|
|
|
|
+ ->build("./cablemodem/")
|
|
|
|
+ ->addLinks("mysql")
|
|
|
|
+ ->addLinks("base")
|
|
|
|
+ ->addLinks("amqp")
|
|
|
|
+ ->addLinks("base", "base.".$fd_domain)
|
|
|
|
+ ->addVolumes("./cablemodem/", "/opt/cablemodem")
|
|
|
|
+ ->addEnv_file("cablemodem.oauth.env")
|
|
|
|
+ ->addEnviroment("VIRTUAL_HOST", "cablemodem.".$fd_domain)
|
|
|
|
+ ->addEnviroment("HOST_BASE", "base.".$fd_domain)
|
|
|
|
+ ->addEnviroment("HOST_FTTH", "ftth.".$fd_domain)
|
|
|
|
+ ->addEnviroment("HOST_STATS", "stats.".$fd_domain)
|
|
|
|
+ ->addEnviroment("HOST_MAPAS", "mapas.".$fd_domain)
|
|
|
|
+ ->addEnviroment("HOST_RADIUS", "radius.".$fd_domain)
|
|
|
|
+ ->addEnviroment("HOST_CABLEMODEM", "cablemodem." .$fd_domain)
|
|
|
|
+ ;
|
|
|
|
+
|
|
/**************************************************************************************/
|
|
/**************************************************************************************/
|
|
/* Servicios */
|
|
/* Servicios */
|
|
/**************************************************************************************/
|
|
/**************************************************************************************/
|
|
@@ -364,10 +395,10 @@ $oauth_client_secret = "5w7gx6ptdoo4g8cwwo88o8gowosgco84sso08ssow0osg88g8k";
|
|
->addEnviroment("./extra/supervisord/sshd_config", "/etc/ssh/sshd_config")
|
|
->addEnviroment("./extra/supervisord/sshd_config", "/etc/ssh/sshd_config")
|
|
->addEnviroment("./extra/supervisord/bin/fiberhome", "/usr/bin/fiberhome")
|
|
->addEnviroment("./extra/supervisord/bin/fiberhome", "/usr/bin/fiberhome")
|
|
->addEnviroment("./extra/supervisord/bin/fiberlink", "/usr/bin/fiberlink")
|
|
->addEnviroment("./extra/supervisord/bin/fiberlink", "/usr/bin/fiberlink")
|
|
-
|
|
|
|
|
|
+
|
|
;
|
|
;
|
|
|
|
|
|
- $composer->addService("nginx")->build("extra/nginx/")
|
|
|
|
|
|
+ $composer->addService("nginx")->build("extra/nginx/")
|
|
->image($registry."fd3/nginx:".$v)
|
|
->image($registry."fd3/nginx:".$v)
|
|
->addEnv_file($host_env_file)
|
|
->addEnv_file($host_env_file)
|
|
->restart("always")
|
|
->restart("always")
|