gabriel 6 éve
szülő
commit
79a103ea83
37 módosított fájl, 51 hozzáadás és 52 törlés
  1. 9 7
      tools/installModules.sh
  2. 3 1
      tools/src/Release.php
  3. 1 1
      tools/src/Services/Amqp.php
  4. 1 1
      tools/src/Services/Api.php
  5. 1 1
      tools/src/Services/Base.php
  6. 1 1
      tools/src/Services/Base_log_worker.php
  7. 1 1
      tools/src/Services/Cablemodem.php
  8. 1 1
      tools/src/Services/Cablemodem_command_worker.php
  9. 1 1
      tools/src/Services/Cablemodem_tasklogger_worker.php
  10. 1 1
      tools/src/Services/Dhcp.php
  11. 1 1
      tools/src/Services/Dhcp_tasklogger_worker.php
  12. 1 1
      tools/src/Services/Freeradius.php
  13. 1 1
      tools/src/Services/Ftth.php
  14. 1 1
      tools/src/Services/Ftth_command_worker.php
  15. 1 1
      tools/src/Services/Ftth_tasklogger_worker.php
  16. 1 1
      tools/src/Services/Genieacs_cwmp.php
  17. 1 1
      tools/src/Services/Genieacs_fs.php
  18. 1 1
      tools/src/Services/Genieacs_gui.php
  19. 1 1
      tools/src/Services/Genieacs_nbi.php
  20. 2 2
      tools/src/Services/Geoserver.php
  21. 1 7
      tools/src/Services/InitialService.php
  22. 1 1
      tools/src/Services/Jsendpoint.php
  23. 1 1
      tools/src/Services/Jsonep_mongo.php
  24. 1 1
      tools/src/Services/Jsonep_mysql.php
  25. 1 1
      tools/src/Services/Kea.php
  26. 3 2
      tools/src/Services/Mongodb.php
  27. 1 1
      tools/src/Services/Mysql.php
  28. 1 1
      tools/src/Services/Nginx.php
  29. 2 2
      tools/src/Services/Pma.php
  30. 1 1
      tools/src/Services/Radius.php
  31. 1 1
      tools/src/Services/Redis.php
  32. 1 1
      tools/src/Services/Stats.php
  33. 1 1
      tools/src/Services/Stats_command_worker.php
  34. 1 1
      tools/src/Services/Statsd.php
  35. 1 1
      tools/src/Services/Supervisord.php
  36. 1 1
      tools/src/Services/Swagger.php
  37. 1 1
      tools/src/Services/Tftp.php

+ 9 - 7
tools/installModules.sh

@@ -73,7 +73,8 @@ fcCheckExecution () {
 }
 ###################################################################
 DIRINSTALLDEFAULT="/opt/flowdat"
-GITDEFUALT="git clone git@bitbucket.org:ikflowdat/installer.git ."
+GITDEFUALT="git@bitbucket.org:ikflowdat/installer.git ."
+COMMANDGITDEFAULT="git clone $GITDEFUALT"
 ###################################################################
 if [ "$1" != "--ansible" ];
 then
@@ -95,7 +96,8 @@ then
     if [ "$VALUEYESNO" = "1" ];
     then
         ## no se utiliza un && porque pueden existir error del apt en la consulta de los repo
-        apt-get update && apt-get install curl git python
+        apt-get update
+        apt-get install curl git python
         curl https://bootstrap.pypa.io/get-pip.py | python
         pip install -U pip setuptools
         curl -fsSL get.docker.com | sh
@@ -121,15 +123,15 @@ then
     cd $DIRINSTALL
     ###################################################################
     GIT=$GITDEFUALT
-    echo "Ingrese repositorio git a instalar. (default: $GITDEFUALT)"
+    echo "Ingrese la rama a instalar. (default: master)"
     read GIT
+    eval `ssh-agent`
+    ssh-add - <<< "$bitbucketid_rsa"
     if [ "$GIT" = "" ];
     then
-        eval `ssh-agent`
-        ssh-add - <<< "$bitbucketid_rsa"
-        eval $GITDEFUALT
+        eval $COMMANDGITDEFAULT
     else
-        eval $GIT
+        eval <<< "git clone -b $GIT $GITDEFUALT"
     fi
     ###################################################################
     echo "Ingresando al directorio $DIRINSTALL/tools"

+ 3 - 1
tools/src/Release.php

@@ -9,7 +9,6 @@ use FD3\Services\Base;
 use FD3\Services\Cablemodem;
 use FD3\Services\Dhcp;
 use FD3\Services\Ftth;
-use FD3\Services\InitialService;
 use FD3\Services\Nginx;
 use FD3\Services\Radius;
 use FD3\Services\Stats;
