Update MY_IP to use curl and metadata instead of cut

Change-Id: I1b7149c330c797c0909d4be6b04e9ab52e875ea4
This commit is contained in:
ArchiFleKs 2017-01-24 16:35:04 +01:00
parent 9d93c5aca6
commit ac68cfc086
9 changed files with 10 additions and 18 deletions

View File

@ -21,8 +21,7 @@ write_files:
#!/bin/sh
. /etc/sysconfig/heat-params
myip=$(ip addr show eth0 |
awk '$1 == "inet" {print $2}' | cut -f1 -d/)
myip=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4)
DROP_IN_FILE=/etc/systemd/system/etcd2.service.d/20-configure-etcd.conf
mkdir -p $(dirname $DROP_IN_FILE)

View File

@ -23,8 +23,7 @@ write_files:
#!/bin/sh
. /etc/sysconfig/heat-params
myip=$(ip addr show eth0 |
awk '$1 == "inet" {print $2}' | cut -f1 -d/)
myip=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4)
until curl -sf "http://127.0.0.1:8080/healthz"
do

View File

@ -21,8 +21,7 @@ write_files:
#!/bin/sh
. /etc/sysconfig/heat-params
myip=$(ip addr show eth0 |
awk '$1 == "inet" {print $2}' | cut -f1 -d/)
myip=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4)
KUBE_CERTS_PATH=/etc/kubernetes/ssl
HOST_CERTS_PATH=/usr/share/ca-certificates

View File

@ -21,8 +21,8 @@ write_files:
#!/bin/sh
. /etc/sysconfig/heat-params
myip=$(ip addr show eth0 |
awk '$1 == "inet" {print $2}' | cut -f1 -d/)
myip=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4)
HOST_CERTS_PATH=/usr/share/ca-certificates

View File

@ -21,8 +21,7 @@ write_files:
#!/bin/sh
. /etc/sysconfig/heat-params
myip=$(ip addr show eth0 |
awk '$1 == "inet" {print $2}' | cut -f1 -d/)
myip=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4)
KUBE_CERTS_PATH=/etc/kubernetes/ssl
KUBE_CONFIG_PATH=/etc/kubernetes/config

View File

@ -21,8 +21,7 @@ write_files:
#!/bin/sh
. /etc/sysconfig/heat-params
myip=$(ip addr show eth0 |
awk '$1 == "inet" {print $2}' | cut -f1 -d/)
myip=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4)
CONF_FILE=/etc/systemd/system/kubelet.service
cat > $CONF_FILE <<EOF

View File

@ -21,8 +21,7 @@ write_files:
#!/bin/sh
. /etc/sysconfig/heat-params
myip=$(ip addr show eth0 |
awk '$1 == "inet" {print $2}' | cut -f1 -d/)
myip=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4)
KUBE_CERTS_PATH=/etc/kubernetes/ssl
TLS_CERT_FILE=${KUBE_CERTS_PATH}/worker.pem

View File

@ -25,8 +25,7 @@ write_files:
exit 0
fi
myip=$(ip addr show eth0 |
awk '$1 == "inet" {print $2}' | cut -f1 -d/)
myip=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4)
ETCD_SERVER_IP=${ETCD_SERVER_IP:-127.0.0.1}
CERT_DIR=/etc/kubernetes/ssl

View File

@ -25,8 +25,7 @@ write_files:
exit 0
fi
myip=$(ip addr show eth0 |
awk '$1 == "inet" {print $2}' | cut -f1 -d/)
myip=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4)
ETCD_SERVER_IP=${ETCD_SERVER_IP:-127.0.0.1}
CERT_DIR=/etc/kubernetes/ssl