Skip to content

Commit

Permalink
Merge branch 'master' into migration
Browse files Browse the repository at this point in the history
  • Loading branch information
wenwu449 committed May 14, 2017
2 parents 87c56c3 + 253dd41 commit e64b446
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 32 deletions.
3 changes: 2 additions & 1 deletion examples/dcos-versions/dcos1.7.3.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"apiVersion": "vlabs",
"properties": {
"orchestratorProfile": {
"orchestratorType": "DCOS173"
"orchestratorType": "DCOS",
"orchestratorVersion": "1.7.3"
},
"masterProfile": {
"count": 1,
Expand Down
3 changes: 2 additions & 1 deletion examples/dcos-versions/dcos1.8.4.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"apiVersion": "vlabs",
"properties": {
"orchestratorProfile": {
"orchestratorType": "DCOS184"
"orchestratorType": "DCOS",
"orchestratorVersion": "1.8.4"
},
"masterProfile": {
"count": 3,
Expand Down
3 changes: 2 additions & 1 deletion examples/dcos-versions/dcos1.8.8.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"apiVersion": "vlabs",
"properties": {
"orchestratorProfile": {
"orchestratorType": "DCOS188"
"orchestratorType": "DCOS",
"orchestratorVersion": "1.8.8"
},
"masterProfile": {
"count": 3,
Expand Down
3 changes: 2 additions & 1 deletion examples/dcos-versions/dcos1.9.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"apiVersion": "vlabs",
"properties": {
"orchestratorProfile": {
"orchestratorType": "DCOS190"
"orchestratorType": "DCOS",
"orchestratorVersion": "1.9.0"
},
"masterProfile": {
"count": 3,
Expand Down
4 changes: 2 additions & 2 deletions examples/scale-up/kubernetes_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -881,9 +881,9 @@
"type": "string"
},
"targetEnvironment": {
"defaultValue": "AzureCloud",
"defaultValue": "AzurePublicCloud",
"metadata": {
"description": "The azure deploy environment. Currently support: AzureCloud, AzureChinaCloud"
"description": "The azure deploy environment. Currently support: AzurePublicCloud, AzureChinaCloud"
},
"type": "string"
}
Expand Down
4 changes: 2 additions & 2 deletions examples/scale-up/kubernetes_update_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -881,9 +881,9 @@
"type": "string"
},
"targetEnvironment": {
"defaultValue": "AzureCloud",
"defaultValue": "AzurePublicCloud",
"metadata": {
"description": "The azure deploy environment. Currently support: AzureCloud, AzureChinaCloud"
"description": "The azure deploy environment. Currently support: AzurePublicCloud, AzureChinaCloud"
},
"type": "string"
}
Expand Down
33 changes: 14 additions & 19 deletions parts/configure-swarm-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,6 @@ echo "AZUREUSER: $AZUREUSER"

ensureAzureNetwork()
{
# ensure the host name is resolvable
hostResolveHealthy=1
for i in {1..120}; do
host $VMNAME
if [ $? -eq 0 ]
then
# hostname has been found continue
hostResolveHealthy=0
echo "the host name resolves"
break
fi
sleep 1
done
if [ $hostResolveHealthy -ne 0 ]
then
echo "host name does not resolve, aborting install"
exit 1
fi

# ensure the network works
networkHealthy=1
for i in {1..12}; do
Expand Down Expand Up @@ -88,6 +69,20 @@ ensureAzureNetwork()
fi
sleep 1
done
# attempt to fix hostname, in case dns is not resolving Azure IPs (but can resolve public ips)
if [ $networkHealthy -ne 0 ]
then
HOSTNAME=`hostname`
HOSTADDR=`ip address show dev eth0 | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*'`
echo $HOSTADDR $HOSTNAME >> /etc/hosts
hostname -i
if [ $? -eq 0 ]
then
# hostname has been found continue
networkHealthy=0
echo "the network is healthy by updating /etc/hosts"
fi
fi
if [ $networkHealthy -ne 0 ]
then
echo "the network is not healthy, cannot resolve ip address, aborting install"
Expand Down
14 changes: 14 additions & 0 deletions parts/configure-swarmmode-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,20 @@ ensureAzureNetwork()
fi
sleep 1
done
# attempt to fix hostname, in case dns is not resolving Azure IPs (but can resolve public ips)
if [ $networkHealthy -ne 0 ]
then
HOSTNAME=`hostname`
HOSTADDR=`ip address show dev eth0 | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*'`
echo $HOSTADDR $HOSTNAME >> /etc/hosts
hostname -i
if [ $? -eq 0 ]
then
# hostname has been found continue
networkHealthy=0
echo "the network is healthy by updating /etc/hosts"
fi
fi
if [ $networkHealthy -ne 0 ]
then
echo "the network is not healthy, cannot resolve ip address, aborting install"
Expand Down
4 changes: 2 additions & 2 deletions parts/masterparams.t
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
"type": "string"
},
"targetEnvironment": {
"defaultValue": "AzureCloud",
"defaultValue": "AzurePublicCloud",
"metadata": {
"description": "The azure deploy environment. Currently support: AzureCloud, AzureChinaCloud"
"description": "The azure deploy environment. Currently support: AzurePublicCloud, AzureChinaCloud"
},
"type": "string"
},
Expand Down
6 changes: 3 additions & 3 deletions pkg/acsengine/templates.go

Large diffs are not rendered by default.

0 comments on commit e64b446

Please sign in to comment.