diff options
Diffstat (limited to 'deployment/heat/onap-oom/k8s_vm_entrypoint.sh')
-rw-r--r-- | deployment/heat/onap-oom/k8s_vm_entrypoint.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh index 79d7db5cf..1ec659c0e 100644 --- a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh +++ b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh @@ -3,7 +3,9 @@ printenv mkdir -p /opt/config echo "__rancher_ip_addr__" > /opt/config/rancher_ip_addr.txt -echo `hostname -I` `hostname` >> /etc/hosts +HOST_IP=$(hostname -I) +echo $HOST_IP `hostname` >> /etc/hosts + mkdir -p /etc/docker if [ ! -z "__docker_proxy__" ]; then cat > /etc/docker/daemon.json <<EOF @@ -41,5 +43,6 @@ while [ ! -e /dockerdata-nfs/rancher_agent_cmd.sh ]; do mount /dockerdata-nfs sleep 5 done -source /dockerdata-nfs/rancher_agent_cmd.sh - +cp /dockerdata-nfs/rancher_agent_cmd.sh . +sed -i "s/docker run/docker run -e CATTLE_AGENT_IP=${HOST_IP}/g" rancher_agent_cmd.sh +source rancher_agent_cmd.sh |