Luciano Andrade 7 年之前
父节点
当前提交
16ba788988
共有 5 个文件被更改,包括 1218 次插入3 次删除
  1. 1196 1
      tools/ONU.json
  2. 15 1
      tools/readme.md
  3. 2 0
      tools/src/GetSource.php
  4. 1 1
      tools/src/ImportClient.php
  5. 4 0
      tools/src/Release.php

文件差异内容过多而无法显示
+ 1196 - 1
tools/ONU.json


+ 15 - 1
tools/readme.md

@@ -1,2 +1,16 @@
 
-php tools/cmd.php make:install --domain=lucho.fd3.flowdat.com ~/dev/
+
+requerimientos
+ * docker
+ * ansible
+ * php/composer
+
+pasos:
+ #1 Crear el directorio de instalación
+	php tools/cmd.php make:install --domain=lucho.fd3.flowdat.com ~/dev/
+ #2 En caso de que sea una instalacion de desarrollo bajar el codigo (get:source) y construir las imagenes de docker
+ #3 Hacer el inventario de ansible con los docker
+ #4 Correr el ansible en localhost (playbook es extra/installer.yml)
+    * Crea las oauth client para cada app (excepto base)
+    * Crea las dbs
+

+ 2 - 0
tools/src/GetSource.php

@@ -43,8 +43,10 @@ class GetSource extends Command
 		$git_path = $dirname.'/'.$sec;
 
 		try{
+			$output->writeln($conf["url"]. " -> " . $git_path);
 			$git->clone($conf["url"], $git_path);
 		}catch (GitException $e){
+			throw $e;
 			$output->write("repo $sec exists \n");
 		}
 		$git->setRepository($git_path);

+ 1 - 1
tools/src/ImportClient.php

@@ -33,7 +33,7 @@ class ImportClient extends Command{
 		->addArgument('base_url', InputArgument::REQUIRED, 'The base url of the FD3 Client.')
 
 		->addArgument('data_file.json', InputArgument::OPTIONAL, 'The data source from where to get data.', "Client.json")
-                ->addOption('uri', null, InputOption::VALUE_REQUIRED, 'uri after the base_url for the complete URL', '/api/clients.json')
+                ->addOption('uri', null, InputOption::VALUE_REQUIRED, 'uri after the base_url for the complete URL', 'api/clients.json')
 		->addOption('user', null, InputOption::VALUE_REQUIRED, 'The FD3 Username.', 'admin')
 		->addOption('pass', null, InputOption::VALUE_REQUIRED, 'The FD3 Password.', 'adminpass')
 		// ->addOption('source-name', null, InputOption::VALUE_REQUIRED, 'Rename the source to this name.', "upstream")

+ 4 - 0
tools/src/Release.php

@@ -102,6 +102,10 @@ class Release extends Command
 
 	$dObj->file('host.env')->content($env_content);
 
+	foreach(array("ftth", "mapas", "stats") as $app){
+		$dObj->file($app.'.oauth.env')->content("");
+	}
+
 	$dObj->file('install.yml')->content(
 		yaml::dump(array(
 			"install_dir" => realpath($dir),