소스 검색

cambie las imagenes de la instalacion

Luciano Andrade 7 년 전
부모
커밋
57d6a9a9db
1개의 변경된 파일22개의 추가작업 그리고 24개의 파일을 삭제
  1. 22 24
      tools/src/Release.php

+ 22 - 24
tools/src/Release.php

@@ -42,6 +42,8 @@ class Release extends Command
 
 	 ->addOption('domain', null, InputOption::VALUE_REQUIRED, 'Domain where the flowdat will be installed', "fd3.flowdat.com")
 
+	 ->addOption('docker-tag', null, InputOption::VALUE_REQUIRED, 'Docker tag to be used', "latest")
+
     ;
     }
 
@@ -49,6 +51,9 @@ class Release extends Command
     {
         $dir = $input->getArgument('dir');
 	$domain = $input->getOption("domain");
+
+	$docker_tag = $input->getOption("docker-tag");
+
 	$dObj = new DevOps\FileSystem($dir);
 	$dObj->dirExists()->realpath();
 
@@ -78,7 +83,7 @@ class Release extends Command
 	$dObj->file("git.ini")->writeIniConfig($install_config);
 
 	$dObj->file("docker-compose.yml")->content(
-		$this->getDockerComposer( "dev",  "host.env", "docker.infra.flowdat.com/", $domain)
+		$this->getDockerComposer( $docker_tag,  "host.env", "docker.infra.flowdat.com/", $domain)
 	);
 
 	$config_ip = $input->getOption("host-ip");
@@ -96,9 +101,6 @@ class Release extends Command
 	}
 
 	$dObj->file('host.env')->content($env_content);
