Booting an AMI

From Federal Burro of Information
Revision as of 23:40, 11 December 2017 by David (talk | contribs) (Created page with "== Ordering == I know nothing == First boot == before or after networking ? == Setting hostname == === Cloud-init === grep -i hostname /usr/lib/python2.7/site-packages/...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Ordering

I know nothing

First boot

before or after networking ?


Setting hostname

Cloud-init

grep -i hostname /usr/lib/python2.7/site-packages/cloudinit/sources/DataSourceEc2.py

nothing

/usr/lib/python2.7/site-packages/cloudinit/sources/__init__.py

ha ha!

def get_hostname(self, fqdn=False, resolve_ip=False):
 if not self.metadata or 'local-hostname' not in self.metadata:
  hostname = util.get_hostname()
  fqdn = util.get_fqdn_from_hosts(hostname)

... /usr/lib/python2.7/site-packages/cloudinit/util.py

def get_hostname():
    print "In cloudinit util, get_hostname"
    hostname = socket.gethostname()
    print "Hostname is %'.format(hostname)
    return hostname