Skip to content

Commit 9e82bd8

Browse files
committed
Dynamic determination of Controller IP in common.sh and Cinder Endpoint IP in controller.sh. Fourth octets still static, though
1 parent 44a8df1 commit 9e82bd8

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Diff for: common.sh

100644100755
+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515

1616
export DEBIAN_FRONTEND=noninteractive
1717

18-
export CONTROLLER_HOST=172.16.0.200
18+
#export CONTROLLER_HOST=172.16.0.200
19+
#Dynamically determine first three octets if user specifies alternative IP ranges. Fourth octet still hardcoded
20+
export CONTROLLER_HOST=$(ifconfig eth1 | awk '/inet addr/ {split ($2,A,":"); print A[2]}' | sed 's/\.[0-9]*$/.200/')
1921
export GLANCE_HOST=${CONTROLLER_HOST}
2022
export MYSQL_HOST=${CONTROLLER_HOST}
2123
export KEYSTONE_ENDPOINT=${CONTROLLER_HOST}

Diff for: controller-gre.sh

100644100755
+3-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ keystone endpoint-create --region RegionOne --service_id $KEYSTONE_SERVICE_ID --
163163

164164
# Cinder Block Storage Service
165165
CINDER_SERVICE_ID=$(keystone service-list | awk '/\ volume\ / {print $2}')
166-
CINDER_ENDPOINT="172.16.0.211"
166+
#CINDER_ENDPOINT="172.16.0.211"
167+
#Dynamically determine first three octets if user specifies alternative IP ranges. Fourth octet still hardcoded
168+
CINDER_ENDPOINT=$(ifconfig eth1 | awk '/inet addr/ {split ($2,A,":"); print A[2]}' | sed 's/\.[0-9]*$/.211/')
167169
PUBLIC="http://$CINDER_ENDPOINT:8776/v1/%(tenant_id)s"
168170
ADMIN=$PUBLIC
169171
INTERNAL=$PUBLIC

Diff for: controller-vlan.sh

100644100755
+3-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ keystone endpoint-create --region RegionOne --service_id $KEYSTONE_SERVICE_ID --
159159

160160
# Cinder Block Storage Service
161161
CINDER_SERVICE_ID=$(keystone service-list | awk '/\ volume\ / {print $2}')
162-
CINDER_ENDPOINT="172.16.0.211"
162+
#CINDER_ENDPOINT="172.16.0.211"
163+
#Dynamically determine first three octets if user specifies alternative IP ranges. Fourth octet still hardcoded
164+
CINDER_ENDPOINT=$(ifconfig eth1 | awk '/inet addr/ {split ($2,A,":"); print A[2]}' | sed 's/\.[0-9]*$/.211/')
163165
PUBLIC="http://$CINDER_ENDPOINT:8776/v1/%(tenant_id)s"
164166
ADMIN=$PUBLIC
165167
INTERNAL=$PUBLIC

0 commit comments

Comments
 (0)