-	$dObj->file('mapas.oauth.env')->content("");
-	$dObj->file('ftth.oauth.env')->content("");
-	$dObj->file('stats.oauth.env')->content("");
 
 	$dObj->file('install.yml')->content(
 		yaml::dump(array(
@@ -140,7 +142,7 @@ inventory=inventory.ini
 
     }
 
-    function getDockerComposer( $v = "dev", $host_env_file = "host.env", $registry = "docker.infra.flowdat.com/", $fd_domain = "fd3.flowdat.com")
+    function getDockerComposer( $v = "latest", $host_env_file = "host.env", $registry = "docker.infra.flowdat.com/", $fd_domain = "fd3.flowdat.com")
 {
 
 $mysql_root_pass="235r2342gtfsw";
@@ -153,7 +155,7 @@ $oauth_client_secret = "5w7gx6ptdoo4g8cwwo88o8gowosgco84sso08ssow0osg88g8k";
 	$composer = new FileFormat2("../");
 
 	$composer->addService("base")
-		->image($registry."fd3_base:" . $v)
+		->image($registry."fd3/base:" . $v)
 		->build("./base/")
 		->restart("always")
 		->addLinks("mysql")
@@ -167,13 +169,13 @@ $oauth_client_secret = "5w7gx6ptdoo4g8cwwo88o8gowosgco84sso08ssow0osg88g8k";
 	;
 
 	$composer->addService("ftth")
-		->image($registry."fd3_ftth:" . $v)
+		->image($registry."fd3/ftth:" . $v)
 		->build("./ftth/")
 		->restart("always")
 		->addLinks("mysql")
 		->addLinks("base")
 		->addLinks("amqp")
-		->addLinks("nginx", "base.".$fd_domain)
+		->addLinks("base", "base.".$fd_domain)
 
 		->addEnv_file("ftth.oauth.env")
 		->addEnviroment("VIRTUAL_HOST", "ftth.".$fd_domain)
@@ -189,12 +191,12 @@ $oauth_client_secret = "5w7gx6ptdoo4g8cwwo88o8gowosgco84sso08ssow0osg88g8k";
 	;
 
 	$composer->addService("mapas")
-		->image($registry."fd3_mapas:" . $v)
+		->image($registry."fd3/mapas:" . $v)
 		->build("./mapas/")
 		->addLinks("mysql")
 		->addLinks("base")
 		->addLinks("amqp")
-		->addLinks("nginx", "base.".$fd_domain)
+		->addLinks("base", "base.".$fd_domain)
 		->addEnv_file("mapas.oauth.env")
 
 		->addEnviroment("VIRTUAL_HOST", "mapas.".$fd_domain)
@@ -211,12 +213,12 @@ $oauth_client_secret = "5w7gx6ptdoo4g8cwwo88o8gowosgco84sso08ssow0osg88g8k";
 
 
 	$composer->addService("stats")
-		->image($registry."fd3_stats:" . $v)
+		->image($registry."fd3/stats:" . $v)
 		->build("./stats/")
 		->addLinks("mysql")
 		->addLinks("base")
 		->addLinks("amqp")
-		->addLinks("nginx", "base.".$fd_domain)
+		->addLinks("base", "base.".$fd_domain)
 		->addVolumes("./stats/", "/opt/stats")
 		->addEnv_file("stats.oauth.env")
 
@@ -234,7 +236,7 @@ $oauth_client_secret = "5w7gx6ptdoo4g8cwwo88o8gowosgco84sso08ssow0osg88g8k";
 	/**************************************************************************************/
 	/* Servicios */
 	/**************************************************************************************/
-	$composer->addService("mysql")->image($registry."fd3_mysql:". $v)
+	$composer->addService("mysql")->image($registry."fd3/mysql:". $v)
 		->build("./extra/mysql")
 		->addVolumes("./mysql/", "/var/lib/mysql/")
 
@@ -253,13 +255,13 @@ $oauth_client_secret = "5w7gx6ptdoo4g8cwwo88o8gowosgco84sso08ssow0osg88g8k";
 	/* Workers */
 	/**************************************************************************************/
 
-	$composer->addService("ftth_worker")->image($registry."fd3_ftth:" . $v)
+	$composer->addService("ftth_worker")->image($registry."fd3/ftth:" . $v)
 		->build("./ftth/")
 		->restart("always")
 		->addLinks("mysql")
 		->addLinks("base")
 		->addLinks("amqp")
-		->addLinks("nginx", "base.".$fd_domain)
+		->addLinks("base", "base.".$fd_domain)
 
 
 		->addEnviroment("VIRTUAL_HOST", "ftth.".$fd_domain)
@@ -305,7 +307,7 @@ $oauth_client_secret = "5w7gx6ptdoo4g8cwwo88o8gowosgco84sso08ssow0osg88g8k";
 	;
 
 	$composer->addService("jsendpoint")
-		->image($registry."jsendpoint:$v")
+		->image($registry."fd3/jsendpoint:$v")
 		->build("./extra/statsd/endpoint/mysql")
 		->addVolumes("./extra/statsd/endpoint/mysql", "/opt/datasource")
 		->addLinks("mysql")
@@ -315,14 +317,14 @@ $oauth_client_secret = "5w7gx6ptdoo4g8cwwo88o8gowosgco84sso08ssow0osg88g8k";
 		;
 
 	$composer->addService("statsd")->build("./extra/statsd/statsd")
-		->image($registry."statsd:$v")
+		->image($registry."fd3/statsd:$v")
 		->addPorts("8125", "8125/udp")
 		->addLinks("mysql")
 		->restart("always")
 	;
 
 	$composer->addService("supervisord")->build("./extra/supervisord")
-		->image($registry."supervisord:$v")
+		->image($registry."fd3/supervisord:$v")
 		->privileged(true)
 		->restart("always")
 		->addEnviroment("./extra/supervisord/", "/etc/supervisord/")
@@ -333,14 +335,10 @@ $oauth_client_secret = "5w7gx6ptdoo4g8cwwo88o8gowosgco84sso08ssow0osg88g8k";
 	 
 	;
 
-	$composer->addService("nginx")->image($registry."fd3_nginx:".$v)
-		->build("extra/nginx/")
+	$composer->addService("nginx")->build("extra/nginx/")	
+		->image($registry."fd3/nginx:".$v)
 		->addEnv_file($host_env_file)
 		->restart("always")
-		//->addLinks("base")
-		//->addLinks("ftth")
-		//->addLinks("mapas")
-		//->addLinks("stats")
 		->addPorts(80, 80)
 		->addPorts(443, 443)
 		->addVolumes("/var/run/docker.sock", "/tmp/docker.sock:ro")