@@ -397,6 +396,9 @@ class Release extends Command
         /* Apps / Web UI / PMA */
         /**************************************************************************************/
         foreach ($this->_modules_all as $module => $env) {
+            if (strpos($module, "genieacs") !== false) {
+                $module = str_replace("-", "_", $module);
+            }
             $class = "FD3\\Services\\" . ucfirst($module);
             $object = new $class();
             $object->add($this, $composer, $base_vars);

+ 1 - 1
tools/src/Services/Amqp.php

@@ -14,7 +14,7 @@ class Amqp extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         $host_env_file = "";

+ 1 - 1
tools/src/Services/Api.php

@@ -14,7 +14,7 @@ class Api extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         $host_env_file = "";

+ 1 - 1
tools/src/Services/Base.php

@@ -15,7 +15,7 @@ class Base extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         $host_env_file = "";

+ 1 - 1
tools/src/Services/Base_log_worker.php

@@ -14,7 +14,7 @@ class Base_log_worker extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $initial = $this->getInitialName();
         $version = "latest";
         $registry = "";

+ 1 - 1
tools/src/Services/Cablemodem.php

@@ -15,7 +15,7 @@ class Cablemodem extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         $host_env_file = "";

+ 1 - 1
tools/src/Services/Cablemodem_command_worker.php

@@ -14,7 +14,7 @@ class Cablemodem_command_worker extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $initial = $this->getInitialName();
         $version = "latest";
         $registry = "";

+ 1 - 1
tools/src/Services/Cablemodem_tasklogger_worker.php

@@ -14,7 +14,7 @@ class Cablemodem_tasklogger_worker extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $initial = $this->getInitialName();
         $version = "latest";
         $registry = "";

+ 1 - 1
tools/src/Services/Dhcp.php

@@ -15,7 +15,7 @@ class Dhcp extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         $host_env_file = "";

+ 1 - 1
tools/src/Services/Dhcp_tasklogger_worker.php

@@ -14,7 +14,7 @@ class Dhcp_tasklogger_worker extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $initial = $this->getInitialName();
         $version = "latest";
         $registry = "";

+ 1 - 1
tools/src/Services/Freeradius.php

@@ -14,7 +14,7 @@ class Freeradius extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         $host_env_file = "";

+ 1 - 1
tools/src/Services/Ftth.php

@@ -15,7 +15,7 @@ class Ftth extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         $host_env_file = "";

+ 1 - 1
tools/src/Services/Ftth_command_worker.php

@@ -14,7 +14,7 @@ class Ftth_command_worker extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $initial = $this->getInitialName();
         $version = "latest";
         $registry = "";

+ 1 - 1
tools/src/Services/Ftth_tasklogger_worker.php

@@ -14,7 +14,7 @@ class Ftth_tasklogger_worker extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $initial = $this->getInitialName();
         $version = "latest";
         $registry = "";

+ 1 - 1
tools/src/Services/Genieacs_cwmp.php

@@ -14,7 +14,7 @@ class Genieacs_cwmp extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = str_replace("_", "-", $this->getModuleName()());
+        $module = str_replace("_", "-", $this->getModuleName());
         if ($release->needInstallModule($module)) {
             $composer
                 ->addService($module)

+ 1 - 1
tools/src/Services/Genieacs_fs.php

@@ -14,7 +14,7 @@ class Genieacs_fs extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = str_replace("_", "-", $this->getModuleName()());
+        $module = str_replace("_", "-", $this->getModuleName());
         if ($release->needInstallModule($module)) {
             $composer
                 ->addService($module)

+ 1 - 1
tools/src/Services/Genieacs_gui.php

@@ -14,7 +14,7 @@ class Genieacs_gui extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = str_replace("_", "-", $this->getModuleName()());
+        $module = str_replace("_", "-", $this->getModuleName());
         if ($release->needInstallModule($module)) {
             $composer
                 ->addService($module)

+ 1 - 1
tools/src/Services/Genieacs_nbi.php

@@ -14,7 +14,7 @@ class Genieacs_nbi extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = str_replace("_", "-", $this->getModuleName()());
+        $module = str_replace("_", "-", $this->getModuleName());
         if ($release->needInstallModule($module)) {
             $composer
                 ->addService($module)

+ 2 - 2
tools/src/Services/Geoserver.php

@@ -14,7 +14,7 @@ class Geoserver extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         extract($config);
@@ -24,7 +24,7 @@ class Geoserver extends InitialService
                 ->image($registry . "fd3/$module:" . $version)
                 ->build("./extra/geoserver/")
                 ->restart($release->_docker_restart_default)
-                ->addLinks((new (Nginx))->getModuleName(), $release->getDomain($module))
+                ->addLinks((new Nginx())->getModuleName(), $release->getDomain($module))
                 ->addEnv_file($release->_running_env)
                 ->addEnv_file($release->_host_env)
                 ->addVolumes("./extra/geoserver/geoserver-data/styles", "/opt/geoserver/data_dir/styles")

+ 1 - 7
tools/src/Services/InitialService.php

@@ -1,10 +1,4 @@
 <?php
-/**
- * Created by PhpStorm.
- * User: gabriel
- * Date: 02/01/19
- * Time: 12:12
- */
 
 namespace FD3\Services;
 
@@ -19,6 +13,6 @@ class InitialService
 
     public function getInitialName()
     {
-        return explode("_", $this->getModuleName()())[0];
+        return explode("_", $this->getModuleName())[0];
     }
 }

+ 1 - 1
tools/src/Services/Jsendpoint.php

@@ -14,7 +14,7 @@ class Jsendpoint extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         $host_env_file = "";

+ 1 - 1
tools/src/Services/Jsonep_mongo.php

@@ -14,7 +14,7 @@ class Jsonep_mongo extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         $host_env_file = "";

+ 1 - 1
tools/src/Services/Jsonep_mysql.php

@@ -14,7 +14,7 @@ class Jsonep_mysql extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         $host_env_file = "";

+ 1 - 1
tools/src/Services/Kea.php

@@ -15,7 +15,7 @@ class Kea extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         $host_env_file = "";

+ 3 - 2
tools/src/Services/Mongodb.php

@@ -14,11 +14,12 @@ class Mongodb extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
-        $version = "3.4";
+        $module = $this->getModuleName();
+        $version = "latest";
         $registry = "";
         $host_env_file = "";
         extract($config);
+        $version = "3.4";
         if ($release->needInstallModule($module)) {
             $composer
                 ->addService($module)

+ 1 - 1
tools/src/Services/Mysql.php

@@ -14,7 +14,7 @@ class Mysql extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         $host_env_file = "";

+ 1 - 1
tools/src/Services/Nginx.php

@@ -14,7 +14,7 @@ class Nginx extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         $host_env_file = "";

+ 2 - 2
tools/src/Services/Pma.php

@@ -14,7 +14,7 @@ class Pma extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $host_env_file = "host.env";
         extract($config);
         if ($release->needInstallModule($module)) {
@@ -22,7 +22,7 @@ class Pma extends InitialService
                 ->addService($module)
                 ->image("phpmyadmin/phpmyadmin")
                 ->restart($release->_docker_restart_default)
-                ->addLinks((new Mysql())->getModuleName())
+                ->addLinks($release->_mysql_link)
                 ->addEnv_file($release->_host_env)
                 ->addEnv_file("mysql." . $host_env_file)
                 ->addEnv_file($module . "." . $host_env_file)

+ 1 - 1
tools/src/Services/Radius.php

@@ -15,7 +15,7 @@ class Radius extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         $host_env_file = "";

+ 1 - 1
tools/src/Services/Redis.php

@@ -14,7 +14,7 @@ class Redis extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         if ($release->needInstallModule($module)) {
             $composer
                 ->addService($module)

+ 1 - 1
tools/src/Services/Stats.php

@@ -15,7 +15,7 @@ class Stats extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         $host_env_file = "";

+ 1 - 1
tools/src/Services/Stats_command_worker.php

@@ -14,7 +14,7 @@ class Stats_command_worker extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $initial = $this->getInitialName();
         $version = "latest";
         $registry = "";

+ 1 - 1
tools/src/Services/Statsd.php

@@ -14,7 +14,7 @@ class Statsd extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = str_replace("_", "-", $this->getModuleName()());
+        $module = str_replace("_", "-", $this->getModuleName());
         $version = "latest";
         $registry = "";
         $host_env_file = "";

+ 1 - 1
tools/src/Services/Supervisord.php

@@ -14,7 +14,7 @@ class Supervisord extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         $host_env_file = "";

+ 1 - 1
tools/src/Services/Swagger.php

@@ -14,7 +14,7 @@ class Swagger extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         $host_env_file = "";

+ 1 - 1
tools/src/Services/Tftp.php

@@ -14,7 +14,7 @@ class Tftp extends InitialService
      */
     public function add(Release $release, FileFormat2 $composer, $config = array())
     {
-        $module = $this->getModuleName()();
+        $module = $this->getModuleName();
         $version = "latest";
         $registry = "";
         $host_env_file = "";