Updated Branches:
  refs/heads/3.0.0-incubating 8df789f3e -> efb16d758

Corrected /etc/hosts file configuration


Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/efb16d75
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/efb16d75
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/efb16d75

Branch: refs/heads/3.0.0-incubating
Commit: efb16d75833b506e43291d888d02af4e7aeba59d
Parents: 8df789f
Author: Imesh Gunaratne <[email protected]>
Authored: Tue Oct 22 14:33:30 2013 +0530
Committer: Imesh Gunaratne <[email protected]>
Committed: Tue Oct 22 14:33:30 2013 +0530

----------------------------------------------------------------------
 tools/stratos-installer/conf/setup.conf | 21 +++++++++++----------
 tools/stratos-installer/setup.sh        | 18 ++++++++++--------
 2 files changed, 21 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/efb16d75/tools/stratos-installer/conf/setup.conf
----------------------------------------------------------------------
diff --git a/tools/stratos-installer/conf/setup.conf 
b/tools/stratos-installer/conf/setup.conf
index 4fa8519..3ab385f 100644
--- a/tools/stratos-installer/conf/setup.conf
+++ b/tools/stratos-installer/conf/setup.conf
@@ -49,7 +49,8 @@ export script_path=$setup_path/scripts
 
 # MB configuration
 # ----------------------------------------------------------------------------
-export mb_hostname=mb.$stratos_domain
+export mb_ip=$hostip # ip address of the message broker host
+export mb_hostname=mb.$stratos_domain # host name of the message broker
 export mb_listen_port="5677"
 
 
@@ -57,6 +58,8 @@ export mb_listen_port="5677"
 # ----------------------------------------------------------------------------
 export sc_path=$stratos_path/"apache-stratos-sc-$stratos_version"
 export sc_pack=$stratos_pack_path/"apache-stratos-sc-$stratos_version.zip"
+export sc_ip=$hostip # ip address of the stratos controller host
+export sc_hostname="$stratos_domain" # host name of the stratos controller
 
 export userstore_db_hostname="localhost"
 export userstore_db_schema="userstore"
@@ -73,11 +76,7 @@ export stratos_foundation_db_pass="<mysql-password>"
 export sc_https_port="9445"
 export sc_http_port="9765"
 export sc_port_offset=2
-export sc_hostname="$stratos_domain"
 export cassandra_port="9163"
-export sc_ip=$hostip
-export elb_ip="" # ip address of the load balancer host
-export agent_ip="" # ip address of the agent host
 export keypair_path="<keypair_path>"
 
 
@@ -85,8 +84,8 @@ export keypair_path="<keypair_path>"
 # ----------------------------------------------------------------------------
 export git_user="git"
 export email="git@$stratos_domain"
+export git_ip=$hostip 
 export git_hostname="$stratos_domain"
-export git_ip=$hostip
 
 
 # CC configuration
@@ -94,10 +93,10 @@ export git_ip=$hostip
 
 export cc_path=$stratos_path/"apache-stratos-cc-$stratos_version"
 export cc_pack=$stratos_pack_path/"apache-stratos-cc-$stratos_version.zip"
-
+export cc_ip=$hostip # ip address of the cloud controller host
+export cc_hostname="cc.$stratos_domain" # host name of the cloud controller
 export cc_https_port="9444"
 export cc_port_offset=1
-export cc_hostname="cc.$stratos_domain"
 export mb_cassandra_host="localhost"
 export mb_cassandra_port="9161"
 
@@ -107,7 +106,8 @@ export mb_cassandra_port="9161"
 
 export elb_path=$stratos_path/"apache-stratos-elb-$stratos_version"
 export elb_pack=$stratos_pack_path/"apache-stratos-elb-$stratos_version.zip"
-export elb_hostname="elb.$stratos_domain"
+export elb_ip=$hostip # ip address of the load balancer host
+export elb_hostname="elb.$stratos_domain" # host name of the load balancer
 export enable_autoscaler=true
 export enable_embedded_autoscaler=false
 export elb_port_offset=0
@@ -120,7 +120,8 @@ export elb_port="9443"
 export agent_path=$stratos_path/"apache-stratos-agent-$stratos_version"
 export 
agent_pack=$stratos_pack_path/"apache-stratos-agent-$stratos_version.zip"
 export agent_clustering_port="4025"
-export agent_hostname="agent.$stratos_domain"
+export agent_ip=$hostip # ip address of the agent host
+export agent_hostname="agent.$stratos_domain" # host name of the agent
 export agent_http_port="9767"
 export agent_https_port="9447"
 export agent_port_offset=4

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/efb16d75/tools/stratos-installer/setup.sh
----------------------------------------------------------------------
diff --git a/tools/stratos-installer/setup.sh b/tools/stratos-installer/setup.sh
index 4afafbc..78bdb20 100755
--- a/tools/stratos-installer/setup.sh
+++ b/tools/stratos-installer/setup.sh
@@ -616,14 +616,16 @@ fi
 
 echo 'Updating /etc/hosts file with domain names' 
 cp -f /etc/hosts hosts.tmp 
- 
-echo "$ip $DOMAIN # stratos domain" >> hosts.tmp 
-echo "$ip mb.$DOMAIN # message broker hostname" >> hosts.tmp 
-echo "$ip cc.$DOMAIN # cloud controller hostname" >> hosts.tmp 
-echo "$ip sc.$DOMAIN # stratos controller hostname" >> hosts.tmp 
-echo "$ip elb.$DOMAIN # elastic load balancer hostname" >> hosts.tmp 
-echo "$ip agent.$DOMAIN # agent hostname" >> hosts.tmp 
- 
+
+echo "" >> hosts.tmp 
+echo "# Apache Stratos" >> hosts.tmp 
+echo "$hostip $stratos_domain # stratos domain" >> hosts.tmp 
+echo "$mb_ip mb.$stratos_domain # message broker hostname" >> hosts.tmp 
+echo "$cc_ip cc.$stratos_domain # cloud controller hostname" >> hosts.tmp 
+echo "$sc_ip sc.$stratos_domain # stratos controller hostname" >> hosts.tmp 
+echo "$elb_ip elb.$stratos_domain # elastic load balancer hostname" >> 
hosts.tmp 
+echo "$agent_ip agent.$stratos_domain # agent hostname" >> hosts.tmp 
+
 mv -f ./hosts.tmp /etc/hosts
 
 # Starting the servers

Reply via email to