Advertisement
Guest User

eucalyptus-ipaddr.conf - jonata

a guest
May 24th, 2010
320
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None
  1. # This file should be sourced by scripts that need access to
  2. # the IP address of the cloud controller, such that the (albeit ugly)
  3. # logic is in a single place, and consistent.
  4.  
  5. default_route=$(ip route show to exact 0/0)
  6. default_interface=$(echo $default_route | sed -e 's/^.*dev \([^ ]*\).*$/\1/')
  7. addr_withprefix=$(ip addr show label $default_interface scope global | awk '$1 == "inet" { print $2 }')
  8. addr=${addr_withprefix%%/*}
  9.  
  10.  
  11. # In the default UEC, all of these components live on the same system.
  12. #
  13. # It is possible, however, to install each of (cloud, cc, walrus, sc, cloud)
  14. # on separate hosts. The admin must ensure that the public key of
  15. # eucalyptus@cloud is installed on each of the systems to be registered.
  16. #
  17. # This sourcable file can be used to statically configure these IPs, or use
  18. # logic to discover the IPs of these services.
  19. #
  20. # Note that CC_IP_ADDR and SC_IP_ADDR can be a quoted, whitespace separated
  21. # list of IP addresses.
  22.  
  23. CC_IP_ADDR="192.168.1.1"
  24. WALRUS_IP_ADDR="$addr"
  25. SC_IP_ADDR="192.168.1.1"
  26. CLOUD_IP_ADDR="$addr"
Advertisement
RAW Paste Data Copied
Advertisement