|
@@ -23,7 +23,7 @@ class Release extends Command
|
|
|
->setHelp('This command allows you to create a new installation...')
|
|
|
|
|
|
->addArgument('dir', InputArgument::REQUIRED, 'The directory where to create the installation.')
|
|
|
- ->addOption('base-repo',null, InputOption::VALUE_REQUIRED, 'Git clone Url fot the app Base', "git@bitbucket.org:ikflowdat/base.git")
|
|
|
+ ->addOption('base-repo',null, InputOption::VALUE_REQUIRED, 'Git clone Url for the app Base', "git@bitbucket.org:ikflowdat/base.git")
|
|
|
->addOption('base-ref', null, InputOption::VALUE_REQUIRED, 'Git reference (branch or tag) to clone the Base app', "master")
|
|
|
|
|
|
->addOption('ftth-repo',null, InputOption::VALUE_REQUIRED, 'Git clone Url fot the app FTTH', "git@bitbucket.org:ikflowdat/ftth.git")
|
|
@@ -92,6 +92,10 @@ class Release extends Command
|
|
|
'url' => $input->getOption("extra-repo"),
|
|
|
'branch' => $input->getOption("extra-ref"),
|
|
|
),
|
|
|
+ "radius" => array(
|
|
|
+ 'url' => $input->getOption("radius-repo"),
|
|
|
+ 'branch' => $input->getOption("radius-ref"),
|
|
|
+ ),
|
|
|
);
|
|
|
|
|
|
$dObj->file("git.ini")->writeIniConfig($install_config);
|
|
@@ -123,7 +127,7 @@ class Release extends Command
|
|
|
$dObj->file('install.yml')->content(
|
|
|
yaml::dump(array(
|
|
|
"install_dir" => realpath($dir),
|
|
|
- 'docker_apps' => array('base', 'stats', 'ftth', 'mapas', 'cablemodem'),
|
|
|
+ 'docker_apps' => array('base', 'stats', 'ftth', 'mapas', 'cablemodem', 'radius'),
|
|
|
'domain' => $fd_domain,
|
|
|
)
|
|
|
)
|
|
@@ -140,25 +144,27 @@ inventory=inventory.ini
|
|
|
|
|
|
function getHostEnv($fd_domain = "fd3.flowdat.com"){
|
|
|
return array(
|
|
|
- "HOST_BASE" => "base.". $fd_domain,
|
|
|
- "HOST_FTTH" => "ftth.". $fd_domain,
|
|
|
- "HOST_MAPAS" => "mapas.".$fd_domain,
|
|
|
- "HOST_STATS" => "stats.".$fd_domain,
|
|
|
+ "HOST_BASE" => "base.". $fd_domain,
|
|
|
+ "HOST_FTTH" => "ftth.". $fd_domain,
|
|
|
+ "HOST_MAPAS" => "mapas.".$fd_domain,
|
|
|
+ "HOST_STATS" => "stats.".$fd_domain,
|
|
|
"HOST_CABLEMODEM" => "cablemodem.".$fd_domain,
|
|
|
- "HOST_GRAFANA" => "grafana.".$fd_domain,
|
|
|
- "HOST_PMA" => "pma.".$fd_domain,
|
|
|
+ "HOST_RADIUS" => "radius.".$fd_domain,
|
|
|
+ "HOST_GRAFANA" => "grafana.".$fd_domain,
|
|
|
+ "HOST_PMA" => "pma.".$fd_domain,
|
|
|
);
|
|
|
}
|
|
|
|
|
|
function getHostConfig($config_ip, $fd_domain = "fd3.flowdat.com"){
|
|
|
return array(
|
|
|
- "base.". $fd_domain => $config_ip,
|
|
|
- "ftth.". $fd_domain => $config_ip,
|
|
|
- "mapas.". $fd_domain => $config_ip,
|
|
|
- "stats.". $fd_domain => $config_ip,
|
|
|
+ "base.". $fd_domain => $config_ip,
|
|
|
+ "ftth.". $fd_domain => $config_ip,
|
|
|
+ "mapas.". $fd_domain => $config_ip,
|
|
|
+ "stats.". $fd_domain => $config_ip,
|
|
|
"cablemodem.". $fd_domain => $config_ip,
|
|
|
- "grafana.". $fd_domain => $config_ip,
|
|
|
- "pma.". $fd_domain => $config_ip,
|
|
|
+ "radius.". $fd_domain => $config_ip,
|
|
|
+ "grafana.". $fd_domain => $config_ip,
|
|
|
+ "pma.". $fd_domain => $config_ip,
|
|
|
);
|
|
|
|
|
|
}
|
|
@@ -179,6 +185,7 @@ inventory=inventory.ini
|
|
|
->addEnviroment("HOST_MAPAS", "mapas.".$fd_domain)
|
|
|
->addEnviroment("HOST_BASE", "base." .$fd_domain)
|
|
|
->addEnviroment("HOST_CABLEMODEM", "cablemodem." .$fd_domain)
|
|
|
+ ->addEnviroment("HOST_RADIUS", "radius." .$fd_domain)
|
|
|
->addVolumes("./base/", "/opt/base")
|
|
|
;
|
|
|
}
|
|
@@ -204,6 +211,7 @@ inventory=inventory.ini
|
|
|
->addEnviroment("HOST_MAPAS", "mapas.".$fd_domain)
|
|
|
->addEnviroment("HOST_BASE", "base.".$fd_domain)
|
|
|
->addEnviroment("HOST_CABLEMODEM", "cablemodem." .$fd_domain)
|
|
|
+ ->addEnviroment("HOST_RADIUS", "radius." .$fd_domain)
|
|
|
//->addEnviroment("OAUTH_CLIENT_ID", $oauth_client)
|
|
|
//->addEnviroment("OAUTH_CLIENT_SECRET", $oauth_client_secret)
|
|
|
//->addEnviroment("HTTPS_METHOD", "nohttps")
|
|
@@ -234,6 +242,7 @@ inventory=inventory.ini
|
|
|
->addEnviroment("HOST_MAPAS", "mapas.".$fd_domain)
|
|
|
->addEnviroment("HOST_BASE", "base.".$fd_domain)
|
|
|
->addEnviroment("HOST_CABLEMODEM", "cablemodem.".$fd_domain)
|
|
|
+ ->addEnviroment("HOST_RADIUS", "radius." .$fd_domain)
|
|
|
//->addEnviroment("OAUTH_CLIENT_ID", $oauth_client)
|
|
|
//->addEnviroment("OAUTH_CLIENT_SECRET", $oauth_client_secret)
|
|
|
//->addEnviroment("HTTPS_METHOD", "nohttps")
|
|
@@ -273,10 +282,6 @@ inventory=inventory.ini
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
function addStats($composer, $config = array(), $flavor = "dev"){
|
|
|
$version = "latest";
|
|
|
$fd_domain = "fd3.flowdat.com";
|
|
@@ -300,6 +305,7 @@ inventory=inventory.ini
|
|
|
->addEnviroment("HOST_MAPAS", "mapas.".$fd_domain)
|
|
|
->addEnviroment("HOST_BASE", "base.".$fd_domain)
|
|
|
->addEnviroment("HOST_CABLEMODEM", "cablemodem." .$fd_domain)
|
|
|
+ ->addEnviroment("HOST_RADIUS", "radius." .$fd_domain)
|
|
|
|
|
|
//->addEnviroment("OAUTH_CLIENT_ID", $oauth_client)
|
|
|
//->addEnviroment("OAUTH_CLIENT_SECRET", $oauth_client_secret)
|
|
@@ -554,14 +560,14 @@ inventory=inventory.ini
|
|
|
$composer->addService("stats_command_worker")->image($registry."fd3/ftth:" . $version)
|
|
|
->build("./stats/")
|
|
|
->command("bin/console rabbitmq:consumer command_consumer")
|
|
|
- ->restart("always")
|
|
|
+ ->addEnviroment("./extra/supervisord/", "/etc/supervisord/")
|
|
|
+ ->addEnviroment("./extra/supervisord/var/", "/var/log/supervisor/")
|
|
|
+ ->addEnviroment("./extra/supervisord/sshd_config", "/etc/ssh/sshd_config")
|
|
|
+ ->addEnviroment("./extra/supervisord/bin/fiberhome", "/usr/bin/fiberhome")
|
|
|
+ ->addEnviroment("./extra/supervisord/bin/fiberlink", "/usr/bin/fiberlink")
|
|
|
|
|
|
- ->addLinks("mysql")
|
|
|
- ->addLinks("base")
|
|
|
- ->addLinks("amqp")
|
|
|
- ->addLinks("nginx", "base.".$fd_domain)
|
|
|
- ->addVolumes("./stats/", "/opt/stats")
|
|
|
;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
function getDockerComposer( $version = "latest", $host_env_file = "host.env", $registry = "docker.infra.flowdat.com/", $fd_domain = "fd3.flowdat.com")
|